"Help page", "version" => "0.9.2", "author" => "Starbeamrainbowlabs", "description" => "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.", "id" => "page-help", "code" => function() { global $settings; /* * ██ ██ ███████ ██ ██████ * ██ ██ ██ ██ ██ ██ * ███████ █████ ██ ██████ * ██ ██ ██ ██ ██ * ██ ██ ███████ ███████ ██ */ add_action("help", function() { global $paths, $settings, $version, $help_sections, $actions; // Sort the help sections by key ksort($help_sections, SORT_NATURAL); if(isset($_GET["dev"]) and $_GET["dev"] == "yes") { $title = "Developers Help - $settings->sitename"; $content = "
$settings->sitename runs on Pepperminty Wiki, an entire wiki packed into a single file. This page contains some information that developers may find useful.
A full guide to developing a Pepperminty Wiki module can be found on GitHub.
The following help sections are currently registered:
Index | Title | Length |
---|---|---|
$index | " . $section["title"] . " | " . human_filesize($sectionLength) . " |
Total: | " . human_filesize($totalSize) . " |
The following actions are currently registered:
\n"; $content .= "" . implode(", ", array_keys(get_object_vars($actions))) . "
"; $content .= "$settings->sitename's root directory is " . (!is_writeable(__DIR__) ? "not " : "") . "writeable.
"; $content .= "The page index is currently " . human_filesize(filesize($paths->pageindex)) . " in size.
"; } else { $title = "Help - $settings->sitename"; $content = "Welcome to $settings->sitename!
$settings->sitename is powered by Pepperminty Wiki, a complete wiki in a box you can drop into your server and expect it to just work.
"; // Todo Insert a table of contents here? foreach($help_sections as $index => $section) { // Todo add a button that you can click to get a permanent link // to this section. $content .= "All the navigation links can be found on the top bar, along with a search box (if your site administrator has enabled it). There is also a "More..." menu in the top right that contains some additional links that you may fine useful.
This page, along with the credits page, can be found on the bar at the bottom of every page.
"); add_help_section("999-extra", "Extra Information", "You can find out whch version of Pepperminty Wiki $settings->sitename is using by visiting the credits page.
Information for developers can be found on this page.
"); } ]); ?>