1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

page-credits: add page-sitemap support

This commit is contained in:
Starbeamrainbowlabs 2020-10-26 18:26:52 +00:00
parent d7128eed0e
commit 7b3f06d539
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -5,7 +5,7 @@
register_module([ register_module([
"name" => "Credits", "name" => "Credits",
"version" => "0.7.12", "version" => "0.8",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds the credits page. You *must* have this module :D", "description" => "Adds the credits page. You *must* have this module :D",
"id" => "page-credits", "id" => "page-credits",
@ -25,7 +25,7 @@ register_module([
* ██████ ██ ██ ███████ ██████ ██ ██ ███████ * ██████ ██ ██ ███████ ██████ ██ ██ ███████
*/ */
add_action("credits", function() { add_action("credits", function() {
global $settings, $version, $pageindex, $modules; global $settings, $version, $env, $pageindex, $modules;
$credits = [ $credits = [
"Code" => [ "Code" => [
@ -161,9 +161,15 @@ register_module([
<tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>{$settings->admindisplaychar}Update</a>, <a href='?action=configure'>{$settings->admindisplaychar} &#x1f527; Edit master settings</a>, <a href='?action=user-table'>{$settings->admindisplaychar} &#x1f465; Edit user table</a>, <a href='?action=export'>&#x1f3db; Export as zip - Check for permission first</a>)</td></tr> <tr><th>Site name:</th><td>$settings->sitename (<a href='?action=update'>{$settings->admindisplaychar}Update</a>, <a href='?action=configure'>{$settings->admindisplaychar} &#x1f527; Edit master settings</a>, <a href='?action=user-table'>{$settings->admindisplaychar} &#x1f465; Edit user table</a>, <a href='?action=export'>&#x1f3db; Export as zip - Check for permission first</a>)</td></tr>
<tr><th>Pepperminty Wiki version:</th><td>$version</td></tr> <tr><th>Pepperminty Wiki version:</th><td>$version</td></tr>
<tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr> <tr><th>Number of pages:</th><td>" . count(get_object_vars($pageindex)) . "</td></tr>
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr> <tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>\n";
</table> if(module_exists("page-sitemap")) {
<h2>Installed Modules</h2> $content .= "<tr><th>Sitemap:</th><td><a href='?action=sitemap'>View</a>";
if($env->is_admin)
$content .= " | Don't forget to add <code>Sitemap: http://example.com/path/to/index.php?action=sitemap</code> to your <code>robots.txt</code>";
$content .= "</td></tr>";
}
$content .= "\t</table>
<h2>Installed Modules</h2>
$modules_html"; $modules_html";
exit(page_renderer::render_main($title, $content)); exit(page_renderer::render_main($title, $content));
}); });