Compare commits

...

3 commits

Author SHA1 Message Date
79257b3dc2 add example config and PageActions 2022-05-30 19:23:45 -04:00
c6f0808313
add citation needed markup
i should really stick this in another file... oh well
2022-02-12 13:56:50 -05:00
d23a632983
Update footnote2.php 2022-01-31 12:16:53 -05:00
3 changed files with 51 additions and 1 deletions

21
PageActions.example.txt Normal file
View file

@ -0,0 +1,21 @@
(:Summary:Contains the '[[PmWiki/AvailableActions|action]]' links (like Browse, Edit, History, etc.), placed at the top of the page, see [[PmWiki/site page actions]]:)
(:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :)
(:if name *-Talk:)
* [[{*$BaseName}|Page]]
(:else:)
* [[{*$BaseName}-Talk|Talk]]
(:ifend:)
* %item rel=nofollow class=browse accesskey='$[ak_view]'% [[{*$FullName} | $[View] ]]
* %item rel=nofollow class=edit accesskey='$[ak_edit]'% [[{*$FullName}?action=edit | $[Edit] ]]
* %item rel=nofollow class=diff accesskey='$[ak_history]'% [[{*$FullName}?action=diff | $[History] ]]
(:if auth upload:)
* %item rel=nofollow class=upload accesskey='$[ak_attach]'% [[{*$FullName}?action=upload | $[Attach] ]]
(:ifend:)
* %item rel=nofollow class=print accesskey='$[ak_print]'% [[{*$FullName}?action=print | $[Print] ]]
(:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:)
* %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]]
(:ifend:)
(:if enabled AuthPw:)
* %item rel=nofollow class=logout accesskey="$[ak_logout]"%'' [-[[{*$FullName}?action=logout | $[Logout] ]]-]''
(:ifend:)

28
config.example.php Normal file
View file

@ -0,0 +1,28 @@
<?php
$WikiTitle = "example";
$DefaultPasswords['admin'] = pmcrypt('hackme');
$EnableUpload = 1;
$DefaultPasswords['upload'] = pmcrypt('hackme');
$ScriptUrl = 'https://example.com/wiki/';
$Skin = "pmwiki-plain-responsive";
$DefaultGroup = 'Example';
include_once("scripts/xlpage-utf-8.php");
$EnableBlocklist = 10;
if ($action == 'rss') include_once("scripts/feeds.php");
if ($action == 'atom') include_once("scripts/feeds.php");
$BaseNamePatterns['/(-Talk|-Users)$/i'] = '';
$PmTOC['Enable'] = 1;
include_once("$FarmD/cookbook/footnote2.php");
include_once("$FarmD/scripts/refcount.php");

View file

@ -59,6 +59,7 @@ SDV($FootnoteBacklinkCharacter, '&uArr;');
Markup("[^",'<split','/\[\^(.*?)\^\]/s',"Footnote");
Markup("checkbox", "inline", "/\[ \]/", "<input type=checkbox class=checkbox disabled>");
Markup("checkedbox", "inline", "/\[x\]/", "<input type=checkbox class=checkbox disabled checked>");
Markup("citationneeded", "inline", "/\{\{(cn|[Cc]itation needed)(\|(reason|date)=.+?)?\}\}/", "<sup>[<em>citation needed</em>]</sup>");
function Footnote($m) {
static $fngroup = 1, $fncount = 0, $fntext = array();
@ -83,7 +84,7 @@ function Footnote($m) {
}
$fnid = $fngroup . '_' . $fncount;
$out = ($fn_str_parts[2] != '' && $fntext[$fncount] == '#') ? '' : "<sup><a class='footnote' id='fnr$fnid' href='#fn$fnid'>[$fncount]</a></sup>";
$out = (isset($fn_str_parts[2]) && $fn_str_parts[2] != '' && $fntext[$fncount] == '#') ? '' : "<sup><a class='footnote' id='fnr$fnid' href='#fn$fnid'>[$fncount]</a></sup>";
global $FootnoteBacklinkCharacter;
if ($fn_str != '') {
$fntext[$fncount] = "<div class='footnote' id='fn$fnid'>\n" .