mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
page-credits: add page-sitemap support
This commit is contained in:
parent
d7128eed0e
commit
7b3f06d539
1 changed files with 11 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
register_module([
|
||||
"name" => "Credits",
|
||||
"version" => "0.7.12",
|
||||
"version" => "0.8",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds the credits page. You *must* have this module :D",
|
||||
"id" => "page-credits",
|
||||
|
@ -25,7 +25,7 @@ register_module([
|
|||
* ██████ ██ ██ ███████ ██████ ██ ██ ███████
|
||||
*/
|
||||
add_action("credits", function() {
|
||||
global $settings, $version, $pageindex, $modules;
|
||||
global $settings, $version, $env, $pageindex, $modules;
|
||||
|
||||
$credits = [
|
||||
"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} 🔧 Edit master settings</a>, <a href='?action=user-table'>{$settings->admindisplaychar} 👥 Edit user table</a>, <a href='?action=export'>🏛 Export as zip - Check for permission first</a>)</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 modules:</th><td>" . count($modules) . "</td></tr>
|
||||
</table>
|
||||
<h2>Installed Modules</h2>
|
||||
<tr><th>Number of modules:</th><td>" . count($modules) . "</td></tr>\n";
|
||||
if(module_exists("page-sitemap")) {
|
||||
$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";
|
||||
exit(page_renderer::render_main($title, $content));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue