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

Cleaned up comments and added more title texts.

This commit is contained in:
Starbeamrainbowlabs 2015-12-26 12:55:19 +00:00
parent e1f5283785
commit 801369387d
16 changed files with 158 additions and 18 deletions

View file

@ -6,6 +6,15 @@ register_module([
"description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.", "description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
"id" => "action-hash", "id" => "action-hash",
"code" => function() { "code" => function() {
/*
* ██ ██ █████ ███████ ██ ██
* ██ ██ ██ ██ ██ ██ ██
* ███████ ███████ ███████ ███████
* ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ███████ ██ ██
*/
add_action("hash", function() { add_action("hash", function() {
global $settings; global $settings;

View file

@ -6,6 +6,14 @@ register_module([
"description" => "Exposes Pepperminty Wiki's new page protection mechanism and makes the protect button in the 'More...' menu on the top bar work.", "description" => "Exposes Pepperminty Wiki's new page protection mechanism and makes the protect button in the 'More...' menu on the top bar work.",
"id" => "action-protect", "id" => "action-protect",
"code" => function() { "code" => function() {
/*
* ██████ ██████ ██████ ████████ ███████ ██████ ████████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██████ ██ ██ ██ █████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██████ ██ ███████ ██████ ██
*/
add_action("protect", function() { add_action("protect", function() {
global $env, $pageindex, $paths, $settings; global $env, $pageindex, $paths, $settings;

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ██████ █████ ██ ██
* ██ ██ ██ ██ ██ ██
* ██████ ███████ ██ ██
* ██ ██ ██ ██ ██ ███ ██
* ██ ██ ██ ██ ███ ███
*/
add_action("raw", function() { add_action("raw", function() {
global $env; global $env;

View file

@ -6,6 +6,14 @@ register_module([
"description" => "Adds proper search functionality to Pepperminty Wiki. Note that this module, at the moment, just contains test code while I figure out how best to write a search engine.", "description" => "Adds proper search functionality to Pepperminty Wiki. Note that this module, at the moment, just contains test code while I figure out how best to write a search engine.",
"id" => "feature-search", "id" => "feature-search",
"code" => function() { "code" => function() {
/*
* ██ ███ ██ ██████ ███████ ██ ██
* ██ ████ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ █████ ███
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ████ ██████ ███████ ██ ██
*/
add_action("index", function() { add_action("index", function() {
global $settings, $env; global $settings, $env;
@ -23,10 +31,30 @@ register_module([
var_dump($index); var_dump($index);
}); });
/*
* ██ ███ ██ ██ ██ ██ ███ ██ ██████ ███████ ██ ██
* ██ ████ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ ███ █████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ████ ████ ██ ██ ████ ██████ ███████ ██ ██
*
* ██████ ███████ ██████ ██ ██ ██ ██ ██████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ █████ ██████ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ███████ ██████ ██████ ██ ███████ ██████
*/
add_action("invindex-rebuild", function() { add_action("invindex-rebuild", function() {
search::rebuild_invindex(); search::rebuild_invindex();
}); });
/*
* ███████ ███████ █████ ██████ ██████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ █████ ███████ ██████ ██ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ███████ ██ ██ ██ ██ ██████ ██ ██
*/
add_action("search", function() { add_action("search", function() {
global $settings, $env, $pageindex, $paths; global $settings, $env, $pageindex, $paths;

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ██ ██ ██████ ██ ██████ █████ ██████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██████ ██ ██ ██ ███████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ███████ ██████ ██ ██ ██████
*/
add_action("upload", function() { add_action("upload", function() {
global $settings, $env, $pageindex, $paths; global $settings, $env, $pageindex, $paths;
@ -140,6 +147,14 @@ register_module([
break; break;
} }
}); });
/*
* ██████ ██████ ███████ ██ ██ ██ ███████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██████ █████ ██ ██ ██ █████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██
* ██ ██ ██ ███████ ████ ██ ███████ ███ ███
*/
add_action("preview", function() { add_action("preview", function() {
global $settings, $env, $pageindex; global $settings, $env, $pageindex;

View file

@ -6,6 +6,14 @@ register_module([
"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",
"code" => function() { "code" => function() {
/*
* ██████ ██████ ███████ ██████ ██ ████████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██████ █████ ██ ██ ██ ██ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██ ███████ ██████ ██ ██ ███████
*/
add_action("credits", function() { add_action("credits", function() {
global $settings, $version, $pageindex, $modules; global $settings, $version, $pageindex, $modules;

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ██████ ███████ ██ ███████ ████████ ███████
* ██ ██ ██ ██ ██ ██ ██
* ██ ██ █████ ██ █████ ██ █████
* ██ ██ ██ ██ ██ ██ ██
* ██████ ███████ ███████ ███████ ██ ███████
*/
add_action("delete", function() { add_action("delete", function() {
global $pageindex, $settings, $env, $paths, $modules; global $pageindex, $settings, $env, $paths, $modules;
if(!$settings->editing) if(!$settings->editing)

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ███████ ██ ██ ██████ ██████ ██████ ████████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* █████ ███ ██████ ██ ██ ██████ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██ ██ ██ ██████ ██ ██ ██
*/
add_action("export", function() { add_action("export", function() {
global $settings, $pageindex, $env; global $settings, $pageindex, $env;

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ██ ██ ███████ ██ ██████
* ██ ██ ██ ██ ██ ██
* ███████ █████ ██ ██████
* ██ ██ ██ ██ ██
* ██ ██ ███████ ███████ ██
*/
add_action("help", function() { add_action("help", function() {
global $settings, $version, $help_sections; global $settings, $version, $help_sections;

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ██ ██ ███████ ████████
* ██ ██ ██ ██
* ██ ██ ███████ ██
* ██ ██ ██ ██
* ███████ ██ ███████ ██
*/
add_action("list", function() { add_action("list", function() {
global $pageindex, $settings; global $pageindex, $settings;
@ -21,6 +28,13 @@ register_module([
exit(page_renderer::render_main("$title - $settings->sitename", $content)); exit(page_renderer::render_main("$title - $settings->sitename", $content));
}); });
/*
* ██ ██ ███████ ████████ ████████ █████ ██████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ███████ ██ █████ ██ ███████ ██ ███ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██ ███████ ██ ██ ██ ██ ██████ ███████
*/
add_action("list-tags", function() { add_action("list-tags", function() {
global $pageindex, $settings; global $pageindex, $settings;

View file

@ -6,6 +6,13 @@ register_module([
"description" => "Adds an action to let users user out. For security reasons it is wise to add this module since logging in automatically opens a session that is valid for 30 days.", "description" => "Adds an action to let users user out. For security reasons it is wise to add this module since logging in automatically opens a session that is valid for 30 days.",
"id" => "page-logout", "id" => "page-logout",
"code" => function() { "code" => function() {
/*
* ██ ██████ ██████ ██████ ██ ██ ████████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ███ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██████ ██████ ██████ ██████ ██
*/
add_action("logout", function() { add_action("logout", function() {
global $env; global $env;
$env->is_logged_in = false; $env->is_logged_in = false;

View file

@ -8,6 +8,13 @@ register_module([
"code" => function() { "code" => function() {
global $settings; global $settings;
/*
* ███ ███ ██████ ██ ██ ███████
* ████ ████ ██ ██ ██ ██ ██
* ██ ████ ██ ██ ██ ██ ██ █████
* ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██████ ████ ███████
*/
add_action("move", function() { add_action("move", function() {
global $pageindex, $settings, $env, $paths; global $pageindex, $settings, $env, $paths;
if(!$settings->editing) if(!$settings->editing)

View file

@ -6,6 +6,13 @@ register_module([
"description" => "Adds an update page that downloads the latest stable version of Pepperminty Wiki. This module is currently outdated as it doesn't save your module preferences.", "description" => "Adds an update page that downloads the latest stable version of Pepperminty Wiki. This module is currently outdated as it doesn't save your module preferences.",
"id" => "page-update", "id" => "page-update",
"code" => function() { "code" => function() {
/*
* ██ ██ ██████ ██████ █████ ████████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██████ ██ ██ ███████ ██ █████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██████ ██ ██ ██ ███████
*/
add_action("update", function() { add_action("update", function() {
global $settings, $env; global $settings, $env;

View file

@ -6,6 +6,13 @@ register_module([
"description" => "Allows you to view pages. You reallyshould include this one.", "description" => "Allows you to view pages. You reallyshould include this one.",
"id" => "page-view", "id" => "page-view",
"code" => function() { "code" => function() {
/*
* ██ ██ ██ ███████ ██ ██
* ██ ██ ██ ██ ██ ██
* ██ ██ ██ █████ ██ ██
* ██ ██ ██ ██ ██ ███ ██
* ████ ██ ███████ ███ ███
*/
add_action("view", function() { add_action("view", function() {
global $pageindex, $settings, $env; global $pageindex, $settings, $env;

View file

@ -49,11 +49,13 @@ register_module([
} }
]); ]);
//////////////////////////////////////////////////////////////////////////////////////////// /***********************************************************************
//////////////////////////////////////////////////////////////////////////////////////////// * ███████ ██ ██ ███ ███ ██████ ██████ ██ ██ ███ ██ *
///////////////////////////////////////// Slimdown ///////////////////////////////////////// * ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ████ ██ *
////////////////////////////////////////////////////////////////////////////// %slimdown% // * ███████ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ *
//////////////////////////////////////////////////////////////////////////////////////////// * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ *
* ███████ ███████ ██ ██ ██ ██████ ██████ ███ ███ ██ ████ *
***********************************************************************/
/** /**
* Slimdown - A very basic regex-based Markdown parser. Supports the * Slimdown - A very basic regex-based Markdown parser. Supports the
* following elements (and can be extended via Slimdown::add_rule()): * following elements (and can be extended via Slimdown::add_rule()):

View file

@ -38,16 +38,11 @@ register_module([
* Website: https://gist.github.com/jbroadway/2836900 * Website: https://gist.github.com/jbroadway/2836900
* License: MIT * License: MIT
*/ */
/** /**
* Modified by Starbeamrainbowlabs (starbeamrainbowlabs) * Modified by Starbeamrainbowlabs
* *
* Changed bold to use single asterisks * - Stripped all existing rules
* Changed italics to use single underscores * - Added a few extensions that parsedown doesn't deal with
* Added one to add the heading levels (no <h1> tags allowed)
* Added wiki style internal link parsing
* Added wiki style internal link parsing with display text
* Added image support
*/ */
class Parsedown_Slimdown_Extensions { class Parsedown_Slimdown_Extensions {
public static $rules = array ( public static $rules = array (
@ -79,7 +74,13 @@ class Parsedown_Slimdown_Extensions {
} }
# /*
* ██████ █████ ██████ ███████ ███████ ██████ ██████ ██ ██ ███ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██
* ██████ ███████ ██████ ███████ █████ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ███████ ███████ ██████ ██████ ███ ███ ██ ████
*/
# #
# Parsedown # Parsedown
# http://parsedown.org # http://parsedown.org
@ -91,7 +92,6 @@ class Parsedown_Slimdown_Extensions {
# with this source code. # with this source code.
# #
# #
class Parsedown class Parsedown
{ {
# ~ # ~