mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Updated the help page to add the new syntax
This commit is contained in:
parent
a0cc71aad0
commit
639b208f80
3 changed files with 33 additions and 7 deletions
19
index.php
19
index.php
|
@ -509,6 +509,7 @@ class Slimdown {
|
|||
'/\r\n/' => "\n", // new line normalisation
|
||||
'/(#+)(.*)/' => 'self::header', // headers
|
||||
'/(\*)(.*?)\1/' => '<strong>\2</strong>', // bold
|
||||
'/(_)(.*?)\1/' => '<em>\2</em>', // emphasis
|
||||
|
||||
// todo test these
|
||||
'/!\[(.*)\]\(([^\s]+)\s(\d+.+)\s(left|right)\)/' => '<img src="\2" alt="\1" style="max-width: \3; float: \4;" />', // images with size
|
||||
|
@ -516,7 +517,6 @@ class Slimdown {
|
|||
'/!\[(.*)\]\((.*)\)/' => '<img src="\2" alt="\1" />', // basic images
|
||||
// todo end
|
||||
|
||||
'/(_)(.*?)\1/' => '<em>\2</em>', // emphasis
|
||||
'/\[\[([a-zA-Z0-9\_\- ]+)\|([a-zA-Z0-9\_\- ]+)\]\]/' => '<a href=\'index.php?page=\1\'>\2</a>', //internal links with display text
|
||||
'/\[\[([a-zA-Z0-9\_\- ]+)\]\]/' => '<a href=\'index.php?page=\1\'>\1</a>', //internal links
|
||||
'/\[([^\[]+)\]\(([^\)]+)\)/' => '<a href=\'\2\' target=\'_blank\'>\1</a>', // links
|
||||
|
@ -864,7 +864,7 @@ register_module([
|
|||
|
||||
register_module([
|
||||
"name" => "Help page",
|
||||
"version" => "0.5",
|
||||
"version" => "0.6",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds the help action. You really want this one.",
|
||||
"id" => "page-help",
|
||||
|
@ -885,20 +885,33 @@ register_module([
|
|||
<tr><th>Type This</th><th>To get this</th>
|
||||
<tr><td><code>_italics_</code></td><td><em>italics</em></td></tr>
|
||||
<tr><td><code>*bold*</code></td><td><strong>bold</strong></td></tr>
|
||||
<tr><td><code>~~Strikethrough~~</code></td><td><del>Strikethough</del></td></tr>
|
||||
<tr><td><code>`code`</code></td><td><code>code</code></td></tr>
|
||||
<tr><td><code># Heading</code></td><td><h2>Heading</h2></td></tr>
|
||||
<tr><td><code>## Sub Heading</code></td><td><h3>Sub Heading</h3></td></tr>
|
||||
<tr><td><code>[[Internal Link]]</code></td><td><a href='index.php?page=Internal Link'>Internal Link</a></td></tr>
|
||||
<tr><td><code>[[Display Text|Internal Link]]</code></td><td><a href='index.php?page=Internal Link'>Display Text</a></td></tr>
|
||||
<tr><td><code>[Display text](//google.com/)</code></td><td><a href='//google.com/'>Display Text</a></td></tr>
|
||||
<tr><td><code>~~Strikethrough~~</code></td><td><del>Strikethough</del></td></tr>
|
||||
<tr><td><code>> Blockquote<br />> Some text</code></td><td><blockquote> Blockquote<br />Some text</td></tr>
|
||||
<tr><td><code> - Apples<br /> * Oranges</code></td><td><ul><li>Apples</li><li>Oranges</li></ul></td></tr>
|
||||
<tr><td><code>1. This is<br />2. an ordered list</code></td><td><ol><li>This is</li><li>an ordered list</li></ol></td></tr>
|
||||
<tr><td><code>
|
||||
---
|
||||
</code></td><td><hr /></td></tr>
|
||||
<tr><tds><code> - One
|
||||
- Two
|
||||
- Three</code></td><td><ul><li>One</li><li>Two</li><li>Three</li></ul></td></tr>
|
||||
<tr><td><code>![Alt text](//starbeamrainbowlabs.com/favicon-small.png)</code></td><td><img src='//starbeamrainbowlabs.com/favicon-small.png' alt='Alt text' /></td></code>
|
||||
</table>
|
||||
|
||||
<p>In addition, the following extra syntax is supported for images:</p>
|
||||
|
||||
<pre><code>Size the image to at most 250 pixels wide:
|
||||
![Alt text](//starbeamrainbowlabs.com/favicon-small.png 250px)
|
||||
|
||||
Size the image to at most 120px wide and have it float at the right ahnd size of the page:
|
||||
![Alt text](//starbeamrainbowlabs.com/favicon-small.png 120px right)</code></pre>
|
||||
|
||||
<h2>Administrator Actions</h2>
|
||||
<p>By default, the <code>delete</code> and <code>move</code> actions are shown on the nav bar. These can be used by administrators to delete or move pages.</p>
|
||||
<p>The other thing admininistrators can do is update the wiki (provided they know the site's secret). This page can be found here: <a href='?action=update'>Update $settings->sitename</a>.</p>
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
},
|
||||
{
|
||||
"name": "Help page",
|
||||
"version": "0.5",
|
||||
"version": "0.6",
|
||||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the help action. You really want this one.",
|
||||
"id": "page-help",
|
||||
"lastupdate": 1432497592
|
||||
"lastupdate": 1432661040
|
||||
},
|
||||
{
|
||||
"name": "Page list",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
register_module([
|
||||
"name" => "Help page",
|
||||
"version" => "0.5",
|
||||
"version" => "0.6",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Adds the help action. You really want this one.",
|
||||
"id" => "page-help",
|
||||
|
@ -22,20 +22,33 @@ register_module([
|
|||
<tr><th>Type This</th><th>To get this</th>
|
||||
<tr><td><code>_italics_</code></td><td><em>italics</em></td></tr>
|
||||
<tr><td><code>*bold*</code></td><td><strong>bold</strong></td></tr>
|
||||
<tr><td><code>~~Strikethrough~~</code></td><td><del>Strikethough</del></td></tr>
|
||||
<tr><td><code>`code`</code></td><td><code>code</code></td></tr>
|
||||
<tr><td><code># Heading</code></td><td><h2>Heading</h2></td></tr>
|
||||
<tr><td><code>## Sub Heading</code></td><td><h3>Sub Heading</h3></td></tr>
|
||||
<tr><td><code>[[Internal Link]]</code></td><td><a href='index.php?page=Internal Link'>Internal Link</a></td></tr>
|
||||
<tr><td><code>[[Display Text|Internal Link]]</code></td><td><a href='index.php?page=Internal Link'>Display Text</a></td></tr>
|
||||
<tr><td><code>[Display text](//google.com/)</code></td><td><a href='//google.com/'>Display Text</a></td></tr>
|
||||
<tr><td><code>~~Strikethrough~~</code></td><td><del>Strikethough</del></td></tr>
|
||||
<tr><td><code>> Blockquote<br />> Some text</code></td><td><blockquote> Blockquote<br />Some text</td></tr>
|
||||
<tr><td><code> - Apples<br /> * Oranges</code></td><td><ul><li>Apples</li><li>Oranges</li></ul></td></tr>
|
||||
<tr><td><code>1. This is<br />2. an ordered list</code></td><td><ol><li>This is</li><li>an ordered list</li></ol></td></tr>
|
||||
<tr><td><code>
|
||||
---
|
||||
</code></td><td><hr /></td></tr>
|
||||
<tr><tds><code> - One
|
||||
- Two
|
||||
- Three</code></td><td><ul><li>One</li><li>Two</li><li>Three</li></ul></td></tr>
|
||||
<tr><td><code>![Alt text](//starbeamrainbowlabs.com/favicon-small.png)</code></td><td><img src='//starbeamrainbowlabs.com/favicon-small.png' alt='Alt text' /></td></code>
|
||||
</table>
|
||||
|
||||
<p>In addition, the following extra syntax is supported for images:</p>
|
||||
|
||||
<pre><code>Size the image to at most 250 pixels wide:
|
||||
![Alt text](//starbeamrainbowlabs.com/favicon-small.png 250px)
|
||||
|
||||
Size the image to at most 120px wide and have it float at the right ahnd size of the page:
|
||||
![Alt text](//starbeamrainbowlabs.com/favicon-small.png 120px right)</code></pre>
|
||||
|
||||
<h2>Administrator Actions</h2>
|
||||
<p>By default, the <code>delete</code> and <code>move</code> actions are shown on the nav bar. These can be used by administrators to delete or move pages.</p>
|
||||
<p>The other thing admininistrators can do is update the wiki (provided they know the site's secret). This page can be found here: <a href='?action=update'>Update $settings->sitename</a>.</p>
|
||||
|
|
Loading…
Reference in a new issue