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.",
"id" => "action-hash",
"code" => function() {
/*
* ██ ██ █████ ███████ ██ ██
* ██ ██ ██ ██ ██ ██ ██
* ███████ ███████ ███████ ███████
* ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ███████ ██ ██
*/
add_action("hash", function() {
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.",
"id" => "action-protect",
"code" => function() {
/*
* ██████ ██████ ██████ ████████ ███████ ██████ ████████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██████ ██ ██ ██ █████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██████ ██ ███████ ██████ ██
*/
add_action("protect", function() {
global $env, $pageindex, $paths, $settings;

View File

@ -8,6 +8,13 @@ register_module([
"code" => function() {
global $settings;
/*
* ██████ █████ ██ ██
* ██ ██ ██ ██ ██ ██
* ██████ ███████ ██ ██
* ██ ██ ██ ██ ██ ███ ██
* ██ ██ ██ ██ ███ ███
*/
add_action("raw", function() {
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.",
"id" => "feature-search",
"code" => function() {
/*
* ██ ███ ██ ██████ ███████ ██ ██
* ██ ████ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ █████ ███
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ████ ██████ ███████ ██ ██
*/
add_action("index", function() {
global $settings, $env;
@ -23,10 +31,30 @@ register_module([
var_dump($index);
});
/*
* ██ ███ ██ ██ ██ ██ ███ ██ ██████ ███████ ██ ██
* ██ ████ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ ███ █████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ████ ████ ██ ██ ████ ██████ ███████ ██ ██
*
* ██████ ███████ ██████ ██ ██ ██ ██ ██████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ █████ ██████ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ███████ ██████ ██████ ██ ███████ ██████
*/
add_action("invindex-rebuild", function() {
search::rebuild_invindex();
});
/*
* ███████ ███████ █████ ██████ ██████ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ █████ ███████ ██████ ██ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ███████ ██ ██ ██ ██ ██████ ██ ██
*/
add_action("search", function() {
global $settings, $env, $pageindex, $paths;

View File

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

View File

@ -6,6 +6,14 @@ register_module([
"description" => "Adds the credits page. You *must* have this module :D",
"id" => "page-credits",
"code" => function() {
/*
* ██████ ██████ ███████ ██████ ██ ████████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██████ █████ ██ ██ ██ ██ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██ ███████ ██████ ██ ██ ███████
*/
add_action("credits", function() {
global $settings, $version, $pageindex, $modules;

View File

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

View File

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

View File

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

View File

@ -8,6 +8,13 @@ register_module([
"code" => function() {
global $settings;
/*
* ██ ██ ███████ ████████
* ██ ██ ██ ██
* ██ ██ ███████ ██
* ██ ██ ██ ██
* ███████ ██ ███████ ██
*/
add_action("list", function() {
global $pageindex, $settings;
@ -21,6 +28,13 @@ register_module([
exit(page_renderer::render_main("$title - $settings->sitename", $content));
});
/*
* ██ ██ ███████ ████████ ████████ █████ ██████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ███████ ██ █████ ██ ███████ ██ ███ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██ ███████ ██ ██ ██ ██ ██████ ███████
*/
add_action("list-tags", function() {
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.",
"id" => "page-logout",
"code" => function() {
/*
* ██ ██████ ██████ ██████ ██ ██ ████████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ███ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██████ ██████ ██████ ██████ ██
*/
add_action("logout", function() {
global $env;
$env->is_logged_in = false;

View File

@ -8,6 +8,13 @@ register_module([
"code" => function() {
global $settings;
/*
* ███ ███ ██████ ██ ██ ███████
* ████ ████ ██ ██ ██ ██ ██
* ██ ████ ██ ██ ██ ██ ██ █████
* ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██████ ████ ███████
*/
add_action("move", function() {
global $pageindex, $settings, $env, $paths;
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.",
"id" => "page-update",
"code" => function() {
/*
* ██ ██ ██████ ██████ █████ ████████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██████ ██ ██ ███████ ██ █████
* ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██████ ██ ██ ██ ███████
*/
add_action("update", function() {
global $settings, $env;

View File

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

View File

@ -49,11 +49,13 @@ register_module([
}
]);
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////// Slimdown /////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// %slimdown% //
////////////////////////////////////////////////////////////////////////////////////////////
/***********************************************************************
* ███████ ██ ██ ███ ███ ██████ ██████ ██ ██ ███ ██ *
* ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ████ ██ *
* ███████ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ *
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ *
* ███████ ███████ ██ ██ ██ ██████ ██████ ███ ███ ██ ████ *
***********************************************************************/
/**
* Slimdown - A very basic regex-based Markdown parser. Supports the
* 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
* License: MIT
*/
/**
* Modified by Starbeamrainbowlabs (starbeamrainbowlabs)
*
* Changed bold to use single asterisks
* Changed italics to use single underscores
* 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
* Modified by Starbeamrainbowlabs
*
* - Stripped all existing rules
* - Added a few extensions that parsedown doesn't deal with
*/
class Parsedown_Slimdown_Extensions {
public static $rules = array (
@ -79,7 +74,13 @@ class Parsedown_Slimdown_Extensions {
}
#
/*
* ██████ █████ ██████ ███████ ███████ ██████ ██████ ██ ██ ███ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██
* ██████ ███████ ██████ ███████ █████ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ███████ ███████ ██████ ██████ ███ ███ ██ ████
*/
#
# Parsedown
# http://parsedown.org
@ -89,9 +90,8 @@ class Parsedown_Slimdown_Extensions {
#
# For the full license information, view the LICENSE file that was distributed
# with this source code.
#
#
#
#
class Parsedown
{
# ~