mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Cleaned up comments and added more title texts.
This commit is contained in:
parent
e1f5283785
commit
801369387d
16 changed files with 158 additions and 18 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -8,6 +8,13 @@ register_module([
|
|||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
/*
|
||||
* ██████ █████ ██ ██
|
||||
* ██ ██ ██ ██ ██ ██
|
||||
* ██████ ███████ ██ █ ██
|
||||
* ██ ██ ██ ██ ██ ███ ██
|
||||
* ██ ██ ██ ██ ███ ███
|
||||
*/
|
||||
add_action("raw", function() {
|
||||
global $env;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -8,6 +8,13 @@ register_module([
|
|||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
/*
|
||||
* ██████ ███████ ██ ███████ ████████ ███████
|
||||
* ██ ██ ██ ██ ██ ██ ██
|
||||
* ██ ██ █████ ██ █████ ██ █████
|
||||
* ██ ██ ██ ██ ██ ██ ██
|
||||
* ██████ ███████ ███████ ███████ ██ ███████
|
||||
*/
|
||||
add_action("delete", function() {
|
||||
global $pageindex, $settings, $env, $paths, $modules;
|
||||
if(!$settings->editing)
|
||||
|
|
|
@ -8,6 +8,13 @@ register_module([
|
|||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
/*
|
||||
* ███████ ██ ██ ██████ ██████ ██████ ████████
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
* █████ ███ ██████ ██ ██ ██████ ██
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
* ███████ ██ ██ ██ ██████ ██ ██ ██
|
||||
*/
|
||||
add_action("export", function() {
|
||||
global $settings, $pageindex, $env;
|
||||
|
||||
|
|
|
@ -8,6 +8,13 @@ register_module([
|
|||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
/*
|
||||
* ██ ██ ███████ ██ ██████
|
||||
* ██ ██ ██ ██ ██ ██
|
||||
* ███████ █████ ██ ██████
|
||||
* ██ ██ ██ ██ ██
|
||||
* ██ ██ ███████ ███████ ██
|
||||
*/
|
||||
add_action("help", function() {
|
||||
global $settings, $version, $help_sections;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -8,6 +8,13 @@ register_module([
|
|||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
/*
|
||||
* ███ ███ ██████ ██ ██ ███████
|
||||
* ████ ████ ██ ██ ██ ██ ██
|
||||
* ██ ████ ██ ██ ██ ██ ██ █████
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██
|
||||
* ██ ██ ██████ ████ ███████
|
||||
*/
|
||||
add_action("move", function() {
|
||||
global $pageindex, $settings, $env, $paths;
|
||||
if(!$settings->editing)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()):
|
||||
|
|
|
@ -38,16 +38,11 @@ register_module([
|
|||
* Website: https://gist.github.com/jbroadway/2836900
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* Modified by Starbeamrainbowlabs (starbeamrainbowlabs)
|
||||
* Modified by 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
|
||||
* - 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
|
||||
|
@ -91,7 +92,6 @@ class Parsedown_Slimdown_Extensions {
|
|||
# with this source code.
|
||||
#
|
||||
#
|
||||
|
||||
class Parsedown
|
||||
{
|
||||
# ~
|
||||
|
|
Loading…
Reference in a new issue