diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-08-07 14:55:39 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-08-07 14:55:39 +0000 |
commit | e5ae6ba24de75881ac6b00e13fc143fe5f6460d3 (patch) | |
tree | feb25fa6eea4bc44cdd5880053117f5868a6c6fb | |
parent | cfa690e46805d731f542d29e7b4d00faabf4b245 (diff) | |
parent | 2457b28ef9fcdfa2310b607e9cf8263549dbf4e8 (diff) | |
download | pmwiki.svn-e5ae6ba24de75881ac6b00e13fc143fe5f6460d3.tar.bz2 |
new latest release
git-svn-id: svn://pmwiki.org/pmwiki/tags/latest@4758 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r-- | pmwiki.php | 114 | ||||
-rw-r--r-- | pub/guiedit/pmwiki.syntax.css | 59 | ||||
-rw-r--r-- | pub/pmwiki-utils.js | 175 | ||||
-rw-r--r-- | scripts/upload.php | 35 | ||||
-rw-r--r-- | scripts/utils.php | 77 | ||||
-rw-r--r-- | scripts/version.php | 2 | ||||
-rw-r--r-- | wikilib.d/PmWiki.AvailableActions | 14 | ||||
-rw-r--r-- | wikilib.d/PmWiki.ChangeLog | 12 | ||||
-rw-r--r-- | wikilib.d/PmWiki.EditVariables | 10 | ||||
-rw-r--r-- | wikilib.d/PmWiki.MarkupMasterIndex | 10 | ||||
-rw-r--r-- | wikilib.d/PmWiki.Passwords | 12 | ||||
-rw-r--r-- | wikilib.d/PmWiki.ReleaseNotes | 12 | ||||
-rw-r--r-- | wikilib.d/PmWiki.UTF-8 | 12 | ||||
-rw-r--r-- | wikilib.d/PmWiki.UploadVariables | 10 | ||||
-rw-r--r-- | wikilib.d/PmWiki.Uploads | 10 |
15 files changed, 422 insertions, 142 deletions
@@ -308,7 +308,7 @@ function CondExpr($pagename, $condname, $condparm) { $code = trim(preg_replace('/(^\\s*|(and|x?or|&&|\\|\\||!)\\s+)(?=and|x?or|&&|\\|\\|)/', '$1 0 ', trim(implode(' ', $terms)))); - if(!$code) return false; + if (!$code) return false; return @eval("return( $code );"); } $Conditions['expr'] = 'CondExpr($pagename, $condname, $condparm)'; @@ -404,7 +404,7 @@ function pm_servefile($basedir, $path, $cachecontrol='no-cache') { die('Forbidden'); } $filepath = "$basedir/$path"; - if(!file_exists($filepath)) { + if (!file_exists($filepath)) { http_response_code(404); die('File not found'); } @@ -562,7 +562,7 @@ function HandleDispatch($pagename, $action, $msg=NULL) { ## helper functions function stripmagic($x) { - if(is_null($x)) return ''; + if (is_null($x)) return ''; $fn = 'get_magic_quotes_gpc'; if (!function_exists($fn)) return $x; if (is_array($x)) { @@ -724,7 +724,7 @@ function PSFT($fmt, $stamp=null, $locale=null, $tz=null) { # strftime() replacem if (@$fmt == '') $fmt = $FTimeFmt; $stamp = is_numeric($stamp)? intval($stamp) : $Now; - if(preg_match('/(?<!%)(%L)/', $fmt)) { + if (preg_match('/(?<!%)(%L)/', $fmt)) { $gmt = PSFT('@%Y-%m-%dT%H:%M:%SZ', $stamp, null, 'GMT'); $fmt = preg_replace('/(?<!%)(%L)/', $gmt, $fmt); } @@ -846,6 +846,47 @@ function PRCB($pat, $repl, $subj, $vars=null, $limit=-1, &$count=null, $flags=0) return preg_replace_callback($pat, $repl, $subj, $limit, $count, $flags); return preg_replace_callback($pat, $repl, $subj, $limit, $count); } + +## This is a replacement for json_encode+PHSC, but only for arrays that +## are used by the PmWiki core. It may or may not work in other cases. +## This may fail with international characters if UTF-8 is not enabled. +function pm_json_encode($x, $encodespecial=false) { + if (!isset($x) || is_null($x)) return 'null'; + if (is_bool($x)) return $x? "true" : "false"; + if (is_int($x) || is_float($x)) return strval($x); + + if (function_exists('json_encode')) + $out = json_encode($x); + + elseif (is_string($x)) ## escape controls and specials per RFC:8259 + $out = '"'.preg_replace_callback("/[\x00-\x1f\\/\\\\\"]/",'cb_rfc8259',$x).'"'; + + elseif (is_array($x)) { + $a = array(); + if (array_values($x) === $x) { # numeric sequential array + foreach($x as $v) + $a[] = pm_json_encode($v); + + $out = "[".implode(',', $a)."]"; + } + else { # associative array -> json object + foreach($x as $k=>$v) { + $jk = is_int($k)? "\"$k\"" : pm_json_encode($k); + $jv = pm_json_encode($v); + $a[] = "$jk:$jv"; + } + $out = "{".implode(',', $a)."}"; + } + } + else return 'null'; # other types not yet supported + + return $encodespecial? PHSC($out, ENT_QUOTES) : $out; +} +function cb_rfc8259($m) { + return sprintf('\\u00%02x', ord($m[0])); +} + + ## callback functions class PPRC { # PmWiki preg replace callbacks + pass local vars var $vars; @@ -881,8 +922,8 @@ function pmcrypt($str, $salt=null) { SDV($PmCryptAlgo, PASSWORD_DEFAULT); if ($salt && preg_match('/^(-?@|\\*$)/', $salt)) return false; if (!is_null($salt)) { - if(function_exists('password_verify')) { - if(password_verify($str, $salt)) return $salt; + if (function_exists('password_verify')) { + if (password_verify($str, $salt)) return $salt; # else retry with crypt() } return crypt($str, $salt); @@ -1500,7 +1541,7 @@ function XLSDV($lang,$a) { function XLPage($lang,$p,$nohtml=false) { global $TimeFmt,$XLLangs,$FarmD, $EnableXLPageScriptLoad; $page = ReadPage($p, READPAGE_CURRENT); - if (!$page) return; + if (!$page || !@$page['text']) return; $text = preg_replace("/=>\\s*\n/",'=> ',@$page['text']); foreach(explode("\n",$text) as $l) if (preg_match('/^\\s*[\'"](.+?)[\'"]\\s*=>\\s*[\'"](.+)[\'"]/',$l,$m)) @@ -1673,6 +1714,7 @@ class PageStore { function delete($pagename) { global $Now, $PageExistsCache; $pagefile = $this->pagefile($pagename); + clearstatcache(); @rename($pagefile,"$pagefile,del-$Now"); unset($PageExistsCache[$pagename]); # PITS:01401 } @@ -1765,7 +1807,7 @@ function ListPages($pat=NULL) { return $out; } -function RAPC($pagename, $level, $authprompt=false, $since=READPAGE_CURRENT) { +function RAPC($pagename, $level='read', $authprompt=false, $since=READPAGE_CURRENT) { # helper function, widely used return RetrieveAuthPage($pagename, $level, $authprompt, $since); } @@ -1813,6 +1855,13 @@ function Redirect($pagename, $urlfmt='$PageUrl', $redirecturl=null) { exit; } +function PrintJSON($pagename, $out) { + $json = pm_json_encode($out); + header('Content-Type: application/json'); + print $json; + exit; +} + function PrintFmt($pagename,$fmt) { global $EnablePrePrintFmt; if (IsEnabled($EnablePrePrintFmt, 1)) PrePrintFmt($pagename,$fmt); @@ -2547,25 +2596,28 @@ function UpdatePage(&$pagename, &$page, &$new, $fnlist = NULL) { # EditTemplate allows a site administrator to pre-populate new pages # with the contents of another page. function EditTemplate($pagename, &$page, &$new) { - global $EditTemplatesFmt; + global $EditTemplatesFmt, $ROEPatterns, $TROEPatterns; if (@$new['text'] > '') return; - if (@$_REQUEST['template'] && PageExists($_REQUEST['template'])) { - $p = RetrieveAuthPage($_REQUEST['template'], 'read', false, - READPAGE_CURRENT); - if ($p['text'] > '') $new['text'] = $p['text']; - return; + $rqt = @$_REQUEST['template']; + if ($rqt && PageExists($rqt)) { + $p = RAPC($rqt); + if (@$p['text'] > '') $new['text'] = $p['text']; } - foreach((array)$EditTemplatesFmt as $t) { - if (strpos($t, ' ')!==false) { - $args = ParseArgs($t); - if (@$args['name']) { - if (! MatchPageNames($pagename, FixGlob($args['name']))) continue; + else { + foreach((array)$EditTemplatesFmt as $t) { + if (strpos($t, ' ')!==false) { + $args = ParseArgs($t); + if (@$args['name']) { + if (! MatchPageNames($pagename, FixGlob($args['name']))) continue; + } + $t = $args[''][0]; } - $t = $args[''][0]; + $p = RAPC(FmtPageName($t,$pagename)); + if (@$p['text'] > '') { $new['text'] = $p['text']; break; } } - $p = RetrieveAuthPage(FmtPageName($t,$pagename), 'read', false, - READPAGE_CURRENT); - if (@$p['text'] > '') { $new['text'] = $p['text']; return; } + } + if (@$new['text']>'' && is_array($TROEPatterns)) { + $new['text'] = ProcessROESPatterns(@$new['text'], $TROEPatterns); } } @@ -2710,11 +2762,13 @@ function PostPage($pagename, &$page, &$new) { if (!$EnablePost) return; if (preg_match("/$DeleteKeyPattern/",$new['text'])) { if (@$new['passwdattr']>'' && !CondAuth($pagename, 'attr')) - Abort('$[The page has an "attr" attribute and cannot be deleted.]'); - else $WikiDir->delete($pagename); - $IsPagePosted = true; - return; + return Abort('$[The page has an "attr" attribute and cannot be deleted.]'); + $csum = @$new['csum']; + $new = array_merge($new, $page); + $new['csum'] = $csum; + $deleted = 1; } + else $deleted = 0; $new['charset'] = $Charset; # kept for now, may be needed if custom PageStore $new['author'] = @$Author; $new["author:$Now"] = @$Author; @@ -2733,6 +2787,10 @@ function PostPage($pagename, &$page, &$new) { unset($new[$k]); } WritePage($pagename,$new); + + if ($deleted) { + $WikiDir->delete($pagename); + } $IsPagePosted = true; } @@ -2951,7 +3009,7 @@ function PmWikiAuth($pagename, $level, $authprompt=true, $since=0) { ## Split from PmWikiAuth to allow for recipes to call it function PrintAuthForm($pagename) { global $FmtV, $AuthPromptFmt, $PageStartFmt, $PageEndFmt, $AuthFormRespCode; - if(IsEnabled($AuthFormRespCode, 0)) http_response_code($AuthFormRespCode); + if (IsEnabled($AuthFormRespCode, 0)) http_response_code($AuthFormRespCode); $postvars = ''; foreach($_POST as $k=>$v) { if ($k == 'authpw' || $k == 'authid') continue; diff --git a/pub/guiedit/pmwiki.syntax.css b/pub/guiedit/pmwiki.syntax.css index ce1346ab..9a3066f3 100644 --- a/pub/guiedit/pmwiki.syntax.css +++ b/pub/guiedit/pmwiki.syntax.css @@ -289,3 +289,62 @@ code.pmhlt, .pmhlt code, #htext.pmhlt { color: var(--pmsyntax-color); } +/* For $EnableUploadDrop, we reuse colors that are + * likely to be appropriate regardless of the skin. */ +.pmdropzone { + border-style: dashed; + border-width: 2px; + margin-bottom: .25rem; +} +.pmdropzone.over { + background-color: var(--pmsyntax-bulletbg); +} +.pmdropzone a { + margin-right: .5em; + display: inline-block; + text-decoration: none; +} +.pmdropzone a::before { + margin-right: .25em; +} +.pmdropzone a.queued { + color: var(--pmsyntax-attr); + opacity: .5; + cursor: wait; +} +.pmdropzone a.uploading { + color: var(--pmsyntax-attr); + cursor: wait; +} +.pmdropzone a.error { + color: var(--pmsyntax-string); +} +.pmdropzone a.deleting { + opacity: 0.1; + transition: opacity 0.7s linear; +} +.pmdropzone a.error:hover { + text-decoration: line-through; +} +.pmdropzone a.queued::before { + content: "\23F8"; +} +.pmdropzone a.uploading::before { + content: "\25B2"; + animation: blnk .6s infinite; +} +@keyframes blnk { 50% { opacity: 0; } } +.pmdropzone a.success::before { + content: "\25A0"; +} +.pmdropzone a.error::before { + content: "\2326"; +} + +@media print { + .pmdropzone { + display: none; + } +} + + diff --git a/pub/pmwiki-utils.js b/pub/pmwiki-utils.js index 5b68101b..c15dab6e 100644 --- a/pub/pmwiki-utils.js +++ b/pub/pmwiki-utils.js @@ -10,7 +10,7 @@ -(function(__script__){ +(async function(__script__){ try { var Config = JSON.parse(__script__.dataset.config); Config.fullname = __script__.dataset.fullname; @@ -19,6 +19,13 @@ var Config = {}; } + if(Config.rediquiet) { + var url = location.href.replace(/\?from=[^?&#]*[&]quiet=1/, ''); + if(url != location.href) + history.replaceState(null, null, url); + } + + function aE(el, ev, fn) { if(typeof el == 'string') el = dqsa(el); for(var i=0; i<el.length; i++) el[i].addEventListener(ev, fn); @@ -59,7 +66,7 @@ function PHSC(x) { return x.replace(/[&]/g, '&').replace(/[<]/g, '<').replace(/[>]/g, '>'); } var wikitext; - var log = console.log; + var echo = console.log; function PmXMail() { var els = document.querySelectorAll('span._pmXmail'); @@ -566,7 +573,7 @@ } if(out) adjae(plus, out); }) - .catch(log); + .catch(echo); }); if(dqs('form[name="authform"]') || location.href.match(/action=/)) return; seenstamp[pagename] = Math.floor(Now.getTime()/1000); @@ -590,16 +597,166 @@ } }); } - - if(Config.rediquiet) { - var url = location.href.replace(/\?from=[^?&#]*[&]quiet=1/, ''); - if(url != location.href) - history.replaceState(null, null, url); + + var Dropzone = false; + var UploadQueue = []; + function init_dropzone(){ + if(!Config.updrop) return; + var form = dqs('form[action$="action=postupload"], form[action$="action=edit"]'); + if(!form) return; + Dropzone = dce('div'); + Dropzone.className = "frame pmdropzone"; + var label = dce('span'); + label.textContent = Config.updrop.label; + adjbe(label, ' '); + Dropzone.appendChild(label); + if(Config.updrop.areq) { + var areq = form.querySelector('input[name="author"]') + Dropzone.pmareq = areq; + } + + form.insertAdjacentElement('afterbegin', Dropzone); + aE([Dropzone], 'dragenter', dragenter); + aE([Dropzone], 'dragover', dragenter); + aE([Dropzone], 'dragleave', dragleave); + aE([Dropzone], 'drop', dragdrop); + tap([Dropzone], clickzone); + } + + async function postUpload(file) { + var url = Config.updrop.action; + var f = new FormData; + f.append('n', Config.fullname); + f.append('action', 'postupload'); + f.append('uploadfile', file); + f.append('pmdrop', 1); + f.append(Config.updrop.token[0], Config.updrop.token[1]); + if(Dropzone.pmareq) + f.append('author', Dropzone.pmareq.value); + try { + var response = await fetch(url, { method: 'POST', body: f }); + if (!response.ok) { + var msg = `HTTP error! Status: ${response.status}`; + throw new Error(msg); + return { error: 1, msg: msg}; + } + return await response.json(); + } + catch(err) { + throw new Error(err); + return {error: 1, msg: 'Error posting form data: ' + err.message }; + } + } + + async function processUploads() { + while(true) { + var a = dqs('.pmdropzone a.queued'); + if(!a) return; + a.className = 'uploading'; + var result = await postUpload(a.pmfile); + if(result.error) { + a.className = 'error'; + a.title = result.msg; + } + else { + a.className = 'success'; + a.href = result.href; + a.textContent = result.uprname; + a.title = result.msg; + delete a.pmfile; + } + } + } + + function clickzone(e){ + var a = e.target.closest('a'); + if(!a) return; + e.preventDefault(); + e.stopPropagation(); + if(a.className.match(/uploading|queued|deleting/)) return; + else if(a.className == 'success' && typeof insMarkup == 'function') { + var pn = e.ctrlKey? Config.fullname + '/': ''; + var text = "Attach:"+pn+a.textContent; + if(text.match(/\s/)) text = '[['+text+']]'; + insMarkup(function(x){ + if(x.length) return text; + return { + mtext: text, + unselect: true + }; + }); + return; + } + else if(a.className == 'error' || typeof insMarkup == 'undefined') { + a.classList.add('deleting'); + setTimeout(function(){a.remove();}, 700); + return; + } + // this shouldn't happen + } + + function dragenter(e) { + e.preventDefault(); + Dropzone.classList.add('over'); + } + + function dragleave(e) { + e.preventDefault(); + Dropzone.classList.remove('over'); } + async function dragdrop(e) { + e.preventDefault(); + Dropzone.classList.remove('over'); + if(Dropzone.pmareq) { + var v = Dropzone.pmareq.value; + if(!v.length) { + appendUpload({size:-500,name:Config.updrop.areq}); + Dropzone.pmareq.focus(); + return; + } + } + var files = event.dataTransfer.files; + for (var i = 0; i < files.length; i++) appendUpload(files[i]); + var pending = dqs('.pmdropzone a.uploading'); + if(!pending) await processUploads(); + } + + function appendUpload(file) { + if(file.size==0) { return; } + var sizes = Config.updrop.sizes; + var ext = ''; + var m = file.name.match(/\.([^\.]+)$/); + if(m) ext = m[1].toLowerCase(); + + var a = dce('a'); + a.href = '#'; + a.textContent = file.name; + + if(file.size==-500) { + a.className = 'error'; + } + else if(typeof sizes[ext] == 'undefined') { + a.className = 'error'; + a.title = Config.updrop.badtype.replace(/\#upext/, ext); + } + else if(file.size > sizes[ext]) { + a.className = 'error'; + a.title = Config.updrop.toobig + .replace(/\#upmax/, sizes[ext]).replace(/\#upext/, ext); + } + else { + a.className = 'queued'; + a.pmfile = file; + } + Dropzone.appendChild(a); + } + + function ready(){ wikitext = document.getElementById('wikitext'); - var fn = [autotoc, inittoggle, PmXMail, localTimes, highlight_pre, copy_pre, confirmForms]; + var fn = [autotoc, inittoggle, PmXMail, localTimes, + highlight_pre, copy_pre, confirmForms, init_dropzone]; fn.forEach(function(a){a();}); makesortable(); } diff --git a/scripts/upload.php b/scripts/upload.php index e88472ac..910078d3 100644 --- a/scripts/upload.php +++ b/scripts/upload.php @@ -105,6 +105,7 @@ SDV($PageUploadFmt,array(" XLSDV('en',array( 'ULby' => 'uploaded by', 'ULsuccess' => 'successfully uploaded', + 'ULdroplabel' => 'Drop files to upload:', 'ULinvalidtoken' => 'Token invalid or missing.', 'ULmimemismatch' => 'extension \'$upext\' doesn\'t match file type \'$upmime\'', 'ULfileinfo' => 'EnableUploadMimeMatch requires PHP Fileinfo functions to be enabled, see https://php.net/fileinfo.installation', @@ -200,8 +201,14 @@ function UploadAuth($pagename, $auth, $cache=0){ SDV($GroupAttributesFmt,'$Group/GroupAttributes'); $pn_upload = FmtPageName($GroupAttributesFmt, $pagename); } else $pn_upload = $pagename; - $page = RetrieveAuthPage($pn_upload, $auth, true, READPAGE_CURRENT); - if (!$page) Abort("?No '$auth' permissions for $pagename"); + $authprompt = @$_POST['pmdrop']? false: true; + $page = RetrieveAuthPage($pn_upload, $auth, $authprompt, READPAGE_CURRENT); + if (!$page) { + $msg = "?No '$auth' permissions for $pagename"; + if (@$_POST['pmdrop']) + return PrintJSON($pagename, array('error'=>1,'msg'=>$msg)); + Abort($msg); + } if ($cache) PCache($pn_upload,$page); return true; } @@ -354,6 +361,17 @@ function HandlePostUpload($pagename, $auth = 'upload') { } } $FmtV['$upresult'] = $result; + if (@$_POST['pmdrop']) { + $out = array('uprname'=>$upname); + preg_match('/^upresult=([a-zA-Z]+)(.*)$/', $result, $m); + $out['msg'] = "$upname: ".FmtPageName(XL("UL{$m[1]}"), $pagename); + + if ($m[1] != 'success') $out['error'] = 1; + else $out['href'] = $FmtV['$upurl']; + + PrintJSON($pagename, $out); + exit; + } SDV($UploadRedirectFunction, 'Redirect'); $UploadRedirectFunction($pagename,"{\$PageUrl}?action=upload&uprname=$upname&$result"); } @@ -362,7 +380,7 @@ function UploadVerifyBasic($pagename,$uploadfile,&$filepath,&$upname=null) { global $EnableUploadOverwrite, $UploadExtSize, $UploadPrefixQuota, $EnableUploadVersions, $UploadDirQuota, $UploadDir, $UploadBlacklist, $Author, $EnablePostAuthorRequired, $EnableUploadAuthorRequired, - $UploadExts, $EnableUploadMimeMatch, $Now; + $UploadExts, $EnableUploadMimeMatch, $Now, $FmtV; if (! pmtoken(1)) { return 'upresult=invalidtoken'; @@ -382,7 +400,7 @@ function UploadVerifyBasic($pagename,$uploadfile,&$filepath,&$upname=null) { } } if (IsEnabled($EnableUploadVersions, 0)==2 && file_exists($filepath)) { - if(preg_match('!^(.*/([^/]+))(\\.[a-z0-9]+)$!i', $filepath, $m)) { + if (preg_match('!^(.*/([^/]+))(\\.[a-z0-9]+)$!i', $filepath, $m)) { $stamp36 = base_convert($Now, 10, 36); $filepath = "{$m[1]}-$stamp36{$m[3]}"; $upname = "{$m[2]}-$stamp36{$m[3]}"; @@ -391,9 +409,12 @@ function UploadVerifyBasic($pagename,$uploadfile,&$filepath,&$upname=null) { if (!$EnableUploadOverwrite && file_exists($filepath)) return 'upresult=exists'; preg_match('/\\.([^.\\/]+)$/',$filepath,$match); $ext=@$match[1]; - if(!isset($UploadExtSize[$ext])) + + $FmtV['$upext'] = $ext; + if (!isset($UploadExtSize[$ext])) return "upresult=badtype&upext=$ext"; $maxsize = $UploadExtSize[$ext]; + $FmtV['$upmax'] = $maxsize; if ($maxsize<=0) return "upresult=badtype&upext=$ext"; if (intval(@$uploadfile['size'])>$maxsize) return "upresult=toobigext&upext=$ext&upmax=$maxsize"; @@ -409,12 +430,14 @@ function UploadVerifyBasic($pagename,$uploadfile,&$filepath,&$upname=null) { return "upresult=fileinfo"; $mime = mime_content_type($uploadfile['tmp_name']); + $FmtV['$upmime'] = $mime; if ($mime != $UploadExts[$ext]) { if (!is_array($EnableUploadMimeMatch) || !isset($EnableUploadMimeMatch[$ext]) - || !preg_match($EnableUploadMimeMatch[$ext], $mime)) + || !preg_match($EnableUploadMimeMatch[$ext], $mime)) { return "upresult=mimemismatch&upext=$ext&upmime=$mime"; + } } } diff --git a/scripts/utils.php b/scripts/utils.php index bcbdcf10..a26b786c 100644 --- a/scripts/utils.php +++ b/scripts/utils.php @@ -21,17 +21,18 @@ To disable all these functions, add to config.php: $EnablePmUtils = 0; */ -function PmUtilsJS() { +function PmUtilsJS($pagename) { global $PmTOC, $EnableSortable, $EnableHighlight, $EnableLocalTimes, $ToggleNextSelector, $LinkFunctions, $FarmD, $HTMLStylesFmt, $HTMLHeaderFmt, $EnablePmSyntax, $CustomSyntax, - $EnableCopyCode, $EnableDarkThemeToggle, $EnableRedirectQuiet; + $EnableCopyCode, $EnableDarkThemeToggle, $EnableRedirectQuiet, + $EnableUploadDrop, $UploadExtSize, $EnableUploadAuthorRequired; $utils = "$FarmD/pub/pmwiki-utils.js"; $dark = "$FarmD/pub/pmwiki-darktoggle.js"; $cc = IsEnabled($EnableCopyCode, 0)? XL('Copy code') : ''; - if($cc) { + if ($cc) { SDVA($HTMLStylesFmt, array('copycode'=>' .pmcopycode { cursor:pointer; display:block; border-radius:.2em; opacity:.2; position:relative; z-index:2; } .pmcopycode::before { content:"+"; display:block; width:.8em; height:.8em; line-height:.8em; text-align:center; } @@ -41,6 +42,24 @@ function PmUtilsJS() { pre:hover .pmcopycode { opacity:1; } ')); } + if (IsEnabled($EnableUploadDrop, 0) && CondAuth($pagename, 'upload', 1)) { + $ddmu = array( + 'action' => '{$PageUrl}?action=postupload', + 'token' => ['$TokenName', pmtoken()], + 'label' => XL('ULdroplabel'), + 'badtype' => str_replace('$', '#', XL('ULbadtype')), + 'toobig' => str_replace('$', '#', preg_replace('/\\s+/',' ', XL('ULtoobigext'))), + 'sizes' => array(), + ); + if(IsEnabled($EnableUploadAuthorRequired, 0)) { + $ddmu['areq'] = XL('ULauthorrequired'); + } + + foreach($UploadExtSize as $ext=>$bytes) { + if($bytes>0) $ddmu['sizes'][$ext] = $bytes; + } + } + else $ddmu = false; if (file_exists($utils)) { $mtime = filemtime($utils); @@ -51,6 +70,7 @@ function PmUtilsJS() { 'toggle' => IsEnabled($ToggleNextSelector, 0), 'localtimes' => IsEnabled($EnableLocalTimes, 0), 'rediquiet' => IsEnabled($EnableRedirectQuiet, 0), + 'updrop' => $ddmu, ); $enabled = $PmTOC['Enable']; foreach($config as $i) { @@ -69,12 +89,15 @@ function PmUtilsJS() { if (IsEnabled($EnablePmSyntax, 0)) { # inject before skins and local.css $cs = is_array(@$CustomSyntax) ? pm_json_encode(array_values($CustomSyntax), true) : ''; - array_unshift($HTMLHeaderFmt, "<link rel='stylesheet' - href='\$FarmPubDirUrl/guiedit/pmwiki.syntax.css'> - <script src='\$FarmPubDirUrl/guiedit/pmwiki.syntax.js' data-imap='{\$EnabledIMap}' + array_unshift($HTMLHeaderFmt, "<script data-imap='{\$EnabledIMap}' + src='\$FarmPubDirUrl/guiedit/pmwiki.syntax.js' data-label=\"$[Highlight]\" data-mode='$EnablePmSyntax' data-custom=\"$cs\"></script>"); } + if (IsEnabled($EnablePmSyntax, 0) || $ddmu) { + array_unshift($HTMLHeaderFmt, "<link rel='stylesheet' + href='\$FarmPubDirUrl/guiedit/pmwiki.syntax.css'>"); + } // Dark theme toggle, needs to be very early $enabled = IsEnabled($EnableDarkThemeToggle, 0); @@ -89,45 +112,5 @@ function PmUtilsJS() { data-config='$json'></script>"); } } -PmUtilsJS(); - -## This is a replacement for json_encode+PHSC, but only for arrays that -## are used by the PmWiki core. It may or may not work in other cases. -## This may fail with international characters if UTF-8 is not enabled. -function pm_json_encode($x, $encodespecial=false) { - if (!isset($x) || is_null($x)) return 'null'; - if (is_bool($x)) return $x? "true" : "false"; - if (is_int($x) || is_float($x)) return strval($x); - - if (function_exists('json_encode')) - $out = json_encode($x); - - elseif (is_string($x)) ## escape controls and specials per RFC:8259 - $out = '"'.preg_replace_callback("/[\x00-\x1f\\/\\\\\"]/",'cb_rfc8259',$x).'"'; - - elseif (is_array($x)) { - $a = array(); - if (array_values($x) === $x) { # numeric sequential array - foreach($x as $v) - $a[] = pm_json_encode($v); - - $out = "[".implode(',', $a)."]"; - } - else { # associative array -> json object - foreach($x as $k=>$v) { - $jk = is_int($k)? "\"$k\"" : pm_json_encode($k); - $jv = pm_json_encode($v); - $a[] = "$jk:$jv"; - } - $out = "{".implode(',', $a)."}"; - } - } - - else return 'null'; # other types not yet supported - - return $encodespecial? PHSC($out, ENT_QUOTES) : $out; -} -function cb_rfc8259($m) { - return sprintf('\\u00%02x', ord($m[0])); -} +PmUtilsJS($pagename); diff --git a/scripts/version.php b/scripts/version.php index d2df7c51..01309b5e 100644 --- a/scripts/version.php +++ b/scripts/version.php @@ -1 +1 @@ -<?php $Version="pmwiki-2.3.35"; $VersionNum=2003035;
\ No newline at end of file +<?php $Version="pmwiki-2.3.36"; $VersionNum=2003036;
\ No newline at end of file diff --git a/wikilib.d/PmWiki.AvailableActions b/wikilib.d/PmWiki.AvailableActions index 82b105bc..79552ba3 100644 --- a/wikilib.d/PmWiki.AvailableActions +++ b/wikilib.d/PmWiki.AvailableActions @@ -1,9 +1,9 @@ -version=pmwiki-2.3.34 ordered=1 urlencoded=1 -author=Petko +version=pmwiki-2.3.35 ordered=1 urlencoded=1 +author=simon charset=UTF-8 -csum=?action=source&highlight=1 (+96) +csum=add migr8 (+90) name=PmWiki.AvailableActions -rev=157 -targets=PmWiki.Security,PmWiki.Passwords,PmWiki.ChangeLog,PmWiki.SitePageActions,PmWiki.SecurityVariables,PmWiki.PageHistory,PmWiki.UploadVariables,PmWiki.BasicEditing,Site.AuthForm,PmWiki.LayoutVariables,PmWiki.RefCount,PmWiki.Search,Cookbook.EditTemplates,PmWiki.WebFeeds,PmWiki.Uploads,PmWiki.SitePreferences,PmWiki.DebugVariables,PmWiki.CustomMarkup,Cookbook.MarkupRulesetDebugging,PmWiki.SiteAnalyzer,PmWiki.AnalyzeResults,PmWiki.UrlApprovals,PmWiki.CustomActions,Cookbook.UserAuth2,Cookbook.Attachman,Cookbook.BackupPages,Cookbook.SearchCloud,Cookbook.CodeMirror,Cookbook.CommentBox,Cookbook.Comments,Cookbook.CommentDb,Cookbook.ROEPatterns,Cookbook.ConvertTable,Cookbook.MovePage,Cookbook.CSVAction,Cookbook.Attachtable,Cookbook.DeletePage,Cookbook.DiscussionTab,Cookbook.DownloadManager,Cookbook.ExpireDiff,Cookbook.HideDiff,Cookbook.ExtensionHub,Cookbook.ImportText,Cookbook.MultiLanguageViews,Cookbook.RenamePage,Cookbook.Flipbox,Cookbook.ListCategories,PmWiki.Categories,Cookbook.CommentBoxPlus,Cookbook.GeneratePDF,Cookbook.PmWiki2PDF,Cookbook.UploadForm,Cookbook.PPDonate,Cookbook.PublishPDF,Cookbook.ASCIIMath,Cookbook.ThumbList,Cookbook.Mini,Cookbook.RecipeCheck,Cookbook.PageRegenerate,Cookbook.Reindex,Cookbook.ReindexCategories,Test.PageIndex,Cookbook.SharedPages,PmWiki.WikiFarms,Cookbook.GoogleSiteMap,Cookbook.Sitemapper,Cookbook.TotalCounter,Cookbook.Trash,Cookbook.WebAdmin,Cookbook.ZAP,Cookbook.ChoiceColorChanger,Skins.Choice -text=(:Summary: All PmWiki page actions (?action=) and other query parameters:)%0aPage actions are applied to wiki pages, as a [[Wikipedia:Query_string|query string]] appended to the [[Wikipedia:Uniform_Resource_Locator|URL]].%0a[[Security]] can be applied to all [[#defaultactions|default actions]], and [[#scriptactions|script actions]] with one exception, but not [[#enablediag|diag actions]], through the use of [[passwords]].%0a%0aAlso documented are all other URL queries.%0a%0a'''NOTE:''' All actions will be disabled if the following is set:%0a%0a%25hlt php%25[@%0a $EnableActions = 0;%0a include('pmwiki.php');%0a@]%0a%0aThis will initialize PmWiki (along with any configuration/customizations%0athat are being made, e.g. from @@local/config.php@@), but won't actually%0aperform any actions. The caller can then call the desired action%0aor other functions as desired. This is available from [[PmWiki/ChangeLog#v22022|Version 2.2.0-beta22]] on up.%0a%0a%0a[[#defaultactions]]%0a!! PmWiki Actions%0aSee also [[site page actions]].%0a%0a[[#attr]]%0a:?action='''attr''': displays dialog for setting/changing password of the specified page or group of pages, see [[PmWiki/passwords]], see also $EnablePostAttrClearSession if you do not want to have the session cleared after validating change [- {PmWiki/Passwords$:Summary} -]%0a%0a[[#browse]]%0a:?action='''browse''': display the specified page (default action if no [@?action=@] is present)%0a%0a[[#crypt]]%0a:?action='''crypt''': displays a form for generating hashed [[Passwords | passwords]] out of clear text for usage in your config.php%0a%0a[[#diff]]%0a:?action='''diff''': show a change history of the specified page, see [[PmWiki/page history]] [- {PmWiki/PageHistory$:Summary} -]%0a%0a[[#download]]%0a:?action='''download'''&upname=''file.ext'': retrieve the page's attachment named ''file.ext'', see $EnableDirectDownload%0a%0a[[#edit]]%0a:?action='''edit''': edit the specified page, see [[PmWiki/basic editing]] [- {PmWiki/BasicEditing$:Summary} -]%0a%0a[[#login]]%0a:?action='''login''': prompt visitor for username/password, by default using [[Site.AuthForm]]%0a%0a[[#logout]]%0a:?action='''logout''': remove author, password, and login information%0a%0a[[#print]]%0a:?action='''print''': display the specified page using the skin specified by $ActionSkin['print']%0a%0a[[#refcount]]%0a:?action='''refcount''': bring up the reference count form, which allows the user to generate a list of links (all, missing, existing or orphaned) in or from specified groups. See [[Ref Count]] [- {PmWiki/RefCount$:Summary} -]. Part of the core distribution but must be enabled by the administrator.%0a%0a[[#search]]%0a:?action='''search''': displays searchbox on current page, see [[PmWiki/search]] [- {PmWiki/Search$:Summary} -]%0a:?action='''search'''&q=''searchterm'': performs search with ''searchterm'' and displays results on current page%0a:?action='''search'''&q=link=''pagename'': performs backlinks search with ''pagename'' and displays results on current page%0a%0a[[#source]]%0a:?action='''source''': show page source (plain text only)%0a:?action='''source&highlight=1''': show page source highlighted (HTML output)%0a%0a[[#template]]%0a:?action='''template''': creates a link that will open the NewPage using the contents of OldPage, see [[Cookbook:Edit Templates]] [-{Cookbook/EditTemplates$:Summary}-]%0a%0a%0a[[#feed]]%0a:?action='''atom''':%0a:?action='''rdf''':%0a:?action='''rss''':%0a:?action='''dc''': If [[web feeds]] are enabled, returns a syndication feed based on the contents of the page or other options provided by the url, see [[PmWiki/web feeds]] [- {PmWiki/WebFeeds$:Summary} -]%0a%0a[[#upload]]%0a:?action='''upload''': display a form to upload an attachment for the current group, see [[PmWiki/uploads]] [- {Cookbook/Uploads$:Summary} -]%0a[[#defaultactionsend]]%0a----%0a[[#querystrings]]%0a!! Query string parameters%0a%0a[[#from]]%0a:?'''from'''=''page name'': use when a page is redirected%0a%0a[[#n]]%0a:?'''n'''=''page name'': display page%0a%0a[[#setprefs]]%0a:?'''setprefs'''=''SomeGroup.CustomPreferences'': sets cookie to custom preferences page. See [[PmWiki/site preferences]] [- {PmWiki/SitePreferences$:Summary} -]%0a----%0a[[#enablediag]]%0a!! Actions enabled by $EnableDiag%0a[[#BEGENABLEDIAG]]%0aThe following actions are available only if you set @@$EnableDiag = 1;@@ in your configuration file. They can be used for debugging and should not be set in a production environment.%0a%0a:?action='''ruleset''': displays a list of all markups in 4 columns:%0a** column 1 = markup-name (1. parameter of %25hlt php%25@@markup()@@ )%0a** column 2 = when will rule apply (2. parameter of %25hlt php%25@@markup()@@ )%0a** column 3 = PmWiki's internal sort key (derived from #2)%0a** column 4 = Debug backtrace information for potentially incompatible rules (filename, line number, pattern)%0a->(see [[Custom Markup]] [- {PmWiki/CustomMarkup$:Summary} -]).%0a->To see more than what [@?action=ruleset@] gives you, apply the [[Cookbook:MarkupRulesetDebugging]] recipe: it can also show the pattern and the replacement strings.%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#phpinfo]]%0a:?action='''phpinfo''': displays the output of %25hlt php%25@@phpinfo()@@ and exits. No page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#diag]]%0a:?action='''diag''': displays a dump of all global vars and exits. No page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#ENDENABLEDIAG]]%0a----%0a[[#scriptactions]]%0a!! Actions enabled by PmWiki Scripts%0a%0a[[#analyse]]%0a:?action='''analyze''': see [[(PmWiki:)Site Analyzer]] and [[(PmWiki:)Analyze Results]]%0a%0a[[#approvesites]]%0a:?action='''approvesites''': see [[PmWiki/Url approvals]] [- {PmWiki/UrlApprovals$:Summary} -]%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#analyseend]]%0a----%0a[[#cookbook]]%0a!! Actions enabled by [[Cookbook(:.)]] recipes%0a(more information about [[(PmWiki:)Custom Actions]])%0a%0a:?action='''admin''': see [[Cookbook:UserAuth2]] [- {Cookbook/UserAuth2$:Summary} -]%0a%0a:?action='''attachman''': see [[Cookbook:Attachman]] [- {Cookbook/Attachman$:Summary} -]%0a%0a:?action='''backup''': see [[Cookbook:BackupPages]] [- {Cookbook/BackupPages$:Summary} -]%0a%0a:?action='''clearsky''': see [[Cookbook:SearchCloud]] [- {Cookbook/SearchCloud$:Summary} -]%0a%0a:?action='''cm-dependencies''': see [[Cookbook:CodeMirror]] [- {Cookbook/CodeMirror$:Summary} -]%0a%0a:?action='''comment''': see [[Cookbook:CommentBox]] [- {Cookbook/CommentBox$:Summary} -]%0a%0a:?action='''comments''': see [[Cookbook:Comments]] [- {Cookbook/Comments$:Summary} -]%0a%0a:?action='''comment-rss''': see [[Cookbook:CommentDb]] [- {Cookbook/CommentDb$:Summary} -]%0a%0a:?action='''convert''': see [[Cookbook:ROEPatterns]] [- {Cookbook/ROEPatterns$:Summary} -]%0a%0a:?action='''converttable''': [[Cookbook:ConvertTable]] [- {Cookbook/ConvertTable$:Summary} -]%0a%0a:?action='''copy''': see [[Cookbook:MovePage]] [- {Cookbook/MovePage$:Summary} -]%0a%0a:?action='''csv''': see [[Cookbook:CSVAction]] [- {Cookbook/CSVAction$:Summary} -]%0a%0a:?action='''downloaddeleted''':%0a:?action='''delattach''':%0a:?action='''deldelattach''':%0a:?action='''fileinfo''':%0a:?action='''thumbnail''':%0a:?action='''undelattach''': [[Cookbook:Attachtable]] [- {Cookbook/Attachtable$:Summary} -]%0a%0a:?action='''delete''': see [[Cookbook:DeletePage]] [- {Cookbook/DeletePage$:Summary} -]%0a%0a:?action='''discuss''': see [[Cookbook:DiscussionTab]] [- {Cookbook/DiscussionTab$:Summary} -]%0a%0a:?action='''downloadman''': see [[Cookbook:DownloadManager]] [- {Cookbook/DownloadManager$:Summary} -]%0a%0a:?action='''expirediff''': see [[Cookbook:ExpireDiff]] [- {Cookbook/ExpireDiff$:Summary} -]%0a%0a:?action='''hidediff''': see [[Cookbook:HideDiff]] [- {Cookbook/HideDiff$:Summary} -]%0a%0a:?action='''hub''': see [[Cookbook:ExtensionHub]] [- {Cookbook/ExtensionHub$:Summary} -]%0a%0a:?action='''import''': see [[Cookbook:ImportText]] [- {Cookbook/ImportText$:Summary} -]%0a%0a:?action='''lang''': see [[Cookbook:MultiLanguageViews]] [- {Cookbook/MultiLanguageViews$:Summary} -]%0a:?action='''setlang''': see [[Cookbook:MultiLanguageViews]] [- {Cookbook/MultiLanguageViews$:Summary} -]%0a%0a:?action='''links''': see [[Cookbook:RenamePage]] [- {Cookbook/RenamePage$:Summary} -]%0a%0a:?action='''lockflipbox''': see [[Cookbook:Flipbox]] [- {Cookbook/Flipbox$:Summary} -]%0a:?action='''unlockflipbox''': see [[Cookbook:Flipbox]] [- {Cookbook/Flipbox$:Summary} -]%0a%0a:?action='''move''': see [[Cookbook:MovePage]] [- {Cookbook/MovePage$:Summary} -]%0a%0a:?action='''pageindex''': see [[Cookbook:ListCategories]] [- {Cookbook/ListCategories$:Summary} -]%0a%0a:?action='''PageUrl''': see [[Cookbook:CommentBoxPlus]] [- {Cookbook/CommentBoxPlus$:Summary} -]%0a%0a:?action='''pdf''': see [[Cookbook:GeneratePDF]] [- {Cookbook/GeneratePDF$:Summary} -] %0a: : or [[Cookbook:PmWiki2PDF]] [- {Cookbook/PmWiki2PDF$:Summary} -]%0a%0a:?action='''postupload2''': see [[Cookbook:UploadForm]] [- {Cookbook/UploadForm$:Summary} -]%0a%0a:?action='''ppdonate''': see [[Cookbook:PPDonate]] - [- {Cookbook/PPDonate$:Summary} -]%0a%0a:?action='''publish''': see [[Cookbook:PublishPDF]] [- {Cookbook/PublishPDF$:Summary} -]%0a%0a:?action='''purgeqns''': see [[Cookbook:ASCIIMath]] [- {Cookbook/ASCIIMath$:Summary} -]%0a%0a:?action='''pwchange''': see [[Cookbook:UserAuth2]] [- {Cookbook/UserAuth2$:Summary} -]%0a%0a:?action='''imgtpl''': (the ''imgtpl'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''createthumb''': (the ''createthumb'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''mini''': (this action is called automatically and should not be called by a link in a wiki page)%0a:?action='''purgethumbs''': see [[Cookbook:ThumbList]] [- {Cookbook/ThumbList$:Summary} -] \\%0a see [[Cookbook:Mini]] [- {Cookbook/Mini$:Summary} -]%0a%0a:?action='''recipecheck''': see [[Cookbook:RecipeCheck]] [- {Cookbook/RecipeCheck$:Summary} -]%0a%0a:?action='''regen''': see [[Cookbook:PageRegenerate]] [- {Cookbook/PageRegenerate$:Summary} -]%0a%0a:?action='''reindex''': see [[Cookbook:Reindex]] [- {Cookbook/Reindex$:Summary} -]%0a%0a:?action='''reindexcat''': See [[Cookbook:ReindexCategories]] [- {Cookbook/ReindexCategories$:Summary} -]%0a%0a:?action='''rename''':%0a:?action='''links''': see [[Cookbook:RenamePage]] [- {Cookbook/RenamePage$:Summary} -]%0a%0a:?action='''rmpi''': see [[Test.PageIndex]] [- {Test/PageIndex$:Summary} -]%0a%0a:?action='''share''':%0a:?action='''unshare''': see [[Cookbook:SharedPages]] [- {Cookbook/SharedPages$:Summary} -]%0a %0a:?action='''sitemap''': see [[Cookbook:GoogleSiteMap]] [- {Cookbook/GoogleSiteMap$:Summary} -]%0a%0a:?action='''sitemapaddgroups''':%0a:?action='''sitemapupdate''': see [[Cookbook:Sitemapper]] [- {Cookbook/Sitemapper$:Summary} -]%0a%0a:?action='''totalcounter''': see [[Cookbook:TotalCounter]] [- {Cookbook/TotalCounter$:Summary} -]%0a%0a:?action='''trash''':%0a:?action='''untrash''': see [[Cookbook:Trash]] [- {Cookbook/Trash$:Summary} -]%0a%0a:?action='''webadmin''': see [[Cookbook:WebAdmin]] [- {Cookbook/WebAdmin$:Summary} -]%0a%0a:?action='''zap''': see [[Cookbook:ZAP]] [- {Cookbook/ZAP$:Summary} -]%0a[[#cookbookend]]%0a----%0a[[#cookbookqueryskins]]%0a!! Query string parameters enabled by [[Cookbook(:.)]] recipes%0a%0a:?'''color'''=''colorscheme'':%0a:?'''setcolor'''=''colorscheme''%0a:?'''skintheme'''=''theme'':%0a:?'''setskintheme'''=''theme'': see [[Cookbook:ChoiceColorChanger ]] [- {Cookbook/ChoiceColorChanger$:Summary} -]%0a%0a%0a:?'''skin'''=''skinname'':%0a:?'''setskin'''=''skinname'': see [[https://www.pmwiki.org/wiki/Skins/SkinChange|SkinChange]] [- {Skins/SkinChange$:Summary} -]%0a%0a!!Custom actions%0a%0a*See [[(PmWiki:)CustomActions]]. -time=1718261904 +rev=158 +targets=PmWiki.Security,PmWiki.Passwords,PmWiki.ChangeLog,PmWiki.SitePageActions,PmWiki.SecurityVariables,PmWiki.PageHistory,PmWiki.UploadVariables,PmWiki.BasicEditing,Site.AuthForm,PmWiki.LayoutVariables,PmWiki.RefCount,PmWiki.Search,Cookbook.EditTemplates,PmWiki.WebFeeds,PmWiki.Uploads,PmWiki.SitePreferences,PmWiki.DebugVariables,PmWiki.CustomMarkup,Cookbook.MarkupRulesetDebugging,PmWiki.SiteAnalyzer,PmWiki.AnalyzeResults,PmWiki.UrlApprovals,PmWiki.CustomActions,Cookbook.UserAuth2,Cookbook.Attachman,Cookbook.BackupPages,Cookbook.SearchCloud,Cookbook.CodeMirror,Cookbook.CommentBox,Cookbook.Comments,Cookbook.CommentDb,Cookbook.ROEPatterns,Cookbook.ConvertTable,Cookbook.MovePage,Cookbook.CSVAction,Cookbook.Attachtable,Cookbook.DeletePage,Cookbook.DiscussionTab,Cookbook.DownloadManager,Cookbook.ExpireDiff,Cookbook.HideDiff,Cookbook.ExtensionHub,Cookbook.ImportText,Cookbook.MultiLanguageViews,Cookbook.RenamePage,Cookbook.Flipbox,Cookbook.MigrateUTF8,Cookbook.ListCategories,PmWiki.Categories,Cookbook.CommentBoxPlus,Cookbook.GeneratePDF,Cookbook.PmWiki2PDF,Cookbook.UploadForm,Cookbook.PPDonate,Cookbook.PublishPDF,Cookbook.ASCIIMath,Cookbook.ThumbList,Cookbook.Mini,Cookbook.RecipeCheck,Cookbook.PageRegenerate,Cookbook.Reindex,Cookbook.ReindexCategories,Test.PageIndex,Cookbook.SharedPages,PmWiki.WikiFarms,Cookbook.GoogleSiteMap,Cookbook.Sitemapper,Cookbook.TotalCounter,Cookbook.Trash,Cookbook.WebAdmin,Cookbook.ZAP,Cookbook.ChoiceColorChanger,Skins.Choice +text=(:Summary: All PmWiki page actions (?action=) and other query parameters:)%0aPage actions are applied to wiki pages, as a [[Wikipedia:Query_string|query string]] appended to the [[Wikipedia:Uniform_Resource_Locator|URL]].%0a[[Security]] can be applied to all [[#defaultactions|default actions]], and [[#scriptactions|script actions]] with one exception, but not [[#enablediag|diag actions]], through the use of [[passwords]].%0a%0aAlso documented are all other URL queries.%0a%0a'''NOTE:''' All actions will be disabled if the following is set:%0a%0a%25hlt php%25[@%0a $EnableActions = 0;%0a include('pmwiki.php');%0a@]%0a%0aThis will initialize PmWiki (along with any configuration/customizations%0athat are being made, e.g. from @@local/config.php@@), but won't actually%0aperform any actions. The caller can then call the desired action%0aor other functions as desired. This is available from [[PmWiki/ChangeLog#v22022|Version 2.2.0-beta22]] on up.%0a%0a%0a[[#defaultactions]]%0a!! PmWiki Actions%0aSee also [[site page actions]].%0a%0a[[#attr]]%0a:?action='''attr''': displays dialog for setting/changing password of the specified page or group of pages, see [[PmWiki/passwords]], see also $EnablePostAttrClearSession if you do not want to have the session cleared after validating change [- {PmWiki/Passwords$:Summary} -]%0a%0a[[#browse]]%0a:?action='''browse''': display the specified page (default action if no [@?action=@] is present)%0a%0a[[#crypt]]%0a:?action='''crypt''': displays a form for generating hashed [[Passwords | passwords]] out of clear text for usage in your config.php%0a%0a[[#diff]]%0a:?action='''diff''': show a change history of the specified page, see [[PmWiki/page history]] [- {PmWiki/PageHistory$:Summary} -]%0a%0a[[#download]]%0a:?action='''download'''&upname=''file.ext'': retrieve the page's attachment named ''file.ext'', see $EnableDirectDownload%0a%0a[[#edit]]%0a:?action='''edit''': edit the specified page, see [[PmWiki/basic editing]] [- {PmWiki/BasicEditing$:Summary} -]%0a%0a[[#login]]%0a:?action='''login''': prompt visitor for username/password, by default using [[Site.AuthForm]]%0a%0a[[#logout]]%0a:?action='''logout''': remove author, password, and login information%0a%0a[[#print]]%0a:?action='''print''': display the specified page using the skin specified by $ActionSkin['print']%0a%0a[[#refcount]]%0a:?action='''refcount''': bring up the reference count form, which allows the user to generate a list of links (all, missing, existing or orphaned) in or from specified groups. See [[Ref Count]] [- {PmWiki/RefCount$:Summary} -]. Part of the core distribution but must be enabled by the administrator.%0a%0a[[#search]]%0a:?action='''search''': displays searchbox on current page, see [[PmWiki/search]] [- {PmWiki/Search$:Summary} -]%0a:?action='''search'''&q=''searchterm'': performs search with ''searchterm'' and displays results on current page%0a:?action='''search'''&q=link=''pagename'': performs backlinks search with ''pagename'' and displays results on current page%0a%0a[[#source]]%0a:?action='''source''': show page source (plain text only)%0a:?action='''source&highlight=1''': show page source highlighted (HTML output)%0a%0a[[#template]]%0a:?action='''template''': creates a link that will open the NewPage using the contents of OldPage, see [[Cookbook:Edit Templates]] [-{Cookbook/EditTemplates$:Summary}-]%0a%0a%0a[[#feed]]%0a:?action='''atom''':%0a:?action='''rdf''':%0a:?action='''rss''':%0a:?action='''dc''': If [[web feeds]] are enabled, returns a syndication feed based on the contents of the page or other options provided by the url, see [[PmWiki/web feeds]] [- {PmWiki/WebFeeds$:Summary} -]%0a%0a[[#upload]]%0a:?action='''upload''': display a form to upload an attachment for the current group, see [[PmWiki/uploads]] [- {Cookbook/Uploads$:Summary} -]%0a[[#defaultactionsend]]%0a----%0a[[#querystrings]]%0a!! Query string parameters%0a%0a[[#from]]%0a:?'''from'''=''page name'': use when a page is redirected%0a%0a[[#n]]%0a:?'''n'''=''page name'': display page%0a%0a[[#setprefs]]%0a:?'''setprefs'''=''SomeGroup.CustomPreferences'': sets cookie to custom preferences page. See [[PmWiki/site preferences]] [- {PmWiki/SitePreferences$:Summary} -]%0a----%0a[[#enablediag]]%0a!! Actions enabled by $EnableDiag%0a[[#BEGENABLEDIAG]]%0aThe following actions are available only if you set @@$EnableDiag = 1;@@ in your configuration file. They can be used for debugging and should not be set in a production environment.%0a%0a:?action='''ruleset''': displays a list of all markups in 4 columns:%0a** column 1 = markup-name (1. parameter of %25hlt php%25@@markup()@@ )%0a** column 2 = when will rule apply (2. parameter of %25hlt php%25@@markup()@@ )%0a** column 3 = PmWiki's internal sort key (derived from #2)%0a** column 4 = Debug backtrace information for potentially incompatible rules (filename, line number, pattern)%0a->(see [[Custom Markup]] [- {PmWiki/CustomMarkup$:Summary} -]).%0a->To see more than what [@?action=ruleset@] gives you, apply the [[Cookbook:MarkupRulesetDebugging]] recipe: it can also show the pattern and the replacement strings.%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#phpinfo]]%0a:?action='''phpinfo''': displays the output of %25hlt php%25@@phpinfo()@@ and exits. No page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#diag]]%0a:?action='''diag''': displays a dump of all global vars and exits. No page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#ENDENABLEDIAG]]%0a----%0a[[#scriptactions]]%0a!! Actions enabled by PmWiki Scripts%0a%0a[[#analyse]]%0a:?action='''analyze''': see [[(PmWiki:)Site Analyzer]] and [[(PmWiki:)Analyze Results]]%0a%0a[[#approvesites]]%0a:?action='''approvesites''': see [[PmWiki/Url approvals]] [- {PmWiki/UrlApprovals$:Summary} -]%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#analyseend]]%0a----%0a[[#cookbook]]%0a!! Actions enabled by [[Cookbook(:.)]] recipes%0a(more information about [[(PmWiki:)Custom Actions]])%0a%0a:?action='''admin''': see [[Cookbook:UserAuth2]] [- {Cookbook/UserAuth2$:Summary} -]%0a%0a:?action='''attachman''': see [[Cookbook:Attachman]] [- {Cookbook/Attachman$:Summary} -]%0a%0a:?action='''backup''': see [[Cookbook:BackupPages]] [- {Cookbook/BackupPages$:Summary} -]%0a%0a:?action='''clearsky''': see [[Cookbook:SearchCloud]] [- {Cookbook/SearchCloud$:Summary} -]%0a%0a:?action='''cm-dependencies''': see [[Cookbook:CodeMirror]] [- {Cookbook/CodeMirror$:Summary} -]%0a%0a:?action='''comment''': see [[Cookbook:CommentBox]] [- {Cookbook/CommentBox$:Summary} -]%0a%0a:?action='''comments''': see [[Cookbook:Comments]] [- {Cookbook/Comments$:Summary} -]%0a%0a:?action='''comment-rss''': see [[Cookbook:CommentDb]] [- {Cookbook/CommentDb$:Summary} -]%0a%0a:?action='''convert''': see [[Cookbook:ROEPatterns]] [- {Cookbook/ROEPatterns$:Summary} -]%0a%0a:?action='''converttable''': [[Cookbook:ConvertTable]] [- {Cookbook/ConvertTable$:Summary} -]%0a%0a:?action='''copy''': see [[Cookbook:MovePage]] [- {Cookbook/MovePage$:Summary} -]%0a%0a:?action='''csv''': see [[Cookbook:CSVAction]] [- {Cookbook/CSVAction$:Summary} -]%0a%0a:?action='''downloaddeleted''':%0a:?action='''delattach''':%0a:?action='''deldelattach''':%0a:?action='''fileinfo''':%0a:?action='''thumbnail''':%0a:?action='''undelattach''': [[Cookbook:Attachtable]] [- {Cookbook/Attachtable$:Summary} -]%0a%0a:?action='''delete''': see [[Cookbook:DeletePage]] [- {Cookbook/DeletePage$:Summary} -]%0a%0a:?action='''discuss''': see [[Cookbook:DiscussionTab]] [- {Cookbook/DiscussionTab$:Summary} -]%0a%0a:?action='''downloadman''': see [[Cookbook:DownloadManager]] [- {Cookbook/DownloadManager$:Summary} -]%0a%0a:?action='''expirediff''': see [[Cookbook:ExpireDiff]] [- {Cookbook/ExpireDiff$:Summary} -]%0a%0a:?action='''hidediff''': see [[Cookbook:HideDiff]] [- {Cookbook/HideDiff$:Summary} -]%0a%0a:?action='''hub''': see [[Cookbook:ExtensionHub]] [- {Cookbook/ExtensionHub$:Summary} -]%0a%0a:?action='''import''': see [[Cookbook:ImportText]] [- {Cookbook/ImportText$:Summary} -]%0a%0a:?action='''lang''': see [[Cookbook:MultiLanguageViews]] [- {Cookbook/MultiLanguageViews$:Summary} -]%0a:?action='''setlang''': see [[Cookbook:MultiLanguageViews]] [- {Cookbook/MultiLanguageViews$:Summary} -]%0a%0a:?action='''links''': see [[Cookbook:RenamePage]] [- {Cookbook/RenamePage$:Summary} -]%0a%0a:?action='''lockflipbox''': see [[Cookbook:Flipbox]] [- {Cookbook/Flipbox$:Summary} -]%0a:?action='''unlockflipbox''': see [[Cookbook:Flipbox]] [- {Cookbook/Flipbox$:Summary} -]%0a%0a:?action='''migr8''': see [[Cookbook:MigrateUTF8]] [- {Cookbook/MigrateUTF8$:Summary} -]%0a%0a:?action='''move''': see [[Cookbook:MovePage]] [- {Cookbook/MovePage$:Summary} -]%0a%0a:?action='''pageindex''': see [[Cookbook:ListCategories]] [- {Cookbook/ListCategories$:Summary} -]%0a%0a:?action='''PageUrl''': see [[Cookbook:CommentBoxPlus]] [- {Cookbook/CommentBoxPlus$:Summary} -]%0a%0a:?action='''pdf''': see [[Cookbook:GeneratePDF]] [- {Cookbook/GeneratePDF$:Summary} -] %0a: : or [[Cookbook:PmWiki2PDF]] [- {Cookbook/PmWiki2PDF$:Summary} -]%0a%0a:?action='''postupload2''': see [[Cookbook:UploadForm]] [- {Cookbook/UploadForm$:Summary} -]%0a%0a:?action='''ppdonate''': see [[Cookbook:PPDonate]] - [- {Cookbook/PPDonate$:Summary} -]%0a%0a:?action='''publish''': see [[Cookbook:PublishPDF]] [- {Cookbook/PublishPDF$:Summary} -]%0a%0a:?action='''purgeqns''': see [[Cookbook:ASCIIMath]] [- {Cookbook/ASCIIMath$:Summary} -]%0a%0a:?action='''pwchange''': see [[Cookbook:UserAuth2]] [- {Cookbook/UserAuth2$:Summary} -]%0a%0a:?action='''imgtpl''': (the ''imgtpl'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''createthumb''': (the ''createthumb'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''mini''': (this action is called automatically and should not be called by a link in a wiki page)%0a:?action='''purgethumbs''': see [[Cookbook:ThumbList]] [- {Cookbook/ThumbList$:Summary} -] \\%0a see [[Cookbook:Mini]] [- {Cookbook/Mini$:Summary} -]%0a%0a:?action='''recipecheck''': see [[Cookbook:RecipeCheck]] [- {Cookbook/RecipeCheck$:Summary} -]%0a%0a:?action='''regen''': see [[Cookbook:PageRegenerate]] [- {Cookbook/PageRegenerate$:Summary} -]%0a%0a:?action='''reindex''': see [[Cookbook:Reindex]] [- {Cookbook/Reindex$:Summary} -]%0a%0a:?action='''reindexcat''': See [[Cookbook:ReindexCategories]] [- {Cookbook/ReindexCategories$:Summary} -]%0a%0a:?action='''rename''':%0a:?action='''links''': see [[Cookbook:RenamePage]] [- {Cookbook/RenamePage$:Summary} -]%0a%0a:?action='''rmpi''': see [[Test.PageIndex]] [- {Test/PageIndex$:Summary} -]%0a%0a:?action='''share''':%0a:?action='''unshare''': see [[Cookbook:SharedPages]] [- {Cookbook/SharedPages$:Summary} -]%0a %0a:?action='''sitemap''': see [[Cookbook:GoogleSiteMap]] [- {Cookbook/GoogleSiteMap$:Summary} -]%0a%0a:?action='''sitemapaddgroups''':%0a:?action='''sitemapupdate''': see [[Cookbook:Sitemapper]] [- {Cookbook/Sitemapper$:Summary} -]%0a%0a:?action='''totalcounter''': see [[Cookbook:TotalCounter]] [- {Cookbook/TotalCounter$:Summary} -]%0a%0a:?action='''trash''':%0a:?action='''untrash''': see [[Cookbook:Trash]] [- {Cookbook/Trash$:Summary} -]%0a%0a:?action='''webadmin''': see [[Cookbook:WebAdmin]] [- {Cookbook/WebAdmin$:Summary} -]%0a%0a:?action='''zap''': see [[Cookbook:ZAP]] [- {Cookbook/ZAP$:Summary} -]%0a[[#cookbookend]]%0a----%0a[[#cookbookqueryskins]]%0a!! Query string parameters enabled by [[Cookbook(:.)]] recipes%0a%0a:?'''color'''=''colorscheme'':%0a:?'''setcolor'''=''colorscheme''%0a:?'''skintheme'''=''theme'':%0a:?'''setskintheme'''=''theme'': see [[Cookbook:ChoiceColorChanger ]] [- {Cookbook/ChoiceColorChanger$:Summary} -]%0a%0a%0a:?'''skin'''=''skinname'':%0a:?'''setskin'''=''skinname'': see [[https://www.pmwiki.org/wiki/Skins/SkinChange|SkinChange]] [- {Skins/SkinChange$:Summary} -]%0a%0a!!Custom actions%0a%0a*See [[(PmWiki:)CustomActions]]. +time=1720903155 diff --git a/wikilib.d/PmWiki.ChangeLog b/wikilib.d/PmWiki.ChangeLog index 4474d963..95a8f01e 100644 --- a/wikilib.d/PmWiki.ChangeLog +++ b/wikilib.d/PmWiki.ChangeLog @@ -1,9 +1,9 @@ -version=pmwiki-2.3.34 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum= (-321) +csum=2.3.36 (+67) name=PmWiki.ChangeLog -rev=1864 -targets=Cookbook.RecentChanges,PmWiki.MailingLists,PmWiki.EditVariables,PITS.01507,PITS.01502,PmWiki.LayoutVariables,PmWiki.UploadVariables,PmWiki.OtherVariables,PITS.01499,PITS.01498,PmWiki.WikiStyles,PITS.01497,Cookbook.DarkColorScheme,PmWiki.LinkVariables,Cookbook.PmSyntax-Talk,PmWiki.Notify,PITS.01431,PITS.01495,PITS.01493,PmWiki.PagelistVariables,PITS.01494,Cookbook.FuseEdit,PmWiki.BasicVariables,PmWiki.SecurityVariables,PITS.01488,PITS.01489,Cookbook.SectionEdit,PITS.01486,PITS.01297,PITS.01485,Cookbook.EditHelp,PITS.01484,PITS.01208,PITS.01483,PITS.01480,PmWiki.PageVariables,PITS.01478,PITS.01477,Cookbook.PmSyntax,Cookbook.CustomSyntax,PITS.01418,PITS.00447,PITS.01475,PITS.00908,PITS.01095,PmWiki.ChangeLogArchive -text=(:Summary: Log of changes made to PmWiki by [[Release(Notes)]]:)\%0aSee [[Cookbook:RecentChanges | the cookbook recent changes page]] for additional updates and activity by other developers, or join the [[PmWiki (/) mailing lists]] to discuss feature development with us.%0a%0a(:Prerelease:Changes made to the [[PmWiki:Subversion | subversion pre-release]] of PmWiki. You can get \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-latest-svn.zip|a full ZIP archive]] of the nightly version, or \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-nightly.zip|a partial export]] with only the files changed since {$Version}.:)\%0a{$:xPrerelease}%0a[[#svn-revision-4732]]%0a%0a!!! Version 2.3.35 (2024-07-07) [[#v2335]]%0a* PmSyntax [@(:comment ...:)@] add required space; add [@(:input defaults ...:)@] (with "s"). %25item pmhlt%25%0a* Enable highlighted source with ?action=source&highlight=1.%0a* Update default sidebar, https links, PITS and Mailing lists in conditional.%0a* Remove upload extensions "svg", "svgz", "htm", "html", "css", "swf", "fla", "epub", and files with no extension. Fix mime types for "wmf", "psd".%0a* Fix page title could accidentally include raw HTML.%0a* Update documentation.%0a%0a!!! Version 2.3.34 (2024-05-27) [[#v2334]]%0a* Delete wikilib.d/PmWiki.PerGroupCustomizations (unused redirect), content moved to GroupCustomizations 14 years ago.%0a* RecipeCheck remove table width attribute (suggested by Simon).%0a* Add %25pmhlt%25[@(:if action browse,edit:)@] conditional.%0a* $GUIButtons remove invalid elements (warning reported by Simon).%0a* phpdiff.php fix for PHP 8 when saving new pages (reported by Simon).%0a* Responsive skin: remove old CSS declarations like @-moz-keyframes (PITS:01507).%0a* Add upload extension 'm4a'.%0a* Update documentation.%0a%0a!!! Version 2.3.33 (2024-04-21) [[#v2333]]%0a* $EnablePreviewChanges to show "%25diffadd%25No changes%25%25" if there are no changes.%0a* PmSyntax add rules for colored pagenames and URLs inside bracket links.%0a* Responsive skin hide dropdown icons from printing.%0a* Fix some cases with conditional markup and markup expressions where an empty code could be evaluated (suggested by Goodguy00).%0a* Add $HTMLTitleFmt (PITS:01502).%0a* Cache auth conditional results for %25pmhlt%25[@(:if auth level:)@].%0a* Update blocklist.php for PHP 8, reported by Foster Schucker.%0a* Update documentation.%0a%0a!!! Version 2.3.32 (2024-03-24) [[#v2332]]%0a* Dark theme: add toggleImages(), add $ImgDarkSuffix, $FmtV['$PathUpload']. Restore light styles and pictures for printing.%0a* Responsive skin: white background when printing, move dark toggle label styles into skin.css.%0a* PmSyntax: only apply dark theme colors on screen (not print).%0a* Add upload extensions and image extension patterns AVIF, AVIFS.%0a* Lock AllRecentChanges in case of concurrent uploads.%0a* FileSizeCompact() allow for base 1000 (PITS:01499).%0a* Update documentation.%0a%0a!!! Version 2.3.31 (2024-02-23) [[#v2331]]%0a* Add $EnableDarkThemeToggle, enable 3-way theme toggle, "Light", "Dark" and "Auto", add annotation tooltip showing the current theme on tap and on mouse over.%0a* Refactor config data passed to pmwiki-utils.php, refactor dark toggle functions into a separate script. %0a* Responsive skin add body attributes for group and page name, update dark theme, enable auto theme (browser preferences) by default.%0a* PmSyntax improve dark theme thanks to a script by Said Achmiz; expose color properties for reuse.%0a* Refactor redirect quiet (PITS:01498).%0a* Page attributes passwords form: allow for +addition and -removal of passwords, users, groups.%0a* Allow $EditTemplatesFmt entries to apply to specific pages with name= specification (suggested by Simon).%0a* Forms add attribute "form".%0a* Refactor $PostConfig to allow called functions to update it.%0a* Update RecipeCheck to also list skins, suggested by Simon.%0a* Refactor PrintFmt, add $EnablePrePrintFmt.%0a* [[WikiStyles]] add 'columns'.%0a* When Highlight.js is enabled, Vardoc links will be the same color as variables in highlighted code blocks.%0a* Refactor $EnableUploadVersions.%0a* Update documentation.%0a%0a!!! Version 2.3.30 (2024-01-22) [[#v2330]]%0a* Add prototype for dark theme toggle. See PITS:01497 and Cookbook:DarkColorScheme.%0a** PmWiki-responsive skin converted CSS colors to variables, added dark theme styles.%0a** Add skins/pmwiki/pmwiki-32.svg, enable default for $PageLogoUrl.%0a** PmSyntax added dark theme styles.%0a* $EnableUploadMimeMatch with Fileinfo not enabled to deny uploads.%0a* upload.php fix warning for PHP 8.%0a* RecipeCheck use https, suggested by Simon.%0a* PrintDiff() add $since argument.%0a* Add $EnableRedirectQuiet = 2. Prevent infinite redirect loops.%0a* Fix Attach: links with escaped path and filename.%0a* Improved readability for inline diffs in page history.%0a* Forms enable input e_author not only for action=edit, fix unquoted positional form action URL.%0a* Update documentation.%0a%0a!!! Version 2.3.29 (2023-12-18) [[#v2329]]%0a* Fix urlapprove.php for PHP 8.2. %0a* PmSyntax textarea remove styles for width, height (Cookbook:PmSyntax-Talk), allow for fractional dimensions of the highlighted area.%0a* $MarkupDirectiveFunctions allow dashes in attribute names.%0a* Update documentation.%0a%0a!!! Version 2.3.28 (2023-11-27) [[#v2328]]%0a* Add input ''month'' and ''color'' fields.%0a* Add $NotifyRelatedTrailFmt.%0a* Reverse simpletable row backgrounds when there is a thead element.%0a* Fix pmwiki-utils.js when window.localStorage is disabled.%0a* UrlApprovals allow https: URLs if the http: URL for the same domain has been approved (PITS:01431).%0a* Update documentation.%0a%0a!!! Version 2.3.27 (2023-10-23) [[#v2327]]%0a* When merging last edit, if there is no change summary, reuse the last one. %0a* Keep unknown date/time formats for undefined timezone (PITS:01495).%0a* DiffRenderSource() fix for PHP 8, keep ins/del tags on the same line.%0a* The ".diffmarkup" element now has the style "white-space: pre-wrap".%0a* Add new keyword shortcuts Ctrl+B (bold), Ctrl+I (italic), Ctrl+K (link/unlink).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.26 (2023-09-28) [[#v2326]]%0a* Add configurable $InputLabelFmt snippet (PITS:01493).%0a* Add configurable $TrailFmt snippets.%0a* Add $EnableSearchAtLeastOneTerm, default disabled.%0a* Unset upload extensions if size for the extension is set to 0.%0a* Update feeds.php for PHP 8.2 (PITS:01494).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.25 (2023-07-29) [[#v2325]]%0a* Updates for PHP 8.2.%0a* Fix pagelist when 2+ directives on the same line, reported by Simon.%0a* Fix possible bug with internal group(header|footer) directives caused by PRR().%0a* Update documentation.%0a%0a%0a!!! Version 2.3.24 (2023-06-06) [[#v2324]]%0a* Add $EnableUploadMimeMatch.%0a* Add $EnableMergeLastMinorEdit, edit functions MergeLastMinorEdit (based on Cookbook:FuseEdit), SaveChangeSummary (refactored out of HandleEdit).%0a* Fix LogoutCookies() doesn't use a $pagename argument.%0a* PmForm add condition 'validemail' for use in template require.%0a* Add $PmCryptAlgo, pmcrypt() to call password_verify() if it exists. %0a* Refactor HandleDownload() split ServeDownload($filepath, $upname).%0a* Add InsertEditFunction($newfn, $where='%3cPostPage').%0a* Add $AuthFormRespCode.%0a* Add $EnableDownloadRanges, default 1.%0a* When the token is expired, reopen edit form rather than abort.%0a* LocalTimes add $EnableRCListLastEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.23 (2023-05-03) [[#v2323]]%0a* Refactor pmtoken() to use session tokens, enable for core actions.%0a* Add %25pmhlt%25[@(:input pmtoken:)@] helper.%0a* PmForm add $PmFormEnablePmToken.%0a* Refactor @@HandleLogoutA()@@ split @@LogoutCookies()@@. %0a* Fix PRCB() for PHP %3c 7.4.%0a* Update documentation.%0a%0a!!! Version 2.3.22 (2023-04-06) [[#v2322]]%0a* Add scripts/pmform.php, Site.PmFormTemplates.%0a* FmtDateTimeZ() can now accept Unix timestamps.%0a* Pagelists fix bug with multiple category=+A,+B entries.%0a* Update for PHP 8.1 (PITS:01488).%0a* MarkupDirectiveFunctions will now cast numeric arguments to floats.%0a* Prevent errors in custom PageVariables from generating internal server errors (PITS:01489).%0a* Improve inline diff for rare cases (end of page).%0a* Forms/buttons with @@data-pmconfirm="Question"@@ will ask the question before they are submitted.%0a* Update documentation.%0a%0a%0a!!! Version 2.3.21 (2023-03-06) [[#v2321]]%0a* Add $IsPmArchive, $PmArchiveDir.%0a* Sortable tables with %3ctime datetime=""> elements can be sorted by the datetime attribute. Fix for tables with preexisting %3cthead> element.%0a* Updates for PHP8.%0a* Add CSV upload extension.%0a* LocalTimes add mode=3 to show old dates as MM'YY.%0a* Fix bug with multiline $MarkupDirectiveFunctions, reported by Antti Tikanmäki.%0a* Add $EnableCopyCode and Copy code button to %3cpre> blocks, suggested by Alex Doré.%0a* Update PmTOC to work better with Cookbook:SectionEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.20 (2023-02-12) [[#v2320]]%0a* Fix undefined variable warning, reported by Gregor Klarič.%0a%0a!!! Version 2.3.19 (2023-02-11) [[#v2319]]%0a* Only set cookie params if headers not sent. %0a* Update for PHP8.2, reported by Dfaure. PageVar() update for PHP 8.%0a* Add variable $DiffPrepareInlineFunction.%0a* PageListCache() remove unused global $PageIndexFile.%0a* Add configurable $LocalCSSDir, $LocalCSSDirUrl.%0a* DownloadUrl() add $FmtV['$LinkDownload'] with current or future download link.%0a* Add pm_recode() helper function (based on PageStore::recodefn), check for more transcode options.%0a* HandleBrowse() add $FmtV['$PageSourceText'].%0a* Add helper function KeepBlock().%0a* Add $FarmPubDirPrefix, pm_servefile(), $ServeFileExts.%0a* Update documentation.%0a%0a!!! Version 2.3.18 (2023-01-15) [[#v2318]]%0a* Refactor scripts/utils.php, add pm_json_encode() (PITS:01486).%0a* EditAutoText() fix for lines ending with multiple backslashes.%0a* PmSyntax optimize/refactor for large pages (cont.), fix inline escaped texts could ignore line markups, add EnableStopwatch.%0a* Notify fix typo in regular expression.%0a* {-Add $EnableUploadVersions >=10 to rename base.ext to base-1.ext, base-2.ext,...-} ''Redesigned in 2.3.31''%0a* CondAuth() fix bug with global $AuthList.%0a* Add helper function PRCB() for simpler preg_replace_callback passing variables.%0a* Update scripts/refcount.php for PHP 8, reported by George Murray.%0a* Add PageVariable $PageLogoUrl (PITS:01297).%0a* Update documentation.%0a%0a!!! Version 2.3.17 (2022-12-17) [[#v2317]]%0a* WikiStyles trim class names (PITS:01485).%0a* GUIEditButtons refactor to enable Undo in textarea; allow for custom functions to configure mopen, mclose, and unselect for their buttons.%0a* [[Cookbook:EditHelp|EditHelp]] refactor to allow undo; add shortcuts Ctrl+L convert selection to lowercase, Ctrl+Shift+L to uppercase, Ctrl+Shift+ArrowUp and ArrowDown to swap lines.%0a* Skip upgrade check if $EnableReadOnly.%0a* Fix bug with multiple $MarkupDirectiveFunctions.%0a* Add $EnableBaseNameConfig.%0a* PmSyntax optimize for larger pages (cont.).%0a* Input password add class "inputbox" like the other fields.%0a* CondAuth() added way to check for usergroup permissions.%0a* Update in pagelist.php for PHP 8.%0a* Documentation update.%0a%0a!!! Version 2.3.16 (2022-11-28) [[#v2316]]%0a* Class PPRC add generic callbacks.%0a* IncludeText() update for PHP 8, reported by V.Krishn.%0a* WikiStyle add 'overflow', 'notoc'.%0a* Add PmNonce().%0a* PmTOC update indented link style->classname. %0a* Responsive skin: replace %25pmhlt%25[@[[%3c%3c]]@] with %25hlt html%25[@%3cbr class='clearboth' />@], update PmTOC styles.%0a* $EnableListIncludedPages use class name instead of style. %0a* guiedit.js remove unneeded style.%0a* PmSyntax realign font for nested programming languages in the edit form, optimize for large pages.%0a* Only call session_status() if function exists.%0a* Edit form remove unsafe-inline script.%0a* Revert WikiStyleToClassName(), PrePrintFmt() -- need more work (PITS:01484).%0a* Documentation update.%0a%0a!!! Version 2.3.15 (2022-11-21) [[#v2315]]%0a* CSS pre, code relative/scalable font-size (pmwiki-responsive skin).%0a* PmSyntax add variable --pmsyntax-fontsize-editform and split from --pmsyntax-fontsize [[https://www.pmichaud.com/pipermail/pmwiki-users/2022-November/064936.html|#]].%0a* PmSyntax fix [@[[Highlight]]@] label font size and family (reported by Hans).%0a* Add variable $CookieSameSite default to 'Lax'%0a* Add argument $samesite to pmsetcookie(), default to $CookieSameSite, refactor for old and new PHP versions. %0a* Add function pm_session_start() respecting local configuration.%0a* CSP header add base-uri=self; object-src 'none'.%0a* Add $HTTPHeaders['XSSP'] = 'X-XSS-Protection: 1; mode=block'.%0a* Rewrite GUIButtons logic to avoid unsafe-inline JavaScript.%0a* Refactor WikiStyles, replace inline styles with class names to avoid unsafe-inline CSS.%0a* Refactor PQA(), tables, cells, to replace inline style="..." with class names to avoid unsafe-inline CSS.%0a* Add PrePrintFmt(), refactor PrintFmt(), PrintSkin() to process wiki pages, skin parts, and skin functions to HTML before outputting headers.%0a* Fix XSS vulnerability.%0a* Documentation update.%0a%0a!!! Version 2.3.14 (2022-11-03) [[#v2314]]%0a* Searchbox also escape custom field names.%0a* Prevent double-encoded entities in searchbox (reported by Simon).%0a* Trim $Author (PITS:01208).%0a* Replace autofocus inline JavaScript with attributes.%0a* Edit form: the label next to the "Minor edit" checkbox now toggles the checkbox.%0a* PmSyntax recognize %25pmhlt%25[@(:template requires? ...:)@].%0a* Update for PHP 8. %0a* Obsolete PCCF() from PHP 7.2 not 8.0.%0a* Add array $ObsoleteMarkups, function TraceMarkup(), update Markup(), Markup_e() and ObsoleteMarkup(), to retrieve and show files and line numbers for obsolete/disabled markup rules.%0a* Fix bug with PSFT format %25L.%0a* Update documentation.%0a%0a!!! Version 2.3.13 (2022-10-07) [[#v2313]]%0a* Close potential XSS vulnerability, reported by lukystreik (PITS:01483).%0a* Refactor $MultiFactorAuthFunction, add $FailedLoginsFunction.%0a* Update documentation.%0a%0a!!! Version 2.3.12 (2022-09-25) [[#v2312]]%0a* Stripmagic() cast null to "" and other fixes for PHP 8.%0a* Fix parse error for complex conditionals with empty variables (PITS:01480).%0a* PSFT() and MarkupExpression [@ftime@] add %25L as human readable local timestamp. %0a* MarkupRestore() fix wrong cast to empty string of false-ish values.%0a* PrintAuthForm() split from PmWikiAuth(). %0a* Fix warning for unneeded session_regenerate_id() (reported by George Murray).%0a* Update documentation.%0a%0a!!! Version 2.3.11 (2022-08-30) [[#v2311]]%0a* Add [[PageVariables]] %25pmhlt%25 [@{$GroupHomePage}@], [@{$GroupHomePageName}@], [@{$GroupHomePageTitle}@], [@{$GroupHomePageTitlespaced}@].%0a* Add $MarkupDirectiveFunctions.%0a* Fix stripmagic() for arrays recently broke after PHP8 update.%0a* Update documentation.%0a%0a!!! Version 2.3.10 (2022-08-20) [[#v2310]]%0a* Update for PHP 8.1 (reported by Armin Bühler).%0a* Forms will now prefill wildcard variables from $DefaultUnsetPageTextVars or $DefaultEmptyPageTextVars.%0a* $EnablePmSyntax = 3; will enable syntax highlighting in the edit form by default, without the user clicking on "Highlight". Fix occasional text mis-alignment between the text area and the highlighted block.%0a* Update documentation.%0a%0a!!! Version 2.3.9 (2022-08-18) [[#v239]]%0a* Add non-wildcard $DefaultUnsetPageTextVars to %25pmhlt%25[@(:input default:)@] (reported by Johnny).%0a* PmSyntax handles new selectors pre.pmhlt, code.pmhlt.%0a* Update for PHP 8 (PITS:01478).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.8 (2022-07-22) [[#v238]]%0a* PmSyntax fix for 2 different %25pmhlt%25 [@%25hlt%25@] on the same line (reported by Simon).%0a* Fix broken include when the first page doesn't exist.%0a* Update documentation.%0a%0a!!! Version 2.3.7 (2022-06-28) [[#v237]]%0a* $HTTPHeaders add X-Frame-Options (suggested by Imagine Dragon) and Content-Security-Policy to disallow embedding in external websites by default.%0a* $EnableHighlight will now remember any links to PmWiki variables and restore them after the highlighting, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* $EnablePmSyntax will now process %25pmhlt%25[@%25hlt pmwiki%25@] in addition to [@%25pmhlt%25@] blocks, and escaped markup after it will be tentatively highlighted.%0a* Update documentation.%0a%0a!!! Version 2.3.6 (2022-06-19) [[#v236]]%0a* Fixes for PHP 8.%0a* Add form attribute "lang".%0a* Sortable tables allow for table headers to have markup such as bold (except links). It will now use a case-insensitive natural ordering.%0a* Allow for $UploadVerifyFunction to modify $upname.%0a* Add variable $PageIndexTermsFunction.%0a* Searchbox allow for removal of submit button if [@label=""@]; add default [@placeholder="$[Search]"@].%0a* Fix author.php may be included before some variables are defined, reported by Said Achmiz.%0a* $EnableHighlight convert code blocks to plain text, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* Documentation update.%0a%0a%0a!!! Version 2.3.5 (2022-05-23) [[#v235]]%0a* Fix broken list=grouphomes (PITS:01477).%0a* Add DisableSkinParts() helper function for recipes.%0a* HandlePostUpload: add @@$FmtV["$filepath"]@@ and @@$FmtV["$upurl"]@@ with the file path and direct URL to the newly uploaded file.%0a* In pmwiki-utils.js, replace forgotten ''let'' with ''var'' (suggested by SteP).%0a* Update for PHP 8.1.%0a* Update documentation.%0a%0a!!! Version 2.3.4 (2022-04-22) [[#v234]]%0a* Fixes for PHP 8 warnings, reported by Siegfried Seibert.%0a* Update documentation.%0a%0a!!! Version 2.3.3 (2022-03-26) [[#v233]]%0a* Fix for PHP 8 warnings, reported by Jean-Patrick Charrey, Dominique Faure and Siegfried Seibert.%0a* Update README.txt and docs/ files, suggested by Simon Davis.%0a* Update documentation.%0a%0a!!! Version 2.3.2 (2022-02-09) [[#v232]]%0a* Allow for $EnableLocalTimes to define custom duration of the pulled page history.%0a* Rename variable $EnableIncludedPages to $EnableListIncludedPages (avoid ambiguity).%0a* Remove $LinkAlt when an embedded picture without an alternative text fails to load.%0a* PmSyntax:%0a** Allow for line breaks \\ inside headings, tables, list items (like the core).%0a** Parallel processing of multiple blocks.%0a* Add scripts/utils.php; move loading of pmwiki-utils.js and PmSyntax to scripts/utils.js.%0a** Add $EnablePmUtils, default enabled.%0a** Parallel processing of the pmwiki-utils.js utility functions.%0a** Move pmwiki-utils.js move to $HTMLHeaderFmt (often prevents page redraw with the TOC/PmToggle/LocalTimes).%0a* Fix bug causing invalid page name when the name is "Group.0".%0a* Fix PHP 8.1.2 warnings, reported by Jürgen Godau and Dominique Faure.%0a* LocaltTimes fix "rcnew" classes for wikis with the older format.%0a* Update documentation.%0a%0a!!! Version 2.3.1 (2022-01-15) [[#v231]]%0a%0a* Fix the release script which broke the $VersionNum variable and the [@[[#anchor]]@] markup with the PmWiki-responsive skin.%0a%0a!!! Version 2.3.0 (2022-01-15) [[#v230]]%0a* Add PmSyntax, $EnablePmSyntax, $CustomSyntax, [@{$EnabledIMap}@], see Cookbook:PmSyntax, Cookbook:CustomSyntax.%0a* [@(:markup:)@] can now have @@class=norender@@ to only show the source code without processing it.%0a* Updates for PHP 8.1, hide warnings, add PSFT() replacement for strftime() and 2 callbacks, $EnableFTimeNew, update core function calls, add [@%25o@] for the ordinal suffix of the date (PITS:01418).%0a* Notify: @@tz=@@ (timezone) per-user.%0a* PageList add category= argument (PITS:00447, PITS:01475); link= and category= now accept multiple pages, wildcards, and negations (PITS:00908).%0a* [=[[!Category]]=] links can have alternative text (PITS:01095).%0a* Simplify/optimize pmwiki-utils.js when using datasets, simplify sorting of table rows without cloning, add LocalTimes().%0a* Page history diff anchors to also have "id=" attributes in addition to "name=".%0a* Add $EnableLocalTimes (default disabled) and styles, add HandleDiffList().%0a* Add markup %25pmhlt%25[@@2022-01-09T08:35:00Z@]%25%25 output as %3ctime>; localized if $EnableLocalTimes.%0a** Add $CurrentLocalTime in the above format, used by default in $RecentChangesFmt.%0a* Add $EnableRecentUploads (only Site.AllRecentChanges, only if $RecentUploadsFmt not defined).%0a* PmTOC update CSS for properly indented subheadings.%0a* Edit form $EnableIncludedPages, add placeholders to e_changesummary and e_author. Enable $EnableNotSavedWarning, add to sample-config.php. EditHelp to behave more like a word processor, typing "Enter" twice without writing text removes the preceding bullet.%0a* Responsive skin details>summary:hover {color:navy, cursor: pointer;}.%0a* PrintDiff() add classes for the delay between edits: diffday, diffweek, diffmonth, diffyear.%0a* Add helper function @@DownloadUrl($pagename, $path)@@ moved from @@LinkUpload()@@.%0a* Add [=$[ULby]=] i18n string 'uploaded by'.%0a* Update documentation.%0a%0a!!! [[#older]] Older versions%0a[[(PmWiki:)ChangeLog Archive]] - changes prior to version 2.3.0.%0a -time=1720337277 +rev=1871 +targets=Cookbook.RecentChanges,PmWiki.MailingLists,PmWiki.LayoutVariables,Cookbook.DragDropMultiUpload,PmWiki.UploadVariables,PmWiki.EditVariables,PITS.01510,PITS.01507,PITS.01502,PmWiki.OtherVariables,PITS.01499,PITS.01498,PmWiki.WikiStyles,PITS.01497,Cookbook.DarkColorScheme,PmWiki.LinkVariables,Cookbook.PmSyntax-Talk,PmWiki.Notify,PITS.01431,PITS.01495,PITS.01493,PmWiki.PagelistVariables,PITS.01494,Cookbook.FuseEdit,PmWiki.BasicVariables,PmWiki.SecurityVariables,PITS.01488,PITS.01489,Cookbook.SectionEdit,PITS.01486,PITS.01297,PITS.01485,Cookbook.EditHelp,PITS.01484,PITS.01208,PITS.01483,PITS.01480,PmWiki.PageVariables,PITS.01478,PITS.01477,Cookbook.PmSyntax,Cookbook.CustomSyntax,PITS.01418,PITS.00447,PITS.01475,PITS.00908,PITS.01095,PmWiki.ChangeLogArchive +text=(:Summary: Log of changes made to PmWiki by [[Release(Notes)]]:)\%0aSee [[Cookbook:RecentChanges | the cookbook recent changes page]] for additional updates and activity by other developers, or join the [[PmWiki (/) mailing lists]] to discuss feature development with us.%0a%0a(:Prerelease:Changes made to the [[PmWiki:Subversion | subversion pre-release]] of PmWiki. You can get \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-latest-svn.zip|a full ZIP archive]] of the nightly version, or \%0a[[https://www.pmwiki.org/pub/pmwiki-devel/pmwiki-nightly.zip|a partial export]] with only the files changed since {$Version}.:)\%0a{$:xPrerelease}%0a%0a(:if false:)%0a(:comment PosArgs and $MessagesFmt were released in 2.3.34 but are undocumented and may change, so I'll announce about them in a future version:)%0a* Add helper function PosArgs($args, $posnames).%0a* Refactor $MessagesFmt to allow nested arrays with keys and %25pmhlt%25 [@(:messages key=a,b:)@]%25%25 that can be set from recipes.%0a[[#svn-revision-4753]]%0a(:ifend:)%0a!!! Version 2.3.36 (2024-08-07) [[#v2336]]%0a* Add $EnableUploadDrop based on Cookbook:DragDropMultiUpload.%0a* Add $TROEPatterns.%0a* Update for PHP 8 (PITS:01510)%0a* Store a history entry when a page is deleted.%0a* Update documentation.%0a%0a!!! Version 2.3.35 (2024-07-07) [[#v2335]]%0a* PmSyntax [@(:comment ...:)@] add required space; add [@(:input defaults ...:)@] (with "s"). %25item pmhlt%25%0a* Enable highlighted source with ?action=source&highlight=1.%0a* Update default sidebar, https links, PITS and Mailing lists in conditional.%0a* Remove upload extensions "svg", "svgz", "htm", "html", "css", "swf", "fla", "epub", and files with no extension. Fix mime types for "wmf", "psd".%0a* Fix page title could accidentally include raw HTML.%0a* Update documentation.%0a%0a!!! Version 2.3.34 (2024-05-27) [[#v2334]]%0a* Delete wikilib.d/PmWiki.PerGroupCustomizations (unused redirect), content moved to GroupCustomizations 14 years ago.%0a* RecipeCheck remove table width attribute (suggested by Simon).%0a* Add %25pmhlt%25[@(:if action browse,edit:)@] conditional.%0a* $GUIButtons remove invalid elements (warning reported by Simon).%0a* phpdiff.php fix for PHP 8 when saving new pages (reported by Simon).%0a* Responsive skin: remove old CSS declarations like @-moz-keyframes (PITS:01507).%0a* Add upload extension 'm4a'.%0a* Update documentation.%0a%0a!!! Version 2.3.33 (2024-04-21) [[#v2333]]%0a* $EnablePreviewChanges to show "%25diffadd%25No changes%25%25" if there are no changes.%0a* PmSyntax add rules for colored pagenames and URLs inside bracket links.%0a* Responsive skin hide dropdown icons from printing.%0a* Fix some cases with conditional markup and markup expressions where an empty code could be evaluated (suggested by Goodguy00).%0a* Add $HTMLTitleFmt (PITS:01502).%0a* Cache auth conditional results for %25pmhlt%25[@(:if auth level:)@].%0a* Update blocklist.php for PHP 8, reported by Foster Schucker.%0a* Update documentation.%0a%0a!!! Version 2.3.32 (2024-03-24) [[#v2332]]%0a* Dark theme: add toggleImages(), add $ImgDarkSuffix, $FmtV['$PathUpload']. Restore light styles and pictures for printing.%0a* Responsive skin: white background when printing, move dark toggle label styles into skin.css.%0a* PmSyntax: only apply dark theme colors on screen (not print).%0a* Add upload extensions and image extension patterns AVIF, AVIFS.%0a* Lock AllRecentChanges in case of concurrent uploads.%0a* FileSizeCompact() allow for base 1000 (PITS:01499).%0a* Update documentation.%0a%0a!!! Version 2.3.31 (2024-02-23) [[#v2331]]%0a* Add $EnableDarkThemeToggle, enable 3-way theme toggle, "Light", "Dark" and "Auto", add annotation tooltip showing the current theme on tap and on mouse over.%0a* Refactor config data passed to pmwiki-utils.php, refactor dark toggle functions into a separate script. %0a* Responsive skin add body attributes for group and page name, update dark theme, enable auto theme (browser preferences) by default.%0a* PmSyntax improve dark theme thanks to a script by Said Achmiz; expose color properties for reuse.%0a* Refactor redirect quiet (PITS:01498).%0a* Page attributes passwords form: allow for +addition and -removal of passwords, users, groups.%0a* Allow $EditTemplatesFmt entries to apply to specific pages with name= specification (suggested by Simon).%0a* Forms add attribute "form".%0a* Refactor $PostConfig to allow called functions to update it.%0a* Update RecipeCheck to also list skins, suggested by Simon.%0a* Refactor PrintFmt, add $EnablePrePrintFmt.%0a* [[WikiStyles]] add 'columns'.%0a* When Highlight.js is enabled, Vardoc links will be the same color as variables in highlighted code blocks.%0a* Refactor $EnableUploadVersions.%0a* Update documentation.%0a%0a!!! Version 2.3.30 (2024-01-22) [[#v2330]]%0a* Add prototype for dark theme toggle. See PITS:01497 and Cookbook:DarkColorScheme.%0a** PmWiki-responsive skin converted CSS colors to variables, added dark theme styles.%0a** Add skins/pmwiki/pmwiki-32.svg, enable default for $PageLogoUrl.%0a** PmSyntax added dark theme styles.%0a* $EnableUploadMimeMatch with Fileinfo not enabled to deny uploads.%0a* upload.php fix warning for PHP 8.%0a* RecipeCheck use https, suggested by Simon.%0a* PrintDiff() add $since argument.%0a* Add $EnableRedirectQuiet = 2. Prevent infinite redirect loops.%0a* Fix Attach: links with escaped path and filename.%0a* Improved readability for inline diffs in page history.%0a* Forms enable input e_author not only for action=edit, fix unquoted positional form action URL.%0a* Update documentation.%0a%0a!!! Version 2.3.29 (2023-12-18) [[#v2329]]%0a* Fix urlapprove.php for PHP 8.2. %0a* PmSyntax textarea remove styles for width, height (Cookbook:PmSyntax-Talk), allow for fractional dimensions of the highlighted area.%0a* $MarkupDirectiveFunctions allow dashes in attribute names.%0a* Update documentation.%0a%0a!!! Version 2.3.28 (2023-11-27) [[#v2328]]%0a* Add input ''month'' and ''color'' fields.%0a* Add $NotifyRelatedTrailFmt.%0a* Reverse simpletable row backgrounds when there is a thead element.%0a* Fix pmwiki-utils.js when window.localStorage is disabled.%0a* UrlApprovals allow https: URLs if the http: URL for the same domain has been approved (PITS:01431).%0a* Update documentation.%0a%0a!!! Version 2.3.27 (2023-10-23) [[#v2327]]%0a* When merging last edit, if there is no change summary, reuse the last one. %0a* Keep unknown date/time formats for undefined timezone (PITS:01495).%0a* DiffRenderSource() fix for PHP 8, keep ins/del tags on the same line.%0a* The ".diffmarkup" element now has the style "white-space: pre-wrap".%0a* Add new keyword shortcuts Ctrl+B (bold), Ctrl+I (italic), Ctrl+K (link/unlink).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.26 (2023-09-28) [[#v2326]]%0a* Add configurable $InputLabelFmt snippet (PITS:01493).%0a* Add configurable $TrailFmt snippets.%0a* Add $EnableSearchAtLeastOneTerm, default disabled.%0a* Unset upload extensions if size for the extension is set to 0.%0a* Update feeds.php for PHP 8.2 (PITS:01494).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.25 (2023-07-29) [[#v2325]]%0a* Updates for PHP 8.2.%0a* Fix pagelist when 2+ directives on the same line, reported by Simon.%0a* Fix possible bug with internal group(header|footer) directives caused by PRR().%0a* Update documentation.%0a%0a%0a!!! Version 2.3.24 (2023-06-06) [[#v2324]]%0a* Add $EnableUploadMimeMatch.%0a* Add $EnableMergeLastMinorEdit, edit functions MergeLastMinorEdit (based on Cookbook:FuseEdit), SaveChangeSummary (refactored out of HandleEdit).%0a* Fix LogoutCookies() doesn't use a $pagename argument.%0a* PmForm add condition 'validemail' for use in template require.%0a* Add $PmCryptAlgo, pmcrypt() to call password_verify() if it exists. %0a* Refactor HandleDownload() split ServeDownload($filepath, $upname).%0a* Add InsertEditFunction($newfn, $where='%3cPostPage').%0a* Add $AuthFormRespCode.%0a* Add $EnableDownloadRanges, default 1.%0a* When the token is expired, reopen edit form rather than abort.%0a* LocalTimes add $EnableRCListLastEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.23 (2023-05-03) [[#v2323]]%0a* Refactor pmtoken() to use session tokens, enable for core actions.%0a* Add %25pmhlt%25[@(:input pmtoken:)@] helper.%0a* PmForm add $PmFormEnablePmToken.%0a* Refactor @@HandleLogoutA()@@ split @@LogoutCookies()@@. %0a* Fix PRCB() for PHP %3c 7.4.%0a* Update documentation.%0a%0a!!! Version 2.3.22 (2023-04-06) [[#v2322]]%0a* Add scripts/pmform.php, Site.PmFormTemplates.%0a* FmtDateTimeZ() can now accept Unix timestamps.%0a* Pagelists fix bug with multiple category=+A,+B entries.%0a* Update for PHP 8.1 (PITS:01488).%0a* MarkupDirectiveFunctions will now cast numeric arguments to floats.%0a* Prevent errors in custom PageVariables from generating internal server errors (PITS:01489).%0a* Improve inline diff for rare cases (end of page).%0a* Forms/buttons with @@data-pmconfirm="Question"@@ will ask the question before they are submitted.%0a* Update documentation.%0a%0a%0a!!! Version 2.3.21 (2023-03-06) [[#v2321]]%0a* Add $IsPmArchive, $PmArchiveDir.%0a* Sortable tables with %3ctime datetime=""> elements can be sorted by the datetime attribute. Fix for tables with preexisting %3cthead> element.%0a* Updates for PHP8.%0a* Add CSV upload extension.%0a* LocalTimes add mode=3 to show old dates as MM'YY.%0a* Fix bug with multiline $MarkupDirectiveFunctions, reported by Antti Tikanmäki.%0a* Add $EnableCopyCode and Copy code button to %3cpre> blocks, suggested by Alex Doré.%0a* Update PmTOC to work better with Cookbook:SectionEdit.%0a* Update documentation.%0a%0a!!! Version 2.3.20 (2023-02-12) [[#v2320]]%0a* Fix undefined variable warning, reported by Gregor Klarič.%0a%0a!!! Version 2.3.19 (2023-02-11) [[#v2319]]%0a* Only set cookie params if headers not sent. %0a* Update for PHP8.2, reported by Dfaure. PageVar() update for PHP 8.%0a* Add variable $DiffPrepareInlineFunction.%0a* PageListCache() remove unused global $PageIndexFile.%0a* Add configurable $LocalCSSDir, $LocalCSSDirUrl.%0a* DownloadUrl() add $FmtV['$LinkDownload'] with current or future download link.%0a* Add pm_recode() helper function (based on PageStore::recodefn), check for more transcode options.%0a* HandleBrowse() add $FmtV['$PageSourceText'].%0a* Add helper function KeepBlock().%0a* Add $FarmPubDirPrefix, pm_servefile(), $ServeFileExts.%0a* Update documentation.%0a%0a!!! Version 2.3.18 (2023-01-15) [[#v2318]]%0a* Refactor scripts/utils.php, add pm_json_encode() (PITS:01486).%0a* EditAutoText() fix for lines ending with multiple backslashes.%0a* PmSyntax optimize/refactor for large pages (cont.), fix inline escaped texts could ignore line markups, add EnableStopwatch.%0a* Notify fix typo in regular expression.%0a* {-Add $EnableUploadVersions >=10 to rename base.ext to base-1.ext, base-2.ext,...-} ''Redesigned in 2.3.31''%0a* CondAuth() fix bug with global $AuthList.%0a* Add helper function PRCB() for simpler preg_replace_callback passing variables.%0a* Update scripts/refcount.php for PHP 8, reported by George Murray.%0a* Add PageVariable $PageLogoUrl (PITS:01297).%0a* Update documentation.%0a%0a!!! Version 2.3.17 (2022-12-17) [[#v2317]]%0a* WikiStyles trim class names (PITS:01485).%0a* GUIEditButtons refactor to enable Undo in textarea; allow for custom functions to configure mopen, mclose, and unselect for their buttons.%0a* [[Cookbook:EditHelp|EditHelp]] refactor to allow undo; add shortcuts Ctrl+L convert selection to lowercase, Ctrl+Shift+L to uppercase, Ctrl+Shift+ArrowUp and ArrowDown to swap lines.%0a* Skip upgrade check if $EnableReadOnly.%0a* Fix bug with multiple $MarkupDirectiveFunctions.%0a* Add $EnableBaseNameConfig.%0a* PmSyntax optimize for larger pages (cont.).%0a* Input password add class "inputbox" like the other fields.%0a* CondAuth() added way to check for usergroup permissions.%0a* Update in pagelist.php for PHP 8.%0a* Documentation update.%0a%0a!!! Version 2.3.16 (2022-11-28) [[#v2316]]%0a* Class PPRC add generic callbacks.%0a* IncludeText() update for PHP 8, reported by V.Krishn.%0a* WikiStyle add 'overflow', 'notoc'.%0a* Add PmNonce().%0a* PmTOC update indented link style->classname. %0a* Responsive skin: replace %25pmhlt%25[@[[%3c%3c]]@] with %25hlt html%25[@%3cbr class='clearboth' />@], update PmTOC styles.%0a* $EnableListIncludedPages use class name instead of style. %0a* guiedit.js remove unneeded style.%0a* PmSyntax realign font for nested programming languages in the edit form, optimize for large pages.%0a* Only call session_status() if function exists.%0a* Edit form remove unsafe-inline script.%0a* Revert WikiStyleToClassName(), PrePrintFmt() -- need more work (PITS:01484).%0a* Documentation update.%0a%0a!!! Version 2.3.15 (2022-11-21) [[#v2315]]%0a* CSS pre, code relative/scalable font-size (pmwiki-responsive skin).%0a* PmSyntax add variable --pmsyntax-fontsize-editform and split from --pmsyntax-fontsize [[https://www.pmichaud.com/pipermail/pmwiki-users/2022-November/064936.html|#]].%0a* PmSyntax fix [@[[Highlight]]@] label font size and family (reported by Hans).%0a* Add variable $CookieSameSite default to 'Lax'%0a* Add argument $samesite to pmsetcookie(), default to $CookieSameSite, refactor for old and new PHP versions. %0a* Add function pm_session_start() respecting local configuration.%0a* CSP header add base-uri=self; object-src 'none'.%0a* Add $HTTPHeaders['XSSP'] = 'X-XSS-Protection: 1; mode=block'.%0a* Rewrite GUIButtons logic to avoid unsafe-inline JavaScript.%0a* Refactor WikiStyles, replace inline styles with class names to avoid unsafe-inline CSS.%0a* Refactor PQA(), tables, cells, to replace inline style="..." with class names to avoid unsafe-inline CSS.%0a* Add PrePrintFmt(), refactor PrintFmt(), PrintSkin() to process wiki pages, skin parts, and skin functions to HTML before outputting headers.%0a* Fix XSS vulnerability.%0a* Documentation update.%0a%0a!!! Version 2.3.14 (2022-11-03) [[#v2314]]%0a* Searchbox also escape custom field names.%0a* Prevent double-encoded entities in searchbox (reported by Simon).%0a* Trim $Author (PITS:01208).%0a* Replace autofocus inline JavaScript with attributes.%0a* Edit form: the label next to the "Minor edit" checkbox now toggles the checkbox.%0a* PmSyntax recognize %25pmhlt%25[@(:template requires? ...:)@].%0a* Update for PHP 8. %0a* Obsolete PCCF() from PHP 7.2 not 8.0.%0a* Add array $ObsoleteMarkups, function TraceMarkup(), update Markup(), Markup_e() and ObsoleteMarkup(), to retrieve and show files and line numbers for obsolete/disabled markup rules.%0a* Fix bug with PSFT format %25L.%0a* Update documentation.%0a%0a!!! Version 2.3.13 (2022-10-07) [[#v2313]]%0a* Close potential XSS vulnerability, reported by lukystreik (PITS:01483).%0a* Refactor $MultiFactorAuthFunction, add $FailedLoginsFunction.%0a* Update documentation.%0a%0a!!! Version 2.3.12 (2022-09-25) [[#v2312]]%0a* Stripmagic() cast null to "" and other fixes for PHP 8.%0a* Fix parse error for complex conditionals with empty variables (PITS:01480).%0a* PSFT() and MarkupExpression [@ftime@] add %25L as human readable local timestamp. %0a* MarkupRestore() fix wrong cast to empty string of false-ish values.%0a* PrintAuthForm() split from PmWikiAuth(). %0a* Fix warning for unneeded session_regenerate_id() (reported by George Murray).%0a* Update documentation.%0a%0a!!! Version 2.3.11 (2022-08-30) [[#v2311]]%0a* Add [[PageVariables]] %25pmhlt%25 [@{$GroupHomePage}@], [@{$GroupHomePageName}@], [@{$GroupHomePageTitle}@], [@{$GroupHomePageTitlespaced}@].%0a* Add $MarkupDirectiveFunctions.%0a* Fix stripmagic() for arrays recently broke after PHP8 update.%0a* Update documentation.%0a%0a!!! Version 2.3.10 (2022-08-20) [[#v2310]]%0a* Update for PHP 8.1 (reported by Armin Bühler).%0a* Forms will now prefill wildcard variables from $DefaultUnsetPageTextVars or $DefaultEmptyPageTextVars.%0a* $EnablePmSyntax = 3; will enable syntax highlighting in the edit form by default, without the user clicking on "Highlight". Fix occasional text mis-alignment between the text area and the highlighted block.%0a* Update documentation.%0a%0a!!! Version 2.3.9 (2022-08-18) [[#v239]]%0a* Add non-wildcard $DefaultUnsetPageTextVars to %25pmhlt%25[@(:input default:)@] (reported by Johnny).%0a* PmSyntax handles new selectors pre.pmhlt, code.pmhlt.%0a* Update for PHP 8 (PITS:01478).%0a* Update documentation.%0a%0a%0a!!! Version 2.3.8 (2022-07-22) [[#v238]]%0a* PmSyntax fix for 2 different %25pmhlt%25 [@%25hlt%25@] on the same line (reported by Simon).%0a* Fix broken include when the first page doesn't exist.%0a* Update documentation.%0a%0a!!! Version 2.3.7 (2022-06-28) [[#v237]]%0a* $HTTPHeaders add X-Frame-Options (suggested by Imagine Dragon) and Content-Security-Policy to disallow embedding in external websites by default.%0a* $EnableHighlight will now remember any links to PmWiki variables and restore them after the highlighting, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* $EnablePmSyntax will now process %25pmhlt%25[@%25hlt pmwiki%25@] in addition to [@%25pmhlt%25@] blocks, and escaped markup after it will be tentatively highlighted.%0a* Update documentation.%0a%0a!!! Version 2.3.6 (2022-06-19) [[#v236]]%0a* Fixes for PHP 8.%0a* Add form attribute "lang".%0a* Sortable tables allow for table headers to have markup such as bold (except links). It will now use a case-insensitive natural ordering.%0a* Allow for $UploadVerifyFunction to modify $upname.%0a* Add variable $PageIndexTermsFunction.%0a* Searchbox allow for removal of submit button if [@label=""@]; add default [@placeholder="$[Search]"@].%0a* Fix author.php may be included before some variables are defined, reported by Said Achmiz.%0a* $EnableHighlight convert code blocks to plain text, see [[thread->https://www.pmwiki.org/pipermail/pmwiki-users/2022-June/064887.html]].%0a* Documentation update.%0a%0a%0a!!! Version 2.3.5 (2022-05-23) [[#v235]]%0a* Fix broken list=grouphomes (PITS:01477).%0a* Add DisableSkinParts() helper function for recipes.%0a* HandlePostUpload: add @@$FmtV["$filepath"]@@ and @@$FmtV["$upurl"]@@ with the file path and direct URL to the newly uploaded file.%0a* In pmwiki-utils.js, replace forgotten ''let'' with ''var'' (suggested by SteP).%0a* Update for PHP 8.1.%0a* Update documentation.%0a%0a!!! Version 2.3.4 (2022-04-22) [[#v234]]%0a* Fixes for PHP 8 warnings, reported by Siegfried Seibert.%0a* Update documentation.%0a%0a!!! Version 2.3.3 (2022-03-26) [[#v233]]%0a* Fix for PHP 8 warnings, reported by Jean-Patrick Charrey, Dominique Faure and Siegfried Seibert.%0a* Update README.txt and docs/ files, suggested by Simon Davis.%0a* Update documentation.%0a%0a!!! Version 2.3.2 (2022-02-09) [[#v232]]%0a* Allow for $EnableLocalTimes to define custom duration of the pulled page history.%0a* Rename variable $EnableIncludedPages to $EnableListIncludedPages (avoid ambiguity).%0a* Remove $LinkAlt when an embedded picture without an alternative text fails to load.%0a* PmSyntax:%0a** Allow for line breaks \\ inside headings, tables, list items (like the core).%0a** Parallel processing of multiple blocks.%0a* Add scripts/utils.php; move loading of pmwiki-utils.js and PmSyntax to scripts/utils.js.%0a** Add $EnablePmUtils, default enabled.%0a** Parallel processing of the pmwiki-utils.js utility functions.%0a** Move pmwiki-utils.js move to $HTMLHeaderFmt (often prevents page redraw with the TOC/PmToggle/LocalTimes).%0a* Fix bug causing invalid page name when the name is "Group.0".%0a* Fix PHP 8.1.2 warnings, reported by Jürgen Godau and Dominique Faure.%0a* LocaltTimes fix "rcnew" classes for wikis with the older format.%0a* Update documentation.%0a%0a!!! Version 2.3.1 (2022-01-15) [[#v231]]%0a%0a* Fix the release script which broke the $VersionNum variable and the [@[[#anchor]]@] markup with the PmWiki-responsive skin.%0a%0a!!! Version 2.3.0 (2022-01-15) [[#v230]]%0a* Add PmSyntax, $EnablePmSyntax, $CustomSyntax, [@{$EnabledIMap}@], see Cookbook:PmSyntax, Cookbook:CustomSyntax.%0a* [@(:markup:)@] can now have @@class=norender@@ to only show the source code without processing it.%0a* Updates for PHP 8.1, hide warnings, add PSFT() replacement for strftime() and 2 callbacks, $EnableFTimeNew, update core function calls, add [@%25o@] for the ordinal suffix of the date (PITS:01418).%0a* Notify: @@tz=@@ (timezone) per-user.%0a* PageList add category= argument (PITS:00447, PITS:01475); link= and category= now accept multiple pages, wildcards, and negations (PITS:00908).%0a* [=[[!Category]]=] links can have alternative text (PITS:01095).%0a* Simplify/optimize pmwiki-utils.js when using datasets, simplify sorting of table rows without cloning, add LocalTimes().%0a* Page history diff anchors to also have "id=" attributes in addition to "name=".%0a* Add $EnableLocalTimes (default disabled) and styles, add HandleDiffList().%0a* Add markup %25pmhlt%25[@@2022-01-09T08:35:00Z@]%25%25 output as %3ctime>; localized if $EnableLocalTimes.%0a** Add $CurrentLocalTime in the above format, used by default in $RecentChangesFmt.%0a* Add $EnableRecentUploads (only Site.AllRecentChanges, only if $RecentUploadsFmt not defined).%0a* PmTOC update CSS for properly indented subheadings.%0a* Edit form $EnableIncludedPages, add placeholders to e_changesummary and e_author. Enable $EnableNotSavedWarning, add to sample-config.php. EditHelp to behave more like a word processor, typing "Enter" twice without writing text removes the preceding bullet.%0a* Responsive skin details>summary:hover {color:navy, cursor: pointer;}.%0a* PrintDiff() add classes for the delay between edits: diffday, diffweek, diffmonth, diffyear.%0a* Add helper function @@DownloadUrl($pagename, $path)@@ moved from @@LinkUpload()@@.%0a* Add [=$[ULby]=] i18n string 'uploaded by'.%0a* Update documentation.%0a%0a!!! [[#older]] Older versions%0a[[(PmWiki:)ChangeLog Archive]] - changes prior to version 2.3.0.%0a +time=1723041928 diff --git a/wikilib.d/PmWiki.EditVariables b/wikilib.d/PmWiki.EditVariables index 85be707e..ef91023e 100644 --- a/wikilib.d/PmWiki.EditVariables +++ b/wikilib.d/PmWiki.EditVariables @@ -1,9 +1,9 @@ -version=pmwiki-2.3.23 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=$EditFunctions: See InsertEditFunction() (+42) +csum=Refactor $ROEPatterns, add $TROEPatterns (-69) name=PmWiki.EditVariables -rev=108 +rev=110 targets=PmWiki.Functions,PmWiki.EditVariables,Cookbook.NotSavedWarning,Cookbook.EditHelp,Cookbook.EditTemplates,PmWiki.SecurityVariables,PmWiki.Drafts,Cookbook.FixURL,Cookbook.PreviewChanges,PmWiki.IncludeOtherPages,PmWiki.PageTextVariables,PmWiki.BasicVariables,Cookbook.ROSPatterns,Category.PmWikiDeveloper,!PmWikiDeveloper -text=(:Summary:variables used when editing pages:)%0aTo set many of the variables below specify them in @@config.php@@.%0a%0a:$EnableReadOnly: Set to 1 to disable editing. Note this doesn't automatically prevent changes to the wiki by recipes, unless they use the [[Functions#Lock|core Lock() function]] correctly.%0a: : %25hlt php%25@@ $EnableReadOnly = 1; # disable editing@@%0a%0a:$EnableNotSavedWarning: Set to 1 to warn the editors if they are about to leave the edit form without saving their changes. Based on Cookbook:NotSavedWarning. By default this is disabled. If you enable it, please disable any addons that may provide a similar feature, notably an older version of Cookbook:NotSavedWarning.%0a: : %25hlt php%25@@ $EnableNotSavedWarning = 0; # disable warning, default 1 (enabled, since 2.3.0)@@%0a%0a:$EnableEditAutoText: Set to 1 to enable basic predictive editing like automatically inserted list bullets, see Cookbook:EditHelp. By default this is disabled. If you enable it, please disable any addons that may provide a similar feature, notably an older version of Cookbook:EditHelp.%0a: : %25hlt php%25@@ $EnableEditAutoText = 1;@@%0a%0a:$EnableMergeLastMinorEdit: When set to 1, ''and'' an author has checked the "This is a minor edit" checkbox, ''and'' the previous edit was by the same author (same name, IP address, browser version), ''then'' the previous and current edits will be merged into a single page history entry. This way an author can make many small changes one after another without creating multiple separate history entries.%0a: : %25hlt php%25@@ $EnableMergeLastMinorEdit = 1;@@%0a: : To only allow this for a limited time between edits, set this variable to the number of seconds. If a longer time has passed, a separate history entry will be added as usual:%0a: : %25hlt php%25@@ $EnableMergeLastMinorEdit = 2*3600; # at most 2 hours between merged edits@@%0a: : See also $EnableDraftAtomicDiff.%0a%0a:$AutoCreate:Used in conjunction with the AutoCreateTargets edit function, this array records any sets of pages which should be created automatically if they don't exist. The syntax is %25hlt php%25[@%0a $AutoCreate[REGEXP] = PAGE_PARAMETERS;%0a@]where @@REGEXP@@ is a regular expression which will identify the pages to be autocreated, and @@PAGE_PARAMETERS@@ is an array of attributes for the page to be created. For example %25hlt php%25[@%0a $AutoCreate['/^Category\\./'] = array('ctime' => $Now);%0a@]will create a blank page with a current creation time for any missing Category page.%0a%0a:$DefaultPageTextFmt:The text that should be displayed when browsing non-existent pages. As default PmWiki uses the contents of Site.PageNotFound: %25hlt php%25[@%0a $DefaultPageTextFmt = '(:include $[{$SiteGroup}.PageNotFound]:)';@] %0a%0a:$DeleteKeyPattern:The pattern used to determine if a page should be deleted. The default is to remove pages that contain only the single word "delete" (and optional spaces). %25hlt php%25[@%0a## Change delete word to "remove":%0a$DeleteKeyPattern = "^\\s*remove\\s*$";%0a## Delete any page with no visible text, i.e., empty:%0a$DeleteKeyPattern = "^\\s*$";@]%0a%0a:$DiffKeepDays:The $DiffKeepDays variable sets the minimum length of time that a page's revision history is kept. By default it is set to 3650 days, or a little less than ten years. You can change this value in a customization file to be something smaller, e.g.: %25hlt php%25[@%0a $DiffKeepDays = 30; # keep revisions at least 30 days%0a@]If you want to suppress a page's revision history, you can insert into a customization file %25hlt php%25[@%0a $DiffKeepDays = $DiffKeepNum = -1; # suppress revision history %0a@]Note that a specific page revision isn't removed from the page until the first edit after the time specified by $DiffKeepDays has elapsed. Thus, it's still possible for some pages to have revisions older than $DiffKeepDays -- such revisions will be removed the next time those pages are edited.%0a%0a:$DiffKeepNum:This variable contains the minimum number of changes to be kept in the page history, even if some of them are older than the limit defined by $DiffKeepDays. It prevents lost history of pages that are older, but have few changes. %25hlt php%25[@%0a $DiffKeepNum = 50; # keep at least 50 revisions (default is 20)%0a@]To suppress page's revision history with [@$DiffKeepNum = -1@] see $DiffKeepDays above.%0a%0a:$DraftActionsPattern:The actions which allow full loading of the draft.php functionality for custom actions. Default is 'edit'. You can enable drafts for other actions like: %25hlt php%25[@%0a $DraftActionsPattern = 'edit|pmform|translate';%0a # Enable drafts for actions 'edit', 'pmform' and 'translate'.@]%0a%0a:$DraftSuffix:The suffix to use for draft versions of pages (default "-Draft").%0a%0a:$EditFunctions: This array contains the sequence of functions that are called when a page is edited. It can be customized to provide additional functions to be called as part of the editing process. The standard setting is: %25hlt php%25[@%0a$EditFunctions = array('EditTemplate', 'RestorePage', 'ReplaceOnSave',%0a 'SaveAttributes', 'PostPage', 'PostRecentChanges', 'AutoCreateTargets', 'PreviewPage');%0a%0a@]Many recipes manipulate this array, so it is recommended, instead of redefining the complete array to add your custom functions, to call [[Functions#InsertEditFunction|InsertEditFunction()]] with your function name. See also [[Functions#UpdatePage|UpdatePage()]].%0a%0a:$EditRedirectFmt: The page to which an author is sent after pressing "Save" or "Cancel" from an edit form. Defaults to "$FullName", which sends the author to the page just edited, but can be changed to specify another page. %25hlt php%25[@%0a## Redirect to Main.HomePage:%0a$EditRedirectFmt = 'Main.HomePage';%0a## Redirect to HomePage of current group:%0a$EditRedirectFmt = '{$Group}.HomePage';@]%0a%0a:$EditTemplatesFmt:Name of the page (or an array of names) to be used as the default text for any newly created pages. %25hlt php%25[@%0a## Use 'Main.NewPageTemplate' as default text of all new pages:%0a $EditTemplatesFmt = 'Main.NewPageTemplate';%0a## Use 'Template' in the current group for new pages:%0a $EditTemplatesFmt = '$Group.Template';%0a## Use 'Template' in the current group if it exists, otherwise%0a## use 'Main.NewPageTemplate':%0a $EditTemplatesFmt = array('$Group.Template', 'Main.NewPageTemplate');@]%0a-> See [[Cookbook:EditTemplates]] for more information.%0a%0a%0a:$EnableDrafts:When set to '1', enables the "Save draft" button and built-in handling of "draft" versions of pages, where: %0a## Initial "Save draft" of an existing page ("PageName") saves changes to a new name ("PageName-Draft").%0a## Subsequent attempts to edit PageName causes PageName-Draft to be edited.%0a## Subsequent selections of "Save draft" cause PageName-Draft to be saved.%0a## Pressing "Publish" causes PageName-Draft to be posted to PageName, and deleted.%0a-> Turn on draft edits: %25hlt php%25[@%0a $EnableDrafts = 1;@]%0a-> A related variable, $EnablePublishAttr, adds a new "publish" authorization level to distinguish editing of drafts from publishing them.%0a%0a:$EnableDraftAtomicDiff:When set to 1, "publishing" a draft version will clear the "draft" history, leaving a single "diff" between the latest and the previous "published" versions. Note that this will delete the author names, dates and contributions of the intermediate, unpublished versions. ([[Drafts]] need to be enabled, see $EnableDrafts.) See also $EnableMergeLastMinorEdit.%0a%0a:$EnableGUIButtons:When set to '1', turns on the graphical buttons in the "Edit Page" form. %25hlt php%25[@%0a## Turn on graphical edit buttons:%0a$EnableGUIButtons = 1;@]%0a%0a:$EnableGuiEditFixUrl: Enables an icon "%252" that can help encoding special characters in URL links, see Cookbook:FixURL. $EnableGUIButtons need to be enabled.%0a: : %25hlt php%25@@$EnableGuiEditFixUrl = 2000; # place the button near the end of the Edit toolbar@@%0a%0a:$EnablePreviewChanges:When set to '1', the "Preview" function will show the highlighted changes in the wiki markup before the rendered page preview. See Cookbook:PreviewChanges. %25hlt php%25[@%0a $EnablePreviewChanges = 1;@]%0a%0a:$EnableListIncludedPages: When set to '1', inserts in the edit form a list with pages included in the currently edited page either via the [[IncludeOtherPages|include markup]], or via [[page text variables]] (and any nested pages and variables). The list appears in a collapsed %25hlt html%25@@%3cdetails>@@ element between the text area and the summary field.%0a%0a:$EnablePostAuthorRequired:When set to '1', posting of pages (and uploading files since 2.2.117) requires the author to provide an author name. Otherwise, authors can post without a name. %25hlt php%25[@%0a## Require authors to provide a name:%0a$EnablePostAuthorRequired = 1;@] %0a%0a:$EnableUploadAuthorRequired:Whether uploading files requires the name of the uploader to be entered (added in 2.2.117). If unset, will use the value of $EnablePostAuthorRequired. %0a%0a:$EnableRevUserAgent:When set to '1', the page history will store the "User agent" string from the browser of the writer (by default this feature is disabled). This can be useful for tracking bugs in custom applications, by examining the disk files in wiki.d. %25hlt php%25[@%0a## Store browser user agent with page diffs:%0a $EnableRevUserAgent = 1; @]%0a%0a:$GUIButtons:Allows the configuration of the buttons which appear at the top of the text area when editing a page. See @@scripts/guiedit.php@@ for the default definition. Note that the 5th element can be HTML code rather than just the url of a gif - this allows more flexibility in defining the related JavaScript.%0a%0a:$HandleEditFmt: Like $HandleBrowseFmt, this specifies the entire output format for [@?action=edit@] for a page.%0a%0a:$IsPagePosted: Set to a true value if the page is actually saved (e.g., this is used to tell the RecentChanges handlers if they need to update).%0a %0a:$PageEditFmt: By default, this is the HTML to be displayed for an edit form.%0a%0a:$PageEditForm: Specifies the edit form for [@?action=edit@]. Defaults to '@@$SiteGroup.EditForm@@'.%0a%0a:$ROEPatterns: With this array you can add a pattern as ''key'' and set a text ''value'' which replace it on every edit request, using %25hlt php%25@@preg_replace ()@@ function. Specifically it is replaced when the page is loaded into the editform, whenever a preview is done, and when the page is saved (from PmWiki 2.2.0beta45). See Cookbook:ROSPatterns for examples.%0a%0a:$ROSPatterns: With this array you can add patterns as ''key'' and set a text ''value'' which will replace it when the edited page is posted (as signaled by $EnablePost). It is not replaced when the page is loaded into the editform nor when a preview is done, but it is replaced only when the page is saved. See Cookbook:ROSPatterns for examples.%0a%0a:$EnableROSEscape: If set to 1, the $ROEPatterns and $ROSPatterns replacements will skip escaped text (surrounded by %25pmhlt%25[@[=...=]@] or @@[=[@...@]=]@@). If not set, or if set to 0, the replacements will happen even inside escaped text.%0a%0a%0aCategories: [[!PmWiki Developer]] -time=1684475421 +text=(:Summary:variables used when editing pages:)%0aTo set many of the variables below specify them in @@config.php@@.%0a%0a:$EnableReadOnly: Set to 1 to disable editing. Note this doesn't automatically prevent changes to the wiki by recipes, unless they use the [[Functions#Lock|core Lock() function]] correctly.%0a: : %25hlt php%25@@ $EnableReadOnly = 1; # disable editing@@%0a%0a:$EnableNotSavedWarning: Set to 1 to warn the editors if they are about to leave the edit form without saving their changes. Based on Cookbook:NotSavedWarning. By default this is disabled. If you enable it, please disable any addons that may provide a similar feature, notably an older version of Cookbook:NotSavedWarning.%0a: : %25hlt php%25@@ $EnableNotSavedWarning = 0; # disable warning, default 1 (enabled, since 2.3.0)@@%0a%0a:$EnableEditAutoText: Set to 1 to enable basic predictive editing like automatically inserted list bullets, see Cookbook:EditHelp. By default this is disabled. If you enable it, please disable any addons that may provide a similar feature, notably an older version of Cookbook:EditHelp.%0a: : %25hlt php%25@@ $EnableEditAutoText = 1;@@%0a%0a:$EnableMergeLastMinorEdit: When set to 1, ''and'' an author has checked the "This is a minor edit" checkbox, ''and'' the previous edit was by the same author (same name, IP address, browser version), ''then'' the previous and current edits will be merged into a single page history entry. This way an author can make many small changes one after another without creating multiple separate history entries.%0a: : %25hlt php%25@@ $EnableMergeLastMinorEdit = 1;@@%0a: : To only allow this for a limited time between edits, set this variable to the number of seconds. If a longer time has passed, a separate history entry will be added as usual:%0a: : %25hlt php%25@@ $EnableMergeLastMinorEdit = 2*3600; # at most 2 hours between merged edits@@%0a: : See also $EnableDraftAtomicDiff.%0a%0a:$AutoCreate:Used in conjunction with the AutoCreateTargets edit function, this array records any sets of pages which should be created automatically if they don't exist. The syntax is %25hlt php%25[@%0a $AutoCreate[REGEXP] = PAGE_PARAMETERS;%0a@]where @@REGEXP@@ is a regular expression which will identify the pages to be autocreated, and @@PAGE_PARAMETERS@@ is an array of attributes for the page to be created. For example %25hlt php%25[@%0a $AutoCreate['/^Category\\./'] = array('ctime' => $Now);%0a@]will create a blank page with a current creation time for any missing Category page.%0a%0a:$DefaultPageTextFmt:The text that should be displayed when browsing non-existent pages. As default PmWiki uses the contents of Site.PageNotFound: %25hlt php%25[@%0a $DefaultPageTextFmt = '(:include $[{$SiteGroup}.PageNotFound]:)';@] %0a%0a:$DeleteKeyPattern:The pattern used to determine if a page should be deleted. The default is to remove pages that contain only the single word "delete" (and optional spaces). %25hlt php%25[@%0a## Change delete word to "remove":%0a$DeleteKeyPattern = "^\\s*remove\\s*$";%0a## Delete any page with no visible text, i.e., empty:%0a$DeleteKeyPattern = "^\\s*$";@]%0a%0a:$DiffKeepDays:The $DiffKeepDays variable sets the minimum length of time that a page's revision history is kept. By default it is set to 3650 days, or a little less than ten years. You can change this value in a customization file to be something smaller, e.g.: %25hlt php%25[@%0a $DiffKeepDays = 30; # keep revisions at least 30 days%0a@]If you want to suppress a page's revision history, you can insert into a customization file %25hlt php%25[@%0a $DiffKeepDays = $DiffKeepNum = -1; # suppress revision history %0a@]Note that a specific page revision isn't removed from the page until the first edit after the time specified by $DiffKeepDays has elapsed. Thus, it's still possible for some pages to have revisions older than $DiffKeepDays -- such revisions will be removed the next time those pages are edited.%0a%0a:$DiffKeepNum:This variable contains the minimum number of changes to be kept in the page history, even if some of them are older than the limit defined by $DiffKeepDays. It prevents lost history of pages that are older, but have few changes. %25hlt php%25[@%0a $DiffKeepNum = 50; # keep at least 50 revisions (default is 20)%0a@]To suppress page's revision history with [@$DiffKeepNum = -1@] see $DiffKeepDays above.%0a%0a:$DraftActionsPattern:The actions which allow full loading of the draft.php functionality for custom actions. Default is 'edit'. You can enable drafts for other actions like: %25hlt php%25[@%0a $DraftActionsPattern = 'edit|pmform|translate';%0a # Enable drafts for actions 'edit', 'pmform' and 'translate'.@]%0a%0a:$DraftSuffix:The suffix to use for draft versions of pages (default "-Draft").%0a%0a:$EditFunctions: This array contains the sequence of functions that are called when a page is edited. It can be customized to provide additional functions to be called as part of the editing process. The standard setting is: %25hlt php%25[@%0a$EditFunctions = array('EditTemplate', 'RestorePage', 'ReplaceOnSave',%0a 'SaveAttributes', 'PostPage', 'PostRecentChanges', 'AutoCreateTargets', 'PreviewPage');%0a%0a@]Many recipes manipulate this array, so it is recommended, instead of redefining the complete array to add your custom functions, to call [[Functions#InsertEditFunction|InsertEditFunction()]] with your function name. See also [[Functions#UpdatePage|UpdatePage()]].%0a%0a:$EditRedirectFmt: The page to which an author is sent after pressing "Save" or "Cancel" from an edit form. Defaults to "$FullName", which sends the author to the page just edited, but can be changed to specify another page. %25hlt php%25[@%0a## Redirect to Main.HomePage:%0a$EditRedirectFmt = 'Main.HomePage';%0a## Redirect to HomePage of current group:%0a$EditRedirectFmt = '{$Group}.HomePage';@]%0a%0a:$EditTemplatesFmt:Name of the page (or an array of names) to be used as the default text for any newly created pages. %25hlt php%25[@%0a## Use 'Main.NewPageTemplate' as default text of all new pages:%0a $EditTemplatesFmt = 'Main.NewPageTemplate';%0a## Use 'Template' in the current group for new pages:%0a $EditTemplatesFmt = '$Group.Template';%0a## Use 'Template' in the current group if it exists, otherwise%0a## use 'Main.NewPageTemplate':%0a $EditTemplatesFmt = array('$Group.Template', 'Main.NewPageTemplate');@]%0a-> See [[Cookbook:EditTemplates]] for more information.%0a%0a%0a:$EnableDrafts:When set to '1', enables the "Save draft" button and built-in handling of "draft" versions of pages, where: %0a## Initial "Save draft" of an existing page ("PageName") saves changes to a new name ("PageName-Draft").%0a## Subsequent attempts to edit PageName causes PageName-Draft to be edited.%0a## Subsequent selections of "Save draft" cause PageName-Draft to be saved.%0a## Pressing "Publish" causes PageName-Draft to be posted to PageName, and deleted.%0a-> Turn on draft edits: %25hlt php%25[@%0a $EnableDrafts = 1;@]%0a-> A related variable, $EnablePublishAttr, adds a new "publish" authorization level to distinguish editing of drafts from publishing them.%0a%0a:$EnableDraftAtomicDiff:When set to 1, "publishing" a draft version will clear the "draft" history, leaving a single "diff" between the latest and the previous "published" versions. Note that this will delete the author names, dates and contributions of the intermediate, unpublished versions. ([[Drafts]] need to be enabled, see $EnableDrafts.) See also $EnableMergeLastMinorEdit.%0a%0a:$EnableGUIButtons:When set to '1', turns on the graphical buttons in the "Edit Page" form. %25hlt php%25[@%0a## Turn on graphical edit buttons:%0a$EnableGUIButtons = 1;@]%0a%0a:$EnableGuiEditFixUrl: Enables an icon "%252" that can help encoding special characters in URL links, see Cookbook:FixURL. $EnableGUIButtons need to be enabled.%0a: : %25hlt php%25@@$EnableGuiEditFixUrl = 2000; # place the button near the end of the Edit toolbar@@%0a%0a:$EnablePreviewChanges:When set to '1', the "Preview" function will show the highlighted changes in the wiki markup before the rendered page preview. See Cookbook:PreviewChanges. %25hlt php%25[@%0a $EnablePreviewChanges = 1;@]%0a%0a:$EnableListIncludedPages: When set to '1', inserts in the edit form a list with pages included in the currently edited page either via the [[IncludeOtherPages|include markup]], or via [[page text variables]] (and any nested pages and variables). The list appears in a collapsed %25hlt html%25@@%3cdetails>@@ element between the text area and the summary field.%0a%0a:$EnablePostAuthorRequired:When set to '1', posting of pages (and uploading files since 2.2.117) requires the author to provide an author name. Otherwise, authors can post without a name. %25hlt php%25[@%0a## Require authors to provide a name:%0a$EnablePostAuthorRequired = 1;@] %0a%0a:$EnableUploadAuthorRequired:Whether uploading files requires the name of the uploader to be entered (added in 2.2.117). If unset, will use the value of $EnablePostAuthorRequired. %0a%0a:$EnableRevUserAgent:When set to '1', the page history will store the "User agent" string from the browser of the writer (by default this feature is disabled). This can be useful for tracking bugs in custom applications, by examining the disk files in wiki.d. %25hlt php%25[@%0a## Store browser user agent with page diffs:%0a $EnableRevUserAgent = 1; @]%0a%0a:$GUIButtons:Allows the configuration of the buttons which appear at the top of the text area when editing a page. See @@scripts/guiedit.php@@ for the default definition. Note that the 5th element can be HTML code rather than just the url of a gif - this allows more flexibility in defining the related JavaScript.%0a%0a:$HandleEditFmt: Like $HandleBrowseFmt, this specifies the entire output format for [@?action=edit@] for a page.%0a%0a:$IsPagePosted: Set to a true value if the page is actually saved (e.g., this is used to tell the RecentChanges handlers if they need to update).%0a %0a:$PageEditFmt: By default, this is the HTML to be displayed for an edit form.%0a%0a:$PageEditForm: Specifies the edit form for [@?action=edit@]. Defaults to '@@$SiteGroup.EditForm@@'.%0a%0a:$ROSPatterns: ("Replace on Save patterns") With this array you can add patterns as ''key'' and set a text ''value'' which will replace it when the edited page is saved (as signaled by $EnablePost). See Cookbook:ROSPatterns for examples.%0a%0a:$ROEPatterns: ("Replace on Edit patterns") This behaves similarly to $ROSPatterns but ''also'' when the page is loaded into the edit form, and when a preview is done.%0a%0a:$TROEPatterns: ("Template Replace on Edit patterns") This behaves similarly to $ROEPatterns but ''only'' when an empty page is opened for editing and an "edit template" is loaded into the edit form, see $EditTemplatesFmt.%0a%0a:$EnableROSEscape: If set to 1, the $ROEPatterns, $ROSPatterns, and $TROEPatterns replacements will skip escaped text (surrounded by %25pmhlt%25[@[=...=]@] or @@[=[@...@]=]@@). If not set, or if set to 0, the replacements will happen even inside escaped text.%0a%0a%0aCategories: [[!PmWiki Developer]] +time=1722083969 diff --git a/wikilib.d/PmWiki.MarkupMasterIndex b/wikilib.d/PmWiki.MarkupMasterIndex index e3722477..30d5af67 100644 --- a/wikilib.d/PmWiki.MarkupMasterIndex +++ b/wikilib.d/PmWiki.MarkupMasterIndex @@ -1,10 +1,10 @@ -version=pmwiki-2.3.29 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=simon charset=UTF-8 -csum=update for make not in distribution (+9) +csum=hlt (+61) name=PmWiki.MarkupMasterIndex -rev=293 +rev=294 targets=PmWiki.WikiStyles,PmWiki.ListStyles,PmWiki.Links,PmWiki.WikiWord,PmWiki.Categories,PmWiki.InterMap,PmWiki.Uploads,PmWiki.LinkSchemes,PmWiki.Images,PmWiki.TextFormattingRules,Cookbook.WikiStylesPlus,PmWiki.BlockMarkup,PmWiki.PageDirectives,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.GroupHeaders,PmWiki.CommentMarkup,PmWiki.PageVariables,PmWiki.IncludeOtherPages,PmWiki.PageTextVariables,PmWiki.ConditionalMarkup,PmWiki.PageLists,PmWiki.TableOfContents,PmWiki.Forms,PmWiki.WikiTrails,PmWiki.PageListTemplates,PmWiki.Internationalizations,PmWiki.SkinTemplates,PmWiki.MarkupExpressions -text=(:title Markup Master Index:)%0a(:Summary:Tabulation of all PmWiki markup:)%0aThis page contains the most frequently used wiki markup, briefly. Follow the links in each section to learn more.%0a%0a!! Markup concepts introduction%0aPmWiki markup can be applied to 'blocks' of text, and to text 'lines'.%0aPmWiki markup is also used to read and save page, group, and wiki metadata through the use of variables. %0aPmWiki markup can be used to process metadata variables though expressions and [[#PageLists|pagelists]].%0aPmWiki provides a [[WikiStyles|wiki style]] markup that can be applied to text, [[ListStyles|lists]], paragraphs, and blocks.%0a%0aText markup, also known as wikitext is variable, see below, and in general broadly follows wiki conventions. %0aText markup only applies to single lines of text, delimited by a [[Wikipedia:Newline|newline]].%0a%0aBlock markup is applied to multiple lines of text as [[#BlockMarkups|paragraph blocks]] and [[#DivisionBlocks|division blocks]].%0a%0aIn PmWiki the most important markup is the [[#Directives|directive]]. %0aThe directive is signified by parenthesis and a colon, viz: %25pmhlt%25[@(:...:)@].%0aThe directive provides most of PmWiki's functionality. %0a%0a[[#Expressions|Markup expressions]] %25pmhlt%25[@{(...)}@], [[#PageVariables|variable markup]] [@{$...}@], and [[wiki styles]] [@%25...%25@] also provide PmWiki functionality.%0a%0a!! [[#LinkMarkups]] Links%0a%0aSee [[Links]]%0a!!![[#ExternalLinks]]External links%0a-%3c %25pmhlt%25[@https://example.com@]%0a-%3c %25pmhlt%25[@[[https://example.com]] @]%0a-%3c %25pmhlt%25[@[[https://example.com"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[https://example.com | link text]] @]%0a-%3c %25pmhlt%25[@[[link text -> https://example.com]] @]%0aUse %25pmhlt%25[@[=link address=]@] to escape any special characters, including quotes, spaces, parentheses and pipes. %0a%0a[[#InternalLinks]]%0a!!! Page links%0a-%3c %25pmhlt%25[@[[PageName]] @]%0a-%3c %25pmhlt%25[@[[page name]] @]%0a-%3c %25pmhlt%25[@[[page (name)]] @]%0a-%3c %25pmhlt%25[@[[PageName | link text]] @]%0a-%3c %25pmhlt%25[@[[PageName | + ]] @] ''(titled link)''%0a-%3c %25pmhlt%25[@[[PageName | # ]] @] ''(anonymous numerical reference link)''%0a-%3c %25pmhlt%25[@[[PageName"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[link text -> PageName]] @]%0a-%3c %25pmhlt%25[@[[#anchor]] @] ''(to create an anchor)''%0a-%3c %25pmhlt%25[@[[#anchor | link text]] @] ''(to refer to an anchor)''%0a-%3c %25pmhlt%25[@[[#anchor | # ]] @] ''(anonymous numerical reference link)''%0a-%3c %25pmhlt%25[@[[PageName#anchor | link text]] @] ''(to refer to an anchor in another page)''%0a%0a%0aSee also [[WikiWord]] on how to enable [@WikiWord@] links.%0a%0a[[#WikiGroupLinks]]%0a!!! WikiGroup links%0aSee [[Links]] and [[Categories]] %0a-%3c %25pmhlt%25[@[[GroupName/]] or [[Group name/]] @]%0a-%3c %25pmhlt%25[@[[GroupName"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[GroupName.]] @]%0a-%3c %25pmhlt%25[@[[GroupName/PageName]] or [[GroupName/page name]] @]%0a-%3c %25pmhlt%25[@[[(GroupName.)page name]] @]%0a%0a-%3c %25pmhlt%25[@[[~Author Name]] @]%0a-%3c %25pmhlt%25[@[[~Author Name | +]] @]%0a-%3c %25pmhlt%25[@[[~Author Name | #]] @]%0a-%3c %25pmhlt%25[@[[~Author Name | link text]] @]%0a-%3c %25pmhlt%25[@[[~Author Name"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[!Category Name]] @]%0a%0a[[#IntermapLinks]]%0a!!! InterMap links%0aSee [[InterMap]]%0a-%3c %25pmhlt%25[@[[Path:/path/local_document.html]] @]%0a-%3c %25pmhlt%25[@[[Wikipedia:WikiWikiWeb]] @]%0a%0a[[#EmailLinks]]%0a!!! Email links%0a-%3c %25pmhlt%25[@mailto:someone@example.com @]%0a-%3c %25pmhlt%25[@[[(mailto:)someone@example.com]] @]%0a-%3c %25pmhlt%25[@[[mailto:someone@example.com | display text]] @]%0a-%3c %25pmhlt%25[@[[display text -> mailto:someone@example.com]] @]%0a%0a[[#UploadLinks]]%0a!!! Upload links%0aSee [[Uploads]] and [[#Images|Images]]%0a-%3c %25pmhlt%25[@Attach:file.odt @]%0a-%3c %25pmhlt%25[@[[(Attach:)file.odt]] @]%0a-%3c %25pmhlt%25[@[[Attach:file.odt | alternative text ]] @]%0a-%3c %25pmhlt%25[@[[Attach:file with spaces.pdf]] @]%0a-%3c %25pmhlt%25[@[[Attach:Groupname./file with spaces.pdf]] @]%0a%0a[[#linkschemes]]%0a!!! [[(PmWiki:)Link Schemes]]%0aIn addition to %25pmhlt%25@@http:@@, @@https:@@, @@mailto:@@ PmWiki also supports:%0a-%3c %25pmhlt%25@@ftp:@@%0a-%3c %25pmhlt%25@@news:@@%0a-%3c %25pmhlt%25@@gopher:@@%0a-%3c %25pmhlt%25@@nap:@@%0a-%3c %25pmhlt%25@@file:@@%0a-%3c %25pmhlt%25@@tel:@@%0a-%3c %25pmhlt%25@@geo:@@%0a%0a!! [[#Images]] Images%0a%0aSee [[Images]] and [[Uploads]]%0a!!! [[#ImagesAsImages]] Images as Images%0a-%3c %25pmhlt%25[@https://example.com/image.gif@]%0a-%3c %25pmhlt%25[@https://example.com/image.gif"alt text"@]%0a-%3c %25pmhlt%25[@Attach:image.gif"My image"@]%0a-%3c %25pmhlt%25[@Attach:Groupname./image.gif"image in another group"@]%0a-%3c %25pmhlt%25[@Attach:Groupname.Pagename/image.gif"image on another page"@]%0a-%3c %25pmhlt%25[@%25lfloat%25 Attach:image.gif | Caption %25%25@] ''(could be [=%25rfloat%25, %25center%25, %25rframe%25, %25lframe%25, %25frame%25 =])''%0a-%3c %25pmhlt%25[@%25width=200px%25 Attach:image.gif %25%25@]%0a-%3c %25pmhlt%25[@%25thumb%25 Attach:image.gif %25%25@]%0a%0a%0a!!! [[#ImagesAsLinks]] Images as links%0a%0a-%3c %25pmhlt%25[@[[Attach:image.gif]] @]%0a-%3c %25pmhlt%25[@[[(Attach:)image.gif]] @]%0a-%3c %25pmhlt%25[@[[PageName | Attach:image.gif"alt text"]] @]%0a-%3c %25pmhlt%25[@[[https://example.com/ | Attach:image.gif"alt text"]] @]%0a-%3c %25pmhlt%25[@[[https://example.com/ | https://example.com/image.png"alt text"]] | Caption @]%0a-%3c %25pmhlt%25[@%25rframe thumb%25 [[Attach:image.gif | Attach:image.gif"alt text"]] | Caption @]%0a%0a%0a!! [[#StartOfLine]] Start-of-line markup%0a%0aSee [[Text formatting rules]]%0a%0a!!! [[#Lists]] [[PmWiki/TextFormattingRules#BulletedLists| Lists]]%0a%0aSee [[List styles]], [[Wiki styles]] and [[Cookbook:Wiki Styles Plus]]%0a-%3c %25pmhlt%25[@* unordered list@]%0a-%3c %25pmhlt%25[@** deeper list@]%0a-%3c %25pmhlt%25[@# ordered list@]%0a-%3c %25pmhlt%25[@# %25item value=#%25@] arbitrary start number%0a-%3c %25pmhlt%25[@# %25decimal%25, %25roman%25, %25ROMAN%25, %25alpha%25, %25ALPHA%25 @]%0a-%3c %25pmhlt%25[@%25comment%25 @]%0a-%3c %25pmhlt%25[@:term:definition@]%0aAlso%0a-%3c %25pmhlt%25[@Q:@] start a question paragraph%0a-%3c %25pmhlt%25[@A:@] start an answer paragraph%0a%0a%0a!!! [[#Headings]] Headings%0a%0a-%3c %25pmhlt%25[@!! Heading@]%0a-%3c %25pmhlt%25[@!!! Deeper heading@]%0a%0a%0a!!! [[#BlockMarkups]] Paragraph blocks%0a%0a-%3c %25pmhlt%25[@-> indented text@]%0a-%3c %25pmhlt%25[@-%3c hanging indent@]%0a-%3c %25pmhlt%25[@%3cspace> preformatted text@]%0a-%3c %25pmhlt%25@@[=[@...@]=]@@ preformatted block%0a-%3c %25pmhlt%25[@----@] (horizontal rule)%0a-%3c %25pmhlt%25[@blank line@] is vertical space%0a-%3c %25pmhlt%25[@\@] at end of line joins next line%0a-%3c %25pmhlt%25[@\\@] at end of line produces a line break%0a-%3c %25pmhlt%25[@\\\@] at the end of a line produces a blank line, even within a list item, n backslashes will produce n-1 blank lines%0a-%3c %25pmhlt%25[@[[%3c%3c]] @] produces a line break that clears floating content%0a%0a%0a!!! [[#DivisionBlocks]] Division blocks, Semantic elements%0a%0aSee [[Block markup]], [[Wiki styles]] and [[Page directives]]%0a-%3c %25pmhlt%25[@>>wikistyle%3c%3c@]%0a-%3c %25pmhlt%25[@>>%3c%3c@]%0a-%3c %25pmhlt%25[@(:div class="" style="":) @]%0a-%3c %25pmhlt%25[@(:divend:) @]%0a-%3c %25pmhlt%25[@>>comment%3c%3c@] %0aSemantic HTML 5 elements%0a-%3c %25pmhlt%25[@(:article:)...(:articleend:)@]%0a-%3c %25pmhlt%25[@(:section:)...(:sectionend:)@]%0a-%3c %25pmhlt%25[@(:header:)...(:headerend:)@]%0a-%3c %25pmhlt%25[@(:footer:)...(:footerend:)@]%0a-%3c %25pmhlt%25[@(:aside:)...(:asideend:)@]%0a-%3c %25pmhlt%25[@(:address:)...(:addressend:)@]%0a-%3c %25pmhlt%25[@(:nav:)...(:navend:)@]%0a-%3c %25pmhlt%25[@(:details summary="Summary" open=open:)...(:detailsend:)@]%0a%0a%0a!! [[#Text]] Text markup%0a%0aSee [[Text formatting rules]]%0a!!! [[#InlineMarkups]] Character format%0a%0a-%3c %25pmhlt%25[@''emphasized''@] %0a-%3c %25pmhlt%25[@'''strong'''@]%0a-%3c %25pmhlt%25[@'''''strong emphasis'''''@]%0a-%3c %25pmhlt%25[@@@monospaced@@@]%0a-%3c %25pmhlt%25[@[-small-], [--smaller--]@]%0a-%3c %25pmhlt%25[@[+big+], [++bigger++]@]%0a-%3c %25pmhlt%25[@'-small-', '+big+'@]%0a-%3c %25pmhlt%25[@'^superscript^', '_subscript_'@]%0a-%3c %25pmhlt%25[@{+inserted+} (underscore)@]%0a-%3c %25pmhlt%25[@{-deleted-} (strikethrough)@]%0a-%3c %25pmhlt%25@@[=[@escaped code@]=]@@%0a-%3c %25pmhlt%25[@[=escaped text=]@]%0a%0a%0a!!! [[#PostingMarkups]] Posting markup%0a%0a-%3c %25pmhlt%25@@~~@@@@~@@ (author's signature)%0a-%3c %25pmhlt%25@@~~@@@@~~@@ (author's signature and date)%0a-%3c %25pmhlt%25@@[=(:encrypt=] ''phrase''[=:)=]@@ -- replaced with encrypted form of ''phrase''%0a%0a%0a!! [[#Tables]] Tables%0a%0a!!! [[#PlainTables]] Plain rows and columns of text%0a%0aSee [[Tables]]%0a-%3c %25pmhlt%25[@||table attributes@]%0a-%3c %25pmhlt%25[@||!table caption!||@]%0a-%3c %25pmhlt%25[@||left aligned || centered || right aligned||@]%0a-%3c %25pmhlt%25[@||!column heading||@]%0a-%3c %25pmhlt%25[@||spanned columns ||||||@]%0a%0a!!! [[#TablesAndDivs]] Structured tables%0a%0aSee [[Table directives ]]%0a-%3c %25pmhlt%25[@(:table attr:) @]%0a-%3c %25pmhlt%25[@(:headnr attr:) @]%0a-%3c %25pmhlt%25[@(:head attr:) @]%0a-%3c %25pmhlt%25[@(:cellnr attr:) @]%0a-%3c %25pmhlt%25[@(:cell attr:) @]%0a-%3c %25pmhlt%25[@(:tableend:) @]%0a%0a!! [[#Directives]] Directives%0a%0a!!! [[#PageDirectives]] Page directives%0a%0aSee [[Page directives]]%0a-%3c %25pmhlt%25[@(:redirect PageName:) @]%0a%0a-%3c %25pmhlt%25[@(:(no)spacewikiwords:) @]%0a-%3c %25pmhlt%25[@(:(no)linkwikiwords:) @]%0a-%3c %25pmhlt%25[@(:(no)linebreaks:) @]%0a%0a!!! [[#Display]] Display%0a%0aSee [[Page directives]] [[Group headers]]%0a-%3c %25pmhlt%25[@(:noheader:), (:nofooter:) @]%0a-%3c %25pmhlt%25[@(:notitle:) @]%0a-%3c %25pmhlt%25[@(:noleft:), (:noright:) @]%0a-%3c %25pmhlt%25[@(:nogroupheader:), (:nogroupfooter:) @]%0a-%3c %25pmhlt%25[@(:noaction:) @]%0a%0a%0a!!! [[#Metadata]] Metadata%0a%0aSee [[Page directives]], [[(PmWiki:)Comment markup]], [[Page variables]]%0a-%3c %25pmhlt%25[@(:title text:) @]%0a-%3c %25pmhlt%25[@(:keywords word, ...:) @]%0a-%3c %25pmhlt%25[@(:description text:) @]%0a-%3c %25pmhlt%25[@(:comment text:) @]%0a-%3c %25pmhlt%25[@{Group/PageName$:variable}@] [-includes from [@ (:variable:text:) @]-]%0a-%3c for example %25pmhlt%25@@[= (:=]Summary:text:) @@%0a%0a%0a!!! [[#IncludeOtherPages]] Include%0a%0aSee [[Include other pages]], [[Page text variables]]%0a-%3c %25pmhlt%25[@(:include PageName:) @]%0a-%3c %25pmhlt%25[@(:include PageName#start#end lines=n paras=n:) @]%0a-%3c %25pmhlt%25[@(:include Page1 Page2 Page3:) @]%0a-%3c %25pmhlt%25[@{Group/PageName$:Var}@] [-includes from [@ (:name:text:) @]-]%0a-%3c %25pmhlt%25[@(:nl:) @] [-separate included text by conditional line break-]%0a%0a!!! [[#ConditionalMarkup]] Conditional markup%0a%0aSee [[Conditional markup]]%0a-%3c %25pmhlt%25[@(:if (!) cond param:)...(:ifend:)@]%0a-%3c %25pmhlt%25[@(:if (!) cond param:)...(:else:)...(:ifend:)@]%0a-%3c %25pmhlt%25[@(:if (!) cond param:)...(:elseif (!) cond param:)...(:ifend:) @]%0a%0a%0a!!! [[#PageLists]] Pagelists%0a%0aSee [[Page lists]]%0a-%3c %25pmhlt%25[@(:searchbox label=label order=-time:) @]%0a-%3c %25pmhlt%25[@(:searchresults incl -excl group=abc fmt=def:) @]%0a-%3c %25pmhlt%25[@(:pagelist incl -excl group=abc fmt=def:) @]%0a%0a%0a!!! [[#OtherDirectives]] Other directives%0a%0aSee [[Page directives]]%0a-%3c %25pmhlt%25[@(:toc:) @] see [[Table of contents]]%0a-%3c %25pmhlt%25[@(:attachlist:)@] see [[PageDirectives#attachlist]]%0a-%3c %25pmhlt%25[@(:markup:)...(:markupend:) @] see [[PageDirectives#markup]]%0a-%3c %25pmhlt%25[@(:markup class=horiz:)...(:markupend:) @]%0a-%3c %25pmhlt%25[@(:markup class=norender:)...(:markupend:) @]%0a-%3c %25pmhlt%25[@(:markup caption='...':)...(:markupend:) @]%0a-%3c %25pmhlt%25[@(:messages:) @]%0a%0a%0a!! [[#Forms]] Forms%0a%0aSee [[PmWiki/Forms]]%0a-%3c %25pmhlt%25[@(:input form method=get action=url enctype=multipart/form-data:) @]%0a--%3c %25pmhlt%25[@(:input default name=xyz value="abc":) @]%0a--%3c %25pmhlt%25[@(:input text name=first value="Bob" size=20:) @]%0a--%3c %25pmhlt%25[@(:input textarea name=xyz [=value=] rows=2 cols=80:) @]%0a--%3c %25pmhlt%25[@(:input submit name=post value="Go" accesskey=g:) @]%0a--%3c %25pmhlt%25[@(:input reset:) @]%0a--%3c %25pmhlt%25[@(:input hidden name=action value=edit:) @]%0a--%3c %25pmhlt%25[@(:input radio name=xyz value="abc" checked=1:) @]%0a--%3c %25pmhlt%25[@(:input checkbox name=xyz value="abc" checked=1:) @]%0a--%3c %25pmhlt%25[@(:input password name=authpw:) @]%0a--%3c %25pmhlt%25[@(:input file name=upload:) @]%0a--%3c %25pmhlt%25[@(:input image name=xyz src="https:..." alt="Alt Text":) @]%0a--%3c %25pmhlt%25[@(:input select name=xyz value="val1" label="Value 1":) @]%0a--%3c %25pmhlt%25[@(:input select name=xyz value="val2" label="Value 2":) @]%0a-%3c %25pmhlt%25[@(:input end:) @]%0a%0aSee also [[PmWiki/Forms#pageeditcontrols|PmWiki Edit forms]].%0a%0a!! [[#WikiTrails]] Wiki trails%0a%0aSee [[Wiki trails]]%0a-%3c %25pmhlt%25[@%3c%3c|[[TrailPage]]|>>@]%0a-%3c %25pmhlt%25[@%3c|[[TrailPage]]|>@]%0a-%3c %25pmhlt%25[@^|[[TrailPage]]|^@]%0a%0a%0a!! [[#PageVariables]] Page variables%0a%0aSee [[Page variables]], [[Page text variables]], [[PmWiki/PageLists#pagetextvariables|Page lists]]%0a-%3c %25pmhlt%25[@{$variable}, {pagename$variable}, {groupname.pagename$variable} @]%0a-%3c %25pmhlt%25[@{$:variable}, {pagename$:variable}, {groupname.pagename$:variable} @]%0aSet a [[page text variable(s)]]%0a-%3c %25pmhlt%25[@(:name:description:) @] %0a-%3c %25pmhlt%25[@:name:description @] %0a-%3c %25pmhlt%25[@name:description @] %0aSee [[PmWiki:PageVariables#specialreferences | special references]]%0a-%3c %25pmhlt%25[@{*$variable} @]%0a-%3c %25pmhlt%25[@{*$:variable} @]%0a[[Page list templates]] [[PmWiki:PageListTemplates#specialreferences | special variables]]%0a-%3c %25pmhlt%25[@{=$variable}, {%3c$variable}, {>$variable}@],%0a-%3c %25pmhlt%25[@{=$:variable}, {%3c$:variable}, {>$:variable}@]%0a%0a!! [[#Internationalization]] Internationalization%0aSee [[PmWiki/Internationalizations]] and [[PmWiki/SkinTemplates]]%0a-%3c %25pmhlt%25[@$[phrase] @]%0a%0a!! [[#Expressions]] Expressions%0a%0aSee [[Markup expressions]]%0a-%3c %25pmhlt%25[@{(function arg)} @]%0a -time=1705553590 +text=(:title Markup Master Index:)%0a(:Summary:Tabulation of all PmWiki markup:)%0aThis page contains the most frequently used wiki markup, briefly. Follow the links in each section to learn more.%0a%0a!! Markup concepts introduction%0aPmWiki markup can be applied to 'blocks' of text, and to text 'lines'.%0aPmWiki markup is also used to read and save page, group, and wiki metadata through the use of variables. %0aPmWiki markup can be used to process metadata variables though expressions and [[#PageLists|pagelists]].%0aPmWiki provides a [[WikiStyles|wiki style]] markup that can be applied to text, [[ListStyles|lists]], paragraphs, and blocks.%0a%0aText markup, also known as wikitext is variable, see below, and in general broadly follows wiki conventions. %0aText markup only applies to single lines of text, delimited by a [[Wikipedia:Newline|newline]].%0a%0aBlock markup is applied to multiple lines of text as [[#BlockMarkups|paragraph blocks]] and [[#DivisionBlocks|division blocks]].%0a%0aIn PmWiki the most important markup is the [[#Directives|directive]]. %0aThe directive is signified by parenthesis and a colon, viz: %25pmhlt%25[@(:...:)@].%0aThe directive provides most of PmWiki's functionality. %0a%0a[[#Expressions|Markup expressions]] %25pmhlt%25[@{(...)}@], [[#PageVariables|variable markup]] [@{$...}@], and [[wiki styles]] [@%25...%25@] also provide PmWiki functionality.%0a%0a!! [[#LinkMarkups]] Links%0a%0aSee [[Links]]%0a!!![[#ExternalLinks]]External links%0a-%3c %25pmhlt%25[@https://example.com@]%0a-%3c %25pmhlt%25[@[[https://example.com]] @]%0a-%3c %25pmhlt%25[@[[https://example.com"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[https://example.com | link text]] @]%0a-%3c %25pmhlt%25[@[[link text -> https://example.com]] @]%0aUse %25pmhlt%25[@[=link address=]@] to escape any special characters, including quotes, spaces, parentheses and pipes. %0a%0a[[#InternalLinks]]%0a!!! Page links%0a-%3c %25pmhlt%25[@[[PageName]] @]%0a-%3c %25pmhlt%25[@[[page name]] @]%0a-%3c %25pmhlt%25[@[[page (name)]] @]%0a-%3c %25pmhlt%25[@[[PageName | link text]] @]%0a-%3c %25pmhlt%25[@[[PageName | + ]] @] ''(titled link)''%0a-%3c %25pmhlt%25[@[[PageName | # ]] @] ''(anonymous numerical reference link)''%0a-%3c %25pmhlt%25[@[[PageName"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[link text -> PageName]] @]%0a-%3c %25pmhlt%25[@[[#anchor]] @] ''(to create an anchor)''%0a-%3c %25pmhlt%25[@[[#anchor | link text]] @] ''(to refer to an anchor)''%0a-%3c %25pmhlt%25[@[[#anchor | # ]] @] ''(anonymous numerical reference link)''%0a-%3c %25pmhlt%25[@[[PageName#anchor | link text]] @] ''(to refer to an anchor in another page)''%0a%0a%0aSee also [[WikiWord]] on how to enable [@WikiWord@] links.%0a%0a[[#WikiGroupLinks]]%0a!!! WikiGroup links%0aSee [[Links]] and [[Categories]] %0a-%3c %25pmhlt%25[@[[GroupName/]] or [[Group name/]] @]%0a-%3c %25pmhlt%25[@[[GroupName"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[GroupName.]] @]%0a-%3c %25pmhlt%25[@[[GroupName/PageName]] or [[GroupName/page name]] @]%0a-%3c %25pmhlt%25[@[[(GroupName.)page name]] @]%0a%0a-%3c %25pmhlt%25[@[[~Author Name]] @]%0a-%3c %25pmhlt%25[@[[~Author Name | +]] @]%0a-%3c %25pmhlt%25[@[[~Author Name | #]] @]%0a-%3c %25pmhlt%25[@[[~Author Name | link text]] @]%0a-%3c %25pmhlt%25[@[[~Author Name"tool tip"]] @]%0a-%3c %25pmhlt%25[@[[!Category Name]] @]%0a%0a[[#IntermapLinks]]%0a!!! InterMap links%0aSee [[InterMap]]%0a-%3c %25pmhlt%25[@[[Path:/path/local_document.html]] @]%0a-%3c %25pmhlt%25[@[[Wikipedia:WikiWikiWeb]] @]%0a%0a[[#EmailLinks]]%0a!!! Email links%0a-%3c %25pmhlt%25[@mailto:someone@example.com @]%0a-%3c %25pmhlt%25[@[[(mailto:)someone@example.com]] @]%0a-%3c %25pmhlt%25[@[[mailto:someone@example.com | display text]] @]%0a-%3c %25pmhlt%25[@[[display text -> mailto:someone@example.com]] @]%0a%0a[[#UploadLinks]]%0a!!! Upload links%0aSee [[Uploads]] and [[#Images|Images]]%0a-%3c %25pmhlt%25[@Attach:file.odt @]%0a-%3c %25pmhlt%25[@[[(Attach:)file.odt]] @]%0a-%3c %25pmhlt%25[@[[Attach:file.odt | alternative text ]] @]%0a-%3c %25pmhlt%25[@[[Attach:file with spaces.pdf]] @]%0a-%3c %25pmhlt%25[@[[Attach:Groupname./file with spaces.pdf]] @]%0a%0a[[#linkschemes]]%0a!!! [[(PmWiki:)Link Schemes]]%0aIn addition to %25pmhlt%25@@http:@@, @@https:@@, @@mailto:@@ PmWiki also supports:%0a-%3c %25pmhlt%25@@ftp:@@%0a-%3c %25pmhlt%25@@news:@@%0a-%3c %25pmhlt%25@@gopher:@@%0a-%3c %25pmhlt%25@@nap:@@%0a-%3c %25pmhlt%25@@file:@@%0a-%3c %25pmhlt%25@@tel:@@%0a-%3c %25pmhlt%25@@geo:@@%0a%0a!! [[#Images]] Images%0a%0aSee [[Images]] and [[Uploads]]%0a!!! [[#ImagesAsImages]] Images as Images%0a-%3c %25pmhlt%25[@https://example.com/image.gif@]%0a-%3c %25pmhlt%25[@https://example.com/image.gif"alt text"@]%0a-%3c %25pmhlt%25[@Attach:image.gif"My image"@]%0a-%3c %25pmhlt%25[@Attach:Groupname./image.gif"image in another group"@]%0a-%3c %25pmhlt%25[@Attach:Groupname.Pagename/image.gif"image on another page"@]%0a-%3c %25pmhlt%25[@%25lfloat%25 Attach:image.gif | Caption %25%25@] ''(could be [=%25rfloat%25, %25center%25, %25rframe%25, %25lframe%25, %25frame%25 =])''%0a-%3c %25pmhlt%25[@%25width=200px%25 Attach:image.gif %25%25@]%0a-%3c %25pmhlt%25[@%25thumb%25 Attach:image.gif %25%25@]%0a%0a%0a!!! [[#ImagesAsLinks]] Images as links%0a%0a-%3c %25pmhlt%25[@[[Attach:image.gif]] @]%0a-%3c %25pmhlt%25[@[[(Attach:)image.gif]] @]%0a-%3c %25pmhlt%25[@[[PageName | Attach:image.gif"alt text"]] @]%0a-%3c %25pmhlt%25[@[[https://example.com/ | Attach:image.gif"alt text"]] @]%0a-%3c %25pmhlt%25[@[[https://example.com/ | https://example.com/image.png"alt text"]] | Caption @]%0a-%3c %25pmhlt%25[@%25rframe thumb%25 [[Attach:image.gif | Attach:image.gif"alt text"]] | Caption @]%0a%0a%0a!! [[#StartOfLine]] Start-of-line markup%0a%0aSee [[Text formatting rules]]%0a%0a!!! [[#Lists]] [[PmWiki/TextFormattingRules#BulletedLists| Lists]]%0a%0aSee [[List styles]], [[Wiki styles]] and [[Cookbook:Wiki Styles Plus]]%0a-%3c %25pmhlt%25[@* unordered list@]%0a-%3c %25pmhlt%25[@** deeper list@]%0a-%3c %25pmhlt%25[@# ordered list@]%0a-%3c %25pmhlt%25[@# %25item value=#%25@] arbitrary start number%0a-%3c %25pmhlt%25[@# %25decimal%25, %25roman%25, %25ROMAN%25, %25alpha%25, %25ALPHA%25 @]%0a-%3c %25pmhlt%25[@%25comment%25 @]%0a-%3c %25pmhlt%25[@:term:definition@]%0aAlso%0a-%3c %25pmhlt%25[@Q:@] start a question paragraph%0a-%3c %25pmhlt%25[@A:@] start an answer paragraph%0a%0a%0a!!! [[#Headings]] Headings%0a%0a-%3c %25pmhlt%25[@!! Heading@]%0a-%3c %25pmhlt%25[@!!! Deeper heading@]%0a%0a%0a!!! [[#BlockMarkups]] Paragraph blocks%0a%0a-%3c %25pmhlt%25[@-> indented text@]%0a-%3c %25pmhlt%25[@-%3c hanging indent@]%0a-%3c %25pmhlt%25[@%3cspace> preformatted text@]%0a-%3c %25pmhlt%25@@[=[@...@]=]@@ preformatted block%0a-%3c %25pmhlt%25[@----@] (horizontal rule)%0a-%3c %25pmhlt%25[@blank line@] is vertical space%0a-%3c %25pmhlt%25[@\@] at end of line joins next line%0a-%3c %25pmhlt%25[@\\@] at end of line produces a line break%0a-%3c %25pmhlt%25[@\\\@] at the end of a line produces a blank line, even within a list item, n backslashes will produce n-1 blank lines%0a-%3c %25pmhlt%25[@[[%3c%3c]] @] produces a line break that clears floating content%0a%0a%0a!!! [[#DivisionBlocks]] Division blocks, Semantic elements%0a%0aSee [[Block markup]], [[Wiki styles]] and [[Page directives]]%0a-%3c %25pmhlt%25[@>>wikistyle%3c%3c@]%0a-%3c %25pmhlt%25[@>>%3c%3c@]%0a-%3c %25pmhlt%25[@(:div class="" style="":) @]%0a-%3c %25pmhlt%25[@(:divend:) @]%0a-%3c %25pmhlt%25[@>>comment%3c%3c@] %0aSemantic HTML 5 elements%0a-%3c %25pmhlt%25[@(:article:)...(:articleend:)@]%0a-%3c %25pmhlt%25[@(:section:)...(:sectionend:)@]%0a-%3c %25pmhlt%25[@(:header:)...(:headerend:)@]%0a-%3c %25pmhlt%25[@(:footer:)...(:footerend:)@]%0a-%3c %25pmhlt%25[@(:aside:)...(:asideend:)@]%0a-%3c %25pmhlt%25[@(:address:)...(:addressend:)@]%0a-%3c %25pmhlt%25[@(:nav:)...(:navend:)@]%0a-%3c %25pmhlt%25[@(:details summary="Summary" open=open:)...(:detailsend:)@]%0a%0a%0a!! [[#Text]] Text markup%0a%0aSee [[Text formatting rules]]%0a!!! [[#InlineMarkups]] Character format%0a%0a-%3c %25pmhlt%25[@''emphasized''@] %0a-%3c %25pmhlt%25[@'''strong'''@]%0a-%3c %25pmhlt%25[@'''''strong emphasis'''''@]%0a-%3c %25pmhlt%25[@@@monospaced@@@]%0a-%3c %25pmhlt%25[@[-small-], [--smaller--]@]%0a-%3c %25pmhlt%25[@[+big+], [++bigger++]@]%0a-%3c %25pmhlt%25[@'-small-', '+big+'@]%0a-%3c %25pmhlt%25[@'^superscript^', '_subscript_'@]%0a-%3c %25pmhlt%25[@{+inserted+} (underscore)@]%0a-%3c %25pmhlt%25[@{-deleted-} (strikethrough)@]%0a-%3c %25pmhlt%25@@[=[@escaped code@]=]@@%0a-%3c %25pmhlt%25[@[=escaped text=]@]%0a%0a%0a!!! [[#PostingMarkups]] Posting markup%0a%0a-%3c %25pmhlt%25@@~~@@@@~@@ (author's signature)%0a-%3c %25pmhlt%25@@~~@@@@~~@@ (author's signature and date)%0a-%3c %25pmhlt%25@@[=(:encrypt=] ''phrase''[=:)=]@@ -- replaced with encrypted form of ''phrase''%0a%0a%0a!! [[#Tables]] Tables%0a%0a!!! [[#PlainTables]] Plain rows and columns of text%0a%0aSee [[Tables]]%0a-%3c %25pmhlt%25[@||table attributes@]%0a-%3c %25pmhlt%25[@||!table caption!||@]%0a-%3c %25pmhlt%25[@||left aligned || centered || right aligned||@]%0a-%3c %25pmhlt%25[@||!column heading||@]%0a-%3c %25pmhlt%25[@||spanned columns ||||||@]%0a%0a!!! [[#TablesAndDivs]] Structured tables%0a%0aSee [[Table directives ]]%0a-%3c %25pmhlt%25[@(:table attr:) @]%0a-%3c %25pmhlt%25[@(:headnr attr:) @]%0a-%3c %25pmhlt%25[@(:head attr:) @]%0a-%3c %25pmhlt%25[@(:cellnr attr:) @]%0a-%3c %25pmhlt%25[@(:cell attr:) @]%0a-%3c %25pmhlt%25[@(:tableend:) @]%0a%0a!! [[#Directives]] Directives%0a%0a!!! [[#PageDirectives]] Page directives%0a%0aSee [[Page directives]]%0a-%3c %25pmhlt%25[@(:redirect PageName:) @]%0a%0a-%3c %25pmhlt%25[@(:spacewikiwords:) @] [@(:nospacewikiwords:) @]%0a-%3c %25pmhlt%25[@(:linkwikiwords:) @] [@(:nolinkwikiwords:) @]%0a-%3c %25pmhlt%25[@(:linebreaks:) @] [@(:nolinebreaks:) @]%0a%0a!!! [[#Display]] Display%0a%0aSee [[Page directives]] [[Group headers]]%0a-%3c %25pmhlt%25[@(:noheader:), (:nofooter:) @]%0a-%3c %25pmhlt%25[@(:notitle:) @]%0a-%3c %25pmhlt%25[@(:noleft:), (:noright:) @]%0a-%3c %25pmhlt%25[@(:nogroupheader:), (:nogroupfooter:) @]%0a-%3c %25pmhlt%25[@(:noaction:) @]%0a%0a%0a!!! [[#Metadata]] Metadata%0a%0aSee [[Page directives]], [[(PmWiki:)Comment markup]], [[Page variables]]%0a-%3c %25pmhlt%25[@(:title text:) @]%0a-%3c %25pmhlt%25[@(:keywords word, ...:) @]%0a-%3c %25pmhlt%25[@(:description text:) @]%0a-%3c %25pmhlt%25[@(:comment text:) @]%0a-%3c %25pmhlt%25[@{Group/PageName$:variable}@] [-includes from [@ (:variable:text:) @]-]%0a-%3c for example %25pmhlt%25@@[= (:=]Summary:text:) @@%0a%0a%0a!!! [[#IncludeOtherPages]] Include%0a%0aSee [[Include other pages]], [[Page text variables]]%0a-%3c %25pmhlt%25[@(:include PageName:) @]%0a-%3c %25pmhlt%25[@(:include PageName#start#end lines=n paras=n:) @]%0a-%3c %25pmhlt%25[@(:include Page1 Page2 Page3:) @]%0a-%3c %25pmhlt%25[@{Group/PageName$:Var}@] [-includes from [@ (:name:text:) @]-]%0a-%3c %25pmhlt%25[@(:nl:) @] [-separate included text by conditional line break-]%0a%0a!!! [[#ConditionalMarkup]] Conditional markup%0a%0aSee [[Conditional markup]]%0a-%3c %25pmhlt%25[@(:if (!) cond param:)...(:ifend:)@]%0a-%3c %25pmhlt%25[@(:if (!) cond param:)...(:else:)...(:ifend:)@]%0a-%3c %25pmhlt%25[@(:if (!) cond param:)...(:elseif (!) cond param:)...(:ifend:) @]%0a%0a%0a!!! [[#PageLists]] Pagelists%0a%0aSee [[Page lists]]%0a-%3c %25pmhlt%25[@(:searchbox label=label order=-time:) @]%0a-%3c %25pmhlt%25[@(:searchresults incl -excl group=abc fmt=def:) @]%0a-%3c %25pmhlt%25[@(:pagelist incl -excl group=abc fmt=def:) @]%0a%0a%0a!!! [[#OtherDirectives]] Other directives%0a%0aSee [[Page directives]]%0a-%3c %25pmhlt%25[@(:toc:) @] see [[Table of contents]]%0a-%3c %25pmhlt%25[@(:attachlist:)@] see [[PageDirectives#attachlist]]%0a-%3c %25pmhlt%25[@(:markup:)...(:markupend:) @] see [[PageDirectives#markup]]%0a-%3c %25pmhlt%25[@(:markup class=horiz:)...(:markupend:) @]%0a-%3c %25pmhlt%25[@(:markup class=norender:)...(:markupend:) @]%0a-%3c %25pmhlt%25[@(:markup caption='...':)...(:markupend:) @]%0a-%3c %25pmhlt%25[@(:messages:) @]%0a%0a%0a!! [[#Forms]] Forms%0a%0aSee [[PmWiki/Forms]]%0a-%3c %25pmhlt%25[@(:input form method=get action=url enctype=multipart/form-data:) @]%0a--%3c %25pmhlt%25[@(:input default name=xyz value="abc":) @]%0a--%3c %25pmhlt%25[@(:input text name=first value="Bob" size=20:) @]%0a--%3c %25pmhlt%25[@(:input textarea name=xyz [=value=] rows=2 cols=80:) @]%0a--%3c %25pmhlt%25[@(:input submit name=post value="Go" accesskey=g:) @]%0a--%3c %25pmhlt%25[@(:input reset:) @]%0a--%3c %25pmhlt%25[@(:input hidden name=action value=edit:) @]%0a--%3c %25pmhlt%25[@(:input radio name=xyz value="abc" checked=1:) @]%0a--%3c %25pmhlt%25[@(:input checkbox name=xyz value="abc" checked=1:) @]%0a--%3c %25pmhlt%25[@(:input password name=authpw:) @]%0a--%3c %25pmhlt%25[@(:input file name=upload:) @]%0a--%3c %25pmhlt%25[@(:input image name=xyz src="https:..." alt="Alt Text":) @]%0a--%3c %25pmhlt%25[@(:input select name=xyz value="val1" label="Value 1":) @]%0a--%3c %25pmhlt%25[@(:input select name=xyz value="val2" label="Value 2":) @]%0a-%3c %25pmhlt%25[@(:input end:) @]%0a%0aSee also [[PmWiki/Forms#pageeditcontrols|PmWiki Edit forms]].%0a%0a!! [[#WikiTrails]] Wiki trails%0a%0aSee [[Wiki trails]]%0a-%3c %25pmhlt%25[@%3c%3c|[[TrailPage]]|>>@]%0a-%3c %25pmhlt%25[@%3c|[[TrailPage]]|>@]%0a-%3c %25pmhlt%25[@^|[[TrailPage]]|^@]%0a%0a%0a!! [[#PageVariables]] Page variables%0a%0aSee [[Page variables]], [[Page text variables]], [[PmWiki/PageLists#pagetextvariables|Page lists]]%0a-%3c %25pmhlt%25[@{$variable}, {pagename$variable}, {groupname.pagename$variable} @]%0a-%3c %25pmhlt%25[@{$:variable}, {pagename$:variable}, {groupname.pagename$:variable} @]%0aSet a [[page text variable(s)]]%0a-%3c %25pmhlt%25[@(:name:description:) @] %0a-%3c %25pmhlt%25[@:name:description @] %0a-%3c %25pmhlt%25[@name:description @] %0aSee [[PmWiki:PageVariables#specialreferences | special references]]%0a-%3c %25pmhlt%25[@{*$variable} @]%0a-%3c %25pmhlt%25[@{*$:variable} @]%0a[[Page list templates]] [[PmWiki:PageListTemplates#specialreferences | special variables]]%0a-%3c %25pmhlt%25[@{=$variable}, {%3c$variable}, {>$variable}@],%0a-%3c %25pmhlt%25[@{=$:variable}, {%3c$:variable}, {>$:variable}@]%0a%0a!! [[#Internationalization]] Internationalization%0aSee [[PmWiki/Internationalizations]] and [[PmWiki/SkinTemplates]]%0a-%3c %25pmhlt%25[@$[phrase] @]%0a%0a!! [[#Expressions]] Expressions%0a%0aSee [[Markup expressions]]%0a-%3c %25pmhlt%25[@{(function arg)} @]%0a +time=1721038488 title=Markup Master Index diff --git a/wikilib.d/PmWiki.Passwords b/wikilib.d/PmWiki.Passwords index 5697b279..7c355819 100644 --- a/wikilib.d/PmWiki.Passwords +++ b/wikilib.d/PmWiki.Passwords @@ -1,11 +1,11 @@ -version=pmwiki-2.3.32 ordered=1 urlencoded=1 -author=simon +version=pmwiki-2.3.35 ordered=1 urlencoded=1 +author=Petko charset=UTF-8 -csum=add @_site_admin (+50) +csum=typo minus, space (+1) description=General use of passwords and login name=PmWiki.Passwords post= Save -rev=253 +rev=254 targets=PmWiki.PasswordsAdmin,PmWiki.PmWiki,PmWiki.WikiGroup,Category.Spam,!Spam,PmWiki.Security,PmWiki.AvailableActions,PmWiki.SpecialPages,PmWiki.GroupAttributes,PmWiki.Uploads,SiteAdmin.AuthList,PmWiki.SecurityVariables,PmWiki.AuthUser,Cookbook.SessionSecurityAdvice,PmWiki.ConditionalMarkup,PITS.01417,PmWiki.IncludeOtherPages,Cookbook.Cookbook -text=(:Summary:General use of passwords and login:)(:Audience: authors :)(:Description General use of passwords and login:)%0a%0a[[PmWiki]] has built-in support for password-protecting various areas of the wiki site. Authors generally want to be able to apply passwords to individual pages or to [[wiki group]]s. Wiki Administrators can apply passwords to individual pages, to wiki groups, or to the [[PasswordsAdmin#settingsitewidepasswords|entire site]]. Setting an edit password on a [[#pageattr|page]] or [[#groupattr|group]] (or [[#siteattr|the entire site]]) is one of the most common ways to stop [[!spam]]. As with any access control system, the password protection mechanisms described here are only a small part of overall system and wiki [[security]].%0a%0a!! As an author editing pages...%0aAn author will generally set 3 types of passwords:%0a# to control who can see a page or group, use @@read@@ passwords%0a# to control who can edit a page or group, use @@edit@@ passwords%0a# to control who can alter the passwords used to protect a page or group, use @@attr@@ passwords%0a%0aIf required most [[AvailableActions|page actions]] can be password protected.%0a%0a[[#pageattr]]%0a!!! Protect an individual page%0aTo set a password on an individual wiki page, add the [[AvailableActions|page action]]%0a->@@?action=attr@@ %0ato the page's URL (address) to access its attributes. Using the form on the attributes page, you can set or clear the @@read@@, @@edit@@, or @@attr@@ passwords on the page. In the form you enter the passwords as cleartext; PmWiki encrypts them for you automatically when it stores them. %0a%0aAdditional options:%0a* Leaving a field blank will leave the attribute unchanged. %0a* To remove a password from a page (''reverting back'' to the group's or site's default), enter %0a--> @@ clear @@%0a* To indicate that the page can be read or edited ''even if a group or site password is set'', enter %0a--> @@ @nopass @@%0a* To lock a page for everybody but the admin, enter %0a--> @@ @lock @@%0a* To assign the site's site-wide passwords to the @@read@@, @@edit@@, @@upload@@, or @@attr@@ password for the page, enter %0a--> @@ @_site_read, @_site_edit, @_site_upload, @_site_admin, or @_site_attr @@%0a%0a* (From 2.3.31) To add passwords, users, or groups to a field without removing the current attributes, enter @@"+ "@@ (plus, space) then list the new password(s), user(s), group(s):%0a--> @@+ newpasword1 id:NewUser @newgroup @@%0a%0a* (From 2.3.31) To remove specific passwords, users, or groups to a field without removing the other ones, enter @@"- "@@ (plus, space) then list the deleted password(s), user(s), group(s):%0a--> @@- oldpasword1 deletedpass2 id:DeletedUser @disabledgroup @@%0a%0a[[#groupattr]]%0a!!! Protect a wiki group of pages%0aTo set a password on a [[wiki group]] is slightly more difficult -- you just set the passwords on a [[special page(s)]] in each group called %0a->[[GroupAttributes]]%0a%0aFirst, you can get to the attributes page for `@@GroupAttributes@@ by entering a URL (address) like %0a->[@https://example.com/pmwiki/pmwiki.php?n=GroupName.GroupAttributes?action=attr@]%0aReplace @@example.com@@ with your domain name, and @@GroupName@@ with the name of the group%0a%0aThen, using the form on the attributes page, you can set or clear the @@read@@, @@edit@@, or @@attr@@ passwords for the entire group. In the form you enter the passwords as cleartext; PmWiki encrypts them for you automatically.%0a%0aAdditional options:%0a* To remove a password from a group (''reverting back'' to the site's default), enter %0a-->@@clear@@%0a* To indicate that the group can be edited ''even if a site password is set'', enter %0a-->@@@nopass@@%0a* To lock a group for everybody but the admin, enter %0a-->@@@lock@@%0a* (Beginning with Ver 2.2.3) To assign the site's site-wide passwords to the @@read@@, @@edit@@, @@upload@@, @@admin@@,or @@attr@@ password for the group, enter %0a--> @@ @_site_read, @_site_edit, @_site_upload, @_site_admin, or @site_attr @@%0a* (From 2.3.31) To add or remove passwords or users, type @@"+ "@@ or @@"- "@@ (plus or minis, space) then the attributes to be added or removed, like for [[#pageattr|the page attributes]].%0a%0a!!! Passwords%0aPasswords may consist of any combination of characters, except double "quotes" or 'apostrophes'.%0aPasswords with spaces or colons must be entered using quotes, eg "foo bar" or "foo:bar".%0aObviously longer is [[Wikipedia:Password_strength|better]], and on some systems passwords need to have 4 or more characters.%0a%0a!!! Multiple passwords%0aMultiple passwords for a page, group or site are allowed. %0aSimply enter multiple passwords separated by a space. This allows you to have a read password, a write password, and have the write password allow read/write access. In other words, if the read password is %0a->alpha%0aand the edit password is %0a->beta%0athen enter%0a-> [@Set new read password: alpha beta%0aSet new edit password: beta@]%0a%0aThis says that either %0a->alpha%0aor %0a->beta%0acan be used to read pages, but only %0a->beta%0amay edit. Since PmWiki checks the passwords you've entered since the browser has been opened, entering a read password that is also a write password allows both reading and writing.%0a%0a[[#siteattr]]%0a!!! Protect the site%0aPasswords can be applied to the entire wiki website in ''@@config.php@@''.%0aSee [[PasswordsAdmin#settingsitewidepasswords|passwords]] administration for details.%0a%0a%0a%25audience%25 administrator%0a%0a[[#administrators]]%0a!! As an administrator ...%0a%0aYou can set passwords on pages and groups exactly as described above for authors. You can also:%0a# set site-wide passwords for pages and groups that do not have passwords%0a# use @@attr@@ passwords to control who is able to set passwords on pages%0a# use @@upload@@ passwords to control access to the file [[upload(s)]] capabilities (if uploads are enabled)%0a# use an @@admin@@ password to override the passwords set for any individual page or group%0a# use [[SiteAdmin.AuthList]] to view the permissions settings for pages that have permissions set. %0aFor more information on password options available to administrators, see [[PasswordsAdmin]].%0a%0a!! [[#priority]]Which password wins?%0aIn PmWiki, page passwords override group passwords, group passwords override the ''default'' passwords, and the @@admin@@ password overrides all passwords. This gives a great deal of flexibility in controlling access to wiki pages in PmWiki. %0a%0aThe [[special page(s)]] [[SiteAdmin.AuthList]] is a page list of all pages with access permissions set.%0a%0a!! Opening access to pages in protected groups/sites%0aSometimes we want to "unprotect" pages in a group or site that is otherwise protected. In these cases, the special password %0a->@@ @nopass @@%0ais used to indicate that access should be allowed to a page without requiring a password. %0a%0aFor example, suppose `Main.GroupAttributes has an edit password set, thus restricting the editing of all pages in Main. Now we want `Main.WikiSandbox to be editable without a password. Using %0a->@@clear@@%0afor the edit password for `Main.WikiSandbox ''doesn't unprotect the page'', because the password is being set by the group. Instead, we set the edit password for `Main.WikiSandbox to the special value %0a->@@ @nopass @@%0awhich tells PmWiki to ignore any site-wide or group-level passwords for that page.%0a%0a!! FAQ%0a>>faq%3c%3c [[#faq]]%0a%0a[[#site]]%0aQ: How can I password protect all the pages and groups on my site? Do I really have to set passwords page by page, or group by group?%0a%0aA: Administrators can set passwords for the entire site by editing the @@config.php@@ file; they don't have to set passwords for each page or group. For example, to set the entire site to be editable only by those who know an "edit" password, an administrator can add a line like the following to @@local/config.php@@:%0a%0a-> %25hlt php%25@@ $DefaultPasswords['edit'] = pmcrypt('edit_password'); @@%0a%0aFor more information about the password options that are available only to administrators, see [[PasswordsAdmin]].%0a%0aQ: I get http error 500 "Internal Server Error" when I try to log in. What's wrong?%0a%0aA: This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki.\\%0aThe [[https://www.php.net/crypt|PHP crypt() function]] changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1.\\%0aThis situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version.\\%0aThe same error occurs when you add encrypted passwords to @@local/config.php@@.%0a%0aSolution: Create the passwords on the system with the oldest PHP version and use them on all other systems.%0a%0aQ: How can I create private groups for users, so that each user can edit pages in their group, but no one else (other than the admin) can?%0a%0aA: Modify the edit attribute for each group to id:username, e.g. set the edit attribute in JaneDoe.GroupAttributes to id:JaneDoe.%0a%0aThere is a more automatic solution, but it's probably not a good idea for most wikis. Administrators can use the [[(PmWiki:)AuthUser]] recipe and add the following few lines to their local/config.php file to set this up:%0a->%25hlt php%25[@$group = FmtPageName('$Group', $pagename);%0a$DefaultPasswords['edit'] = 'id:'.$group;%0ainclude_once("$FarmD/scripts/authuser.php"); @]%0aThis automatically gives edit rights to a group to every user who has the same user name as the group name. Unfortunately it also gives edit rights to such a user who is visiting a same-named group not just for pages in that group, but for any page on the wiki that relies on the site's default edit password. This can create security holes.%0a%0aQ: [[#farm]] How come when I switch to another wiki within a farm, I keep my same authorization?%0a%0aA: PmWiki uses PHP sessions to keep track of authentication/authorization information, and by default PHP sets things up such that all interactions with the same server are considered part of the same session.\\%0aFor security considerations about shared session pools, see the "Session injection" chapter in Cookbook:SessionSecurityAdvice.\\%0aTo fix the browser-side convenience issue, one easy way is to make sure each wiki uses a different cookie name for its session identifier. Near the top of one of the wiki's @@local/config.php@@ files, before calling authuser or any other recipes, add a line like:%0a-> %25hlt php%25[@session_name('XYZSESSID');@]%0aYou can pick any alphanumeric name for XYZSESSID; for example, for the cs559-1 wiki you might choose%0a-> %25hlt php%25[@session_name('CS559SESSID');@]%0aThis will keep the two wikis' session cookies independent of each other.%0a%0aQ: Is it possible to test the password level for display and/or if condition? Example: %25pmhlt%25[= * (:if WriterPassword:) (display Edit link) (:ifend:) =]%0a%0aA: You can use %25pmhlt%25[@(:if auth edit:)@]. See [[ConditionalMarkup]].%0a%0aQ: [[#condmarkup-secrets]] Can I use %25pmhlt%25[@(:if …:)@] to hide secrets in a wiki page?%0a%0aA: You can, but [[usually that's not secure -> PITS:01417]].%0aThe recommended strategy is to put secrets in a separate page and restrict all read-related¹ access permissions to those users who are allowed to read the secrets.%0aTo display the secrets in another page, you can [[include( other pages)]] (parts of) the secrets page:%0aUsers with read access to the secrets will readily see them, whereas other users see nothing or (at your choosing) some other text, e.g. a login link.%0a-> ¹ Currently (version 2.2.99), these are: @@read@@ (would allow include), @@edit@@ (would show the source), @@attr@@ (would allow to obtain read/edit), @@diff@@ (would allow viewing any change), @@source@@ (allows raw source display)%0a%0aThe reason why [[Conditional Markup]] isn't suitable for access control is that it only applies for rendering wikitext as a web page, and that's just one of many ways to access a page's text.%0aIn order to rely on Conditional Markup for protection of secrets, you'd have to restrict all access methods that can circumvent it.%0aTo do so, you'd need to keep track of all methods available.%0aIn a default installation of PmWiki, some of the easy methods include: Editing a page, viewing its edit history, its source, or [[including fragments of it -> IncludeOtherPages]] into the edit preview of another page. (Preview: To avoid traces in @@RecentChanges@@.)%0aHowever, this list is far from exhaustive, and could easily grow with [[Recipes -> Cookbook/]] or future versions of PmWiki.%0a%0a -time=1712290065 +text=(:Summary:General use of passwords and login:)(:Audience: authors :)(:Description General use of passwords and login:)%0a%0a[[PmWiki]] has built-in support for password-protecting various areas of the wiki site. Authors generally want to be able to apply passwords to individual pages or to [[wiki group]]s. Wiki Administrators can apply passwords to individual pages, to wiki groups, or to the [[PasswordsAdmin#settingsitewidepasswords|entire site]]. Setting an edit password on a [[#pageattr|page]] or [[#groupattr|group]] (or [[#siteattr|the entire site]]) is one of the most common ways to stop [[!spam]]. As with any access control system, the password protection mechanisms described here are only a small part of overall system and wiki [[security]].%0a%0a!! As an author editing pages...%0aAn author will generally set 3 types of passwords:%0a# to control who can see a page or group, use @@read@@ passwords%0a# to control who can edit a page or group, use @@edit@@ passwords%0a# to control who can alter the passwords used to protect a page or group, use @@attr@@ passwords%0a%0aIf required most [[AvailableActions|page actions]] can be password protected.%0a%0a[[#pageattr]]%0a!!! Protect an individual page%0aTo set a password on an individual wiki page, add the [[AvailableActions|page action]]%0a->@@?action=attr@@ %0ato the page's URL (address) to access its attributes. Using the form on the attributes page, you can set or clear the @@read@@, @@edit@@, or @@attr@@ passwords on the page. In the form you enter the passwords as cleartext; PmWiki encrypts them for you automatically when it stores them. %0a%0aAdditional options:%0a* Leaving a field blank will leave the attribute unchanged. %0a* To remove a password from a page (''reverting back'' to the group's or site's default), enter %0a--> @@ clear @@%0a* To indicate that the page can be read or edited ''even if a group or site password is set'', enter %0a--> @@ @nopass @@%0a* To lock a page for everybody but the admin, enter %0a--> @@ @lock @@%0a* To assign the site's site-wide passwords to the @@read@@, @@edit@@, @@upload@@, or @@attr@@ password for the page, enter %0a--> @@ @_site_read, @_site_edit, @_site_upload, @_site_admin, or @_site_attr @@%0a%0a* (From 2.3.31) To add passwords, users, or groups to a field without removing the current attributes, enter @@"+ "@@ (plus, space) then list the new password(s), user(s), group(s):%0a--> @@+ newpasword1 id:NewUser @newgroup @@%0a%0a* (From 2.3.31) To remove specific passwords, users, or groups to a field without removing the other ones, enter @@"- "@@ (minus, space) then list the deleted password(s), user(s), group(s):%0a--> @@- oldpasword1 deletedpass2 id:DeletedUser @disabledgroup @@%0a%0a[[#groupattr]]%0a!!! Protect a wiki group of pages%0aTo set a password on a [[wiki group]] is slightly more difficult -- you just set the passwords on a [[special page(s)]] in each group called %0a->[[GroupAttributes]]%0a%0aFirst, you can get to the attributes page for `@@GroupAttributes@@ by entering a URL (address) like %0a->[@https://example.com/pmwiki/pmwiki.php?n=GroupName.GroupAttributes?action=attr@]%0aReplace @@example.com@@ with your domain name, and @@GroupName@@ with the name of the group%0a%0aThen, using the form on the attributes page, you can set or clear the @@read@@, @@edit@@, or @@attr@@ passwords for the entire group. In the form you enter the passwords as cleartext; PmWiki encrypts them for you automatically.%0a%0aAdditional options:%0a* To remove a password from a group (''reverting back'' to the site's default), enter %0a-->@@clear@@%0a* To indicate that the group can be edited ''even if a site password is set'', enter %0a-->@@@nopass@@%0a* To lock a group for everybody but the admin, enter %0a-->@@@lock@@%0a* (Beginning with Ver 2.2.3) To assign the site's site-wide passwords to the @@read@@, @@edit@@, @@upload@@, @@admin@@,or @@attr@@ password for the group, enter %0a--> @@ @_site_read, @_site_edit, @_site_upload, @_site_admin, or @site_attr @@%0a* (From 2.3.31) To add or remove passwords or users, type @@"+ "@@ or @@"- "@@ (plus or minis, space) then the attributes to be added or removed, like for [[#pageattr|the page attributes]].%0a%0a!!! Passwords%0aPasswords may consist of any combination of characters, except double "quotes" or 'apostrophes'.%0aPasswords with spaces or colons must be entered using quotes, eg "foo bar" or "foo:bar".%0aObviously longer is [[Wikipedia:Password_strength|better]], and on some systems passwords need to have 4 or more characters.%0a%0a!!! Multiple passwords%0aMultiple passwords for a page, group or site are allowed. %0aSimply enter multiple passwords separated by a space. This allows you to have a read password, a write password, and have the write password allow read/write access. In other words, if the read password is %0a->alpha%0aand the edit password is %0a->beta%0athen enter%0a-> [@Set new read password: alpha beta%0aSet new edit password: beta@]%0a%0aThis says that either %0a->alpha%0aor %0a->beta%0acan be used to read pages, but only %0a->beta%0amay edit. Since PmWiki checks the passwords you've entered since the browser has been opened, entering a read password that is also a write password allows both reading and writing.%0a%0a[[#siteattr]]%0a!!! Protect the site%0aPasswords can be applied to the entire wiki website in ''@@config.php@@''.%0aSee [[PasswordsAdmin#settingsitewidepasswords|passwords]] administration for details.%0a%0a%0a%25audience%25 administrator%0a%0a[[#administrators]]%0a!! As an administrator ...%0a%0aYou can set passwords on pages and groups exactly as described above for authors. You can also:%0a# set site-wide passwords for pages and groups that do not have passwords%0a# use @@attr@@ passwords to control who is able to set passwords on pages%0a# use @@upload@@ passwords to control access to the file [[upload(s)]] capabilities (if uploads are enabled)%0a# use an @@admin@@ password to override the passwords set for any individual page or group%0a# use [[SiteAdmin.AuthList]] to view the permissions settings for pages that have permissions set. %0aFor more information on password options available to administrators, see [[PasswordsAdmin]].%0a%0a!! [[#priority]]Which password wins?%0aIn PmWiki, page passwords override group passwords, group passwords override the ''default'' passwords, and the @@admin@@ password overrides all passwords. This gives a great deal of flexibility in controlling access to wiki pages in PmWiki. %0a%0aThe [[special page(s)]] [[SiteAdmin.AuthList]] is a page list of all pages with access permissions set.%0a%0a!! Opening access to pages in protected groups/sites%0aSometimes we want to "unprotect" pages in a group or site that is otherwise protected. In these cases, the special password %0a->@@ @nopass @@%0ais used to indicate that access should be allowed to a page without requiring a password. %0a%0aFor example, suppose `Main.GroupAttributes has an edit password set, thus restricting the editing of all pages in Main. Now we want `Main.WikiSandbox to be editable without a password. Using %0a->@@clear@@%0afor the edit password for `Main.WikiSandbox ''doesn't unprotect the page'', because the password is being set by the group. Instead, we set the edit password for `Main.WikiSandbox to the special value %0a->@@ @nopass @@%0awhich tells PmWiki to ignore any site-wide or group-level passwords for that page.%0a%0a!! FAQ%0a>>faq%3c%3c [[#faq]]%0a%0a[[#site]]%0aQ: How can I password protect all the pages and groups on my site? Do I really have to set passwords page by page, or group by group?%0a%0aA: Administrators can set passwords for the entire site by editing the @@config.php@@ file; they don't have to set passwords for each page or group. For example, to set the entire site to be editable only by those who know an "edit" password, an administrator can add a line like the following to @@local/config.php@@:%0a%0a-> %25hlt php%25@@ $DefaultPasswords['edit'] = pmcrypt('edit_password'); @@%0a%0aFor more information about the password options that are available only to administrators, see [[PasswordsAdmin]].%0a%0aQ: I get http error 500 "Internal Server Error" when I try to log in. What's wrong?%0a%0aA: This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki.\\%0aThe [[https://www.php.net/crypt|PHP crypt() function]] changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1.\\%0aThis situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version.\\%0aThe same error occurs when you add encrypted passwords to @@local/config.php@@.%0a%0aSolution: Create the passwords on the system with the oldest PHP version and use them on all other systems.%0a%0aQ: How can I create private groups for users, so that each user can edit pages in their group, but no one else (other than the admin) can?%0a%0aA: Modify the edit attribute for each group to id:username, e.g. set the edit attribute in JaneDoe.GroupAttributes to id:JaneDoe.%0a%0aThere is a more automatic solution, but it's probably not a good idea for most wikis. Administrators can use the [[(PmWiki:)AuthUser]] recipe and add the following few lines to their local/config.php file to set this up:%0a->%25hlt php%25[@$group = FmtPageName('$Group', $pagename);%0a$DefaultPasswords['edit'] = 'id:'.$group;%0ainclude_once("$FarmD/scripts/authuser.php"); @]%0aThis automatically gives edit rights to a group to every user who has the same user name as the group name. Unfortunately it also gives edit rights to such a user who is visiting a same-named group not just for pages in that group, but for any page on the wiki that relies on the site's default edit password. This can create security holes.%0a%0aQ: [[#farm]] How come when I switch to another wiki within a farm, I keep my same authorization?%0a%0aA: PmWiki uses PHP sessions to keep track of authentication/authorization information, and by default PHP sets things up such that all interactions with the same server are considered part of the same session.\\%0aFor security considerations about shared session pools, see the "Session injection" chapter in Cookbook:SessionSecurityAdvice.\\%0aTo fix the browser-side convenience issue, one easy way is to make sure each wiki uses a different cookie name for its session identifier. Near the top of one of the wiki's @@local/config.php@@ files, before calling authuser or any other recipes, add a line like:%0a-> %25hlt php%25[@session_name('XYZSESSID');@]%0aYou can pick any alphanumeric name for XYZSESSID; for example, for the cs559-1 wiki you might choose%0a-> %25hlt php%25[@session_name('CS559SESSID');@]%0aThis will keep the two wikis' session cookies independent of each other.%0a%0aQ: Is it possible to test the password level for display and/or if condition? Example: %25pmhlt%25[= * (:if WriterPassword:) (display Edit link) (:ifend:) =]%0a%0aA: You can use %25pmhlt%25[@(:if auth edit:)@]. See [[ConditionalMarkup]].%0a%0aQ: [[#condmarkup-secrets]] Can I use %25pmhlt%25[@(:if …:)@] to hide secrets in a wiki page?%0a%0aA: You can, but [[usually that's not secure -> PITS:01417]].%0aThe recommended strategy is to put secrets in a separate page and restrict all read-related¹ access permissions to those users who are allowed to read the secrets.%0aTo display the secrets in another page, you can [[include( other pages)]] (parts of) the secrets page:%0aUsers with read access to the secrets will readily see them, whereas other users see nothing or (at your choosing) some other text, e.g. a login link.%0a-> ¹ Currently (version 2.2.99), these are: @@read@@ (would allow include), @@edit@@ (would show the source), @@attr@@ (would allow to obtain read/edit), @@diff@@ (would allow viewing any change), @@source@@ (allows raw source display)%0a%0aThe reason why [[Conditional Markup]] isn't suitable for access control is that it only applies for rendering wikitext as a web page, and that's just one of many ways to access a page's text.%0aIn order to rely on Conditional Markup for protection of secrets, you'd have to restrict all access methods that can circumvent it.%0aTo do so, you'd need to keep track of all methods available.%0aIn a default installation of PmWiki, some of the easy methods include: Editing a page, viewing its edit history, its source, or [[including fragments of it -> IncludeOtherPages]] into the edit preview of another page. (Preview: To avoid traces in @@RecentChanges@@.)%0aHowever, this list is far from exhaustive, and could easily grow with [[Recipes -> Cookbook/]] or future versions of PmWiki.%0a%0a +time=1722399498 diff --git a/wikilib.d/PmWiki.ReleaseNotes b/wikilib.d/PmWiki.ReleaseNotes index 323fee05..5537b2ff 100644 --- a/wikilib.d/PmWiki.ReleaseNotes +++ b/wikilib.d/PmWiki.ReleaseNotes @@ -1,10 +1,10 @@ -version=pmwiki-2.3.34 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=2.3.35 (+49) +csum=2.3.36 (+475) name=PmWiki.ReleaseNotes -rev=832 -targets=PmWiki.Upgrades,PmWiki.ChangeLog,PmWiki.Download,PmWiki.RoadMap,PmWiki.UploadsAdmin,PmWiki.ConditionalMarkup,PmWiki.EditVariables,PmWiki.LayoutVariables,PmWiki.UploadVariables,Cookbook.DarkColorScheme,PmWiki.LinkVariables,PmWiki.OtherVariables,PmWiki.Notify,PmWiki.UrlApprovals,PmWiki.Functions,PmWiki.SecurityVariables,PmWiki.Forms,Cookbook.PmForm,PmWiki.PageLists,PmWiki.Tables,PmWiki.TableOfContents,PmWiki.BasicVariables,PmWiki.AuthUser,Cookbook.PmSyntax,PmWiki.WikiStyles,PmWiki.PageVariables,Cookbook.MarkupDirectiveFunctions,PmWiki.PagelistVariables,Cookbook.CustomSyntax,Cookbook.LocalTimes,Cookbook.RecentUploadsLog,Cookbook.DiffDelay,Cookbook.ReindexCategories,Cookbook.PageListMultiTargets,PITS.01095,PITS.01461,Cookbook.RecipeCheck,Skins.SkinChange,Cookbook.ToggleNext,PmWiki.Links,Cookbook.SectionEdit,PmWiki.BlockMarkup,Cookbook.DeObMail,Cookbook.FixURL,Cookbook.NotSavedWarning,Cookbook.EditHelp,Cookbook.AutoTOC,Cookbook.DeltaBytesRecentChanges,Cookbook.RowspanInSimpleTables,Cookbook.LocalCSS,Cookbook.PreviewChanges,PmWiki.MarkupExpressions,PmWiki.DebugVariables,PmWiki.WikiTrails,SiteAdmin.AuthList,PmWiki.PathVariables,Site.UploadQuickReference,PmWiki.Troubleshooting,PmWiki.CustomMarkup,PmWiki.PageDirectives,PmWiki.I18nVariables,PmWiki.PageHistory,PmWiki.Uploads,PmWiki.Passwords,PmWiki.SiteAnalyzer,Site.Site,SiteAdmin.SiteAdmin,PITS.00961,Site.PageActions,Site.EditForm,Site.PageNotFound,PmWiki.Drafts,PmWiki.Blocklist,Cookbook.Cookbook,Cookbook.DebuggingForCookbookAuthors,PmWiki.SkinTemplates,PmWiki.ReleaseNotesArchive -text=(:title Release Notes:)(:Summary: Notes about new versions, important for upgrades:)%0aSee also: [[Upgrades]], [[Change log]], [[(PmWiki:)Download]] and [[(PmWiki:)Road map]].%0a(:comment The {*$:Released} variable is used in [[News/]]. :)%0a%0a!! Version 2.3.35 {*$:Released} (2024-07-07) [[#v2335]]%0a%0aThis version updates links in the default sidebar to the HTTPS scheme, and places the links to PITS (issue tracking) and Mailing lists in a conditional for editors only.%0a%0aMinor improvements to PmSynxtax. It is now possible to show the source text of a wiki page highlighted by opening @@Page?action=source&highlight=1@@.%0a%0aA minor bug with escaped strings in page titles was fixed, and the documentation was updated.%0a%0aVersion 2.3.35 for security reasons removes the upload types "svg", "svgz", "htm", "html", "css", "swf", "fla", "epub". In some cases, those file formats may allow scripting and potentially open XSS vulnerabilities. Existing uploads with these extensions will not be affected. Wiki administrators who only allow trusted users to upload, can re-enable the extensions that they require with the following lines in config.php:%0a%0a%25hlt php%25[@%0a# NOTE: Only enable extensions that you require%0a%0a# files with no extension, the type may be auto-detected by the server%0a$UploadExts[''] = 'text/plain';%0a%0a# SVG images may contain scripting%0a$UploadExts['svg'] = 'image/svg+xml';%0a$UploadExts['svgz'] = 'image/svg+xml';%0a%0a# Epub may contain scripting and be opened by a browser extension%0a$UploadExts['epub'] = 'application/epub+zip';%0a%0a# Flash files may contain scripting on older browsers%0a# but are no longer supported by recent browsers%0a$UploadExts['swf'] = 'application/x-shockwave-flash';%0a$UploadExts['fla'] = 'application/vnd.adobe.fla';%0a%0a# HTML may contain scripting%0a$UploadExts['html'] = $UploadExts['htm'] = 'text/html';%0a%0a# CSS, if loaded by a browser, may request external resources%0a# and thus reveal your visitors to external websites%0a$UploadExts['css'] = 'text/css';%0a@]%0a%0aAdditionally, a few more upload extensions are considered for deprecation and removal from the core in early 2025. Please join the discussion: %0a https://www.pmwiki.org/wiki/PITS/01509.%0a%0a%0a!! Version 2.3.34 {*$:Released} (2024-05-27) [[#v2334]]%0a%0aThis version adds a new [[conditional markup]] for the current wiki action like %25pmhlt%25[@(:if action browse,edit:)@] which accepts comma-separated actions and wildcards. A new [[UploadsAdmin|upload extension]] "m4a" for audio files was added. A few updates for recent PHP versions, minor improvements for RecipeCheck and $GUIButtons, some cleanup and the documentation was updated.%0a%0a%0a!! Version 2.3.33 {*$:Released} (2024-04-21) [[#v2333]]%0a%0aThis version includes updates for PHP 8, improvements to the responsive skin, to the preview changes mode, to conditional markup handling, and the documentation was updated. PmSyntax will now colorize links in double brackets. A new variable $HTMLTitleFmt in local configuration can override the format between %25hlt html%25[@%3ctitle>...%3c/title>@] defined in a skin template.%0a%0a%0a!! Version 2.3.32 {*$:Released} (2024-03-24) [[#v2332]]%0a%0aThis version includes improvements for the dark color scheme, restoring a light scheme for printing.%0a%0aPictures with a white background may appear too bright on a dark theme, so a new variable $ImgDarkSuffix, when defined, allows you to prepare a separate picture adapted for the dark theme. On a wiki page you still use @@[=Attach:picture.png=]@@ and when the dark theme is loaded, the browser will load @@[=Attach:=]picture'''-dark'''.png@@ (if it exists).%0a%0aNew image and upload extensions AVIF and AVIFS were added, FileSizeCompact() was refactored to allow decimal file sizes, Recent changes pages will be locked to prevent blanking in case of concurrent uploads, and the documentation was updated.%0a%0a%0a!! Version 2.3.31 {*$:Released} (2024-02-23) [[#v2331]]%0a%0aThis release includes improvements to the color sets of the dark theme for the PmWiki-responsive skin, and for the PmSyntax highlighting. The dark toggle icons are now 3-state, rotating between Light, Dark, and Auto (browser/system preference), and an annotation tooltip near the icon displays the current mode. The dark theme functions detecting, storing, and restoring visitor preferences can be reused by other skins, and a new variable $EnableDarkThemeToggle can define the default theme for visitors that have not used the toggle icon.%0a%0aThe page attributes form where passwords and permissions are defined, can now add or remove passwords, users, or groups, without the need to rewrite the full definition. If for example you need to add a new password and a group without removing existing permissions, type "[@+ @]" (plus, space) or "[@- @]" (minus, space), followed by the permissions to be added or removed:%0a + MyNewPassword @newgroup%0a%0aEdit templates entries can now include page patterns where the template should be used. For example:%0a $EditTemplatesFmt[] = "Site.TalkTemplate name=*-Talk";%0a%0aThe function PrintFmt() was refactored to process markup and wiki pages before outputting HTML headers, which would allow for markup, headers, footers, sidebars included from the skin, and action pages like the Auth form, to configure $HTMLHeaderFmt and $HTMLStylesFmt, and the directives %25pmhlt%25@@[=(:noheader:), (:notitle:), (:noleft:), (:noaction:)=]@@%25%25 to work from these pages. In case your wiki relied on the previous behavior, you can revert to it by adding to config.php:%0a $EnablePrePrintFmt = 0;%0a%0aThe variable $EnableUploadVersions can now be set to 2, and if a file with the same name already exists, the new file will have a unique suffix added. %0a%0aRecipeCheck was updated to also list skins and report their versions.%0a%0aOther minor changes include: the "form" attribute was added to input fields; WikiStyles accept a new property 'columns', %25pmhlt%25@@[=(:redirect quiet=1:)=]@@%25%25 has been refactored to prevent an infinite loop, and the documentation was updated.%0a%0a%0a!! Version 2.3.30 {*$:Released} (2024-01-22) [[#v2330]]%0a%0aPublishing my 176th PmWiki release, this milestone coincides with 15.0 years of me (Petko) serving as core developer. Here are some new developments that may be interesting.%0a%0a'''Dark color theme''': The PmWiki-responsive skin has new styles for a user-activated dark/night scheme, with dark backgrounds and light texts. A dark theme can be softer on the eyes if used at night or in dark rooms. %0a%0aAn icon to toggle the styles is placed near the search box in the header. It is possible to place toggle icons and/or labels in wiki pages, headers, footers, sidebars, to toggle stylesheets, and all functions can be easily reused in other skins, and with syntax highlighting, see Cookbook:DarkColorScheme.%0a%0a'''PmSyntax''': We added styles for the new dark color theme. These may be improved in the future.%0a%0a'''PmWiki logo''': A new logo in SVG format was added to pub/skins/pmwiki, and the variable $PageLogoUrl was updated to use the new logo by default. A vector logo can upscale without pixelizing or blurring and looks better on the dark theme. Most wikis have their own logos, this will not change, but if you prefer to display the old raster logo, add to config.php such lines:%0a%0a%25hlt php%25[@%0a$FarmPubDirUrl = $PubDirUrl; # if not already defined%0a$PageLogoUrl = "$FarmPubDirUrl/skins/pmwiki/pmwiki-32.gif"%0a@]%0a%0a'''Page history''': A significant improvement in the word-diff highlighting precision.%0a%0a'''Uploads''': Various fixes for $EnableUploadMimeMatch and Attach: links with escaped filenames.%0a%0a'''Forms''': The input field %25pmhlt%25[@(:input e_author:)@] is now available to all forms with pre-filled author name and "required" attribute per $EnablePostAuthorRequired. A positional form action URL no longer needs to be quoted.%0a%0a'''Quiet redirects''': With the directive %25pmhlt%25[@(:redirect OtherPage:)@], the variable $EnableRedirectQuiet can now be set to 2 to make all redirects quiet by default (without @@quiet=1@@ argument), unless there is a @@quiet=0@@ argument. Quiet redirects will now prevent multiple jumps and infinite loop errors (like normal redirects).%0a%0aThe release includes a few other minor fixes and the documentation was updated.%0a%0a!! Version 2.3.29 {*$:Released} (2023-12-18) [[#v2329]]%0a%0aThis version includes a fix for PHP 8.2 and improvements to the PmSyntax functions, markup directives defined in $MarkupDirectiveFunctions now accept dashes in attribute names, and the documentation was updated.%0a%0a%0a!! Version 2.3.28 {*$:Released} (2023-11-27) [[#v2328]]%0a%0aThis version adds new form input types "month" and "color".%0a%0aA new variable $NotifyRelatedTrailFmt allows for the Notify trail= function to automatically include related pages when the base page is in the trail. This has been enabled on PmWiki.org, so if your notify trail contains Cookbook.MyRecipe, you will be notified about edits to this page, but also to Cookbook.MyRecipe-Talk and Cookbook.MyRecipe-Users.%0a%0aThe "simpletable" zebra backgrounds are now reversed when the table has a %3cthead> element, in order to have dark-light-dark rows instead of dark-dark-light.%0a%0aWith [[UrlApprovals]], if a URL with the insecure http: scheme has been approved, URLs with the secure https: scheme to the same domain name will be automatically approved (not the other way around).%0a%0aSome utility JavaScript functions should now work better when localStorage is not available.%0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.3.27 {*$:Released} (2023-10-23) [[#v2327]]%0a%0aThis version includes fixes for PHP 8, and for time formats with an invalid timezone. %0a%0aWhen merging the last edit without an edit summary, it will now reuse the previous edit summary.%0a%0aThe ".diffmarkup" element now has the style "white-space: pre-wrap" - if a custom skin disables core styles you may want to update the skin styles.%0a%0aWhen $EnableEditAutoText is enabled, new keyboard shortcuts will be available: %25pmhlt%25@@[=Ctrl+B ('''bold'''), Ctrl+I (''italic''), Ctrl+K ([[link]]/unlink).=]@@%0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.3.26 {*$:Released} (2023-09-28) [[#v2326]]%0a%0aThis version includes updates for PHP 8.2, customizable HTML snippets for trails and input labels. It is now possible to configure searching for "at least one" term among many, as opposed to currently searching for all terms. Extensions are now removed from the $UploadExts array if their size is set to zero in $UploadExtSize, and the documentation was updated.%0a%0a%0a!! Version 2.3.25 {*$:Released} (2023-07-29) [[#v2325]]%0a%0aThis version includes updates for PHP 8.2. Some core markup directives were refactored to prevent very rare bugs. The documentation was updated.%0a%0a%0a!! Version 2.3.24 {*$:Released} (2023-06-06) [[#v2324]]%0a%0aThis version includes some code refactoring, and a new helper function [[Functions#InsertEditFunction|InsertEditFunction()]] to simplify the reuse of core functionality by recipes. %0a%0aIt is now possible to configure the merging of the latest edits by the same author into a single history entry, see $EnableMergeLastMinorEdit.%0a%0aNew configuration variables $AuthFormRespCode, $EnableUploadMimeMatch, $EnableDownloadRanges, see documentation.%0a%0aPmForm now can validate an email address field with the "template require FIELD if=validemail" condition.%0a%0aA few other minor improvements in the [[change log]], and the documentation was updated.%0a%0a%0a!! Version 2.3.23 {*$:Released} (2023-05-03) [[#v2323]]%0aThis version implements session tokens to prevent potential cross-site request forgery vulnerabilities, suggested by Dominique Faure. Most core actions that modify pages or files should have this enabled and should work like before. %0a%0aThis new feature can be disabled by setting these variables in config.php:%0a%0a%25hlt php%25[@%0a $EnablePmToken = 0; # edit, upload, attributes, approveurls%0a $PmFormEnablePmToken = 0; # PmForm%0a@]%0a%0aSome installations might encounter the error message "Token invalid or missing". These can include custom edit forms, automated scripts posting to the wiki, AJAX posting text or uploads used by some recipes, or partial upgrades where some core scripts haven't been updated. Most of these should be easy to update -- please check if you're using the latest recipe versions, otherwise report such cases to us -- otherwise you may selectively disable the feature. See [[Upgrades#pmtoken]].%0a%0aA [[Forms|form]] element %25pmhlt%25[@(:input pmtoken:)@] was added, and the helper function [[Functions#pmtoken|pmtoken()]] was documented to make it easy for custom forms and recipes to use this new feature.%0a%0aThe version also includes a minor code refactoring, a bug fix, and the documentation was updated.%0a%0a%0a!! Version 2.3.22 {*$:Released} (2023-04-06) [[#v2322]]%0aThis version adds to the core the Cookbook:PmForm recipe (script and templates), not enabled by default. This is in order to reduce my workload, and future updates to PmForm will be made only in the core version. %0a%0aIf you already use PmForm, you can enable the core script, by modifying your @@include_once()@@ call from "@@'''cookbook'''/pmform.php@@" to "@@'''scripts'''/pmform.php@@". Your existing templates and configuration should continue to work.%0a%0aA bug was fixed with [[PageLists]] with multiple @@category=+A,+B@@ categories. Input [[forms]] and buttons can now be configured to ask for confirmation before they are submitted. A few updates for recent PHP versions, and other minor improvements, and the documentation was updated.%0a%0a!! Version 2.3.21 {*$:Released} (2023-03-06) [[#v2321]]%0aThis version includes updates for PHP 8, and bug fixes with [[tables#sortable|sortable tables]] and multiline $MarkupDirectiveFunctions. The core [[table of contents]] was updated to work better with recent SectionEdit versions, and the documentation was updated.%0a%0aNew features include: the upload extension CSV, $EnableLocalTimes with a new short mode 3 where old dates are shown as MM'YY, and a new variable $EnableCopyCode to add [@[+]@] buttons for easy copying of preformatted blocks.%0a%0a!! Version 2.3.20 {*$:Released} (2023-02-12) [[#v2320]]%0aThis version fixes an unidentified variable warning introduced yesterday in 2.3.19.%0a%0a!! Version 2.3.19 {*$:Released} (2023-02-11) [[#v2319]]%0aThis version includes fixes for recent PHP versions, new helper functions, new variables allowing more customization, and the documentation was updated.%0a%0aWork is underway to define and implement a new family of self-contained recipes "Modules" which should be easier to install, configure and update. It may be possible to easily update your modules and skins either from a remote Git/SVN repository, or by simply dropping a ZIP file into the "modules" directory, and use a wiki-based editor to enable and configure them. Nothing will change for existing recipes, and they will not need to be updated; this will be an entirely optional new interface. Let me know if you can suggest features/scopes added to the wishlist.%0a%0aPmWiki too may be able to run directly from the read-only release ZIP archive, without the need to unzip it first. Again, this will be entirely optional, the current ways will continue to work as before, and slightly faster than the ZIP version (approx. 2%25 faster in my benchmarks).%0a%0a%0a!! Version 2.3.18 {*$:Released} (2023-01-15) [[#v2318]]%0a%0aThis version fixes a bug with user groups in with conditional markup, includes updates for PHP 8, minor improvements to the edit textarea and to the syntax highlighting. A helper function pm_json_encode() was added for servers where the PHP-JSON extension is not enabled.%0a%0aThe documentation was updated.%0a%0a!! Version 2.3.17 {*$:Released} (2022-12-17) [[#v2317]]%0a%0aThis release has updates for recent PHP versions.%0a%0aThe edit textarea had some improvements. Edit buttons and the automatic edit text will now insert their wiki markup in a way which allows for the "undo" function in the text area to work (with Ctrl+Z). The edit textarea (with $EnableEditAutoText enabled) now accepts 4 new keyboard shortcuts: Ctrl+L and Ctrl+Shift+L to convert the selected text to lowercase or uppercase, and Ctrl+Shift+ArrowUp or ArrowDown to move the line with the cursor up or down.%0a%0aA new variable $EnableBaseNameConfig was added - it allows to enable automatic inclusion of local configuration for the "basename" of the current page, for example Group.Page-Draft to include local/Group.Page.php if it exists.%0a%0aConditional markup %25pmhlt%25[@(:if auth @admins,@editors:)@] can now check if the current user belongs to selected usergroups (with [[AuthUser]]).%0a%0aA few minor bugs and omissions were fixed, and the documentation was updated.%0a%0a!! Version 2.3.16 {*$:Released} (2022-11-28) [[#v2316]]%0a%0aThis version fixes a bug with some skins introduced in 2.3.15 last week, and reverts PrePrintFmt(). %0a%0aNew WikiStyles 'notoc' and 'overflow' were added. PmTOC Table of contents, and the list of included pages in the edit form, now use classnames instead of style attributes.%0a%0aPmSyntax fixes a font-size alignment bug with nested programming languages, and has been optimized for large pages.%0a%0aA few more minor bugs were fixed, including for PHP 8, and the documentation was updated.%0a%0a%0a!! Version 2.3.15 {*$:Released} (2022-11-21) [[#v2315]]%0a%0aSecurity: Closed a potential XSS vulnerability discovered today. Your wiki may be at risk if untrusted people can edit your pages.%0a%0aHTTP headers: CSP updated, XSSP added. Both can be disabled or modified by changing the $HTTPHeaders values.%0a%0aCookies: Added a new variable $CookieSameSite default to 'Lax' per current browser defaults and expectations. Updated pmsetcookie() added an argument $samesite, and refactored to work with old and current PHP versions. Added function pm_session_start() as a replacement for session_start() with respect for local preferences ($CookieSameSite, $EnableCookieSecure, $EnableCookieHTTPOnly). %0a%0a[[Cookbook:PmSyntax|PmSyntax]]: A new CSS variable @@--pmsyntax-fontsize-editform@@ allows to set the font size of the edit form separately from highlighted elements in the documentation. Fixed the [@[[Highlight]]@] label could change fonts when clicked.%0a%0aResponsive skin: The font size for "pre" and "code" elements is now scalable/relative to the paragraph font size rather than fixed. This works better in headings or small text blocks.%0a%0aGUI edit buttons: Part of these functions were rewritten to avoid 'unsafe inline' JavaScript. While default and most custom buttons should work without change, you should no longer need to url-encode some characters like %25 or add backslashes. If you have such buttons, you may need to update their declarations to strip the extra backslashes. %0a%0a[[WikiStyles]]: Refactored to move all inline WikiStyles to the $HTMLStylesFmt array in the header of the HTML page.%0a%0aTables and block markup: Replaced inline @@style="..."@@ attributes with class names. %0a%0aThe function PrintFmt() was refactored to process skin parts, skin functions, markup, and wiki pages, before sending the HTTP and HTML headers. This allows for wikistyles and recipes in sidebars and footers to add their configuration to the headers.%0a%0aIf you have questions or difficulties upgrading, please contact us.%0a%0a!! Version 2.3.14 {*$:Released} (2022-11-03) [[#v2314]]%0a%0aThis version includes fixes for recent PHP versions and for 2 minor bugs (searchbox wrongly encoded entities and %25pmhlt%25[@{(ftime %25L)}@] format). Inline JavaScript for focusing form fields is now replaced with native attributes. In the Edit form, the "Minor edit" label can now toggle the checkbox.%0a%0aThe "disabled obsolete markup" tooltip now includes the file path and the line number of the markup rule definition.%0a%0aPmSyntax now recognizes %25pmhlt%25[@(:template requires? ...:)@] which is used by some recipes.%0a%0aThe documentation was updated.%0a%0a!! Version 2.3.13 {*$:Released} (2022-10-07) [[#v2313]]%0aThis version closes a potential XSS vulnerability, reported by lukystreik. A new variable $FailedLoginsFunction will allow to define a function limiting the number of failed logins. The documentation was updated.%0a%0a!! Version 2.3.12 {*$:Released} (2022-09-25) [[#v2312]]%0aThis version has a few fixes for PHP8. Complex conditionals with empty page variables could cause errors, now fixed. Form elements with values like "0" could appear empty, now fixed. The PSFT() function and the %25pmhlt%25[@{(ftime)}@] markup expression now recognize a "%25L" format as a human-readable localizable timestamp. A new helper function PrintAuthForm() was split from PmWikiAuth() to allow recipes to call it directly. The documentation was updated.%0a%0a!! Version 2.3.11 {*$:Released} (2022-08-30) [[#v2311]]%0a%0aThis version fixes the function stripmagic(), when used with arrays (a recent update for PHP 8 broke it).%0a%0aNew [[PageVariables]] derived from a Group's homepage are now available: %25pmhlt%25 [@{$GroupHomePage}@], [@{$GroupHomePageName}@], [@{$GroupHomePageTitle}@], [@{$GroupHomePageTitlespaced}@].%0a%0aA new helper function should simplify recipes with custom markup directives of the format:%0a%0a-> %25pmhlt%25 [@(:mydirective arg=val param="other value":)...(:mydirectiveend:)@].%0a%0aSee the documentation at Cookbook:MarkupDirectiveFunctions.%0a%0aThe core documentation was updated.%0a%0a%0a!! Version 2.3.10 {*$:Released} (2022-08-20) [[#v2310]]%0a%0aThis version includes updates for PHP 8. Wildcard $DefaultUnsetPageTextVars should now work with forms. PmSyntax fixed text alignment between the edit area and the colored block in some cases. The documentation was updated.%0a%0a!! Version 2.3.9 {*$:Released} (2022-08-18) [[#v239]]%0a%0aThis version includes updates for PHP 8. Non-wildcard $DefaultUnsetPageTextVars should now work with %25pmhlt%25[@(:input default:)@]. PmSyntax now handles blocks with simpler selectors, possibly created by recipes. The documentation was updated.%0a%0a!! Version 2.3.8 {*$:Released} (2022-07-22) [[#v238]]%0a%0aThis version fixes a bug caused by a recent update for PHP 8 with the include markup:%0a%0a %25pmhlt%25[@(:include Page1 Page2 Page3:)@]%0a%0aWhen the first page doesn't exist, it didn't check for the other pages (now fixed).%0a%0aIn addition, PmSyntax was improved when more than one inline blocks are on the same line, and the documentation was updated.%0a%0a%0a!! Version 2.3.7 {*$:Released} (2022-06-28) [[#v237]]%0a%0aThis version sets default HTTP headers X-Frame-Options (reported by Imagine Dragon) and Content-Security-Policy to disallow embedding in external websites by default and clickjacking attempts.%0a%0aShould you require the previous behavior, you can add this line to local/config.php:%0a%0a-> %25hlt php%25[@unset($HTTPHeaders['XFO'], $HTTPHeaders['CSP']);@]%0a%0a$EnableHighlight will now remember any links to PmWiki variables and restore them after the highlighting. %0a%0a$EnablePmSyntax will now process %25pmhlt%25[@%25hlt pmwiki%25@] in addition to [@%25pmhlt%25@] blocks, and escaped markup after it will be tentatively highlighted.%0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.3.6 {*$:Released} (2022-06-19) [[#v236]]%0a%0aThis version contains fixes for PHP 8. A form attribute "lang" was added. %0a%0aSortable tables now allow for table headers to have markup such as bold (except links), and will use a case-insensitive natural ordering. %0a%0aSearchbox now has a default placeholder %25pmhlt%25 [@"$[Search]"@] and can have the submit button removed with the argument [@label=""@] (users need to press Enter on their keyboards to search).%0a%0a$EnableHighlight-formatted code blocks are now converted to plain text to prevent warnings; there is an ongoing discussion in the mailing list so this solution may evolve.%0a%0aFor developers: $UploadVerifyFunction can now modify $upname, and a variable $PageIndexTermsFunction can configure a replacement function for PageIndexTerms().%0a%0aThe documentation was updated.%0a%0a%0a!!Version 2.3.5 {*$:Released} (2022-05-23) [[#v235]]%0a%0aThis version fixes a bug with %25pmhlt%25 @@[=(:pagelist list=grouphomes:)=]@@. A new helper function DisableSkinParts() allows for simpler disabling of headers, footers and sidebars from recipes. When a file is uploaded, new variables with the file path and URL are now available to recipes.%0a%0aThe version also contains fixes for PHP 8 and documentation updates.%0a%0a%0a!!Version 2.3.4 {*$:Released} (2022-04-22) [[#v234]]%0a%0aThis version includes fixes for PHP 8 and documentation updates.%0a%0a%0a!!Version 2.3.3 {*$:Released} (2022-03-26) [[#v233]]%0a%0aThis version includes fixes for PHP 8 and documentation updates.%0a%0a%0a!!Version 2.3.2 {*$:Released} (2022-02-09) [[#v232]]%0a%0aThis version includes bug fixes and updates for PHP 8.1. The core variable $EnableIncludedPages introduced in 2.3.0 was renamed to $EnableListIncludedPages to avoid ambiguity. With LocalTimes, is now possible to configure the number of days the "plus" button will pull from the page history, and the function will better recognize some older RecentUploads formats. PmSyntax was updated so that "%25pmhlt%25@@\\@@" line breaks in tables and headings are treated like in the core, staying in the same context; and the different PmSyntax blocks will now be processed in parallel.%0a%0aThe code configuring and loading pmwiki-utils.js was moved to a new file scripts/utils.php, and a new variable $EnablePmUtils was added to allow administrators to easily disable these functions. The script pmwiki-utils.js will now be included in the page header rather than the footer, which may reduce the number of page redraws. The individual functions will now be processed in parallel.%0a%0aThe documentation was updated.%0a%0a%0a!!Version 2.3.1 {*$:Released} (2022-01-15) [[#v231]]%0a%0aThere was an omission in the release script which unexpectedly deleted the $VersionNum variable which broke some settings. This quick release fixes it.%0a%0a!!Version 2.3.0 {*$:Released} (2022-01-15) [[#v230]]%0a%0aJanuary 2022 is the 20th year anniversary of the release of PmWiki version 0.1, and 13 years since I (Petko) became core developer. This merited additional work and effort with hopefully interesting and useful new production.%0a%0a'''PHP 5.3 - 8.1 compatibility''' %0a* PmWiki 2.3.0 includes updates for PHP 8.0 and 8.1.%0a* Consequently, it requires PHP version 5.3 (released 2009) or more recent.%0a%0a'''PmSyntax'''. A new function PmSyntax was added to the core, and enabled on pmwiki.org. %0a* It highlights PmWiki syntax in the documentation, and possibly in the basic edit form. %0a* It only highlights PmWiki markup, and is independent from Highlight.js. See Cookbook:PmSyntax and $EnablePmSyntax. %0a* It should highlight most core language features and those of many recipes, see [[https://www.pmwiki.org/wiki/Test/PmSyntax|this mashup of various markups]]. %0a* Developers can add custom rules in the $CustomSyntax array, see Cookbook:CustomSyntax. %0a* The %25pmhlt%25 [@(:markup:)@] directive can now have @@class=norender@@ to only show the source code without processing it. This may be useful, together with PmSyntax, in 2 cases: writing/discussing markup code without actually running it, or working on PageList Templates where you want to see and edit them highlighted.%0a%0a'''Improvements to the edit form'''%0a* PmSyntax (above) can be enabled to highlight the PmWiki markup the edit form, and should work in recent standards-compliant browsers.%0a* The variable $EnableNotSavedWarning is now enabled by default. Add to config.php @@$EnableNotSavedWarning = 0;@@ to disable it.%0a* A new variable {- $EnableIncludedPages -} $EnableListIncludedPages (from 2.3.2) allows listing of other pages included from the currently edited page, with links to see or edit them. When the variable is enabled, the list of pages appears in the edit form, after the text area, in a collapsed %3cdetails> element. The list includes pages from which text, text variables, or templates are included from the edited page. This is enabled on pmwiki.org if you wish to preview it.%0a* The $EnableEditAutoText function will now feel more like other text editors by removing the automatically inserted bullet when Enter is pressed twice.%0a%0a'''Dates and times, monitoring, review'''%0a* The %25pmhlt%25 [@{(ftime)}@] Markup expression now accepts a new format '[@%25o@]' for the ordinal suffix of the date.%0a* The [[Notify]] feature now accepts a @@tz=@@ timezone specifier for individual subscribers. See [[Notify#tz]].%0a* A function based on Cookbook:LocalTimes was added to the core. See [[Cookbook:LocalTimes|the recipe page]] for the differences. You can continue using the recipe, or disable it and enable the core function.%0a* New core variables $EnableLocalTimes, $CurrentLocalTime.%0a* New markup %25pmhlt%25[@@2022-01-09T08:35:00Z@]%25%25 output as a %3ctime> element, formatted via $TimeFmt; localized if $EnableLocalTimes. %0a* Added a variable $EnableRecentUploads which makes it easy to enable the Recent Uploads feature on AllRecentChanges. This is a basic format that may be good enough for many wikis. For more options, see Cookbook:RecentUploadsLog.%0a* The default $RecentChangesFmt now use the variable $CurrentLocalTime instead of $CurrentTime. In the wiki source text it saves the timestamps in a portable time format in GMT, which is then shown formatted per $TimeFmt (wiki timezone). It looks just like $CurrentTime did previously, but can be converted to the visitor's time zone if LocalTimes is enabled. If you have custom $RecentChangesFmt entries that use $CurrentTime, nothing will change for you, but you may want to update these with $CurrentLocalTime if you want to benefit from localization.%0a* The "page history" page now has CSS classes for the delay between edits: diffday, diffweek, diffmonth, diffyear. These allow styling of vertical spacing between individual edits in page histories. See Cookbook:DiffDelay for an example.%0a* The page history can now have a "hidden" edit type, in addition to "minor". This is intended to be used by recipes in order to hide, rather than delete, some edits from the page history. A couple of new recipes using this feature will be added in the next few days.%0a%0a'''PageLists, categories, backlinks'''%0a* [[PageLists]] now accept a new argument @@category=Name@@ which lists only pages declared in the category with the markup %25pmhlt%25 [@[[!Name]]@], and does not include pages simply linking to [@[[Category/Name]]@] (unless they also contain [@[[!Name]]@]).%0a** The differentiation between links to !Name and Category.Name requires the pages containing category links to be re-indexed; see Cookbook:ReindexCategories which can automate this.%0a* Also in PageLists, the arguments @@link=@@ and @@category=@@ now accept multiple and negative specifiers, and wildcards. See [[PageLists#wildcards]]. If you previously used the recipe Cookbook:PageListMultiTargets, please disable it when you upgrade to 2.3.0.%0a* Category links can now have a different text, like %25pmhlt%25 [@[[!Name|Text]]@], and the markup generally behaves like other links, see PITS:01095.%0a%0a'''Styles''' (core skin PmWiki-responsive)%0a* Collapsible sections details+summary will now change the cursor to the "pointer" style over the clickable element, and the color will change to "navy". %0a* The core table of contents function ($PmTOC) has had its styles updated, in order to properly indent long sub-headings.%0a%0a'''Core helper functions'''%0a* A new helper function %25hlt php%25@@PSFT()@@ can now be used as an ''almost'' drop-in replacement for @@strftime()@@ and @@gmstrftime()@@ which became deprecated in PHP 8.1. Please review the documentation at [[Functions#PSFT]]. If you have local configurations or recipes using @@strftime()@@ you can change for @@PSFT()@@ now.%0a* A helper function %25hlt php%25@@DownloadUrl($pagename, $path)@@ was added, see [[Functions#DownloadUrl]]. It can simplify the handling of attached files by recipes.%0a%0aLast but not least, '''the documentation''' in English has been updated with the latest development (and in German by MFWolff).%0a%0aSee also [[Upgrades#v22v23|Upgrading from version 2.2.145 to 2.3.0]].%0a%0aAs always, if you have any questions or difficulties, please let us know.%0a%0a%0a!! Version 2.2.145 {*$:Released} (2021-12-11) [[#v22145]]%0aThis version includes a minor change in search patterns: searches and pagelists with a wrong or undefined $SearchPatterns (@@list=abc@@ argument) will now use $SearchPatterns["default"] rather than an empty array (effectively all pages). This was likely the intended behavior, a way for admins to restrict search locations.%0a%0aIt also includes updates for PHP 8, a fix of an emoji for non-UTF8 wikis, and the latest pages of the documentation.%0a%0a!! Version 2.2.144 {*$:Released} (2021-11-06) [[#v22144]]%0aThis version includes fixes for PHP 8 and an update to @@intermap.txt@@. The conditional markup "exists" was optimized when called multiple times. The functions %25hlt php%25@@CondExists()@@, @@MatchPageNames()@@, and @@MatchNames()@@, can now be called with an additional argument (false) when a case-sensitive match is needed. The documentation was updated.%0a%0a!! Version 2.2.143 {*$:Released} (2021-10-02) [[#v22143]]%0aThis version should prevent some errors from local customization or recipes with recent PHP versions, by disabling obsolete markup rules and replacement patterns. If such markup appears on a page, it will not be processed, it will be rendered like this: %25frame%25@@⚠(:my-obsolete-directive params:)@@%25%25 and a tooltip title should have some additional information.%0a%0aCare should be taken if you have custom calls to the deprecated function [[PmWiki/Functions#PCCF|%25hlt php%25@@PCCF()@@]], and incompatible custom replacement patterns processed via [[PmWiki/Functions#PPRE|@@PPRE()@@]] or [[PmWiki/Functions#PPRA|@@PPRA()@@]] are silently skipped, which may not work as expected. (Previously they wouldn't work at all.)%0a%0aIf you experience any difficulties, please do let us know and we'll try to provide a fix.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.142 {*$:Released} (2021-08-31) [[#v22142]]%0aThis version hides some PHP 8 notices, and adds 2 new form element attributes "accept" and "autofocus". %0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.2.141 {*$:Released} (2021-07-09) [[#v22141]]%0aThis version adds ways to define 2 custom functions:%0a* $MultiFactorAuthFunction to enable custom MFA/2FA with [[AuthUser]]%0a* $PageIndexFoldFunction to define a custom function normalizing the page terms while indexing and searching (by default PmWiki converts the terms to lowercase).%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.140 {*$:Released} (2021-06-26) [[#v22140]]%0aThis version has updates for PHP 8. %0a%0aThe API of the source code highlighting library has changed and the PmWiki loader function was adapted; if you use this feature, please upgrade Highlight.js to version 11.0.0 or newer. %0a%0aNote: since version 11, Highlight.js doesn't preserve HTML in the preformatted blocks and issues a console warning, so you should only use the [@(space)[=escaped=]@] or the @@[=[@escaped@]=]@@ markup blocks.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.139 {*$:Released} (2021-05-05) [[#v22139]]%0aThis version removes empty "title" attributes in HTML tags (links and images), fixes warnings which appear with PHP 8 and updates the documentation.%0a%0a!! Version 2.2.138 {*$:Released} (2021-03-02) [[#v22138]]%0aThis version fixes a bug when a details directive has markup in the summary attribute, and the documentation was updated.%0a%0a!! Version 2.2.137 {*$:Released} (2021-02-26) [[#v22137]]%0aThis version fixes a bug introduced earlier today with entities encoded twice in PQA() quoted arguments.%0a%0a!! Version 2.2.136 {*$:Released} (2021-02-26) [[#v22136]]%0aThis version fixes a XSS vulnerability for WikiStyles reported today by Igor Sak-Sakovskiy.%0a%0aThe fix adds a second argument $keep to the core function PQA($attr, $keep=true) which by default escapes HTML special characters and places the values in Keep() containers. If you have custom functions that call PQA() and expect the previous behavior, call PQA() with a second argument set to false.%0a%0aIf you have any questions or difficulties, please let us know.%0a%0a!! Version 2.2.135 {*$:Released} (2021-01-31) [[#v22135]]%0aThis version fixes a number of PHP8 compatibility issues. This is a work in progress, if you uncover others, please report them at PITS:01461.%0a%0aA work is underway to implement session tokens to prevent CSRF vulnerabilities -- suggested by Dominique Faure. I wanted to rework these functions but the PHP8 compatibilities are more urgent so at the moment the PmToken functions are transparent/non-functional.%0a%0aA defunct syndicated blocklist was disabled, a minor code refactoring was done for PmTOC to better support manual edit section links, and the documentation was updated.%0a%0a%0a!! Version 2.2.134 {*$:Released} (2020-11-30) [[#v22134]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.133 {*$:Released} (2020-10-25) [[#v22133]]%0aThis version fixes a potential vulnerability to CWE-384: Session Fixation, reported by Dominique Faure. The fix regenerates the session identifier at the moment someone logs in. In case this is not desirable, a wiki admin can set the new variable $EnableAuthPostRegenerateSID to false.%0a%0aThis version also fixes an unintended variable evaluation in link markups. The CSS from Cookbook:RecipeCheck will now be injected only when needed. The responsive skin styles contained a reduced padding value for numbered and bulleted lists in order to save space, but in longer lists it could clip the item numbers. This value was removed from the styles because it was complex to reliably override it from local configuration. If you need to enable the previous values, add to pub/css/local.css the following:%0a%0a%25hlt css%25[@%0aul, ol { padding: 0 0 0 20px; }%0a@media screen and (min-width:50em) {%0a ul, ol { padding: 0 0 0 40px; }%0a}@]%0a%0a!! Version 2.2.132 {*$:Released} (2020-09-30) [[#v22132]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.131 {*$:Released} (2020-08-30) [[#v22131]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.130 {*$:Released} (2020-07-04) [[#v22130]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.129 {*$:Released} (2020-05-21) [[#v22129]]%0aThis version adds the styles for the "simpletable" class of tables from the "pmwiki-responsive" skin into the old "pmwiki" skin, and the documentation was updated.%0a%0a!! Version 2.2.128 {*$:Released} (2020-04-26) [[#v22128]]%0aThis version only includes some cosmetic changes and updates the documentation.%0a%0a!! Version 2.2.127 {*$:Released} (2020-03-23) [[#v22127]]%0aThis version sets the maximum height of the edit form textarea after reports for a jumping behavior on mobile devices (the PmWiki-responsive skin only). The core table of content classes "pmtoc-show" and "pmtoc-hide" now replace the previous classes "show" and "hide" to prevent conflicts with other frameworks. The functionality of the recipe Skins:SkinChange was added to the core (disabled by default). The documentation was updated.%0a%0a!! Version 2.2.126 {*$:Released} (2020-02-01) [[#v22126]]%0aThis version fixes a bug with $PmTOC['MinNumber'] set to -1, and updates the .htaccess format for caches.php. The documentation was updated.%0a%0a!! Version 2.2.124, 2.2.125 {*$:Released} (2020-01-27) [[#v22124]] [[#v22125]]%0aThis version adds a variable $SetCookieFunction to override the core "pmsetcookie" function. A new feature ToggleNext was included in the core, documented at Cookbook:ToggleNext. The documentation was updated.%0a%0a!! Version 2.2.123 {*$:Released} (2019-12-31) [[#v22123]]%0aThis version allows link URLs to be [[Links#escaped | escaped]] with [@[=link address=]@] if they contain any special characters, including quotes, parentheses and pipes. The obfuscated e-mails will now work from headers, footers and sidebars. A [[forms|form]] attribute "formnovalidate" was added to the core and to the "Cancel" button in the edit form. Core [[table of contents]] will now work better with Cookbook:SectionEdit. Cookbook:RecipeCheck was included in the core -- if you have this recipe already installed, you can simply comment it out from your config.php. The code that handles $EnableRCDiffBytes was refactored to also show the bytes changed in the page histories. New upload extensions [[https://developers.google.com/speed/webp | "webp"]] (images) and [[https://www.opus-codec.org/ | "opus"]] (audio) were added. The documentation was updated.%0a%0a!! Version 2.2.122 {*$:Released} (2019-11-19) [[#v22122]]%0aVersion 2.2.121 was released by mistake and contained some experimental code that was meant to be tested first. %0a%0aThis version fixes a bug with ObfuscateLinkIMap() and international characters. New configuration variables $DefaultUnsetPageTextVars, $DefaultEmptyPageTextVars can set default values for page text variables. The built-in table of contents and numbered headings can now be enabled independently. A pagelist template pseudovariable [@{$$EachCount}@] was added, containing the number of the page in the current "each" loop. Input form elements and the [@(:searchbox:)@] field now can have ARIA accessibility attributes.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.120 {*$:Released} (2019-10-13) [[#v22120]]%0aThis version fixes a bug with existing complex customization of GUIEdit buttons. Very long [[table of contents|tables of contents]] will now be scrollable. A new "input datalist" [[Forms|form]] element (list of suggestions to other input fields), and a new "details+summary" [[block markup|block section]] (toggle sections without JavaScript) were added. The documentation was updated.%0a%0a!! Version 2.2.119 {*$:Released} (2019-10-03) [[#v22119]]%0aThis version updates the core for PHP 7.4. Required input fields now feature @@required="required"@@ attributes and modern browsers prevent sending the edit or upload form with empty required fields. Attachlist @@ext=@@ and @@names=@@ arguments now accept patterns and negatives like @@ext=jpg,png@@, @@ext=-pdf@@, or @@names=-th*---*.jpg@@. The Redirect function can now have a 3rd argument with the full URL. The scroll position in the edit text area will be remembered on save-and-edit and preview. A bug was fixed with pagelist while preview. The documentation was updated.%0a%0aA number of features currently provided by recipes were added to the core and disabled by default. You can still use the recipes, or you can disable them and enable the core features. The following features were added:%0a* e-mail obfuscation functions based on Cookbook:DeObMail; see instructions to enable%0a* a FixUrl button based on Cookbook:FixURL, see $EnableGuiEditFixUrl%0a* $EnableNotSavedWarning based on Cookbook:NotSavedWarning%0a* $EnableEditAutoText based on Cookbook:EditHelp%0a* $PmTOC, [@(:toc:)@], [@(:notoc:)@], Table of contents/Numbered headings, based on a simplified variant of Cookbook:AutoTOC%0a* $EnableSortable, basic sortable tables%0a* $EnableRCDiffBytes based on Cookbook:DeltaBytesRecentChanges%0a* $EnableSimpleTableRowspan replicating the markup from Cookbook:RowspanInSimpleTables%0a* $WikiPageCSSFmt enables CSS in a wiki page, based on Cookbook:LocalCSS%0a* $EnableHighlight code highlight feature compatible with "highlight.js"%0a* $AddLinkCSS['othergroup'] and $AddLinkCSS['samedomain'] can contain custom CSS classes for in-wiki links to other groups and for URL links to the same site.%0a%0aThe above new features are disabled by default, see the documentation for more information on how to enable them, or test them on pmwiki.org where most of these are enabled. Please report if you notice any problems.%0a%0a!! Version 2.2.118 {*$:Released} (2019-08-28) [[#v22118]]%0aThis version integrates the features of the recipe Cookbook:PreviewChanges into the core. If you currently use this recipe, please uninstall it and add to config.php:%0a $EnablePreviewChanges = 1;%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.117 {*$:Released} (2019-07-28) [[#v22117]]%0aThis version adds handling of "partial content" requests for file downloads. New video file extensions 'm4v' and '3gp' were added. The Upload form now includes a new text field "Uploader" pre-filled with the name of the editor, and a new variable $EnableUploadAuthorRequired was added (defaults to $EnablePostAuthorRequired). The documentation was updated.%0a%0a!! Version 2.2.116 {*$:Released} (2019-06-19) [[#v22116]]%0aThis version fixes pagelists with case insensitive matches of page (text) variables for international wikis. If your international wiki pagelists rely on case-sensitive variable matches, please see $PageListVarFoldFn. The documentation was updated.%0a%0a!! Version 2.2.115 {*$:Released} (2019-05-13) [[#v22115]]%0aIn this version the responsive skin in large "desktop" mode changes the search form background to transparent, for easier custom styling of the header. The documentation was updated.%0a%0a!! Version 2.2.114 {*$:Released} (2019-04-02) [[#v22114]]%0aThis version adds a skin directive @@%3c!--IncludeTemplate ... -->@@ and the variable $SkinTemplateIncludeLevel. The core variable documentation format identifiers were moved to the definition term element to allow CSS ":target" styling, and the header and link text of the vardoc table can now be translated. Input forms have a new HTML5 element "tel", a new attribute "pattern" and two bugs were fixed with the classnames of the new elements and with the identifiers of "select" lists. The documentation was updated.%0a%0a!! Version 2.2.113 {*$:Released} (2019-03-01) [[#v22113]]%0aThis version adds a new [@(:input button:)@] form element. All form elements can now accept custom data-* attributes, which can be disabled by setting $EnableInputDataAttr to 0. Both additions are meant for easier integration with custom JavaScript functions or some frameworks.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.112 {*$:Released} (2019-01-09) [[#v22112]]%0aThis version includes a fix for PHP 7.3, and the documentation was updated.%0a%0a!! Version 2.2.111 {*$:Released} (2018-12-08) [[#v22111]]%0aThis version updates core .htaccess files to be compatible with both Apache 2.4 and earlier versions, and the variable $DenyHtaccessContent was added with the updated content. In case of difficulties or questions please contact us.%0a%0aA CSS value in the pmwiki-responsive skin was fixed. The [[MarkupExpression(s)]] [@{(ftime )}@] now accepts @@tz=@@ (time zone) and @@locale=@@ (language locale) arguments. The documentation was updated.%0a%0a!! Version 2.2.110 {*$:Released} (2018-11-05) [[#v22110]]%0aThis version prevents a warning with the [@{(substr )}@] markup expression when non-number arguments are typed. A new variable $PageListSortCmpFunction allows custom functions to order page lists. A new variable $MarkupMarkupLevel indicates when the processing happens inside [@(:markup:)@] blocks. %0a%0aThe default style for @@[=[@escaped code@]=]@@ dropped white spaces inconsistently and was fixed. If you rely on the previous behavior please add this to your pub/css/local.css file to revert it:%0a%0a code.escaped { white-space: nowrap; }%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.109 {*$:Released} (2018-07-09) [[#v22109]]%0aThis version fixes a bug with the Path: InterMap prefix which was broken in 2.2.108. The function pmcrypt() was updated to prevent more strings from causing "invalid hash" warnings in PHP 7. The variable $EnableMarkupDiag was added to help diagnose all markup calls. The documentation was updated.%0a%0a!! Version 2.2.108 {*$:Released} (2018-07-05) [[#v22108]]%0aThis version adds the $PCCFOverrideFunction variable allowing a custom function to override PCCF(). $AuthUserPageFmt can now be an array of page names. The page cache file name can now be customized. Form checkbox labels now have the same tooltip title as the checkbox. Ordered lists with the [@%25reversed%25@] WikiStyle will have descending numbers. Minor fixes to refcount.php, vardoc.php, and pmcrypt(). The default InterMap PmWiki URLs have now the HTTPS protocol. The documentation was updated.%0a%0a!! Version 2.2.107 {*$:Released} (2018-02-02) [[#v22107]]%0aThis version includes more fixes for PHP 7.2 for forms and pagelists. A new variable $MailFunction allows administrators and developers to write replacement functions for the PHP function "mail()". Styles were improved for right-to-left text blocks embedded into left-to-right texts (and vice versa). The documentation was updated.%0a%0a!! Version 2.2.106 {*$:Released} (2017-12-01) [[#v22106]]%0aThis version has a rewrite of the function PageListSort() to allow it to work with PHP 7.2, and fixes a bug with the backtick (escape) [@`WikiWord@] markup. The helper function pmsetcookie() and the variables $EnableCookieSecure, $EnableCookieHTTPOnly were added to allow easy setting of secure cookies. The documentation was updated.%0a%0a!! Version 2.2.105 {*$:Released} (2017-11-07) [[#v22105]]%0aThis version fixes a bug with the PQA() function causing invalid HTML with attributes glued together. The function @@HandleUpload()@@ was refactored and @@UploadSetVars($pagename)@@ was added to allow upload-managing add-ons to set variables more easily.%0a%0aIf you upgrade from 2.2.98 or earlier, and you have custom markup rules relative to author signatures, please see note about [[#v2299|change in 2.2.99]] (documented November 2017).%0a%0a!! Version 2.2.104 {*$:Released} (2017-10-11) [[#v22104]]%0aThis version fixes a bug with [[WikiTrails#pathtrail|path WikiTrails]] reported today.%0a%0a!! Version 2.2.103 {*$:Released} (2017-10-01) [[#v22103]]%0aThis version is a major upgrade on the internal processing of markups and patterns, all core scripts were updated to be compatible with PHP version 7.2. Whether you use that PHP version or another one, with any local configurations and custom add-ons, there should be no change for what you see, but if any problems please contact us immediately.%0a%0aPagelists can now have optimized @@list=grouphomes@@ and @@fmt=#grouphomes@@ arguments to list only the home pages of your wiki groups, whether they are named Group.HomePage, Group.Group, or a custom Group.$DefaultName. Minor bugs in older xlpage scripts were fixed, the responsive skin is now compatible with even older PmWiki/PHP versions, web subtitles (*.vtt) were added as an allowed extension, input form fields can now have a "title" attribute (usually rendered as a tooltip/help balloon when the mouse cursor is over the input element), and a configuration variable $AuthLDAPReferrals was added for wikis running AuthUser over LDAP to force enable or disable referrals when needed.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.102 {*$:Released} (2017-08-05) [[#v22102]]%0aThis version reverts the patterns for text variables changed in 2.2.99, because we found that a longer text variable content may cause a blank page or an internal server error. In the page [[SiteAdmin.AuthList]] an input box was added to allow filtering of the groups or pages.%0a%0a!! Version 2.2.101 {*$:Released} (2017-07-30) [[#v22101]]%0aThis version renames the internal constructor of the PageStore class to be compatible with both PHP 5 and PHP 7. Previously, the PageStore class had two constructors for PHP 4 and PHP 5 compatibility of which one was silently ignored, but recent PHP 7 versions display strict or deprecated notices when the PHP 4 constructor is used.%0a%0aIf you must use PmWiki 2.2.101 or newer on a PHP 4 installation, please contact me so I can provide you with a workaround.%0a%0a!! Version 2.2.100 {*$:Released} (2017-07-30) [[#v22100]]%0aThis version provides a workaround for an incompatibility with our Subversion version control system, where the $Author wiki variable was considered a Subversion variable. A fix for the responsive skin adds some spacing above the WikiText block. The documentation was updated.%0a%0a!! Version 2.2.99 {*$:Released} (2017-06-26) [[#v2299]]%0aThis version fixes a bug where an incomplete text variable without a closing parenthesis like "[@(:Var:Value@]" could hide the remaining of the page.%0a%0aA bug was fixed where previewing a page didn't show changes to be done by replace-on-save patterns (the function ReplaceOnSave was refactored). Markup rules for previewing author signatures are no longer needed and were removed. %25note%25 Note that if you had custom markup rules processed before or after the @@[=~~=][=~=]@@ or @@[=~~=][=~~=]@@ author signatures may need to be set to [@'%3c[[~'@] (second argument of the @@Markup@@ call).%0a%0aA bug and a warning for PHP 4 installations were fixed. Two minor bugs with the [@[[%3c%3c]]@] line break for the responsive skin and the $Version variable link in the documentation were fixed. %0a%0aThe InterMap prefix to Wikipedia was corrected to use the secure HTTPS protocol and the documentation was updated.%0a%0a!! Version 2.2.98 (2017-05-31) [[#v2298]]%0aThis version adds a new skin that is better adaptable to both large and small screens, desktop and mobile devices (touchscreens). The new skin "pmwiki-responsive" is not enabled by default but available as an option, and as a base for customized copies. It requires a relatively modern browser (post-2009). The old skin is still available and enabled by default.%0a%0aThe Vardoc links now use MakeLink() to allow a custom LinkPage function. The function ReplaceOnSave() was refactored to allow easier calling from recipes. Markup processing functions now can access besides $pagename, a $markupid variable that contains the "name" of the processed markup rule, allowing a single function to process multiple markup rules. The "*.mkv" video extension was added to the list of allowed uploads.%0a%0aA bug was fixed with the [@(:markup:)@] output where a leading space was lost. Note that the "markup" frame is now wrapped in a %3cpre> block with a "pre-wrap" style instead of %3ccode>.%0a%0aA number of other (minor) bugs were fixed: see ChangeLog, and the documentation was updated.%0a%0a!! Version 2.2.97 (2017-04-07) [[#v2297]]%0aThis version fixes a bug concerning $ScriptUrl when $EnablePathInfo is set, introduced in 2.2.96 and reported by 3 users.%0a%0a!! Version 2.2.96 (2017-04-05) [[#v2296]]%0aThis version fixes a severe PHP code injection vulnerability, reported by Gabriel Margiani. PmWiki versions 2.2.56 to 2.2.95 are concerned.%0a%0aOnly certain local customizations enable the vulnerability. Your website may be at risk if your local configuration or recipes call too early some core functions like CondAuth(), RetrievePageName() or FmtPageName(), before the $pagename variable is sanitized by ResolvePageName() in stdconfig.php. A specific URL launched by a malicious visitor may trigger the vulnerability.%0a%0aMost recipes call core functions from a $HandleActions function, or from a Markup expression rule, these do not appear to be affected by the current exploit.%0a%0aIf your wiki may be at risk, it is recommended to upgrade to version 2.2.96 or most recent at the earliest opportunity. If you cannot immediately upgrade, you should place the following line in your local (farm)config.php file:%0a%0a [@$pagename = preg_replace('![${}\'"\\\\]+!', '', $pagename);@]%0a%0aPlace this line near the top of the file but after you include scripts/xlpage-utf-8.php or other character encoding file.%0a%0aThis version filters the $pagename variable to exclude certain characters. A new variable $pagename_unfiltered is added in case a recipe requires the previous behavior. The documentation was updated.%0a%0a!! Version 2.2.95 (2017-02-28) [[#v2295]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.94 (2017-01-31) [[#v2294]]%0aThis version allows webmasters to configure and use both .html and .htm extensions. The cached information about whether a page exists or not will now be cleared when that page is created or deleted. The documentation was updated.%0a%0a!! Version 2.2.93 (2016-12-31) [[#v2293]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.92 (2016-11-30) [[#v2292]]%0aThis version allows administrators to disable the "nopass" password by setting $AllowPassword to false. The function FmtPageName() will now expand PageVariables with asterisks like [@{*$FullName}@]. The documentation was updated.%0a%0a!! Version 2.2.91 (2016-09-30) [[#v2291]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.90 (2016-08-31) [[#v2290]]%0aThis version adds a parameter to the upload form which can improve analytics from the server logs. Two new CSS classes were added to help skin developers: @@imgonly@@ and @@imgcaption@@, for standalone embedded pictures with or without a caption. A bug with the plus-links was fixed. The documentation was updated.%0a%0a!! Version 2.2.89 (2016-07-30) [[#v2289]]%0aThis version allows to set a default class name for simple tables. The [@(:searchbox:)@] directive can now have a "placeholder" attribute, and the input type can be changed from "text" to "search" for HTML5 websites. The edit form elements have now identifier attributes to allow easier styling. All core scripts will now inject CSS into the skin only if it hasn't already been defined. The vardoc.php script now recognizes and links to the documentation for the variables $pagename, $Author and $Skin. The documentation was updated.%0a%0a!! Version 2.2.88 (2016-06-29) [[#v2288]]%0aThis version fixes invalid HTML output of some WikiTrail links. The function PHSC() can now have an optional fourth argument for a safe replacement of htmlspecialchars(). A new page variable [@{$SiteAdminGroup}@] was added and the documentation was updated. %0a%0a!! Version 2.2.87 (2016-05-31) [[#v2287]]%0aThis version adds the $HTMLTagAttr variable to be used in the %3chtml> tag in skins for additional attributes like "lang" or "manifest". To enable it, use it in your skin, for example:%0a%0a %3chtml xmlns="http://www.w3.org/1999/xhtml" $HTMLTagAttr>%0a%0aThe variable $EnableRevUserAgent, if set to 1, will cause the User-Agent string from browsers to be stored with each page history entry (as opposed to only storing the last user agent string). The output variable $DiffUserAgent can be used in history templates like $DiffStartFmt.%0a%0aA wrong page variable in [[Site.UploadQuickReference]] was corrected, and the documentation was updated.%0a%0a!! Version 2.2.86 (2016-04-28) [[#v2286]]%0aThis version adds updates for PHP 7, for the PageStore() class and for the $DefaultPasswords default/unset definitions (no action should be needed upon upgrades). The documentation was updated.%0a%0a!! Version 2.2.85 (2016-03-31) [[#v2285]]%0aThis version adds Scalable Vector Graphics (*.svg, *.svgz) as allowed uploads and as embeddable picture extensions (with the html tag %3cimg/>). The documentation was updated.%0a%0a!! Version 2.2.84 (2016-02-21) [[#v2284]]%0aThis version fixes "indent" and "outdent" styles for right-to-left languages. A new variable $EnableLinkPlusTitlespaced allows "plus links" [@[[Link|+]]@] to display the "Spaced Title" of the page instead the "Title". The documentation was updated.%0a%0a!! Version 2.2.83 (2015-12-31) [[#v2283]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.82 (2015-11-30) [[#v2282]]%0aThis version enables stripmagic() to process arrays recursively and updates the documentation.%0a%0a!! Version 2.2.81 (2015-10-31) [[#v2281]]%0aThis version fixes an inconsistency with single line page text variables. International wikis enabling UTF-8 will now be able to use the CSS classes "rtl" and "ltr" to override the text direction when inserting right to left languages. The documentation was updated.%0a%0a!! Version 2.2.80 (2015-09-30) [[#v2280]]%0aThis version modifies the [@(:searchbox:)@] directive to use type="search" semantic input, and updates the documentation.%0a%0a!! Version 2.2.79 (2015-08-27) [[#v2279]]%0aThis version adds WikiStyles for the CSS basic colors "fuchsia", "olive", "lime", "teal", "aqua", "orange" and "gray"/"grey". New input elements "email", "url", "number", "date", and "search" can now be used in wiki forms. %0a%0aNote: the "target" attribute of input forms which was added in the previous version broke the PmForm processor, and was removed until we find a solution. If you don't use PmForm and require this attribute (or others), the usual way to add it is to redefine the $InputAttrs array in your local configuration.%0a%0aA new variable $EnableROSEscape can be set to 1 if $ROSPatterns and $ROEPatterns should not process source text wrapped with [@[=...=]@] or @@[=[@...@]=]@@. By default "replace on edit" patterns are performed even in such text.%0a%0aThe insMarkup() function in guiedit.js was refactored to allow custom input ids and/or custom functions to process the selected text.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.78 (2015-07-21) [[#v2278]]%0aThis version updates the $RobotPattern list with currently active user agents. {-Input forms can have a "target" attribute-} (removed in 2.2.79). The documentation was updated.%0a%0aNote, this release broke the Cookbook:PmForm module. Please do upgrade to 2.2.79 or newer if your wiki uses PmForm.%0a%0a!! Version 2.2.77 (2015-06-19) [[#v2277]]%0aThis version extends the [@(:if attachments:)@] conditional to specify file and page names. A [@{$WikiTitle}@] page variable was added. A MatchNames() function was introduced as a generic way to match array values the same way MatchPageNames() does currently with lists of pages -- recipe authors can use it to get a subset of attachments for example. The PageStore() class was slightly optimized when recoding pages from-to UTF-8. The documentation was updated.%0a%0a!! Version 2.2.76 (2015-05-31) [[#v2276]]%0aThis version improves support for arrays in form elements: setting default values and recovering values from posted forms. A new "label" argument to checkbox and radio input elements allows easy insertion of clickable text labels after the form elements. Division blocks wrapping standalone images, and standalone image captions, now receive CSS classes allowing greater control via stylesheets. The documentation was updated.%0a%0a!! Version 2.2.75 (2015-04-26) [[#v2275]]%0aThis version adds a pmcrypt($pass, $salt) function which can be used as a replacement for the PHP crypt() function when encrypting passwords. From PHP 5.6 on, crypt() should not be used without a $salt parameter and would raise a notice. If pmcrypt() is called with a $salt parameter it will simply call crypt() in order to check a password. If it is called without a $salt parameter, pmcrypt() will create a password hash with the password_hash() function or with crypt() depending on your installation. You can replace any calls to crypt() with pmcrypt(), notably in config.php when defining $DefaultPasswords entries.%0a%0aMarkup was added for the semantic HTML5 tags article, section, nav, header, footer, aside, address.%0a%0aA bug with the uploads feature was fixed when $EnableReadOnly is set, and the documentation was updated.%0a%0a!! Version 2.2.74 (2015-03-28) [[#v2274]]%0aThis version allows the translation of the word "OK" in authentication forms. The documentation was updated to the latest state on pmwiki.org.%0a%0a!! Version 2.2.73 (2015-02-28) [[#v2273]]%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.72 (2015-01-27) [[#v2272]]%0aThis version improves the ?action=ruleset display for markup rules potentially incompatible with PHP 5.5 when the function debug_backtrace() is not available. It restores the ability to set a custom function handling the [=(:markup:)=] demos. A variable $AbortFunction was added allowing administrators to override the core Abort() function. The documentation was updated.%0a%0a!! Version 2.2.71 (2014-12-29) [[#v2271]]%0aThis version removes the hard word wrap in [@(:markup:)@] wikicode examples, and instead of %3cpre> tags, it wraps it in %3ccode> tags. This allows newcomers to copy and paste the code in their wikis without inserted line breaks (which often cause the markup to not work).%0a%0aThe release also adds back-tracing for markup rules potentially incompatible with PHP 5.5. Such rules, often added by recipes, can trigger "Deprecated: preg_replace()" warnings. To find out which recipes may trigger the warnings, enable diagnostic tools in config.php with @@$EnableDiag = 1;@@ then open a page with the 'ruleset' action, eg. [@[[HomePage?action=ruleset]]@]. The PHP-5.5-incompatible rules will be flagged with filenames, line numbers and patterns. See also the pages [[(PmWiki:)Troubleshooting]] and [[(PmWiki:)CustomMarkup]] on pmwiki.org.%0a%0aThe variable $DraftActionsPattern was added, the pagelist "request" parameter can now contain a list of allowed or disallowed parameters that can be overridden by the user, the "input default source" parameter can now contain multiple pages, and a minor bug was fixed in upload.php ('strict' warning). See the updated documentation for more information. %0a%0a!! Version 2.2.70 (2014-11-08) [[#v2270]]%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.69 (2014-10-13) [[#v2269]]%0aThis version fixes a bug when dates are defined as relative to other dates, eg. "2014-10-13 -3 days". The documentation was updated; note that the instructions in Site.UploadQuickReference were updated to reflect the display of the upload form in current browsers.%0a%0a!! Version 2.2.68 (2014-09-01) [[#v2268]]%0aThis version adds a Skins: InterMap prefix pointing to the Skins section on PmWiki.org, a "signature" markup in the edit quick reference, new WikiStyles clear, min-width and max-width and the documentation was updated.%0a%0a!! Version 2.2.67 (2014-08-02) [[#v2267]]%0aThis version fixes an inconsistency with input forms when values are taken from PageTextVariables. The documentation was updated to the latest state on pmwiki.org.%0a%0a!! Version 2.2.66 (2014-07-02) [[#v2266]]%0aThis version fixes a minor longstanding bug in the default Notification format when a page is deleted. In custom patterns, the "_" character will no longer be considered a function name. The documentation was updated.%0a%0a!! Version 2.2.65 (2014-06-07) [[#rel2.2.65]]%0aThis version fixes Pagelist handling of [@{$$PseudoVars}@] when they contain page variables. File permissions handling was improved when the current directory is owned by "root". The documentation was updated.%0a%0a!! Version 2.2.64 (2014-05-08) [[#rel2.2.64]]%0aThis version adds the [="{(mod)}"=] markup expression for modulo/remainder calculations, and the "tel:" and "geo:" URI schemes which, on compatible devices like smartphones, allow the creation of links to dial telephone numbers and open map/location applications. %0a%0aThe $SysMergePassthru switch was added, if enabled, it allows the "Simultaneous Edits" conflict resolution to use the passthru() function instead of popen().%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.63 (2014-04-05) [[#rel2.2.63]]%0aThis version allows for form elements to have custom attributes containing a dash in the attribute names and enables the attributes 'required', 'placeholder' and 'autocomplete' for HTML5 forms. A minor bug with pagelist [={$$RequestVariables}=] appearing on some installations was fixed. The documentation was updated.%0a%0a!! Version 2.2.62 (2014-02-28) [[#rel2.2.62]]%0aThis version adds the variable $EnableTableAutoValignTop which allows to make advanced tables compatible with HTML5. For developers, a fourth argument $template was added to the Markup_e() function, and a callback template 'return' was added. The documentation was updated.%0a%0a!! Version 2.2.61 (2014-01-31) [[#rel2.2.61]]%0aThis version removes unnecessary snippets of code and adds the variable $TableCellAlignFmt which allows to make simple tables compatible with HTML5. The documentation was updated.%0a%0a!! Version 2.2.60 (2014-01-12) [[#rel2.2.60]]%0aThis version reverts the changes to the pmwiki.css file made in 2.2.59. %0a%0a!! Version 2.2.59 (2014-01-11) [[#rel2.2.59]]%0aThis version has an improvement for Blocklist when multiple text fields are posted. A bug with some nested markup conditionals was fixed. The default skin switched font sizes from points (fixed) to percents (relative). A couple of other minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.58 (2013-12-25) [[#rel2.2.58]]%0aThis version enables customization of [=(:input auth_form:)=], and fixes a couple of minor bugs. The documentation was updated.%0a%0a!! Version 2.2.57 (2013-11-03)%0aThis version enables the use of the Attach: link format in the [[PmWiki/PageDirectives#attachlist|[=(:attachlist:)=]]] directive. The documentation was updated.%0a%0a!! Version 2.2.56 (2013-09-30)%0aThis version aims to fix a PHP 5.5 compatibility issue with a deprecated feature of the preg_replace() function. The PageStore() class now detects and works around a bug with the iconv() function, and the documentation was updated.%0a%0a!! Version 2.2.55 (2013-09-16)%0aThis version adds the variable $EnableDraftAtomicDiff. If enabled, publishing from a draft version will clear the history of intermediate draft edits, and the published version will contain a single combined diff from the previous published version. The documentation was updated.%0a%0a!! Version 2.2.54 (2013-08-13)%0aThis version fixes a bug when old versions are restored from draft pages. The documentation was updated.%0a%0a!! Version 2.2.53 (2013-07-08)%0aThis version enables a message to be shown when a post is blocked because of too many unapproved links. The documentation was updated.%0a%0a!! Version 2.2.52 (2013-06-08)%0aThis version hides warnings about a deprecated feature in PHP 5.5 installations (preg_replace with /e eval flag). Three new upload extensions were added: docx, pptx and xlsx produced by recent versions of some office suites. The documentation was updated.%0a%0a!! Version 2.2.51 (2013-05-08)%0aThis version updates the addresses for the remote blocklists. A minor XSS vulnerability for open wikis, which was discovered today, was fixed. The documentation was updated.%0a%0a!! Version 2.2.50 (2013-04-08)%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.49 (2013-03-09)%0aThis version adds an array $UploadBlacklist containing forbidden strings of an uploaded filename (case insensitive). Some Apache installations try to execute a file which has ".php", ".pl" or ".cgi" anywhere in the filename, for example, "test.php.txt" may be executed. To disallow such files to be uploaded via the PmWiki interface, add to config.php such a line:%0a%0a $UploadBlacklist = array('.php', '.pl', '.cgi', '.py', '.shtm', '.phtm', '.pcgi', '.asp', '.jsp', '.sh');%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.48 (2013-02-11)%0aThis version fixes a bug introduced yesterday with some links. %0a%0a!! Version 2.2.47 (2013-02-10)%0aThis version enables tooltip titles in links to anchors in the same page, and the documentation was updated.%0a%0a!! Version 2.2.46 (2013-01-07)%0aThis version adds $UploadPermAdd and $UploadPermSet variables, and the documentation was updated.%0a%0aIf your wiki has uploads enabled, it is recommended to set the variable $UploadPermAdd to 0. %0a%0aThe $UploadPermAdd variable sets additional unix permissions applied to newly uploaded files, and should be 0 (recommended as of 2013). If uploaded files cannot be downloaded and displayed on the website, for example with the error 403 Forbidden, set this value to 0444 (core setting, default since 2004). %0a $UploadPermAdd = 0; # recommended%0a%0aThe $UploadPermSet variable unconditionally sets the file permissions on newly uploaded files. Only advanced administrators should use it.%0a%0a%0a!! Version 2.2.45 (2012-12-02)%0aThis version fixes some PHP notices appearing on some installations. The documentation was updated.%0a%0a!! Version 2.2.44 (2012-10-21)%0aThis version improves the display of consecutive whitespaces in page histories, and fixes the definition of PageTextVariables containing a dash. The documentation was updated.%0a%0a%0a!! Version 2.2.43 (2012-09-20)%0aThis version makes it possible to use HTML attribute names that contain dashes, and removes a warning when editing and previewing Site.EditForm. The documentation was updated.%0a%0a!! Version 2.2.42 (2012-08-20)%0aThis version provides a workaround for cases when a wiki page contains a character nonexistent in the active encoding. The documentation was updated.%0a%0a!! Version 2.2.41 (2012-08-12)%0aThis version changes the internal $KeepToken separator to be compatible with more encodings. The documentation was updated.%0a%0a!! Version 2.2.40 (2012-07-21)%0aThis version provides a helper function replacing htmlspecialchars() and compatible with PHP 5.4. The documentation was updated.%0a%0a!! Version 2.2.39 (2012-06-25)%0aThis version provides a fix for links to attachments containing international characters. The documentation was updated.%0a%0a!! Version 2.2.38 (2012-05-21)%0aThis version fixes a "parameter count" warning which appeared on some websites.%0a%0a!! Version 2.2.37 (2012-05-01)%0aThis version provides a workaround for installations with broken iconv() function, while optimizing the recode function. This should fix the "Unable to retrieve edit form" problem in some wikis. Dots in [[#anchor_1.2]] sections are now better supported, PageVariables are expanded in PageList template defaults, and the documentation is updated.%0a%0a!! Version 2.2.36 (2011-12-28)%0aThis version fixes the recode function to try to recover Windows-1252 characters in ISO-8859-1 files. A new variable $EnableOldCharset enables the $page["=oldcharset"] entry which will be used in the future. A couple of minor bugs were fixed and the documentation was updated.%0a%0a!! [[#v2235]] Version 2.2.35 (2011-11-11)%0aThis release fixes a critical PHP injection vulnerability, reported today by Egidio Romano. PmWiki versions 2.2.X, 2.1.X, 2.0.X and 2.0.beta33 and newer are vulnerable. When you upgrade, please read carefully the Release notes for all PmWiki versions since yours.%0a%0aIf you cannot upgrade, it is recommended to disable Searches at the earliest opportunity (even if your wiki skin doesn't have a search form). Add to config.php such a line:%0a if ($action == 'search') $action = 'browse';%0a%0aIf your old version wiki allows editing by not entirely trusted visitors, even on limited pages like a WikiSandbox, you should also disable PageLists. Add to config.php this line:%0a $EnablePageList = 0;%0a%0aThis version has an important change for international wikis: the XLPage() function no longer loads encoding scripts such as xlpage-utf-8.php. When you upgrade, you need to include those scripts from config.php, before calling XLPage():%0a%0a include_once("scripts/xlpage-utf-8.php"); # if your wiki uses UTF-8%0a XLPage('bg','PmWikiBg.XLPage');%0a%0aAll links can now have tooltip titles. Previously, only images and external links could have tooltip titles, now this feature is enabled for internal links. To set a tooltip title, add it in quotes after the link address:%0a[@%0a [[Main.HomePage"This is a tooltip title"]]%0a [[Main.HomePage"This is a tooltip title"|Home]]%0a [[http://www.pmwiki.org"Home of PmWiki"]]%0a Attach:image.jpg"Tooltip title of the image"%0a@]%0a%0aThe following new upload extensions were added: svg, xcf, ogg, flac, ogv, mp4, webm, odg, epub. A couple of minor optimizations were added (MarkupExpressions and rendering of page history) and the documentation was updated.%0a%0a!! Version 2.2.34 (2011-10-10)%0aThis version resets the timestamps of the default pages Site(Admin).AuthUser which are expected in case of upgrades from the versions 2.1.*. Core MarkupExpressions which manipulate strings should now work better with international characters. The documentation was updated to its latest state from pmwiki.org.%0a%0a!! Version 2.2.33 (2011-09-23) [[#v2233]]%0aThis version fixes a security bug introduced in 2.2.32 which left the groups Site and SiteAdmin open for reading and editing because the pages Site.GroupAttributes and SiteAdmin.GroupAttributes didn't have all necessary attributes. %0a%0aAll wikis running 2.2.32 should upgrade. If you cannot immediately upgrade, you can set the attributes from your wiki:%0a* open the attributes page [=[[SiteAdmin.GroupAttributes?action=attr]]=] and set a "read" and an "edit" password, @@ @lock @@ is recommended.%0a* open the attributes page [=[[Site.GroupAttributes?action=attr]]=] and set an "edit" password, @@ @lock @@ is recommended. Do not set a "read" password here.%0a%0aThe release also fixes the refcount.php script to produce valid HTML, and updates intermap.txt entries PITS: and Wikipedia: to point to their current locations.%0a%0a!! Version 2.2.32 (2011-09-18)%0aThis is the first version shipping with the core documentation in the UTF-8 encoding. PmWiki will automatically convert it on the fly for wikis using an older encoding.%0a%0aIt is recommended that all '''new''' PmWiki installations enable UTF-8. Migration of ''existing'' wikis from an older encoding to UTF-8 shouldn't be rushed: it is not trivial and will be documented in the future.%0a%0aA required HTML xmlns attribute was added to the print skin template. The history rendering is now faster when many lines are added or removed.%0a%0a%25note%25 Note: Due to a manipulation error, a version 2.2.31 was created before it was ready for a release.%0a%0a!! Version 2.2.30 (2011-08-13)%0aThis version fixes a $Charset definition in international iso-8859-*.php files. This will help for a future transition to UTF-8. %0a%0aA variable $EnableRangeMatchUTF8 was added, set it to 1 to enable range matches of pagenames in UTF-8 like [A-D]. Previously the range matches were always enabled in UTF-8, but we found out that on some installations this feature breaks all pagelists, even those without range matches. In case the feature worked for you, you can re-enable it.%0a%0a!! Version 2.2.29 (2011-07-24)%0aThis release fixes Attach links that were broken with the Path fix in 2.2.28 earlier today.%0a%0a!! Version 2.2.28 (2011-07-24)%0aThis release fixes 2 potential XSS vulnerabilities and a bug with Path: links.%0a%0a!! Version 2.2.27 (2011-06-19)%0aThis release fixes a validation bug on pages after a redirection. A new block WikiStyle [@%25justify%25@] was added, allowing left and right aligned text. The page history now accepts a URL parameter @@?nodiff=1@@ which hides the rendering of edit differences, showing only timestamps, authors, summaries and "Restore" links; it allows to restore a vandalized page with a huge contents or history which otherwise would break the memory or time limits of the server.%0a%0a!! Version 2.2.26 (2011-05-21)%0aThis release fixes a redundant removal of link hashes from WikiTrails, and updates the documentation to the most recent version from PmWiki.org.%0a%0a!! Version 2.2.25 (2011-03-22)%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.24 (2011-02-15)%0aThis version reverts the way existing PageVariables are processed, like version 2.2.21 or earlier, but it adds a special variable $authpage which can be used in PageVar definitions. It is the same as the $page array, but exists only if the visitor has read permissions. For example, an administrator can set to config.php:%0a%0a $FmtPV['$LastModifiedSummary'] = '@$authpage["csum"]'; # instead of '@$page["csum"]'%0a%0aThen, the edit summary metadata will only be available if the user has read permissions.%0a%0a!! Version 2.2.23 (2011-01-25)%0aThis version sets the default value of $EnablePageVarAuth to 0 until we investigate a reported problem with authentication.%0a%0a!! Version 2.2.22 (2011-01-16)%0aThis version adds the variable $EnableXLPageScriptLoad which, if set to 0, will prevent authors to load scripts from XLPage and to accidentally change the encoding of the wiki. If you use it, make sure you include the required files, eg. xlpage-utf-8.php from local config files.%0a%0aPageVariables should now respect authentications: without read permissions, the title, description, change summary, author of a protected page are unavailable. PageVariables that are computed without reading the page are still available (eg. $Group, $Namespaced, $Version etc.). Administrators can revert the previous behavior by adding to config.php such a line:%0a%0a@@ $EnablePageVarAuth = 0; @@%0a%0a!! Version 2.2.21 (2010-12-14)%0aDue to a mis-configuration of a local svn repository, some of the changes intended for 2.2.20 didn't make it in the correct branch. This release corrects this.%0a%0a!! Version 2.2.20 (2010-12-14)%0aThis version fixes a potential XSS vulnerability, reported today. An AuthUser bug with excluding users from authgroups was fixed. A new InterMap prefix PmL10n: was added, it leads to the Localization section on PmWiki.org and should help the work of translators. A couple of other minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.19 (2010-11-10)%0aThis is a documentation-update release.%0a%0a!! Version 2.2.18 (2010-09-04)%0aThis version fixes 3 minor bugs, and updates the documentation.%0a%0a!! Version 2.2.17 (2010-06-20)%0aThis version adds a variable $PostConfig containing functions and scripts to be loaded after stdconfig.php. Tabindex was added as a valid form field attribute. Protected downloads now respect existing browser caches. AuthUser now allows more flexible cookbook recipe integration. A couple of bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.16 (2010-05-10)%0aThis version fixes a bug with parsing html attributes which could allow XSS injection. Wikis allowing unprotected editing are encouraged to upgrade.%0a%0aA bug with the "center" button of the GUI edit toolbar was corrected.%0a%0aThe "exists" conditional now accepts wildcards, for example:%0a [@(:if exists Main.*:)There are pages in the Main group (:if:)@]%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.15 (2010-03-27)%0aThis version adds some minor bugfixes and optimizations notably a bug with @@[=(:template none:)=]@@ introduced in the last version 2.2.14.%0a%0a!! Version 2.2.14 (2010-02-27)%0aThis release corrects inline styles for WikiTrail links. Undefined include/template @@ [={$$variables}=] @@ are now removed from the included section, like Page(Text)Variables, and can be used in conditional expressions. If needed, this change can be reverted by adding to config.php such a line:%0a%0a[@%0a $EnableUndefinedTemplateVars = 1; # keep and display unset {$$variables}%0a@]%0a%0aPageList templates now accept the sections @@ !first @@ and @@ !last @@ for markup to appear for every page in list ''except'' the first or last one.%0a%0a"Title" attributes were added to external links. You can have tooltip titles on external links, including InterMap and attachments, by adding the link title in double quotes after the URL:%0a [=[[http://www.pmwiki.org"Home of PmWiki"| External link]]=]%0a%0aFor international wikis, PmWiki now automatically translates the titles of technical pages like GroupAttributes or RecentChanges -- just define these strings as usual in XLPage, for example, in French:%0a 'AllRecentChanges' => 'Tous les changements récents',%0a%0aSome minor optimizations were done and the documentation was updated.%0a%0a!! Version 2.2.13 (2010-02-21)%0aThis release fixes a bug with $DiffKeepNum introduced in 2.2.10 -- the count of revisions was incorrect and a page could drop more revisions than it should.%0a%0aThe [[page history]] layout was modified with a rough consensus in the community. The history now defaults to "source" view with word-level highlighting of the differences. Authors can see the changes in rendered output by clicking on the link "Show changes to output". Admins can switch back the default by adding such a line to config.php:%0a%0a $DiffShow['source'] = (@$_REQUEST['source']=='y')?'y':'n';%0a%0aTo disable word-level highlighting and show plain text changes:%0a%0a $EnableDiffInline = 0;%0a%0aIn the page history rendering, a few minor bugs were fixed and the code was slightly optimized.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.12 (2010-02-17)%0aThis release adds simple word-level highlighting of differences in the page history, when "Show changes to markup" is selected. To enable the feature, add to config.php such a line:%0a $EnableDiffInline = 1;%0a%0aThis feature is like what the InlineDiff recipe provides, but not exactly the same, and the implementation is simpler. It is enabled on PmWiki.org and can be improved -- your comments are welcome.%0a%0a!! Version 2.2.11 (2010-02-14)%0aThis release adds two new table directives for header cells, [=(:head:) and (:headnr:)=]. They work the same way as [=(:cell:) and (:cellnr:)=] except that create %3cth> instead of %3ctd> html tags.%0a%0aThe pagerev.php script was refactored into separate functions to allow easier integration of recipes displaying the page history.%0a%0aA couple of minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.9, 2.2.10 (2010-01-17)%0aMost important in this release is the official change of $EnableRelativePageVars to 1. The change is about how [={$Variable}=] in included pages is understood by PmWiki.%0a* When $EnableRelativePageVars is set to 0, [={$Name}=] displays the name of the currently browsed page. Even if [={$Name}=] is in an included page, it will display the name of the browsed page.%0a* When $EnableRelativePageVars is set to 1, [={$Name}=] displays the name of the physical page where it written. If [={$Name}=] is in an included page, it will display the name of the included page.%0a* [={*$Name}=] always displays the name of the currently browsed page, regardless of $EnableRelativePageVars.%0a%0aSo, if your wiki relies on page variables from included pages, and doesn't have $EnableRelativePageVars set to 1, after upgrading to 2.2.9, you can revert to the previous behavior by adding to config.php such a line:%0a $EnableRelativePageVars = 0;%0a%0aMore information about page variables can be found at:%0a http://www.pmwiki.org/wiki/PmWiki/PageVariables%0a%0aThis release adds a new variable $EnablePageTitlePriority which defines how to treat multiple [=(:title..:)=] directives. If set to 1, the first title directive will be used, and if a page defines a title, directives from included pages cannot override it. PmWiki default is 0, for years, the last title directive was used (it could come from an included page or GroupFooter).%0a%0aThis release also adds a new variable $DiffKeepNum, specifying the minimum number (default 20) of edits that will be kept even if some of them are older than the limit of $DiffKeepDays.%0a%0aA number of bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.8 (2009-12-07)%0aThis release fixes another PHP 5.3 compatibility issue with conditional markup. The Author field now handles apostrophes correctly. The documentation was updated.%0a%0a!! Version 2.2.7 (2009-11-08)%0aThis release fixes most PHP 5.3 compatibility issues. Unfortunately some specific builds for Windows may still have problems, which are unrelated to PmWiki. Notably, on Windows, all passwords need to be 4 characters or longer.%0a%0aUpload names with spaces are now correctly quoted. The documentation was updated.%0a%0a!! Version 2.2.6 (2009-10-04)%0aWith this release it is now possible to display recently uploaded files to the RecentChanges pages -- if you have been using the RecentUploadsLog recipe, please uninstall it and follow the instructions at http://www.pmwiki.org/wiki/Cookbook/RecentUploadsLog.%0a%0aThe release also introduces $MakeUploadNamePatterns to allow custom filename normalization for attachements. It is now possible to replace $PageListFilters and $FPLTemplateFunctions with custom functions. Notify should now work in safe_mode. Some bugs were fixed, among which one with conditional markup with dates. The documentation was updated.%0a%0a!! Version 2.2.5 (2009-08-25)%0aThis release adds a new markup for Pagelist templates, [@(:template none:)@] which allows a message to be set when the search found no pages. The FPLTemplate() function was broken into configurable sub-parts to allow development hooks. A number of bugs were fixed, and the documentation was updated.%0a%0a!! Version 2.2.4 (2009-07-16)%0aThis release fixes a bug introduced earlier today with HTML entities in XLPages.%0a%0a!! Version 2.2.3 (2009-07-16)%0aThis release fixes six potential XSS vulnerabilities, reported by Michael Engelke. The vulnerabilities may affect wikis open for editing and may allow the injection of external JavaScripts in their pages. Public open wikis should upgrade.%0a%0aA new variable $EnableUploadGroupAuth was added; if set to 1, it allows password-protected [[uploads]] to be checked against the Group password. %0a%0aIt is now possible to use @@ @_site_edit, @_site_read, @_site_admin@@ or @@ @_site_upload @@ global [[passwords]] in GroupAttributes pages.%0a%0aA number of other small bugs were fixed, and the documentation was updated.%0a%0a!! Version 2.2.2 (2009-06-21)%0aThe major news in this release is a fix of an AuthUser vulnerability.%0a%0aThe vulnerability affects only wikis that (1) rely on the AuthUser core module %0afor User:Password authentication, -AND- (2) where the PHP installation runs %0awith the variable "magic_quotes_gpc" disabled.%0a%0aAll PmWiki 2.1.x versions from pmwiki-2.1.beta6 on, all 2.2.betaX, 2.2.0, and %0a2.2.1 are affected.%0a%0aThe PmWiki [[SiteAnalyzer]] can detect if your wiki needs to upgrade:%0a http://www.pmwiki.org/wiki/PmWiki/SiteAnalyzer%0a%0aIf your wiki is vulnerable, you should do one of the following at the earliest %0aopportunity:%0a%0a* Upgrade to a version of PmWiki at least 2.2.2 or greater.%0a* Turn on magic_quotes_gpc in the php.ini file or in a .htaccess file.%0a%0aAlternatively, you can temporarily disable AuthUser until you upgrade.%0a%0aNote that even if your wiki does not have the AuthUser vulnerability at the %0amoment, you are strongly encouraged to upgrade to PmWiki version 2.2.2 or %0alater, as some future configuration of your hosting server might put you at %0arisk.%0a%0aThis release also comes with minor updates in the local documentation; fixes %0awere applied for international wikis - notably global variables in %0axlpage-utf-8.php and a new variable $EnableNotifySubjectEncode, which allows %0ae-mail clients to correctly display the Subject header; and a number of other %0asmall bugs were fixed.%0a%0a!! Version 2.2.1 (2009-03-28)%0aThis release comes with an updated local documentation; [[wiki trails]] now work cross-group; guiedit.php now produces valid HTML, and other small bugs were fixed. We also added $EnableRedirectQuiet, which allows redirects to take place without any mention of "redirected from page ....".%0a%0a[[#v220]]%0a!! Version 2.2.0 (2009-01-18)%0a%0aThis is a summary of changes from 2.1.x to 2.2.0.%0a%0a* Several pages that were formerly in the [[Site]].* group are now in a separate [[SiteAdmin]].* group, which is read-restricted by default. The affected pages include Site.AuthUser, Site.AuthList, Site.NotifyList, Site.Blocklist, and Site.ApprovedUrls . If upgrading from an earlier version of PmWiki, PmWiki will prompt to automatically copy these pages to their new location if needed. If a site wishes to continue using the old Site.* group for these pages, simply set%0a%0a-> $SiteAdminGroup = $SiteGroup;%0a%0a-> when carrying out this upgrade inspect your config files for lines such as%0a--> $BlocklistDownload['Site.Blocklist-PmWiki'] = array('format' => 'pmwiki');%0a->as you may wish to fix then, eg%0a--> $BlocklistDownload[$SiteAdminGroup . '.Blocklist-PmWiki'] = array('format' => 'pmwiki');%0a%0a* Important Change in Passwords in PmWiki 2.2 indicating that the group can be edited even if a site password is set will be done by @@"@nopass"@@ prior it was done by @@"nopass"@@%0a-> When migrating a wiki you will have to manually modify the permission or by a script replace in all the page concerned @@passwdread=nopass:@@ by @@passwdread=@nopass@@ (see PITS:00961) --isidor%0a%0a* PmWiki now ships with WikiWords entirely disabled by default. To re-enable them, set either $LinkWikiWords or $EnableWikiWords to 1. To get the 2.1 behavior where WikiWords are spaced and parsed but don't form links, use the following:%0a-> $EnableWikiWords = 1;%0a-> $LinkWikiWords = 0;%0a%0a* It's now easy to disable the rule that causes lines with leading spaces to be treated as preformatted text -- simply set $EnableWSPre=0; to disable this rule.%0a%0a--> '''Important:''' There is ongoing discussion that the leading whitespace rule may be disabled ''by default'' in a future versions of PmWiki. If you want to make sure that the rule will continue to work in future upgrades, set $EnableWSPre=1; in ''local/config.php''.%0a%0a* The $ROSPatterns variable has changed somewhat -- replacement strings are no longer automatically passed through FmtPageName() prior to substitution (i.e., it must now be done explicitly).%0a%0a* Page variables and page links inside of [@(:include:)@] pages are now treated as relative to the included page, instead of the currently browsed page. In short, the idea is that links and page variables should be evaluated with respect to the page in which they are written, as opposed to the page in which they appear. This seems to be more in line with what authors expect. There are a number of important ramifications of this change:%0a%0a[[#relativeurls]]%0a** We now have a new [@{*$var}@] form of page variable, which always refers to "the currently displayed page". Pages such as Site.PageActions and Site.EditForm that are designed to work on "the currently browsed page" should generally switch to using [@{*$FullName}@] instead of [@{$FullName}@].%0a%0a** The $EnableRelativePageLinks and $EnableRelativePageVars settings control the treatment of links and page variables in included pages. However, to minimize disruption to existing sites, $EnableRelativePageVars defaults to '''disabled'''. This will give existing sites an opportunity to convert any absolute [@{$var}@] references to be [@{*$var}@] instead.%0a%0a** Eventually $EnableRelativePageVars will be enabled by default, so we highly recommend setting [@$EnableRelativePageVars = 1;@] in ''local/config.php'' to see how a site will react to the new interpretation. Administrators should especially check any customized versions of the following:%0a---> [[Site.PageActions]]%0a---> [[Site.EditForm]]%0a---> [[Site.PageNotFound]]%0a---> SideBar pages with ?action= links for the current page%0a---> $GroupHeaderFmt, $GroupFooterFmt%0a---> [[Page lists]] that refer to the current group or page, etc in sidebars, headers, and footers%0a%0a** The [@(:include:)@] directive now has a [@basepage=@] option whereby an author can explicitly specify the page upon which relative links and page variables should be based. If no basepage= option is specified, the included page is assumed to be the base.%0a%0a* Sites that want to retain the pre-2.2 behavior of [@(:include:)@] and other items can set [@$Transition['version'] = 2001900;@] to automatically retain the 2.1.x defaults.%0a%0a* Text inserted via [@(:include:)@] can contain "immediate substitutions" of the form [@{$$option}@] -- these are substituted with the value of any options provided to the include directive.%0a%0a* PmWiki now recognizes when it is being accessed via "https:" and switches its internal links appropriately. This can be overridden by explicitly setting $ScriptUrl and $PubDirUrl.%0a%0a* A new $EnableLinkPageRelative option allows PmWiki to generate relative urls for page links instead of absolute urls.%0a%0a* Draft handling capabilities have been greatly improved. When $EnableDrafts is set, then the "Save" button is relabeled to "Publish" and a "Save draft" button appears. In addition, an $EnablePublishAttr configuration variable adds a new "publish" authorization level to distinguish editing from publishing. See [[PmWiki:Drafts]] for more details.%0a%0a[[#ptvstart]]%0a* There is a new [@{$:var}@] "page text variable" available that is able to grab text excerpts out of markup content. For example, [@{SomePage$:Xyz}@] will be replaced by a definition of "Xyz" in SomePage. Page text variables can be defined using definition markup, a line beginning with the variable name and a colon, or a special directive form (that doesn't display anything on output):%0a%0a-->[@%0a:Xyz: some value # definition list form%0aXyz: some value # colon form%0a(:Xyz: some value:) # directive form%0a@]%0a[[#ptvend]]%0a%0a* The [@(:pagelist:)@] command can now filter pages based on the contents of page variables and/or page text variables. For example, the following directive displays only those pages that have an "Xyz" page text variable with "some value":%0a%0a-->[@(:pagelist $:Xyz="some value":)@]%0a%0a Wildcards also work here, thus the following pagelist command lists pages where the page's title starts with the letter "a":%0a%0a-->[@(:pagelist $Title=A* :)@]%0a%0a* The if= option to [@(:pagelist)@] can be used to filter pages based on conditional markup:%0a%0a-->[@(:pagelist if="auth upload {=$FullName}":)@] pages with upload permission%0a-->[@(:pagelist if="date today.. {=$Name}":)@] pages with names that are dates later than today%0a%0a* Spaces no longer separate wildcard patterns -- use commas. (Most people have been doing this already.)%0a%0a* Because page variables are now "relative", the [@{$PageCount}, {$GroupCount}, {$GroupPageCount}@] variables used in pagelist templates are now [@{$$PageCount}, {$$GroupCount}, {$$GroupPageCount}@].%0a%0a* One can now use [@{$$option}@] in a pagelist template to obtain the value of any 'option=' provided to the [@(:pagelist:)@] command.%0a%0a* The [@(:pagelist:)@] directive no longer accepts parameters from urls or forms by default. In order to have it accept such parameters (which was the default in 2.1 and earlier), add a [@request=1@] option to the [@(:pagelist:)@] directive.%0a%0a* The [@count=@] option to pagelists now accepts negative values to count from the end of the list. Thus [@count=5@] returns the the first five pages in the list, and [@count=-5@] returns the last five pages in the list. In addition, ranges of pages may be specified, as in [@count=10..19@] or [@count=-10..-5@].%0a%0a* Pagelist templates may have special [@(:template first ...:)@] and [@(:template last ...:)@] sections to specify output for the first or last page in the list or a group. There's also a [@(:template defaults ...:)@] to allow a template to specify default options.%0a%0a* PmWiki comes with an ability to cache the results of certain [@(:pagelist:)@] directives, to speed up processing on subsequent visits to the page. To enable this feature, set $PageListCacheDir to the name of a writable directory (e.g., ''work.d/'').%0a%0a* [[#elseifelse]]The [@(:if ...:)@] conditional markup now also understands [@(:elseif ...:)@] and [@(:else:)@]. In addition, markup can nest conditionals by placing digits after if/elseif/else, as in [@(:if1 ...)@], [@(:elseif1 ...:)@], [@(:else1:)@], etc.%0a%0a* The [@(:if date ...:)@] conditional markup can now perform date comparisons for dates other than the current date and time.%0a%0a* [[WikiTrails]] can now specify #anchor identifiers to use only sections of pages as a trail.%0a%0a* A new [@(:if ontrail ...:)@] condition allows testing if a page is listed on a trail.%0a%0a* The extensions .odt, .ods, and .odp (from OpenOffice.org) are now recognized as valid attachment types by default.%0a%0a* A new [[blocklist]] capability has been added to the core distribution. It allows blocking of posts based on IP address, phrase, or regular expression, and can also make use of publicly available standard blocklists. See [[PmWiki.Blocklist]] for details.%0a%0a* There is a new [[SiteAdmin.AuthList]] page that can display a summary of all password and permissions settings for pages on a site. This page is restricted to administrators by default.%0a%0a* There are new [@{$PasswdRead}@], [@{$PasswdEdit}@], etc. variables that display the current password settings for a page (assuming the browser has attr permissions or whatever permissions are set in $PasswdVarAuth).%0a%0a* Forms creation via the [@(:input:)@] markup has been internally refactored somewhat (and may still undergo some changes prior to 2.2.0 release). The new [@(:input select ...:)@] markup can be used to create select boxes, and [@(:input default ...:)@] can be used to set default control values, including for radio buttons and checkboxes.%0a%0a* The [@(:input textarea:)@] markup now can take values from other sources, including page text variables from other pages.%0a%0a* Specifying [@focus=1@] on an [@(:input:)@] control causes that control to receive the input focus when a page is loaded. If a page has multiple controls requesting the focus, then the first control with the lowest value of [@focus=@] "wins".%0a%0a* PmWiki now provides a ''scripts/creole.php'' module to enable Creole standard markup. To enable this, add [@include_once('scripts/creole.php')@] to a local customization file.%0a%0a* PmWiki adds a new [@{(...)}@] ''markup expression'' capability, which allows various simple string and data processing (e.g., formatting of dates and times). This is extensible so that recipe authors and system administrators can easily add custom expression operators.%0a%0a* It's now possible to configure PmWiki to automatically create Category pages whenever a page is saved with category links and the corresponding category doesn't already exist. Pages are created only if the author has appropriate write permissions into the group. To enable this behavior, add the following to ''local/config.php'':%0a%0a-->[@$AutoCreate['/^Category\\./'] = array('ctime' => $Now);@]%0a%0a* Sites with wikiwords enabled can now set $WikiWordCount['WikiWord'] to -1 to indicate that 'WikiWord' should not be spaced according to $SpaceWikiWords.%0a%0a* WikiWords that follow # or & are no longer treated as WikiWords.%0a%0a* Links to non-existent group home pages (e.g., [@[[Group.]]@] and [@[[Group/]]@]) will now go to the first valid entry of $PagePathFmt, instead of being hardcoded to "Group.Group". For example, to set PmWiki to default group home pages to [@$DefaultName@], use%0a%0a-->[@$PagePathFmt = array('{$Group}.$1', '$1.{$DefaultName}', '$1.$1');@]%0a%0a* PmWiki now provides a $CurrentTimeISO and $TimeISOFmt variables, for specifying dates in ISO format.%0a%0a* [[(Cookbook:)Cookbook]] authors can use the internal PmWiki function UpdatePage (temporarily documented at [[(Cookbook:)DebuggingForCookbookAuthors]]) to change page text while preserving history/diff information, updating page revision numbers, updating RecentChanges pages, sending email notifications, etc.%0a%0a* [[Skin templates]] are now required to have %3c!--HTMLHeader--> and %3c!--HTMLFooter--> directives. Setting $EnableSkinDiag causes PmWiki to return an error if this isn't the case for a loaded skin. Skins that explicitly do not want HTMLHeader or HTMLFooter sections can use %3c!--NoHTMLHeader--> and %3c!--NoHTMLFooter--> to suppress the warning.%0a%0a* Added a new "pre" wikistyle for preformatted text blocks.%0a%0a* The xlpage-utf-8.php script now understands how to space UTF-8 wikiwords. %0a%0a* Searches on utf-8 site are now case-insensitive for utf-8 characters.%0a%0a* Many Abort() calls now provide a link to pages on pmwiki.org that can explain the problem in more detail and provide troubleshooting assistance.%0a%0a* PmWiki no longer reports "?cannot acquire lockfile" if the visitor is simply browsing pages or performing other read-only actions.%0a%0a* The $EnableReadOnly configuration variable can be set to signal PmWiki that it is to run in "read-only" mode (e.g., for distribution on read-only media). Attempts to perform actions that write to the disk are either ignored or raise an error via Abort().%0a%0a* Including authuser.php no longer automatically calls ResolvePageName().%0a%0a* Authentication using Active Directory is now simplified. In Site.AuthUser or the $AuthUser variable, set "ldap://name.of.ad.server/" with no additional path information (see PmWiki.AuthUser for more details).%0a%0a* Pages are now saved with a "charset=" attribute to identify the character set in effect when the page was saved.%0a%0a* The phpdiff.php algorithm has been optimized to be smarter about finding smaller diffs.%0a%0a* Removed the (deprecated) "#wikileft h1" and "#wikileft h5" styles from the pmwiki default skin.%0a%0a* The mailposts.php and compat1x.php scripts have been removed from the distribution.%0a%0a----%0aBugs and other requests can be reported to the PmWiki Issue Tracking %0aSystem at http://www.pmwiki.org/wiki/PITS/PITS. Any help%0ain testing, development, and/or documentation is greatly appreciated..%0a%0a[[(PmWiki:)Release Notes archive]] - notes for versions older than 2.2.0.%0a%0a%0a%0a%0a -time=1720338237 +rev=837 +targets=PmWiki.Upgrades,PmWiki.ChangeLog,PmWiki.Download,PmWiki.RoadMap,PmWiki.UploadVariables,PmWiki.EditVariables,PmWiki.UploadsAdmin,PmWiki.ConditionalMarkup,PmWiki.LayoutVariables,Cookbook.DarkColorScheme,PmWiki.LinkVariables,PmWiki.OtherVariables,PmWiki.Notify,PmWiki.UrlApprovals,PmWiki.Functions,PmWiki.SecurityVariables,PmWiki.Forms,Cookbook.PmForm,PmWiki.PageLists,PmWiki.Tables,PmWiki.TableOfContents,PmWiki.BasicVariables,PmWiki.AuthUser,Cookbook.PmSyntax,PmWiki.WikiStyles,PmWiki.PageVariables,Cookbook.MarkupDirectiveFunctions,PmWiki.PagelistVariables,Cookbook.CustomSyntax,Cookbook.LocalTimes,Cookbook.RecentUploadsLog,Cookbook.DiffDelay,Cookbook.ReindexCategories,Cookbook.PageListMultiTargets,PITS.01095,PITS.01461,Cookbook.RecipeCheck,Skins.SkinChange,Cookbook.ToggleNext,PmWiki.Links,Cookbook.SectionEdit,PmWiki.BlockMarkup,Cookbook.DeObMail,Cookbook.FixURL,Cookbook.NotSavedWarning,Cookbook.EditHelp,Cookbook.AutoTOC,Cookbook.DeltaBytesRecentChanges,Cookbook.RowspanInSimpleTables,Cookbook.LocalCSS,Cookbook.PreviewChanges,PmWiki.MarkupExpressions,PmWiki.DebugVariables,PmWiki.WikiTrails,SiteAdmin.AuthList,PmWiki.PathVariables,Site.UploadQuickReference,PmWiki.Troubleshooting,PmWiki.CustomMarkup,PmWiki.PageDirectives,PmWiki.I18nVariables,PmWiki.PageHistory,PmWiki.Uploads,PmWiki.Passwords,PmWiki.SiteAnalyzer,Site.Site,SiteAdmin.SiteAdmin,PITS.00961,Site.PageActions,Site.EditForm,Site.PageNotFound,PmWiki.Drafts,PmWiki.Blocklist,Cookbook.Cookbook,Cookbook.DebuggingForCookbookAuthors,PmWiki.SkinTemplates,PmWiki.ReleaseNotesArchive +text=(:title Release Notes:)(:Summary: Notes about new versions, important for upgrades:)%0aSee also: [[Upgrades]], [[Change log]], [[(PmWiki:)Download]] and [[(PmWiki:)Road map]].%0a(:comment The {*$:Released} variable is used in [[News/]]. :)%0a%0a!! Version 2.3.36 {*$:Released} (2024-08-07) [[#v2336]]%0a%0aThis version introduces a drag-and-drop feature for uploads, which can be enabled using $EnableUploadDrop. The new $TROEPatterns array allows configuration of replace-on-edit patterns when a template is loaded onto an empty page. When a page is deleted, a history entry will now be recorded, capturing the date and time, user, and change summary.%0a%0aThe release also includes a fix for PHP 8 and updated documentation.%0a%0a!! Version 2.3.35 {*$:Released} (2024-07-07) [[#v2335]]%0a%0aThis version updates links in the default sidebar to the HTTPS scheme, and places the links to PITS (issue tracking) and Mailing lists in a conditional for editors only.%0a%0aMinor improvements to PmSynxtax. It is now possible to show the source text of a wiki page highlighted by opening @@Page?action=source&highlight=1@@.%0a%0aA minor bug with escaped strings in page titles was fixed, and the documentation was updated.%0a%0aVersion 2.3.35 for security reasons removes the upload types "svg", "svgz", "htm", "html", "css", "swf", "fla", "epub". In some cases, those file formats may allow scripting and potentially open XSS vulnerabilities. Existing uploads with these extensions will not be affected. Wiki administrators who only allow trusted users to upload, can re-enable the extensions that they require with the following lines in config.php:%0a%0a%25hlt php%25[@%0a# NOTE: Only enable extensions that you require%0a%0a# files with no extension, the type may be auto-detected by the server%0a$UploadExts[''] = 'text/plain';%0a%0a# SVG images may contain scripting%0a$UploadExts['svg'] = 'image/svg+xml';%0a$UploadExts['svgz'] = 'image/svg+xml';%0a%0a# Epub may contain scripting and be opened by a browser extension%0a$UploadExts['epub'] = 'application/epub+zip';%0a%0a# Flash files may contain scripting on older browsers%0a# but are no longer supported by recent browsers%0a$UploadExts['swf'] = 'application/x-shockwave-flash';%0a$UploadExts['fla'] = 'application/vnd.adobe.fla';%0a%0a# HTML may contain scripting%0a$UploadExts['html'] = $UploadExts['htm'] = 'text/html';%0a%0a# CSS, if loaded by a browser, may request external resources%0a# and thus reveal your visitors to external websites%0a$UploadExts['css'] = 'text/css';%0a@]%0a%0aAdditionally, a few more upload extensions are considered for deprecation and removal from the core in early 2025. Please join the discussion: %0a https://www.pmwiki.org/wiki/PITS/01509.%0a%0a%0a!! Version 2.3.34 {*$:Released} (2024-05-27) [[#v2334]]%0a%0aThis version adds a new [[conditional markup]] for the current wiki action like %25pmhlt%25[@(:if action browse,edit:)@] which accepts comma-separated actions and wildcards. A new [[UploadsAdmin|upload extension]] "m4a" for audio files was added. A few updates for recent PHP versions, minor improvements for RecipeCheck and $GUIButtons, some cleanup and the documentation was updated.%0a%0a%0a!! Version 2.3.33 {*$:Released} (2024-04-21) [[#v2333]]%0a%0aThis version includes updates for PHP 8, improvements to the responsive skin, to the preview changes mode, to conditional markup handling, and the documentation was updated. PmSyntax will now colorize links in double brackets. A new variable $HTMLTitleFmt in local configuration can override the format between %25hlt html%25[@%3ctitle>...%3c/title>@] defined in a skin template.%0a%0a%0a!! Version 2.3.32 {*$:Released} (2024-03-24) [[#v2332]]%0a%0aThis version includes improvements for the dark color scheme, restoring a light scheme for printing.%0a%0aPictures with a white background may appear too bright on a dark theme, so a new variable $ImgDarkSuffix, when defined, allows you to prepare a separate picture adapted for the dark theme. On a wiki page you still use @@[=Attach:picture.png=]@@ and when the dark theme is loaded, the browser will load @@[=Attach:=]picture'''-dark'''.png@@ (if it exists).%0a%0aNew image and upload extensions AVIF and AVIFS were added, FileSizeCompact() was refactored to allow decimal file sizes, Recent changes pages will be locked to prevent blanking in case of concurrent uploads, and the documentation was updated.%0a%0a%0a!! Version 2.3.31 {*$:Released} (2024-02-23) [[#v2331]]%0a%0aThis release includes improvements to the color sets of the dark theme for the PmWiki-responsive skin, and for the PmSyntax highlighting. The dark toggle icons are now 3-state, rotating between Light, Dark, and Auto (browser/system preference), and an annotation tooltip near the icon displays the current mode. The dark theme functions detecting, storing, and restoring visitor preferences can be reused by other skins, and a new variable $EnableDarkThemeToggle can define the default theme for visitors that have not used the toggle icon.%0a%0aThe page attributes form where passwords and permissions are defined, can now add or remove passwords, users, or groups, without the need to rewrite the full definition. If for example you need to add a new password and a group without removing existing permissions, type "[@+ @]" (plus, space) or "[@- @]" (minus, space), followed by the permissions to be added or removed:%0a + MyNewPassword @newgroup%0a%0aEdit templates entries can now include page patterns where the template should be used. For example:%0a $EditTemplatesFmt[] = "Site.TalkTemplate name=*-Talk";%0a%0aThe function PrintFmt() was refactored to process markup and wiki pages before outputting HTML headers, which would allow for markup, headers, footers, sidebars included from the skin, and action pages like the Auth form, to configure $HTMLHeaderFmt and $HTMLStylesFmt, and the directives %25pmhlt%25@@[=(:noheader:), (:notitle:), (:noleft:), (:noaction:)=]@@%25%25 to work from these pages. In case your wiki relied on the previous behavior, you can revert to it by adding to config.php:%0a $EnablePrePrintFmt = 0;%0a%0aThe variable $EnableUploadVersions can now be set to 2, and if a file with the same name already exists, the new file will have a unique suffix added. %0a%0aRecipeCheck was updated to also list skins and report their versions.%0a%0aOther minor changes include: the "form" attribute was added to input fields; WikiStyles accept a new property 'columns', %25pmhlt%25@@[=(:redirect quiet=1:)=]@@%25%25 has been refactored to prevent an infinite loop, and the documentation was updated.%0a%0a%0a!! Version 2.3.30 {*$:Released} (2024-01-22) [[#v2330]]%0a%0aPublishing my 176th PmWiki release, this milestone coincides with 15.0 years of me (Petko) serving as core developer. Here are some new developments that may be interesting.%0a%0a'''Dark color theme''': The PmWiki-responsive skin has new styles for a user-activated dark/night scheme, with dark backgrounds and light texts. A dark theme can be softer on the eyes if used at night or in dark rooms. %0a%0aAn icon to toggle the styles is placed near the search box in the header. It is possible to place toggle icons and/or labels in wiki pages, headers, footers, sidebars, to toggle stylesheets, and all functions can be easily reused in other skins, and with syntax highlighting, see Cookbook:DarkColorScheme.%0a%0a'''PmSyntax''': We added styles for the new dark color theme. These may be improved in the future.%0a%0a'''PmWiki logo''': A new logo in SVG format was added to pub/skins/pmwiki, and the variable $PageLogoUrl was updated to use the new logo by default. A vector logo can upscale without pixelizing or blurring and looks better on the dark theme. Most wikis have their own logos, this will not change, but if you prefer to display the old raster logo, add to config.php such lines:%0a%0a%25hlt php%25[@%0a$FarmPubDirUrl = $PubDirUrl; # if not already defined%0a$PageLogoUrl = "$FarmPubDirUrl/skins/pmwiki/pmwiki-32.gif"%0a@]%0a%0a'''Page history''': A significant improvement in the word-diff highlighting precision.%0a%0a'''Uploads''': Various fixes for $EnableUploadMimeMatch and Attach: links with escaped filenames.%0a%0a'''Forms''': The input field %25pmhlt%25[@(:input e_author:)@] is now available to all forms with pre-filled author name and "required" attribute per $EnablePostAuthorRequired. A positional form action URL no longer needs to be quoted.%0a%0a'''Quiet redirects''': With the directive %25pmhlt%25[@(:redirect OtherPage:)@], the variable $EnableRedirectQuiet can now be set to 2 to make all redirects quiet by default (without @@quiet=1@@ argument), unless there is a @@quiet=0@@ argument. Quiet redirects will now prevent multiple jumps and infinite loop errors (like normal redirects).%0a%0aThe release includes a few other minor fixes and the documentation was updated.%0a%0a!! Version 2.3.29 {*$:Released} (2023-12-18) [[#v2329]]%0a%0aThis version includes a fix for PHP 8.2 and improvements to the PmSyntax functions, markup directives defined in $MarkupDirectiveFunctions now accept dashes in attribute names, and the documentation was updated.%0a%0a%0a!! Version 2.3.28 {*$:Released} (2023-11-27) [[#v2328]]%0a%0aThis version adds new form input types "month" and "color".%0a%0aA new variable $NotifyRelatedTrailFmt allows for the Notify trail= function to automatically include related pages when the base page is in the trail. This has been enabled on PmWiki.org, so if your notify trail contains Cookbook.MyRecipe, you will be notified about edits to this page, but also to Cookbook.MyRecipe-Talk and Cookbook.MyRecipe-Users.%0a%0aThe "simpletable" zebra backgrounds are now reversed when the table has a %3cthead> element, in order to have dark-light-dark rows instead of dark-dark-light.%0a%0aWith [[UrlApprovals]], if a URL with the insecure http: scheme has been approved, URLs with the secure https: scheme to the same domain name will be automatically approved (not the other way around).%0a%0aSome utility JavaScript functions should now work better when localStorage is not available.%0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.3.27 {*$:Released} (2023-10-23) [[#v2327]]%0a%0aThis version includes fixes for PHP 8, and for time formats with an invalid timezone. %0a%0aWhen merging the last edit without an edit summary, it will now reuse the previous edit summary.%0a%0aThe ".diffmarkup" element now has the style "white-space: pre-wrap" - if a custom skin disables core styles you may want to update the skin styles.%0a%0aWhen $EnableEditAutoText is enabled, new keyboard shortcuts will be available: %25pmhlt%25@@[=Ctrl+B ('''bold'''), Ctrl+I (''italic''), Ctrl+K ([[link]]/unlink).=]@@%0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.3.26 {*$:Released} (2023-09-28) [[#v2326]]%0a%0aThis version includes updates for PHP 8.2, customizable HTML snippets for trails and input labels. It is now possible to configure searching for "at least one" term among many, as opposed to currently searching for all terms. Extensions are now removed from the $UploadExts array if their size is set to zero in $UploadExtSize, and the documentation was updated.%0a%0a%0a!! Version 2.3.25 {*$:Released} (2023-07-29) [[#v2325]]%0a%0aThis version includes updates for PHP 8.2. Some core markup directives were refactored to prevent very rare bugs. The documentation was updated.%0a%0a%0a!! Version 2.3.24 {*$:Released} (2023-06-06) [[#v2324]]%0a%0aThis version includes some code refactoring, and a new helper function [[Functions#InsertEditFunction|InsertEditFunction()]] to simplify the reuse of core functionality by recipes. %0a%0aIt is now possible to configure the merging of the latest edits by the same author into a single history entry, see $EnableMergeLastMinorEdit.%0a%0aNew configuration variables $AuthFormRespCode, $EnableUploadMimeMatch, $EnableDownloadRanges, see documentation.%0a%0aPmForm now can validate an email address field with the "template require FIELD if=validemail" condition.%0a%0aA few other minor improvements in the [[change log]], and the documentation was updated.%0a%0a%0a!! Version 2.3.23 {*$:Released} (2023-05-03) [[#v2323]]%0aThis version implements session tokens to prevent potential cross-site request forgery vulnerabilities, suggested by Dominique Faure. Most core actions that modify pages or files should have this enabled and should work like before. %0a%0aThis new feature can be disabled by setting these variables in config.php:%0a%0a%25hlt php%25[@%0a $EnablePmToken = 0; # edit, upload, attributes, approveurls%0a $PmFormEnablePmToken = 0; # PmForm%0a@]%0a%0aSome installations might encounter the error message "Token invalid or missing". These can include custom edit forms, automated scripts posting to the wiki, AJAX posting text or uploads used by some recipes, or partial upgrades where some core scripts haven't been updated. Most of these should be easy to update -- please check if you're using the latest recipe versions, otherwise report such cases to us -- otherwise you may selectively disable the feature. See [[Upgrades#pmtoken]].%0a%0aA [[Forms|form]] element %25pmhlt%25[@(:input pmtoken:)@] was added, and the helper function [[Functions#pmtoken|pmtoken()]] was documented to make it easy for custom forms and recipes to use this new feature.%0a%0aThe version also includes a minor code refactoring, a bug fix, and the documentation was updated.%0a%0a%0a!! Version 2.3.22 {*$:Released} (2023-04-06) [[#v2322]]%0aThis version adds to the core the Cookbook:PmForm recipe (script and templates), not enabled by default. This is in order to reduce my workload, and future updates to PmForm will be made only in the core version. %0a%0aIf you already use PmForm, you can enable the core script, by modifying your @@include_once()@@ call from "@@'''cookbook'''/pmform.php@@" to "@@'''scripts'''/pmform.php@@". Your existing templates and configuration should continue to work.%0a%0aA bug was fixed with [[PageLists]] with multiple @@category=+A,+B@@ categories. Input [[forms]] and buttons can now be configured to ask for confirmation before they are submitted. A few updates for recent PHP versions, and other minor improvements, and the documentation was updated.%0a%0a!! Version 2.3.21 {*$:Released} (2023-03-06) [[#v2321]]%0aThis version includes updates for PHP 8, and bug fixes with [[tables#sortable|sortable tables]] and multiline $MarkupDirectiveFunctions. The core [[table of contents]] was updated to work better with recent SectionEdit versions, and the documentation was updated.%0a%0aNew features include: the upload extension CSV, $EnableLocalTimes with a new short mode 3 where old dates are shown as MM'YY, and a new variable $EnableCopyCode to add [@[+]@] buttons for easy copying of preformatted blocks.%0a%0a!! Version 2.3.20 {*$:Released} (2023-02-12) [[#v2320]]%0aThis version fixes an unidentified variable warning introduced yesterday in 2.3.19.%0a%0a!! Version 2.3.19 {*$:Released} (2023-02-11) [[#v2319]]%0aThis version includes fixes for recent PHP versions, new helper functions, new variables allowing more customization, and the documentation was updated.%0a%0aWork is underway to define and implement a new family of self-contained recipes "Modules" which should be easier to install, configure and update. It may be possible to easily update your modules and skins either from a remote Git/SVN repository, or by simply dropping a ZIP file into the "modules" directory, and use a wiki-based editor to enable and configure them. Nothing will change for existing recipes, and they will not need to be updated; this will be an entirely optional new interface. Let me know if you can suggest features/scopes added to the wishlist.%0a%0aPmWiki too may be able to run directly from the read-only release ZIP archive, without the need to unzip it first. Again, this will be entirely optional, the current ways will continue to work as before, and slightly faster than the ZIP version (approx. 2%25 faster in my benchmarks).%0a%0a%0a!! Version 2.3.18 {*$:Released} (2023-01-15) [[#v2318]]%0a%0aThis version fixes a bug with user groups in with conditional markup, includes updates for PHP 8, minor improvements to the edit textarea and to the syntax highlighting. A helper function pm_json_encode() was added for servers where the PHP-JSON extension is not enabled.%0a%0aThe documentation was updated.%0a%0a!! Version 2.3.17 {*$:Released} (2022-12-17) [[#v2317]]%0a%0aThis release has updates for recent PHP versions.%0a%0aThe edit textarea had some improvements. Edit buttons and the automatic edit text will now insert their wiki markup in a way which allows for the "undo" function in the text area to work (with Ctrl+Z). The edit textarea (with $EnableEditAutoText enabled) now accepts 4 new keyboard shortcuts: Ctrl+L and Ctrl+Shift+L to convert the selected text to lowercase or uppercase, and Ctrl+Shift+ArrowUp or ArrowDown to move the line with the cursor up or down.%0a%0aA new variable $EnableBaseNameConfig was added - it allows to enable automatic inclusion of local configuration for the "basename" of the current page, for example Group.Page-Draft to include local/Group.Page.php if it exists.%0a%0aConditional markup %25pmhlt%25[@(:if auth @admins,@editors:)@] can now check if the current user belongs to selected usergroups (with [[AuthUser]]).%0a%0aA few minor bugs and omissions were fixed, and the documentation was updated.%0a%0a!! Version 2.3.16 {*$:Released} (2022-11-28) [[#v2316]]%0a%0aThis version fixes a bug with some skins introduced in 2.3.15 last week, and reverts PrePrintFmt(). %0a%0aNew WikiStyles 'notoc' and 'overflow' were added. PmTOC Table of contents, and the list of included pages in the edit form, now use classnames instead of style attributes.%0a%0aPmSyntax fixes a font-size alignment bug with nested programming languages, and has been optimized for large pages.%0a%0aA few more minor bugs were fixed, including for PHP 8, and the documentation was updated.%0a%0a%0a!! Version 2.3.15 {*$:Released} (2022-11-21) [[#v2315]]%0a%0aSecurity: Closed a potential XSS vulnerability discovered today. Your wiki may be at risk if untrusted people can edit your pages.%0a%0aHTTP headers: CSP updated, XSSP added. Both can be disabled or modified by changing the $HTTPHeaders values.%0a%0aCookies: Added a new variable $CookieSameSite default to 'Lax' per current browser defaults and expectations. Updated pmsetcookie() added an argument $samesite, and refactored to work with old and current PHP versions. Added function pm_session_start() as a replacement for session_start() with respect for local preferences ($CookieSameSite, $EnableCookieSecure, $EnableCookieHTTPOnly). %0a%0a[[Cookbook:PmSyntax|PmSyntax]]: A new CSS variable @@--pmsyntax-fontsize-editform@@ allows to set the font size of the edit form separately from highlighted elements in the documentation. Fixed the [@[[Highlight]]@] label could change fonts when clicked.%0a%0aResponsive skin: The font size for "pre" and "code" elements is now scalable/relative to the paragraph font size rather than fixed. This works better in headings or small text blocks.%0a%0aGUI edit buttons: Part of these functions were rewritten to avoid 'unsafe inline' JavaScript. While default and most custom buttons should work without change, you should no longer need to url-encode some characters like %25 or add backslashes. If you have such buttons, you may need to update their declarations to strip the extra backslashes. %0a%0a[[WikiStyles]]: Refactored to move all inline WikiStyles to the $HTMLStylesFmt array in the header of the HTML page.%0a%0aTables and block markup: Replaced inline @@style="..."@@ attributes with class names. %0a%0aThe function PrintFmt() was refactored to process skin parts, skin functions, markup, and wiki pages, before sending the HTTP and HTML headers. This allows for wikistyles and recipes in sidebars and footers to add their configuration to the headers.%0a%0aIf you have questions or difficulties upgrading, please contact us.%0a%0a!! Version 2.3.14 {*$:Released} (2022-11-03) [[#v2314]]%0a%0aThis version includes fixes for recent PHP versions and for 2 minor bugs (searchbox wrongly encoded entities and %25pmhlt%25[@{(ftime %25L)}@] format). Inline JavaScript for focusing form fields is now replaced with native attributes. In the Edit form, the "Minor edit" label can now toggle the checkbox.%0a%0aThe "disabled obsolete markup" tooltip now includes the file path and the line number of the markup rule definition.%0a%0aPmSyntax now recognizes %25pmhlt%25[@(:template requires? ...:)@] which is used by some recipes.%0a%0aThe documentation was updated.%0a%0a!! Version 2.3.13 {*$:Released} (2022-10-07) [[#v2313]]%0aThis version closes a potential XSS vulnerability, reported by lukystreik. A new variable $FailedLoginsFunction will allow to define a function limiting the number of failed logins. The documentation was updated.%0a%0a!! Version 2.3.12 {*$:Released} (2022-09-25) [[#v2312]]%0aThis version has a few fixes for PHP8. Complex conditionals with empty page variables could cause errors, now fixed. Form elements with values like "0" could appear empty, now fixed. The PSFT() function and the %25pmhlt%25[@{(ftime)}@] markup expression now recognize a "%25L" format as a human-readable localizable timestamp. A new helper function PrintAuthForm() was split from PmWikiAuth() to allow recipes to call it directly. The documentation was updated.%0a%0a!! Version 2.3.11 {*$:Released} (2022-08-30) [[#v2311]]%0a%0aThis version fixes the function stripmagic(), when used with arrays (a recent update for PHP 8 broke it).%0a%0aNew [[PageVariables]] derived from a Group's homepage are now available: %25pmhlt%25 [@{$GroupHomePage}@], [@{$GroupHomePageName}@], [@{$GroupHomePageTitle}@], [@{$GroupHomePageTitlespaced}@].%0a%0aA new helper function should simplify recipes with custom markup directives of the format:%0a%0a-> %25pmhlt%25 [@(:mydirective arg=val param="other value":)...(:mydirectiveend:)@].%0a%0aSee the documentation at Cookbook:MarkupDirectiveFunctions.%0a%0aThe core documentation was updated.%0a%0a%0a!! Version 2.3.10 {*$:Released} (2022-08-20) [[#v2310]]%0a%0aThis version includes updates for PHP 8. Wildcard $DefaultUnsetPageTextVars should now work with forms. PmSyntax fixed text alignment between the edit area and the colored block in some cases. The documentation was updated.%0a%0a!! Version 2.3.9 {*$:Released} (2022-08-18) [[#v239]]%0a%0aThis version includes updates for PHP 8. Non-wildcard $DefaultUnsetPageTextVars should now work with %25pmhlt%25[@(:input default:)@]. PmSyntax now handles blocks with simpler selectors, possibly created by recipes. The documentation was updated.%0a%0a!! Version 2.3.8 {*$:Released} (2022-07-22) [[#v238]]%0a%0aThis version fixes a bug caused by a recent update for PHP 8 with the include markup:%0a%0a %25pmhlt%25[@(:include Page1 Page2 Page3:)@]%0a%0aWhen the first page doesn't exist, it didn't check for the other pages (now fixed).%0a%0aIn addition, PmSyntax was improved when more than one inline blocks are on the same line, and the documentation was updated.%0a%0a%0a!! Version 2.3.7 {*$:Released} (2022-06-28) [[#v237]]%0a%0aThis version sets default HTTP headers X-Frame-Options (reported by Imagine Dragon) and Content-Security-Policy to disallow embedding in external websites by default and clickjacking attempts.%0a%0aShould you require the previous behavior, you can add this line to local/config.php:%0a%0a-> %25hlt php%25[@unset($HTTPHeaders['XFO'], $HTTPHeaders['CSP']);@]%0a%0a$EnableHighlight will now remember any links to PmWiki variables and restore them after the highlighting. %0a%0a$EnablePmSyntax will now process %25pmhlt%25[@%25hlt pmwiki%25@] in addition to [@%25pmhlt%25@] blocks, and escaped markup after it will be tentatively highlighted.%0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.3.6 {*$:Released} (2022-06-19) [[#v236]]%0a%0aThis version contains fixes for PHP 8. A form attribute "lang" was added. %0a%0aSortable tables now allow for table headers to have markup such as bold (except links), and will use a case-insensitive natural ordering. %0a%0aSearchbox now has a default placeholder %25pmhlt%25 [@"$[Search]"@] and can have the submit button removed with the argument [@label=""@] (users need to press Enter on their keyboards to search).%0a%0a$EnableHighlight-formatted code blocks are now converted to plain text to prevent warnings; there is an ongoing discussion in the mailing list so this solution may evolve.%0a%0aFor developers: $UploadVerifyFunction can now modify $upname, and a variable $PageIndexTermsFunction can configure a replacement function for PageIndexTerms().%0a%0aThe documentation was updated.%0a%0a%0a!!Version 2.3.5 {*$:Released} (2022-05-23) [[#v235]]%0a%0aThis version fixes a bug with %25pmhlt%25 @@[=(:pagelist list=grouphomes:)=]@@. A new helper function DisableSkinParts() allows for simpler disabling of headers, footers and sidebars from recipes. When a file is uploaded, new variables with the file path and URL are now available to recipes.%0a%0aThe version also contains fixes for PHP 8 and documentation updates.%0a%0a%0a!!Version 2.3.4 {*$:Released} (2022-04-22) [[#v234]]%0a%0aThis version includes fixes for PHP 8 and documentation updates.%0a%0a%0a!!Version 2.3.3 {*$:Released} (2022-03-26) [[#v233]]%0a%0aThis version includes fixes for PHP 8 and documentation updates.%0a%0a%0a!!Version 2.3.2 {*$:Released} (2022-02-09) [[#v232]]%0a%0aThis version includes bug fixes and updates for PHP 8.1. The core variable $EnableIncludedPages introduced in 2.3.0 was renamed to $EnableListIncludedPages to avoid ambiguity. With LocalTimes, is now possible to configure the number of days the "plus" button will pull from the page history, and the function will better recognize some older RecentUploads formats. PmSyntax was updated so that "%25pmhlt%25@@\\@@" line breaks in tables and headings are treated like in the core, staying in the same context; and the different PmSyntax blocks will now be processed in parallel.%0a%0aThe code configuring and loading pmwiki-utils.js was moved to a new file scripts/utils.php, and a new variable $EnablePmUtils was added to allow administrators to easily disable these functions. The script pmwiki-utils.js will now be included in the page header rather than the footer, which may reduce the number of page redraws. The individual functions will now be processed in parallel.%0a%0aThe documentation was updated.%0a%0a%0a!!Version 2.3.1 {*$:Released} (2022-01-15) [[#v231]]%0a%0aThere was an omission in the release script which unexpectedly deleted the $VersionNum variable which broke some settings. This quick release fixes it.%0a%0a!!Version 2.3.0 {*$:Released} (2022-01-15) [[#v230]]%0a%0aJanuary 2022 is the 20th year anniversary of the release of PmWiki version 0.1, and 13 years since I (Petko) became core developer. This merited additional work and effort with hopefully interesting and useful new production.%0a%0a'''PHP 5.3 - 8.1 compatibility''' %0a* PmWiki 2.3.0 includes updates for PHP 8.0 and 8.1.%0a* Consequently, it requires PHP version 5.3 (released 2009) or more recent.%0a%0a'''PmSyntax'''. A new function PmSyntax was added to the core, and enabled on pmwiki.org. %0a* It highlights PmWiki syntax in the documentation, and possibly in the basic edit form. %0a* It only highlights PmWiki markup, and is independent from Highlight.js. See Cookbook:PmSyntax and $EnablePmSyntax. %0a* It should highlight most core language features and those of many recipes, see [[https://www.pmwiki.org/wiki/Test/PmSyntax|this mashup of various markups]]. %0a* Developers can add custom rules in the $CustomSyntax array, see Cookbook:CustomSyntax. %0a* The %25pmhlt%25 [@(:markup:)@] directive can now have @@class=norender@@ to only show the source code without processing it. This may be useful, together with PmSyntax, in 2 cases: writing/discussing markup code without actually running it, or working on PageList Templates where you want to see and edit them highlighted.%0a%0a'''Improvements to the edit form'''%0a* PmSyntax (above) can be enabled to highlight the PmWiki markup the edit form, and should work in recent standards-compliant browsers.%0a* The variable $EnableNotSavedWarning is now enabled by default. Add to config.php @@$EnableNotSavedWarning = 0;@@ to disable it.%0a* A new variable {- $EnableIncludedPages -} $EnableListIncludedPages (from 2.3.2) allows listing of other pages included from the currently edited page, with links to see or edit them. When the variable is enabled, the list of pages appears in the edit form, after the text area, in a collapsed %3cdetails> element. The list includes pages from which text, text variables, or templates are included from the edited page. This is enabled on pmwiki.org if you wish to preview it.%0a* The $EnableEditAutoText function will now feel more like other text editors by removing the automatically inserted bullet when Enter is pressed twice.%0a%0a'''Dates and times, monitoring, review'''%0a* The %25pmhlt%25 [@{(ftime)}@] Markup expression now accepts a new format '[@%25o@]' for the ordinal suffix of the date.%0a* The [[Notify]] feature now accepts a @@tz=@@ timezone specifier for individual subscribers. See [[Notify#tz]].%0a* A function based on Cookbook:LocalTimes was added to the core. See [[Cookbook:LocalTimes|the recipe page]] for the differences. You can continue using the recipe, or disable it and enable the core function.%0a* New core variables $EnableLocalTimes, $CurrentLocalTime.%0a* New markup %25pmhlt%25[@@2022-01-09T08:35:00Z@]%25%25 output as a %3ctime> element, formatted via $TimeFmt; localized if $EnableLocalTimes. %0a* Added a variable $EnableRecentUploads which makes it easy to enable the Recent Uploads feature on AllRecentChanges. This is a basic format that may be good enough for many wikis. For more options, see Cookbook:RecentUploadsLog.%0a* The default $RecentChangesFmt now use the variable $CurrentLocalTime instead of $CurrentTime. In the wiki source text it saves the timestamps in a portable time format in GMT, which is then shown formatted per $TimeFmt (wiki timezone). It looks just like $CurrentTime did previously, but can be converted to the visitor's time zone if LocalTimes is enabled. If you have custom $RecentChangesFmt entries that use $CurrentTime, nothing will change for you, but you may want to update these with $CurrentLocalTime if you want to benefit from localization.%0a* The "page history" page now has CSS classes for the delay between edits: diffday, diffweek, diffmonth, diffyear. These allow styling of vertical spacing between individual edits in page histories. See Cookbook:DiffDelay for an example.%0a* The page history can now have a "hidden" edit type, in addition to "minor". This is intended to be used by recipes in order to hide, rather than delete, some edits from the page history. A couple of new recipes using this feature will be added in the next few days.%0a%0a'''PageLists, categories, backlinks'''%0a* [[PageLists]] now accept a new argument @@category=Name@@ which lists only pages declared in the category with the markup %25pmhlt%25 [@[[!Name]]@], and does not include pages simply linking to [@[[Category/Name]]@] (unless they also contain [@[[!Name]]@]).%0a** The differentiation between links to !Name and Category.Name requires the pages containing category links to be re-indexed; see Cookbook:ReindexCategories which can automate this.%0a* Also in PageLists, the arguments @@link=@@ and @@category=@@ now accept multiple and negative specifiers, and wildcards. See [[PageLists#wildcards]]. If you previously used the recipe Cookbook:PageListMultiTargets, please disable it when you upgrade to 2.3.0.%0a* Category links can now have a different text, like %25pmhlt%25 [@[[!Name|Text]]@], and the markup generally behaves like other links, see PITS:01095.%0a%0a'''Styles''' (core skin PmWiki-responsive)%0a* Collapsible sections details+summary will now change the cursor to the "pointer" style over the clickable element, and the color will change to "navy". %0a* The core table of contents function ($PmTOC) has had its styles updated, in order to properly indent long sub-headings.%0a%0a'''Core helper functions'''%0a* A new helper function %25hlt php%25@@PSFT()@@ can now be used as an ''almost'' drop-in replacement for @@strftime()@@ and @@gmstrftime()@@ which became deprecated in PHP 8.1. Please review the documentation at [[Functions#PSFT]]. If you have local configurations or recipes using @@strftime()@@ you can change for @@PSFT()@@ now.%0a* A helper function %25hlt php%25@@DownloadUrl($pagename, $path)@@ was added, see [[Functions#DownloadUrl]]. It can simplify the handling of attached files by recipes.%0a%0aLast but not least, '''the documentation''' in English has been updated with the latest development (and in German by MFWolff).%0a%0aSee also [[Upgrades#v22v23|Upgrading from version 2.2.145 to 2.3.0]].%0a%0aAs always, if you have any questions or difficulties, please let us know.%0a%0a%0a!! Version 2.2.145 {*$:Released} (2021-12-11) [[#v22145]]%0aThis version includes a minor change in search patterns: searches and pagelists with a wrong or undefined $SearchPatterns (@@list=abc@@ argument) will now use $SearchPatterns["default"] rather than an empty array (effectively all pages). This was likely the intended behavior, a way for admins to restrict search locations.%0a%0aIt also includes updates for PHP 8, a fix of an emoji for non-UTF8 wikis, and the latest pages of the documentation.%0a%0a!! Version 2.2.144 {*$:Released} (2021-11-06) [[#v22144]]%0aThis version includes fixes for PHP 8 and an update to @@intermap.txt@@. The conditional markup "exists" was optimized when called multiple times. The functions %25hlt php%25@@CondExists()@@, @@MatchPageNames()@@, and @@MatchNames()@@, can now be called with an additional argument (false) when a case-sensitive match is needed. The documentation was updated.%0a%0a!! Version 2.2.143 {*$:Released} (2021-10-02) [[#v22143]]%0aThis version should prevent some errors from local customization or recipes with recent PHP versions, by disabling obsolete markup rules and replacement patterns. If such markup appears on a page, it will not be processed, it will be rendered like this: %25frame%25@@⚠(:my-obsolete-directive params:)@@%25%25 and a tooltip title should have some additional information.%0a%0aCare should be taken if you have custom calls to the deprecated function [[PmWiki/Functions#PCCF|%25hlt php%25@@PCCF()@@]], and incompatible custom replacement patterns processed via [[PmWiki/Functions#PPRE|@@PPRE()@@]] or [[PmWiki/Functions#PPRA|@@PPRA()@@]] are silently skipped, which may not work as expected. (Previously they wouldn't work at all.)%0a%0aIf you experience any difficulties, please do let us know and we'll try to provide a fix.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.142 {*$:Released} (2021-08-31) [[#v22142]]%0aThis version hides some PHP 8 notices, and adds 2 new form element attributes "accept" and "autofocus". %0a%0aThe documentation was updated.%0a%0a%0a!! Version 2.2.141 {*$:Released} (2021-07-09) [[#v22141]]%0aThis version adds ways to define 2 custom functions:%0a* $MultiFactorAuthFunction to enable custom MFA/2FA with [[AuthUser]]%0a* $PageIndexFoldFunction to define a custom function normalizing the page terms while indexing and searching (by default PmWiki converts the terms to lowercase).%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.140 {*$:Released} (2021-06-26) [[#v22140]]%0aThis version has updates for PHP 8. %0a%0aThe API of the source code highlighting library has changed and the PmWiki loader function was adapted; if you use this feature, please upgrade Highlight.js to version 11.0.0 or newer. %0a%0aNote: since version 11, Highlight.js doesn't preserve HTML in the preformatted blocks and issues a console warning, so you should only use the [@(space)[=escaped=]@] or the @@[=[@escaped@]=]@@ markup blocks.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.139 {*$:Released} (2021-05-05) [[#v22139]]%0aThis version removes empty "title" attributes in HTML tags (links and images), fixes warnings which appear with PHP 8 and updates the documentation.%0a%0a!! Version 2.2.138 {*$:Released} (2021-03-02) [[#v22138]]%0aThis version fixes a bug when a details directive has markup in the summary attribute, and the documentation was updated.%0a%0a!! Version 2.2.137 {*$:Released} (2021-02-26) [[#v22137]]%0aThis version fixes a bug introduced earlier today with entities encoded twice in PQA() quoted arguments.%0a%0a!! Version 2.2.136 {*$:Released} (2021-02-26) [[#v22136]]%0aThis version fixes a XSS vulnerability for WikiStyles reported today by Igor Sak-Sakovskiy.%0a%0aThe fix adds a second argument $keep to the core function PQA($attr, $keep=true) which by default escapes HTML special characters and places the values in Keep() containers. If you have custom functions that call PQA() and expect the previous behavior, call PQA() with a second argument set to false.%0a%0aIf you have any questions or difficulties, please let us know.%0a%0a!! Version 2.2.135 {*$:Released} (2021-01-31) [[#v22135]]%0aThis version fixes a number of PHP8 compatibility issues. This is a work in progress, if you uncover others, please report them at PITS:01461.%0a%0aA work is underway to implement session tokens to prevent CSRF vulnerabilities -- suggested by Dominique Faure. I wanted to rework these functions but the PHP8 compatibilities are more urgent so at the moment the PmToken functions are transparent/non-functional.%0a%0aA defunct syndicated blocklist was disabled, a minor code refactoring was done for PmTOC to better support manual edit section links, and the documentation was updated.%0a%0a%0a!! Version 2.2.134 {*$:Released} (2020-11-30) [[#v22134]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.133 {*$:Released} (2020-10-25) [[#v22133]]%0aThis version fixes a potential vulnerability to CWE-384: Session Fixation, reported by Dominique Faure. The fix regenerates the session identifier at the moment someone logs in. In case this is not desirable, a wiki admin can set the new variable $EnableAuthPostRegenerateSID to false.%0a%0aThis version also fixes an unintended variable evaluation in link markups. The CSS from Cookbook:RecipeCheck will now be injected only when needed. The responsive skin styles contained a reduced padding value for numbered and bulleted lists in order to save space, but in longer lists it could clip the item numbers. This value was removed from the styles because it was complex to reliably override it from local configuration. If you need to enable the previous values, add to pub/css/local.css the following:%0a%0a%25hlt css%25[@%0aul, ol { padding: 0 0 0 20px; }%0a@media screen and (min-width:50em) {%0a ul, ol { padding: 0 0 0 40px; }%0a}@]%0a%0a!! Version 2.2.132 {*$:Released} (2020-09-30) [[#v22132]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.131 {*$:Released} (2020-08-30) [[#v22131]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.130 {*$:Released} (2020-07-04) [[#v22130]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.129 {*$:Released} (2020-05-21) [[#v22129]]%0aThis version adds the styles for the "simpletable" class of tables from the "pmwiki-responsive" skin into the old "pmwiki" skin, and the documentation was updated.%0a%0a!! Version 2.2.128 {*$:Released} (2020-04-26) [[#v22128]]%0aThis version only includes some cosmetic changes and updates the documentation.%0a%0a!! Version 2.2.127 {*$:Released} (2020-03-23) [[#v22127]]%0aThis version sets the maximum height of the edit form textarea after reports for a jumping behavior on mobile devices (the PmWiki-responsive skin only). The core table of content classes "pmtoc-show" and "pmtoc-hide" now replace the previous classes "show" and "hide" to prevent conflicts with other frameworks. The functionality of the recipe Skins:SkinChange was added to the core (disabled by default). The documentation was updated.%0a%0a!! Version 2.2.126 {*$:Released} (2020-02-01) [[#v22126]]%0aThis version fixes a bug with $PmTOC['MinNumber'] set to -1, and updates the .htaccess format for caches.php. The documentation was updated.%0a%0a!! Version 2.2.124, 2.2.125 {*$:Released} (2020-01-27) [[#v22125]]%0aThis version adds a variable $SetCookieFunction to override the core "pmsetcookie" function. A new feature ToggleNext was included in the core, documented at Cookbook:ToggleNext. The documentation was updated.%0a%0a!! Version 2.2.123 {*$:Released} (2019-12-31) [[#v22123]]%0aThis version allows link URLs to be [[Links#escaped | escaped]] with [@[=link address=]@] if they contain any special characters, including quotes, parentheses and pipes. The obfuscated e-mails will now work from headers, footers and sidebars. A [[forms|form]] attribute "formnovalidate" was added to the core and to the "Cancel" button in the edit form. Core [[table of contents]] will now work better with Cookbook:SectionEdit. Cookbook:RecipeCheck was included in the core -- if you have this recipe already installed, you can simply comment it out from your config.php. The code that handles $EnableRCDiffBytes was refactored to also show the bytes changed in the page histories. New upload extensions [[https://developers.google.com/speed/webp | "webp"]] (images) and [[https://www.opus-codec.org/ | "opus"]] (audio) were added. The documentation was updated.%0a%0a!! Version 2.2.122 {*$:Released} (2019-11-19) [[#v22122]]%0aVersion 2.2.121 was released by mistake and contained some experimental code that was meant to be tested first. %0a%0aThis version fixes a bug with ObfuscateLinkIMap() and international characters. New configuration variables $DefaultUnsetPageTextVars, $DefaultEmptyPageTextVars can set default values for page text variables. The built-in table of contents and numbered headings can now be enabled independently. A pagelist template pseudovariable [@{$$EachCount}@] was added, containing the number of the page in the current "each" loop. Input form elements and the [@(:searchbox:)@] field now can have ARIA accessibility attributes.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.120 {*$:Released} (2019-10-13) [[#v22120]]%0aThis version fixes a bug with existing complex customization of GUIEdit buttons. Very long [[table of contents|tables of contents]] will now be scrollable. A new "input datalist" [[Forms|form]] element (list of suggestions to other input fields), and a new "details+summary" [[block markup|block section]] (toggle sections without JavaScript) were added. The documentation was updated.%0a%0a!! Version 2.2.119 {*$:Released} (2019-10-03) [[#v22119]]%0aThis version updates the core for PHP 7.4. Required input fields now feature @@required="required"@@ attributes and modern browsers prevent sending the edit or upload form with empty required fields. Attachlist @@ext=@@ and @@names=@@ arguments now accept patterns and negatives like @@ext=jpg,png@@, @@ext=-pdf@@, or @@names=-th*---*.jpg@@. The Redirect function can now have a 3rd argument with the full URL. The scroll position in the edit text area will be remembered on save-and-edit and preview. A bug was fixed with pagelist while preview. The documentation was updated.%0a%0aA number of features currently provided by recipes were added to the core and disabled by default. You can still use the recipes, or you can disable them and enable the core features. The following features were added:%0a* e-mail obfuscation functions based on Cookbook:DeObMail; see instructions to enable%0a* a FixUrl button based on Cookbook:FixURL, see $EnableGuiEditFixUrl%0a* $EnableNotSavedWarning based on Cookbook:NotSavedWarning%0a* $EnableEditAutoText based on Cookbook:EditHelp%0a* $PmTOC, [@(:toc:)@], [@(:notoc:)@], Table of contents/Numbered headings, based on a simplified variant of Cookbook:AutoTOC%0a* $EnableSortable, basic sortable tables%0a* $EnableRCDiffBytes based on Cookbook:DeltaBytesRecentChanges%0a* $EnableSimpleTableRowspan replicating the markup from Cookbook:RowspanInSimpleTables%0a* $WikiPageCSSFmt enables CSS in a wiki page, based on Cookbook:LocalCSS%0a* $EnableHighlight code highlight feature compatible with "highlight.js"%0a* $AddLinkCSS['othergroup'] and $AddLinkCSS['samedomain'] can contain custom CSS classes for in-wiki links to other groups and for URL links to the same site.%0a%0aThe above new features are disabled by default, see the documentation for more information on how to enable them, or test them on pmwiki.org where most of these are enabled. Please report if you notice any problems.%0a%0a!! Version 2.2.118 {*$:Released} (2019-08-28) [[#v22118]]%0aThis version integrates the features of the recipe Cookbook:PreviewChanges into the core. If you currently use this recipe, please uninstall it and add to config.php:%0a $EnablePreviewChanges = 1;%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.117 {*$:Released} (2019-07-28) [[#v22117]]%0aThis version adds handling of "partial content" requests for file downloads. New video file extensions 'm4v' and '3gp' were added. The Upload form now includes a new text field "Uploader" pre-filled with the name of the editor, and a new variable $EnableUploadAuthorRequired was added (defaults to $EnablePostAuthorRequired). The documentation was updated.%0a%0a!! Version 2.2.116 {*$:Released} (2019-06-19) [[#v22116]]%0aThis version fixes pagelists with case insensitive matches of page (text) variables for international wikis. If your international wiki pagelists rely on case-sensitive variable matches, please see $PageListVarFoldFn. The documentation was updated.%0a%0a!! Version 2.2.115 {*$:Released} (2019-05-13) [[#v22115]]%0aIn this version the responsive skin in large "desktop" mode changes the search form background to transparent, for easier custom styling of the header. The documentation was updated.%0a%0a!! Version 2.2.114 {*$:Released} (2019-04-02) [[#v22114]]%0aThis version adds a skin directive @@%3c!--IncludeTemplate ... -->@@ and the variable $SkinTemplateIncludeLevel. The core variable documentation format identifiers were moved to the definition term element to allow CSS ":target" styling, and the header and link text of the vardoc table can now be translated. Input forms have a new HTML5 element "tel", a new attribute "pattern" and two bugs were fixed with the classnames of the new elements and with the identifiers of "select" lists. The documentation was updated.%0a%0a!! Version 2.2.113 {*$:Released} (2019-03-01) [[#v22113]]%0aThis version adds a new [@(:input button:)@] form element. All form elements can now accept custom data-* attributes, which can be disabled by setting $EnableInputDataAttr to 0. Both additions are meant for easier integration with custom JavaScript functions or some frameworks.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.112 {*$:Released} (2019-01-09) [[#v22112]]%0aThis version includes a fix for PHP 7.3, and the documentation was updated.%0a%0a!! Version 2.2.111 {*$:Released} (2018-12-08) [[#v22111]]%0aThis version updates core .htaccess files to be compatible with both Apache 2.4 and earlier versions, and the variable $DenyHtaccessContent was added with the updated content. In case of difficulties or questions please contact us.%0a%0aA CSS value in the pmwiki-responsive skin was fixed. The [[MarkupExpression(s)]] [@{(ftime )}@] now accepts @@tz=@@ (time zone) and @@locale=@@ (language locale) arguments. The documentation was updated.%0a%0a!! Version 2.2.110 {*$:Released} (2018-11-05) [[#v22110]]%0aThis version prevents a warning with the [@{(substr )}@] markup expression when non-number arguments are typed. A new variable $PageListSortCmpFunction allows custom functions to order page lists. A new variable $MarkupMarkupLevel indicates when the processing happens inside [@(:markup:)@] blocks. %0a%0aThe default style for @@[=[@escaped code@]=]@@ dropped white spaces inconsistently and was fixed. If you rely on the previous behavior please add this to your pub/css/local.css file to revert it:%0a%0a code.escaped { white-space: nowrap; }%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.109 {*$:Released} (2018-07-09) [[#v22109]]%0aThis version fixes a bug with the Path: InterMap prefix which was broken in 2.2.108. The function pmcrypt() was updated to prevent more strings from causing "invalid hash" warnings in PHP 7. The variable $EnableMarkupDiag was added to help diagnose all markup calls. The documentation was updated.%0a%0a!! Version 2.2.108 {*$:Released} (2018-07-05) [[#v22108]]%0aThis version adds the $PCCFOverrideFunction variable allowing a custom function to override PCCF(). $AuthUserPageFmt can now be an array of page names. The page cache file name can now be customized. Form checkbox labels now have the same tooltip title as the checkbox. Ordered lists with the [@%25reversed%25@] WikiStyle will have descending numbers. Minor fixes to refcount.php, vardoc.php, and pmcrypt(). The default InterMap PmWiki URLs have now the HTTPS protocol. The documentation was updated.%0a%0a!! Version 2.2.107 {*$:Released} (2018-02-02) [[#v22107]]%0aThis version includes more fixes for PHP 7.2 for forms and pagelists. A new variable $MailFunction allows administrators and developers to write replacement functions for the PHP function "mail()". Styles were improved for right-to-left text blocks embedded into left-to-right texts (and vice versa). The documentation was updated.%0a%0a!! Version 2.2.106 {*$:Released} (2017-12-01) [[#v22106]]%0aThis version has a rewrite of the function PageListSort() to allow it to work with PHP 7.2, and fixes a bug with the backtick (escape) [@`WikiWord@] markup. The helper function pmsetcookie() and the variables $EnableCookieSecure, $EnableCookieHTTPOnly were added to allow easy setting of secure cookies. The documentation was updated.%0a%0a!! Version 2.2.105 {*$:Released} (2017-11-07) [[#v22105]]%0aThis version fixes a bug with the PQA() function causing invalid HTML with attributes glued together. The function @@HandleUpload()@@ was refactored and @@UploadSetVars($pagename)@@ was added to allow upload-managing add-ons to set variables more easily.%0a%0aIf you upgrade from 2.2.98 or earlier, and you have custom markup rules relative to author signatures, please see note about [[#v2299|change in 2.2.99]] (documented November 2017).%0a%0a!! Version 2.2.104 {*$:Released} (2017-10-11) [[#v22104]]%0aThis version fixes a bug with [[WikiTrails#pathtrail|path WikiTrails]] reported today.%0a%0a!! Version 2.2.103 {*$:Released} (2017-10-01) [[#v22103]]%0aThis version is a major upgrade on the internal processing of markups and patterns, all core scripts were updated to be compatible with PHP version 7.2. Whether you use that PHP version or another one, with any local configurations and custom add-ons, there should be no change for what you see, but if any problems please contact us immediately.%0a%0aPagelists can now have optimized @@list=grouphomes@@ and @@fmt=#grouphomes@@ arguments to list only the home pages of your wiki groups, whether they are named Group.HomePage, Group.Group, or a custom Group.$DefaultName. Minor bugs in older xlpage scripts were fixed, the responsive skin is now compatible with even older PmWiki/PHP versions, web subtitles (*.vtt) were added as an allowed extension, input form fields can now have a "title" attribute (usually rendered as a tooltip/help balloon when the mouse cursor is over the input element), and a configuration variable $AuthLDAPReferrals was added for wikis running AuthUser over LDAP to force enable or disable referrals when needed.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.102 {*$:Released} (2017-08-05) [[#v22102]]%0aThis version reverts the patterns for text variables changed in 2.2.99, because we found that a longer text variable content may cause a blank page or an internal server error. In the page [[SiteAdmin.AuthList]] an input box was added to allow filtering of the groups or pages.%0a%0a!! Version 2.2.101 {*$:Released} (2017-07-30) [[#v22101]]%0aThis version renames the internal constructor of the PageStore class to be compatible with both PHP 5 and PHP 7. Previously, the PageStore class had two constructors for PHP 4 and PHP 5 compatibility of which one was silently ignored, but recent PHP 7 versions display strict or deprecated notices when the PHP 4 constructor is used.%0a%0aIf you must use PmWiki 2.2.101 or newer on a PHP 4 installation, please contact me so I can provide you with a workaround.%0a%0a!! Version 2.2.100 {*$:Released} (2017-07-30) [[#v22100]]%0aThis version provides a workaround for an incompatibility with our Subversion version control system, where the $Author wiki variable was considered a Subversion variable. A fix for the responsive skin adds some spacing above the WikiText block. The documentation was updated.%0a%0a!! Version 2.2.99 {*$:Released} (2017-06-26) [[#v2299]]%0aThis version fixes a bug where an incomplete text variable without a closing parenthesis like "[@(:Var:Value@]" could hide the remaining of the page.%0a%0aA bug was fixed where previewing a page didn't show changes to be done by replace-on-save patterns (the function ReplaceOnSave was refactored). Markup rules for previewing author signatures are no longer needed and were removed. %25note%25 Note that if you had custom markup rules processed before or after the @@[=~~=][=~=]@@ or @@[=~~=][=~~=]@@ author signatures may need to be set to [@'%3c[[~'@] (second argument of the @@Markup@@ call).%0a%0aA bug and a warning for PHP 4 installations were fixed. Two minor bugs with the [@[[%3c%3c]]@] line break for the responsive skin and the $Version variable link in the documentation were fixed. %0a%0aThe InterMap prefix to Wikipedia was corrected to use the secure HTTPS protocol and the documentation was updated.%0a%0a!! Version 2.2.98 (2017-05-31) [[#v2298]]%0aThis version adds a new skin that is better adaptable to both large and small screens, desktop and mobile devices (touchscreens). The new skin "pmwiki-responsive" is not enabled by default but available as an option, and as a base for customized copies. It requires a relatively modern browser (post-2009). The old skin is still available and enabled by default.%0a%0aThe Vardoc links now use MakeLink() to allow a custom LinkPage function. The function ReplaceOnSave() was refactored to allow easier calling from recipes. Markup processing functions now can access besides $pagename, a $markupid variable that contains the "name" of the processed markup rule, allowing a single function to process multiple markup rules. The "*.mkv" video extension was added to the list of allowed uploads.%0a%0aA bug was fixed with the [@(:markup:)@] output where a leading space was lost. Note that the "markup" frame is now wrapped in a %3cpre> block with a "pre-wrap" style instead of %3ccode>.%0a%0aA number of other (minor) bugs were fixed: see ChangeLog, and the documentation was updated.%0a%0a!! Version 2.2.97 (2017-04-07) [[#v2297]]%0aThis version fixes a bug concerning $ScriptUrl when $EnablePathInfo is set, introduced in 2.2.96 and reported by 3 users.%0a%0a!! Version 2.2.96 (2017-04-05) [[#v2296]]%0aThis version fixes a severe PHP code injection vulnerability, reported by Gabriel Margiani. PmWiki versions 2.2.56 to 2.2.95 are concerned.%0a%0aOnly certain local customizations enable the vulnerability. Your website may be at risk if your local configuration or recipes call too early some core functions like CondAuth(), RetrievePageName() or FmtPageName(), before the $pagename variable is sanitized by ResolvePageName() in stdconfig.php. A specific URL launched by a malicious visitor may trigger the vulnerability.%0a%0aMost recipes call core functions from a $HandleActions function, or from a Markup expression rule, these do not appear to be affected by the current exploit.%0a%0aIf your wiki may be at risk, it is recommended to upgrade to version 2.2.96 or most recent at the earliest opportunity. If you cannot immediately upgrade, you should place the following line in your local (farm)config.php file:%0a%0a [@$pagename = preg_replace('![${}\'"\\\\]+!', '', $pagename);@]%0a%0aPlace this line near the top of the file but after you include scripts/xlpage-utf-8.php or other character encoding file.%0a%0aThis version filters the $pagename variable to exclude certain characters. A new variable $pagename_unfiltered is added in case a recipe requires the previous behavior. The documentation was updated.%0a%0a!! Version 2.2.95 (2017-02-28) [[#v2295]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.94 (2017-01-31) [[#v2294]]%0aThis version allows webmasters to configure and use both .html and .htm extensions. The cached information about whether a page exists or not will now be cleared when that page is created or deleted. The documentation was updated.%0a%0a!! Version 2.2.93 (2016-12-31) [[#v2293]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.92 (2016-11-30) [[#v2292]]%0aThis version allows administrators to disable the "nopass" password by setting $AllowPassword to false. The function FmtPageName() will now expand PageVariables with asterisks like [@{*$FullName}@]. The documentation was updated.%0a%0a!! Version 2.2.91 (2016-09-30) [[#v2291]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.90 (2016-08-31) [[#v2290]]%0aThis version adds a parameter to the upload form which can improve analytics from the server logs. Two new CSS classes were added to help skin developers: @@imgonly@@ and @@imgcaption@@, for standalone embedded pictures with or without a caption. A bug with the plus-links was fixed. The documentation was updated.%0a%0a!! Version 2.2.89 (2016-07-30) [[#v2289]]%0aThis version allows to set a default class name for simple tables. The [@(:searchbox:)@] directive can now have a "placeholder" attribute, and the input type can be changed from "text" to "search" for HTML5 websites. The edit form elements have now identifier attributes to allow easier styling. All core scripts will now inject CSS into the skin only if it hasn't already been defined. The vardoc.php script now recognizes and links to the documentation for the variables $pagename, $Author and $Skin. The documentation was updated.%0a%0a!! Version 2.2.88 (2016-06-29) [[#v2288]]%0aThis version fixes invalid HTML output of some WikiTrail links. The function PHSC() can now have an optional fourth argument for a safe replacement of htmlspecialchars(). A new page variable [@{$SiteAdminGroup}@] was added and the documentation was updated. %0a%0a!! Version 2.2.87 (2016-05-31) [[#v2287]]%0aThis version adds the $HTMLTagAttr variable to be used in the %3chtml> tag in skins for additional attributes like "lang" or "manifest". To enable it, use it in your skin, for example:%0a%0a %3chtml xmlns="http://www.w3.org/1999/xhtml" $HTMLTagAttr>%0a%0aThe variable $EnableRevUserAgent, if set to 1, will cause the User-Agent string from browsers to be stored with each page history entry (as opposed to only storing the last user agent string). The output variable $DiffUserAgent can be used in history templates like $DiffStartFmt.%0a%0aA wrong page variable in [[Site.UploadQuickReference]] was corrected, and the documentation was updated.%0a%0a!! Version 2.2.86 (2016-04-28) [[#v2286]]%0aThis version adds updates for PHP 7, for the PageStore() class and for the $DefaultPasswords default/unset definitions (no action should be needed upon upgrades). The documentation was updated.%0a%0a!! Version 2.2.85 (2016-03-31) [[#v2285]]%0aThis version adds Scalable Vector Graphics (*.svg, *.svgz) as allowed uploads and as embeddable picture extensions (with the html tag %3cimg/>). The documentation was updated.%0a%0a!! Version 2.2.84 (2016-02-21) [[#v2284]]%0aThis version fixes "indent" and "outdent" styles for right-to-left languages. A new variable $EnableLinkPlusTitlespaced allows "plus links" [@[[Link|+]]@] to display the "Spaced Title" of the page instead the "Title". The documentation was updated.%0a%0a!! Version 2.2.83 (2015-12-31) [[#v2283]]%0aThis is a documentation update version.%0a%0a!! Version 2.2.82 (2015-11-30) [[#v2282]]%0aThis version enables stripmagic() to process arrays recursively and updates the documentation.%0a%0a!! Version 2.2.81 (2015-10-31) [[#v2281]]%0aThis version fixes an inconsistency with single line page text variables. International wikis enabling UTF-8 will now be able to use the CSS classes "rtl" and "ltr" to override the text direction when inserting right to left languages. The documentation was updated.%0a%0a!! Version 2.2.80 (2015-09-30) [[#v2280]]%0aThis version modifies the [@(:searchbox:)@] directive to use type="search" semantic input, and updates the documentation.%0a%0a!! Version 2.2.79 (2015-08-27) [[#v2279]]%0aThis version adds WikiStyles for the CSS basic colors "fuchsia", "olive", "lime", "teal", "aqua", "orange" and "gray"/"grey". New input elements "email", "url", "number", "date", and "search" can now be used in wiki forms. %0a%0aNote: the "target" attribute of input forms which was added in the previous version broke the PmForm processor, and was removed until we find a solution. If you don't use PmForm and require this attribute (or others), the usual way to add it is to redefine the $InputAttrs array in your local configuration.%0a%0aA new variable $EnableROSEscape can be set to 1 if $ROSPatterns and $ROEPatterns should not process source text wrapped with [@[=...=]@] or @@[=[@...@]=]@@. By default "replace on edit" patterns are performed even in such text.%0a%0aThe insMarkup() function in guiedit.js was refactored to allow custom input ids and/or custom functions to process the selected text.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.78 (2015-07-21) [[#v2278]]%0aThis version updates the $RobotPattern list with currently active user agents. {-Input forms can have a "target" attribute-} (removed in 2.2.79). The documentation was updated.%0a%0aNote, this release broke the Cookbook:PmForm module. Please do upgrade to 2.2.79 or newer if your wiki uses PmForm.%0a%0a!! Version 2.2.77 (2015-06-19) [[#v2277]]%0aThis version extends the [@(:if attachments:)@] conditional to specify file and page names. A [@{$WikiTitle}@] page variable was added. A MatchNames() function was introduced as a generic way to match array values the same way MatchPageNames() does currently with lists of pages -- recipe authors can use it to get a subset of attachments for example. The PageStore() class was slightly optimized when recoding pages from-to UTF-8. The documentation was updated.%0a%0a!! Version 2.2.76 (2015-05-31) [[#v2276]]%0aThis version improves support for arrays in form elements: setting default values and recovering values from posted forms. A new "label" argument to checkbox and radio input elements allows easy insertion of clickable text labels after the form elements. Division blocks wrapping standalone images, and standalone image captions, now receive CSS classes allowing greater control via stylesheets. The documentation was updated.%0a%0a!! Version 2.2.75 (2015-04-26) [[#v2275]]%0aThis version adds a pmcrypt($pass, $salt) function which can be used as a replacement for the PHP crypt() function when encrypting passwords. From PHP 5.6 on, crypt() should not be used without a $salt parameter and would raise a notice. If pmcrypt() is called with a $salt parameter it will simply call crypt() in order to check a password. If it is called without a $salt parameter, pmcrypt() will create a password hash with the password_hash() function or with crypt() depending on your installation. You can replace any calls to crypt() with pmcrypt(), notably in config.php when defining $DefaultPasswords entries.%0a%0aMarkup was added for the semantic HTML5 tags article, section, nav, header, footer, aside, address.%0a%0aA bug with the uploads feature was fixed when $EnableReadOnly is set, and the documentation was updated.%0a%0a!! Version 2.2.74 (2015-03-28) [[#v2274]]%0aThis version allows the translation of the word "OK" in authentication forms. The documentation was updated to the latest state on pmwiki.org.%0a%0a!! Version 2.2.73 (2015-02-28) [[#v2273]]%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.72 (2015-01-27) [[#v2272]]%0aThis version improves the ?action=ruleset display for markup rules potentially incompatible with PHP 5.5 when the function debug_backtrace() is not available. It restores the ability to set a custom function handling the [=(:markup:)=] demos. A variable $AbortFunction was added allowing administrators to override the core Abort() function. The documentation was updated.%0a%0a!! Version 2.2.71 (2014-12-29) [[#v2271]]%0aThis version removes the hard word wrap in [@(:markup:)@] wikicode examples, and instead of %3cpre> tags, it wraps it in %3ccode> tags. This allows newcomers to copy and paste the code in their wikis without inserted line breaks (which often cause the markup to not work).%0a%0aThe release also adds back-tracing for markup rules potentially incompatible with PHP 5.5. Such rules, often added by recipes, can trigger "Deprecated: preg_replace()" warnings. To find out which recipes may trigger the warnings, enable diagnostic tools in config.php with @@$EnableDiag = 1;@@ then open a page with the 'ruleset' action, eg. [@[[HomePage?action=ruleset]]@]. The PHP-5.5-incompatible rules will be flagged with filenames, line numbers and patterns. See also the pages [[(PmWiki:)Troubleshooting]] and [[(PmWiki:)CustomMarkup]] on pmwiki.org.%0a%0aThe variable $DraftActionsPattern was added, the pagelist "request" parameter can now contain a list of allowed or disallowed parameters that can be overridden by the user, the "input default source" parameter can now contain multiple pages, and a minor bug was fixed in upload.php ('strict' warning). See the updated documentation for more information. %0a%0a!! Version 2.2.70 (2014-11-08) [[#v2270]]%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.69 (2014-10-13) [[#v2269]]%0aThis version fixes a bug when dates are defined as relative to other dates, eg. "2014-10-13 -3 days". The documentation was updated; note that the instructions in Site.UploadQuickReference were updated to reflect the display of the upload form in current browsers.%0a%0a!! Version 2.2.68 (2014-09-01) [[#v2268]]%0aThis version adds a Skins: InterMap prefix pointing to the Skins section on PmWiki.org, a "signature" markup in the edit quick reference, new WikiStyles clear, min-width and max-width and the documentation was updated.%0a%0a!! Version 2.2.67 (2014-08-02) [[#v2267]]%0aThis version fixes an inconsistency with input forms when values are taken from PageTextVariables. The documentation was updated to the latest state on pmwiki.org.%0a%0a!! Version 2.2.66 (2014-07-02) [[#v2266]]%0aThis version fixes a minor longstanding bug in the default Notification format when a page is deleted. In custom patterns, the "_" character will no longer be considered a function name. The documentation was updated.%0a%0a!! Version 2.2.65 (2014-06-07) [[#v2265]]%0aThis version fixes Pagelist handling of [@{$$PseudoVars}@] when they contain page variables. File permissions handling was improved when the current directory is owned by "root". The documentation was updated.%0a%0a!! Version 2.2.64 (2014-05-08) [[#v2264]]%0aThis version adds the [="{(mod)}"=] markup expression for modulo/remainder calculations, and the "tel:" and "geo:" URI schemes which, on compatible devices like smartphones, allow the creation of links to dial telephone numbers and open map/location applications. %0a%0aThe $SysMergePassthru switch was added, if enabled, it allows the "Simultaneous Edits" conflict resolution to use the passthru() function instead of popen().%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.63 (2014-04-05) [[#v2263]]%0aThis version allows for form elements to have custom attributes containing a dash in the attribute names and enables the attributes 'required', 'placeholder' and 'autocomplete' for HTML5 forms. A minor bug with pagelist [={$$RequestVariables}=] appearing on some installations was fixed. The documentation was updated.%0a%0a!! Version 2.2.62 (2014-02-28) [[#v2262]]%0aThis version adds the variable $EnableTableAutoValignTop which allows to make advanced tables compatible with HTML5. For developers, a fourth argument $template was added to the Markup_e() function, and a callback template 'return' was added. The documentation was updated.%0a%0a!! Version 2.2.61 (2014-01-31) [[#v2261]]%0aThis version removes unnecessary snippets of code and adds the variable $TableCellAlignFmt which allows to make simple tables compatible with HTML5. The documentation was updated.%0a%0a!! Version 2.2.60 (2014-01-12) [[#v2260]]%0aThis version reverts the changes to the pmwiki.css file made in 2.2.59. %0a%0a!! Version 2.2.59 (2014-01-11) [[#v2259]]%0aThis version has an improvement for Blocklist when multiple text fields are posted. A bug with some nested markup conditionals was fixed. The default skin switched font sizes from points (fixed) to percents (relative). A couple of other minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.58 (2013-12-25) [[#v2258]]%0aThis version enables customization of [=(:input auth_form:)=], and fixes a couple of minor bugs. The documentation was updated.%0a%0a!! Version 2.2.57 (2013-11-03) [[#v2257]]%0aThis version enables the use of the Attach: link format in the [[PmWiki/PageDirectives#attachlist|[=(:attachlist:)=]]] directive. The documentation was updated.%0a%0a!! Version 2.2.56 (2013-09-30) [[#v2256]]%0aThis version aims to fix a PHP 5.5 compatibility issue with a deprecated feature of the preg_replace() function. The PageStore() class now detects and works around a bug with the iconv() function, and the documentation was updated.%0a%0a!! Version 2.2.55 (2013-09-16) [[#v2255]]%0aThis version adds the variable $EnableDraftAtomicDiff. If enabled, publishing from a draft version will clear the history of intermediate draft edits, and the published version will contain a single combined diff from the previous published version. The documentation was updated.%0a%0a!! Version 2.2.54 (2013-08-13) [[#v2254]]%0aThis version fixes a bug when old versions are restored from draft pages. The documentation was updated.%0a%0a!! Version 2.2.53 (2013-07-08) [[#v2253]]%0aThis version enables a message to be shown when a post is blocked because of too many unapproved links. The documentation was updated.%0a%0a!! Version 2.2.52 (2013-06-08) [[#v2252]]%0aThis version hides warnings about a deprecated feature in PHP 5.5 installations (preg_replace with /e eval flag). Three new upload extensions were added: docx, pptx and xlsx produced by recent versions of some office suites. The documentation was updated.%0a%0a!! Version 2.2.51 (2013-05-08) [[#v2251]]%0aThis version updates the addresses for the remote blocklists. A minor XSS vulnerability for open wikis, which was discovered today, was fixed. The documentation was updated.%0a%0a!! Version 2.2.50 (2013-04-08) [[#v2250]]%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.49 (2013-03-09) [[#v2249]]%0aThis version adds an array $UploadBlacklist containing forbidden strings of an uploaded filename (case insensitive). Some Apache installations try to execute a file which has ".php", ".pl" or ".cgi" anywhere in the filename, for example, "test.php.txt" may be executed. To disallow such files to be uploaded via the PmWiki interface, add to config.php such a line:%0a%0a $UploadBlacklist = array('.php', '.pl', '.cgi', '.py', '.shtm', '.phtm', '.pcgi', '.asp', '.jsp', '.sh');%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.48 (2013-02-11) [[#v2248]]%0aThis version fixes a bug introduced yesterday with some links. %0a%0a!! Version 2.2.47 (2013-02-10) [[#v2247]]%0aThis version enables tooltip titles in links to anchors in the same page, and the documentation was updated.%0a%0a!! Version 2.2.46 (2013-01-07) [[#v2246]]%0aThis version adds $UploadPermAdd and $UploadPermSet variables, and the documentation was updated.%0a%0aIf your wiki has uploads enabled, it is recommended to set the variable $UploadPermAdd to 0. %0a%0aThe $UploadPermAdd variable sets additional unix permissions applied to newly uploaded files, and should be 0 (recommended as of 2013). If uploaded files cannot be downloaded and displayed on the website, for example with the error 403 Forbidden, set this value to 0444 (core setting, default since 2004). %0a $UploadPermAdd = 0; # recommended%0a%0aThe $UploadPermSet variable unconditionally sets the file permissions on newly uploaded files. Only advanced administrators should use it.%0a%0a%0a!! Version 2.2.45 (2012-12-02) [[#v2245]]%0aThis version fixes some PHP notices appearing on some installations. The documentation was updated.%0a%0a!! Version 2.2.44 (2012-10-21) [[#v2244]]%0aThis version improves the display of consecutive whitespaces in page histories, and fixes the definition of PageTextVariables containing a dash. The documentation was updated.%0a%0a%0a!! Version 2.2.43 (2012-09-20) [[#v2243]]%0aThis version makes it possible to use HTML attribute names that contain dashes, and removes a warning when editing and previewing Site.EditForm. The documentation was updated.%0a%0a!! Version 2.2.42 (2012-08-20) [[#v2242]]%0aThis version provides a workaround for cases when a wiki page contains a character nonexistent in the active encoding. The documentation was updated.%0a%0a!! Version 2.2.41 (2012-08-12) [[#v2241]]%0aThis version changes the internal $KeepToken separator to be compatible with more encodings. The documentation was updated.%0a%0a!! Version 2.2.40 (2012-07-21) [[#v2240]]%0aThis version provides a helper function replacing htmlspecialchars() and compatible with PHP 5.4. The documentation was updated.%0a%0a!! Version 2.2.39 (2012-06-25) [[#v2239]]%0aThis version provides a fix for links to attachments containing international characters. The documentation was updated.%0a%0a!! Version 2.2.38 (2012-05-21) [[#v2238]]%0aThis version fixes a "parameter count" warning which appeared on some websites.%0a%0a!! Version 2.2.37 (2012-05-01) [[#v2237]]%0aThis version provides a workaround for installations with broken iconv() function, while optimizing the recode function. This should fix the "Unable to retrieve edit form" problem in some wikis. Dots in [[#anchor_1.2]] sections are now better supported, PageVariables are expanded in PageList template defaults, and the documentation is updated.%0a%0a!! Version 2.2.36 (2011-12-28) [[#v2236]]%0aThis version fixes the recode function to try to recover Windows-1252 characters in ISO-8859-1 files. A new variable $EnableOldCharset enables the $page["=oldcharset"] entry which will be used in the future. A couple of minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.35 (2011-11-11) [[#v2235]]%0aThis release fixes a critical PHP injection vulnerability, reported today by Egidio Romano. PmWiki versions 2.2.X, 2.1.X, 2.0.X and 2.0.beta33 and newer are vulnerable. When you upgrade, please read carefully the Release notes for all PmWiki versions since yours.%0a%0aIf you cannot upgrade, it is recommended to disable Searches at the earliest opportunity (even if your wiki skin doesn't have a search form). Add to config.php such a line:%0a if ($action == 'search') $action = 'browse';%0a%0aIf your old version wiki allows editing by not entirely trusted visitors, even on limited pages like a WikiSandbox, you should also disable PageLists. Add to config.php this line:%0a $EnablePageList = 0;%0a%0aThis version has an important change for international wikis: the XLPage() function no longer loads encoding scripts such as xlpage-utf-8.php. When you upgrade, you need to include those scripts from config.php, before calling XLPage():%0a%0a include_once("scripts/xlpage-utf-8.php"); # if your wiki uses UTF-8%0a XLPage('bg','PmWikiBg.XLPage');%0a%0aAll links can now have tooltip titles. Previously, only images and external links could have tooltip titles, now this feature is enabled for internal links. To set a tooltip title, add it in quotes after the link address:%0a[@%0a [[Main.HomePage"This is a tooltip title"]]%0a [[Main.HomePage"This is a tooltip title"|Home]]%0a [[http://www.pmwiki.org"Home of PmWiki"]]%0a Attach:image.jpg"Tooltip title of the image"%0a@]%0a%0aThe following new upload extensions were added: svg, xcf, ogg, flac, ogv, mp4, webm, odg, epub. A couple of minor optimizations were added (MarkupExpressions and rendering of page history) and the documentation was updated.%0a%0a!! Version 2.2.34 (2011-10-10) [[#v2234]]%0aThis version resets the timestamps of the default pages Site(Admin).AuthUser which are expected in case of upgrades from the versions 2.1.*. Core MarkupExpressions which manipulate strings should now work better with international characters. The documentation was updated to its latest state from pmwiki.org.%0a%0a!! Version 2.2.33 (2011-09-23) [[#v2233]]%0aThis version fixes a security bug introduced in 2.2.32 which left the groups Site and SiteAdmin open for reading and editing because the pages Site.GroupAttributes and SiteAdmin.GroupAttributes didn't have all necessary attributes. %0a%0aAll wikis running 2.2.32 should upgrade. If you cannot immediately upgrade, you can set the attributes from your wiki:%0a* open the attributes page [=[[SiteAdmin.GroupAttributes?action=attr]]=] and set a "read" and an "edit" password, @@ @lock @@ is recommended.%0a* open the attributes page [=[[Site.GroupAttributes?action=attr]]=] and set an "edit" password, @@ @lock @@ is recommended. Do not set a "read" password here.%0a%0aThe release also fixes the refcount.php script to produce valid HTML, and updates intermap.txt entries PITS: and Wikipedia: to point to their current locations.%0a%0a!! Version 2.2.32 (2011-09-18) [[#v2232]]%0aThis is the first version shipping with the core documentation in the UTF-8 encoding. PmWiki will automatically convert it on the fly for wikis using an older encoding.%0a%0aIt is recommended that all '''new''' PmWiki installations enable UTF-8. Migration of ''existing'' wikis from an older encoding to UTF-8 shouldn't be rushed: it is not trivial and will be documented in the future.%0a%0aA required HTML xmlns attribute was added to the print skin template. The history rendering is now faster when many lines are added or removed.%0a%0a%25note%25 Note: Due to a manipulation error, a version 2.2.31 was created before it was ready for a release.%0a%0a!! Version 2.2.30 (2011-08-13) [[#v2230]]%0aThis version fixes a $Charset definition in international iso-8859-*.php files. This will help for a future transition to UTF-8. %0a%0aA variable $EnableRangeMatchUTF8 was added, set it to 1 to enable range matches of pagenames in UTF-8 like [A-D]. Previously the range matches were always enabled in UTF-8, but we found out that on some installations this feature breaks all pagelists, even those without range matches. In case the feature worked for you, you can re-enable it.%0a%0a!! Version 2.2.29 (2011-07-24) [[#v2229]]%0aThis release fixes Attach links that were broken with the Path fix in 2.2.28 earlier today.%0a%0a!! Version 2.2.28 (2011-07-24) [[#v2228]]%0aThis release fixes 2 potential XSS vulnerabilities and a bug with Path: links.%0a%0a!! Version 2.2.27 (2011-06-19) [[#v2227]]%0aThis release fixes a validation bug on pages after a redirection. A new block WikiStyle [@%25justify%25@] was added, allowing left and right aligned text. The page history now accepts a URL parameter @@?nodiff=1@@ which hides the rendering of edit differences, showing only timestamps, authors, summaries and "Restore" links; it allows to restore a vandalized page with a huge contents or history which otherwise would break the memory or time limits of the server.%0a%0a!! Version 2.2.26 (2011-05-21) [[#v2226]]%0aThis release fixes a redundant removal of link hashes from WikiTrails, and updates the documentation to the most recent version from PmWiki.org.%0a%0a!! Version 2.2.25 (2011-03-22) [[#v2225]]%0aThis release only updates the documentation to the latest state on pmwiki.org.%0a%0a!! Version 2.2.24 (2011-02-15) [[#v2224]]%0aThis version reverts the way existing PageVariables are processed, like version 2.2.21 or earlier, but it adds a special variable $authpage which can be used in PageVar definitions. It is the same as the $page array, but exists only if the visitor has read permissions. For example, an administrator can set to config.php:%0a%0a $FmtPV['$LastModifiedSummary'] = '@$authpage["csum"]'; # instead of '@$page["csum"]'%0a%0aThen, the edit summary metadata will only be available if the user has read permissions.%0a%0a!! Version 2.2.23 (2011-01-25) [[#v2223]]%0aThis version sets the default value of $EnablePageVarAuth to 0 until we investigate a reported problem with authentication.%0a%0a!! Version 2.2.22 (2011-01-16) [[#v2222]]%0aThis version adds the variable $EnableXLPageScriptLoad which, if set to 0, will prevent authors to load scripts from XLPage and to accidentally change the encoding of the wiki. If you use it, make sure you include the required files, eg. xlpage-utf-8.php from local config files.%0a%0aPageVariables should now respect authentications: without read permissions, the title, description, change summary, author of a protected page are unavailable. PageVariables that are computed without reading the page are still available (eg. $Group, $Namespaced, $Version etc.). Administrators can revert the previous behavior by adding to config.php such a line:%0a%0a@@ $EnablePageVarAuth = 0; @@%0a%0a!! Version 2.2.21 (2010-12-14) [[#v2221]]%0aDue to a mis-configuration of a local svn repository, some of the changes intended for 2.2.20 didn't make it in the correct branch. This release corrects this.%0a%0a!! Version 2.2.20 (2010-12-14) [[#v2220]]%0aThis version fixes a potential XSS vulnerability, reported today. An AuthUser bug with excluding users from authgroups was fixed. A new InterMap prefix PmL10n: was added, it leads to the Localization section on PmWiki.org and should help the work of translators. A couple of other minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.19 (2010-11-10) [[#v2219]]%0aThis is a documentation-update release.%0a%0a!! Version 2.2.18 (2010-09-04) [[#v2218]]%0aThis version fixes 3 minor bugs, and updates the documentation.%0a%0a!! Version 2.2.17 (2010-06-20) [[#v2217]]%0aThis version adds a variable $PostConfig containing functions and scripts to be loaded after stdconfig.php. Tabindex was added as a valid form field attribute. Protected downloads now respect existing browser caches. AuthUser now allows more flexible cookbook recipe integration. A couple of bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.16 (2010-05-10) [[#v2216]]%0aThis version fixes a bug with parsing html attributes which could allow XSS injection. Wikis allowing unprotected editing are encouraged to upgrade.%0a%0aA bug with the "center" button of the GUI edit toolbar was corrected.%0a%0aThe "exists" conditional now accepts wildcards, for example:%0a [@(:if exists Main.*:)There are pages in the Main group (:if:)@]%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.15 (2010-03-27) [[#v2215]]%0aThis version adds some minor bugfixes and optimizations notably a bug with @@[=(:template none:)=]@@ introduced in the last version 2.2.14.%0a%0a!! Version 2.2.14 (2010-02-27) [[#v2214]]%0aThis release corrects inline styles for WikiTrail links. Undefined include/template @@ [={$$variables}=] @@ are now removed from the included section, like Page(Text)Variables, and can be used in conditional expressions. If needed, this change can be reverted by adding to config.php such a line:%0a%0a[@%0a $EnableUndefinedTemplateVars = 1; # keep and display unset {$$variables}%0a@]%0a%0aPageList templates now accept the sections @@ !first @@ and @@ !last @@ for markup to appear for every page in list ''except'' the first or last one.%0a%0a"Title" attributes were added to external links. You can have tooltip titles on external links, including InterMap and attachments, by adding the link title in double quotes after the URL:%0a [=[[http://www.pmwiki.org"Home of PmWiki"| External link]]=]%0a%0aFor international wikis, PmWiki now automatically translates the titles of technical pages like GroupAttributes or RecentChanges -- just define these strings as usual in XLPage, for example, in French:%0a 'AllRecentChanges' => 'Tous les changements récents',%0a%0aSome minor optimizations were done and the documentation was updated.%0a%0a!! Version 2.2.13 (2010-02-21) [[#v2213]]%0aThis release fixes a bug with $DiffKeepNum introduced in 2.2.10 -- the count of revisions was incorrect and a page could drop more revisions than it should.%0a%0aThe [[page history]] layout was modified with a rough consensus in the community. The history now defaults to "source" view with word-level highlighting of the differences. Authors can see the changes in rendered output by clicking on the link "Show changes to output". Admins can switch back the default by adding such a line to config.php:%0a%0a $DiffShow['source'] = (@$_REQUEST['source']=='y')?'y':'n';%0a%0aTo disable word-level highlighting and show plain text changes:%0a%0a $EnableDiffInline = 0;%0a%0aIn the page history rendering, a few minor bugs were fixed and the code was slightly optimized.%0a%0aThe documentation was updated.%0a%0a!! Version 2.2.12 (2010-02-17) [[#v2212]]%0aThis release adds simple word-level highlighting of differences in the page history, when "Show changes to markup" is selected. To enable the feature, add to config.php such a line:%0a $EnableDiffInline = 1;%0a%0aThis feature is like what the InlineDiff recipe provides, but not exactly the same, and the implementation is simpler. It is enabled on PmWiki.org and can be improved -- your comments are welcome.%0a%0a!! Version 2.2.11 (2010-02-14) [[#v2211]]%0aThis release adds two new table directives for header cells, [=(:head:) and (:headnr:)=]. They work the same way as [=(:cell:) and (:cellnr:)=] except that create %3cth> instead of %3ctd> html tags.%0a%0aThe pagerev.php script was refactored into separate functions to allow easier integration of recipes displaying the page history.%0a%0aA couple of minor bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.9, 2.2.10 (2010-01-17) [[#v2210]]%0aMost important in this release is the official change of $EnableRelativePageVars to 1. The change is about how [={$Variable}=] in included pages is understood by PmWiki.%0a* When $EnableRelativePageVars is set to 0, [={$Name}=] displays the name of the currently browsed page. Even if [={$Name}=] is in an included page, it will display the name of the browsed page.%0a* When $EnableRelativePageVars is set to 1, [={$Name}=] displays the name of the physical page where it written. If [={$Name}=] is in an included page, it will display the name of the included page.%0a* [={*$Name}=] always displays the name of the currently browsed page, regardless of $EnableRelativePageVars.%0a%0aSo, if your wiki relies on page variables from included pages, and doesn't have $EnableRelativePageVars set to 1, after upgrading to 2.2.9, you can revert to the previous behavior by adding to config.php such a line:%0a $EnableRelativePageVars = 0;%0a%0aMore information about page variables can be found at:%0a http://www.pmwiki.org/wiki/PmWiki/PageVariables%0a%0aThis release adds a new variable $EnablePageTitlePriority which defines how to treat multiple [=(:title..:)=] directives. If set to 1, the first title directive will be used, and if a page defines a title, directives from included pages cannot override it. PmWiki default is 0, for years, the last title directive was used (it could come from an included page or GroupFooter).%0a%0aThis release also adds a new variable $DiffKeepNum, specifying the minimum number (default 20) of edits that will be kept even if some of them are older than the limit of $DiffKeepDays.%0a%0aA number of bugs were fixed and the documentation was updated.%0a%0a!! Version 2.2.8 (2009-12-07) [[#v228]]%0aThis release fixes another PHP 5.3 compatibility issue with conditional markup. The Author field now handles apostrophes correctly. The documentation was updated.%0a%0a!! Version 2.2.7 (2009-11-08) [[#v227]]%0aThis release fixes most PHP 5.3 compatibility issues. Unfortunately some specific builds for Windows may still have problems, which are unrelated to PmWiki. Notably, on Windows, all passwords need to be 4 characters or longer.%0a%0aUpload names with spaces are now correctly quoted. The documentation was updated.%0a%0a!! Version 2.2.6 (2009-10-04) [[#v226]]%0aWith this release it is now possible to display recently uploaded files to the RecentChanges pages -- if you have been using the RecentUploadsLog recipe, please uninstall it and follow the instructions at http://www.pmwiki.org/wiki/Cookbook/RecentUploadsLog.%0a%0aThe release also introduces $MakeUploadNamePatterns to allow custom filename normalization for attachements. It is now possible to replace $PageListFilters and $FPLTemplateFunctions with custom functions. Notify should now work in safe_mode. Some bugs were fixed, among which one with conditional markup with dates. The documentation was updated.%0a%0a!! Version 2.2.5 (2009-08-25) [[#v225]]%0aThis release adds a new markup for Pagelist templates, [@(:template none:)@] which allows a message to be set when the search found no pages. The FPLTemplate() function was broken into configurable sub-parts to allow development hooks. A number of bugs were fixed, and the documentation was updated.%0a%0a!! Version 2.2.4 (2009-07-16) [[#v224]]%0aThis release fixes a bug introduced earlier today with HTML entities in XLPages.%0a%0a!! Version 2.2.3 (2009-07-16) [[#v223]]%0aThis release fixes six potential XSS vulnerabilities, reported by Michael Engelke. The vulnerabilities may affect wikis open for editing and may allow the injection of external JavaScripts in their pages. Public open wikis should upgrade.%0a%0aA new variable $EnableUploadGroupAuth was added; if set to 1, it allows password-protected [[uploads]] to be checked against the Group password. %0a%0aIt is now possible to use @@ @_site_edit, @_site_read, @_site_admin@@ or @@ @_site_upload @@ global [[passwords]] in GroupAttributes pages.%0a%0aA number of other small bugs were fixed, and the documentation was updated.%0a%0a!! Version 2.2.2 (2009-06-21) [[#v222]]%0aThe major news in this release is a fix of an AuthUser vulnerability.%0a%0aThe vulnerability affects only wikis that (1) rely on the AuthUser core module %0afor User:Password authentication, -AND- (2) where the PHP installation runs %0awith the variable "magic_quotes_gpc" disabled.%0a%0aAll PmWiki 2.1.x versions from pmwiki-2.1.beta6 on, all 2.2.betaX, 2.2.0, and %0a2.2.1 are affected.%0a%0aThe PmWiki [[SiteAnalyzer]] can detect if your wiki needs to upgrade:%0a http://www.pmwiki.org/wiki/PmWiki/SiteAnalyzer%0a%0aIf your wiki is vulnerable, you should do one of the following at the earliest %0aopportunity:%0a%0a* Upgrade to a version of PmWiki at least 2.2.2 or greater.%0a* Turn on magic_quotes_gpc in the php.ini file or in a .htaccess file.%0a%0aAlternatively, you can temporarily disable AuthUser until you upgrade.%0a%0aNote that even if your wiki does not have the AuthUser vulnerability at the %0amoment, you are strongly encouraged to upgrade to PmWiki version 2.2.2 or %0alater, as some future configuration of your hosting server might put you at %0arisk.%0a%0aThis release also comes with minor updates in the local documentation; fixes %0awere applied for international wikis - notably global variables in %0axlpage-utf-8.php and a new variable $EnableNotifySubjectEncode, which allows %0ae-mail clients to correctly display the Subject header; and a number of other %0asmall bugs were fixed.%0a%0a!! Version 2.2.1 (2009-03-28) [[#v221]]%0aThis release comes with an updated local documentation; [[wiki trails]] now work cross-group; guiedit.php now produces valid HTML, and other small bugs were fixed. We also added $EnableRedirectQuiet, which allows redirects to take place without any mention of "redirected from page ....".%0a%0a!! Version 2.2.0 (2009-01-18) [[#v220]]%0a%0aThis is a summary of changes from 2.1.x to 2.2.0.%0a%0a* Several pages that were formerly in the [[Site]].* group are now in a separate [[SiteAdmin]].* group, which is read-restricted by default. The affected pages include Site.AuthUser, Site.AuthList, Site.NotifyList, Site.Blocklist, and Site.ApprovedUrls . If upgrading from an earlier version of PmWiki, PmWiki will prompt to automatically copy these pages to their new location if needed. If a site wishes to continue using the old Site.* group for these pages, simply set%0a%0a-> $SiteAdminGroup = $SiteGroup;%0a%0a-> when carrying out this upgrade inspect your config files for lines such as%0a--> $BlocklistDownload['Site.Blocklist-PmWiki'] = array('format' => 'pmwiki');%0a->as you may wish to fix then, eg%0a--> $BlocklistDownload[$SiteAdminGroup . '.Blocklist-PmWiki'] = array('format' => 'pmwiki');%0a%0a* Important Change in Passwords in PmWiki 2.2 indicating that the group can be edited even if a site password is set will be done by @@"@nopass"@@ prior it was done by @@"nopass"@@%0a-> When migrating a wiki you will have to manually modify the permission or by a script replace in all the page concerned @@passwdread=nopass:@@ by @@passwdread=@nopass@@ (see PITS:00961) --isidor%0a%0a* PmWiki now ships with WikiWords entirely disabled by default. To re-enable them, set either $LinkWikiWords or $EnableWikiWords to 1. To get the 2.1 behavior where WikiWords are spaced and parsed but don't form links, use the following:%0a-> $EnableWikiWords = 1;%0a-> $LinkWikiWords = 0;%0a%0a* It's now easy to disable the rule that causes lines with leading spaces to be treated as preformatted text -- simply set $EnableWSPre=0; to disable this rule.%0a%0a--> '''Important:''' There is ongoing discussion that the leading whitespace rule may be disabled ''by default'' in a future versions of PmWiki. If you want to make sure that the rule will continue to work in future upgrades, set $EnableWSPre=1; in ''local/config.php''.%0a%0a* The $ROSPatterns variable has changed somewhat -- replacement strings are no longer automatically passed through FmtPageName() prior to substitution (i.e., it must now be done explicitly).%0a%0a* Page variables and page links inside of [@(:include:)@] pages are now treated as relative to the included page, instead of the currently browsed page. In short, the idea is that links and page variables should be evaluated with respect to the page in which they are written, as opposed to the page in which they appear. This seems to be more in line with what authors expect. There are a number of important ramifications of this change:%0a%0a[[#relativeurls]]%0a** We now have a new [@{*$var}@] form of page variable, which always refers to "the currently displayed page". Pages such as Site.PageActions and Site.EditForm that are designed to work on "the currently browsed page" should generally switch to using [@{*$FullName}@] instead of [@{$FullName}@].%0a%0a** The $EnableRelativePageLinks and $EnableRelativePageVars settings control the treatment of links and page variables in included pages. However, to minimize disruption to existing sites, $EnableRelativePageVars defaults to '''disabled'''. This will give existing sites an opportunity to convert any absolute [@{$var}@] references to be [@{*$var}@] instead.%0a%0a** Eventually $EnableRelativePageVars will be enabled by default, so we highly recommend setting [@$EnableRelativePageVars = 1;@] in ''local/config.php'' to see how a site will react to the new interpretation. Administrators should especially check any customized versions of the following:%0a---> [[Site.PageActions]]%0a---> [[Site.EditForm]]%0a---> [[Site.PageNotFound]]%0a---> SideBar pages with ?action= links for the current page%0a---> $GroupHeaderFmt, $GroupFooterFmt%0a---> [[Page lists]] that refer to the current group or page, etc in sidebars, headers, and footers%0a%0a** The [@(:include:)@] directive now has a [@basepage=@] option whereby an author can explicitly specify the page upon which relative links and page variables should be based. If no basepage= option is specified, the included page is assumed to be the base.%0a%0a* Sites that want to retain the pre-2.2 behavior of [@(:include:)@] and other items can set [@$Transition['version'] = 2001900;@] to automatically retain the 2.1.x defaults.%0a%0a* Text inserted via [@(:include:)@] can contain "immediate substitutions" of the form [@{$$option}@] -- these are substituted with the value of any options provided to the include directive.%0a%0a* PmWiki now recognizes when it is being accessed via "https:" and switches its internal links appropriately. This can be overridden by explicitly setting $ScriptUrl and $PubDirUrl.%0a%0a* A new $EnableLinkPageRelative option allows PmWiki to generate relative urls for page links instead of absolute urls.%0a%0a* Draft handling capabilities have been greatly improved. When $EnableDrafts is set, then the "Save" button is relabeled to "Publish" and a "Save draft" button appears. In addition, an $EnablePublishAttr configuration variable adds a new "publish" authorization level to distinguish editing from publishing. See [[PmWiki:Drafts]] for more details.%0a%0a[[#ptvstart]]%0a* There is a new [@{$:var}@] "page text variable" available that is able to grab text excerpts out of markup content. For example, [@{SomePage$:Xyz}@] will be replaced by a definition of "Xyz" in SomePage. Page text variables can be defined using definition markup, a line beginning with the variable name and a colon, or a special directive form (that doesn't display anything on output):%0a%0a-->[@%0a:Xyz: some value # definition list form%0aXyz: some value # colon form%0a(:Xyz: some value:) # directive form%0a@]%0a[[#ptvend]]%0a%0a* The [@(:pagelist:)@] command can now filter pages based on the contents of page variables and/or page text variables. For example, the following directive displays only those pages that have an "Xyz" page text variable with "some value":%0a%0a-->[@(:pagelist $:Xyz="some value":)@]%0a%0a Wildcards also work here, thus the following pagelist command lists pages where the page's title starts with the letter "a":%0a%0a-->[@(:pagelist $Title=A* :)@]%0a%0a* The if= option to [@(:pagelist)@] can be used to filter pages based on conditional markup:%0a%0a-->[@(:pagelist if="auth upload {=$FullName}":)@] pages with upload permission%0a-->[@(:pagelist if="date today.. {=$Name}":)@] pages with names that are dates later than today%0a%0a* Spaces no longer separate wildcard patterns -- use commas. (Most people have been doing this already.)%0a%0a* Because page variables are now "relative", the [@{$PageCount}, {$GroupCount}, {$GroupPageCount}@] variables used in pagelist templates are now [@{$$PageCount}, {$$GroupCount}, {$$GroupPageCount}@].%0a%0a* One can now use [@{$$option}@] in a pagelist template to obtain the value of any 'option=' provided to the [@(:pagelist:)@] command.%0a%0a* The [@(:pagelist:)@] directive no longer accepts parameters from urls or forms by default. In order to have it accept such parameters (which was the default in 2.1 and earlier), add a [@request=1@] option to the [@(:pagelist:)@] directive.%0a%0a* The [@count=@] option to pagelists now accepts negative values to count from the end of the list. Thus [@count=5@] returns the the first five pages in the list, and [@count=-5@] returns the last five pages in the list. In addition, ranges of pages may be specified, as in [@count=10..19@] or [@count=-10..-5@].%0a%0a* Pagelist templates may have special [@(:template first ...:)@] and [@(:template last ...:)@] sections to specify output for the first or last page in the list or a group. There's also a [@(:template defaults ...:)@] to allow a template to specify default options.%0a%0a* PmWiki comes with an ability to cache the results of certain [@(:pagelist:)@] directives, to speed up processing on subsequent visits to the page. To enable this feature, set $PageListCacheDir to the name of a writable directory (e.g., ''work.d/'').%0a%0a* [[#elseifelse]]The [@(:if ...:)@] conditional markup now also understands [@(:elseif ...:)@] and [@(:else:)@]. In addition, markup can nest conditionals by placing digits after if/elseif/else, as in [@(:if1 ...)@], [@(:elseif1 ...:)@], [@(:else1:)@], etc.%0a%0a* The [@(:if date ...:)@] conditional markup can now perform date comparisons for dates other than the current date and time.%0a%0a* [[WikiTrails]] can now specify #anchor identifiers to use only sections of pages as a trail.%0a%0a* A new [@(:if ontrail ...:)@] condition allows testing if a page is listed on a trail.%0a%0a* The extensions .odt, .ods, and .odp (from OpenOffice.org) are now recognized as valid attachment types by default.%0a%0a* A new [[blocklist]] capability has been added to the core distribution. It allows blocking of posts based on IP address, phrase, or regular expression, and can also make use of publicly available standard blocklists. See [[PmWiki.Blocklist]] for details.%0a%0a* There is a new [[SiteAdmin.AuthList]] page that can display a summary of all password and permissions settings for pages on a site. This page is restricted to administrators by default.%0a%0a* There are new [@{$PasswdRead}@], [@{$PasswdEdit}@], etc. variables that display the current password settings for a page (assuming the browser has attr permissions or whatever permissions are set in $PasswdVarAuth).%0a%0a* Forms creation via the [@(:input:)@] markup has been internally refactored somewhat (and may still undergo some changes prior to 2.2.0 release). The new [@(:input select ...:)@] markup can be used to create select boxes, and [@(:input default ...:)@] can be used to set default control values, including for radio buttons and checkboxes.%0a%0a* The [@(:input textarea:)@] markup now can take values from other sources, including page text variables from other pages.%0a%0a* Specifying [@focus=1@] on an [@(:input:)@] control causes that control to receive the input focus when a page is loaded. If a page has multiple controls requesting the focus, then the first control with the lowest value of [@focus=@] "wins".%0a%0a* PmWiki now provides a ''scripts/creole.php'' module to enable Creole standard markup. To enable this, add [@include_once('scripts/creole.php')@] to a local customization file.%0a%0a* PmWiki adds a new [@{(...)}@] ''markup expression'' capability, which allows various simple string and data processing (e.g., formatting of dates and times). This is extensible so that recipe authors and system administrators can easily add custom expression operators.%0a%0a* It's now possible to configure PmWiki to automatically create Category pages whenever a page is saved with category links and the corresponding category doesn't already exist. Pages are created only if the author has appropriate write permissions into the group. To enable this behavior, add the following to ''local/config.php'':%0a%0a-->[@$AutoCreate['/^Category\\./'] = array('ctime' => $Now);@]%0a%0a* Sites with wikiwords enabled can now set $WikiWordCount['WikiWord'] to -1 to indicate that 'WikiWord' should not be spaced according to $SpaceWikiWords.%0a%0a* WikiWords that follow # or & are no longer treated as WikiWords.%0a%0a* Links to non-existent group home pages (e.g., [@[[Group.]]@] and [@[[Group/]]@]) will now go to the first valid entry of $PagePathFmt, instead of being hardcoded to "Group.Group". For example, to set PmWiki to default group home pages to [@$DefaultName@], use%0a%0a-->[@$PagePathFmt = array('{$Group}.$1', '$1.{$DefaultName}', '$1.$1');@]%0a%0a* PmWiki now provides a $CurrentTimeISO and $TimeISOFmt variables, for specifying dates in ISO format.%0a%0a* [[(Cookbook:)Cookbook]] authors can use the internal PmWiki function UpdatePage (temporarily documented at [[(Cookbook:)DebuggingForCookbookAuthors]]) to change page text while preserving history/diff information, updating page revision numbers, updating RecentChanges pages, sending email notifications, etc.%0a%0a* [[Skin templates]] are now required to have %3c!--HTMLHeader--> and %3c!--HTMLFooter--> directives. Setting $EnableSkinDiag causes PmWiki to return an error if this isn't the case for a loaded skin. Skins that explicitly do not want HTMLHeader or HTMLFooter sections can use %3c!--NoHTMLHeader--> and %3c!--NoHTMLFooter--> to suppress the warning.%0a%0a* Added a new "pre" wikistyle for preformatted text blocks.%0a%0a* The xlpage-utf-8.php script now understands how to space UTF-8 wikiwords. %0a%0a* Searches on utf-8 site are now case-insensitive for utf-8 characters.%0a%0a* Many Abort() calls now provide a link to pages on pmwiki.org that can explain the problem in more detail and provide troubleshooting assistance.%0a%0a* PmWiki no longer reports "?cannot acquire lockfile" if the visitor is simply browsing pages or performing other read-only actions.%0a%0a* The $EnableReadOnly configuration variable can be set to signal PmWiki that it is to run in "read-only" mode (e.g., for distribution on read-only media). Attempts to perform actions that write to the disk are either ignored or raise an error via Abort().%0a%0a* Including authuser.php no longer automatically calls ResolvePageName().%0a%0a* Authentication using Active Directory is now simplified. In Site.AuthUser or the $AuthUser variable, set "ldap://name.of.ad.server/" with no additional path information (see PmWiki.AuthUser for more details).%0a%0a* Pages are now saved with a "charset=" attribute to identify the character set in effect when the page was saved.%0a%0a* The phpdiff.php algorithm has been optimized to be smarter about finding smaller diffs.%0a%0a* Removed the (deprecated) "#wikileft h1" and "#wikileft h5" styles from the pmwiki default skin.%0a%0a* The mailposts.php and compat1x.php scripts have been removed from the distribution.%0a%0a----%0aBugs and other requests can be reported to the PmWiki Issue Tracking %0aSystem at http://www.pmwiki.org/wiki/PITS/PITS. Any help%0ain testing, development, and/or documentation is greatly appreciated.%0a%0a[[(PmWiki:)Release Notes archive]] - notes for versions older than 2.2.0.%0a +time=1723042397 title=Release Notes diff --git a/wikilib.d/PmWiki.UTF-8 b/wikilib.d/PmWiki.UTF-8 index 98997757..ec1fc154 100644 --- a/wikilib.d/PmWiki.UTF-8 +++ b/wikilib.d/PmWiki.UTF-8 @@ -1,9 +1,9 @@ -version=pmwiki-2.3.18 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=pmhlt (+7) +csum=Cookbook:MigrateUTF8 (+168) name=PmWiki.UTF-8 -rev=46 -targets=PmWiki.Internationalizations,PmWiki.Upgrades,PmWiki.I18nVariables,Skins.Amber,PmWiki.UploadVariables,Cookbook.ISO8859MakePageNamePatterns,PmWiki.LocalCustomizations,Cookbook.UTF-8 -text=(:Summary: Enabling UTF-8 Unicode language encoding in your wiki.:)%0a%0a[[Wikipedia:UTF-8|UTF-8]] supports all languages and alphabets, including Asian languages and their character depth. It is a widely supported and flexible character encoding. %0a%0aIt's fairly simple to enable UTF-8 on your wiki pages. Current PmWiki versions have the UTF-8 file which is enabled by default in the @@sample-config.php@@.%0a%0a!! Enabling UTF-8 on a new wiki%0a%0aIf you start a new wiki in any language with the latest PmWiki version, it is highly recommended to enable UTF-8. In the future, PmWiki will change to use the UTF-8 encoding by default, so if you already use it, you will not need a complex "migration" to UTF-8 later.%0a%0aTo enable UTF-8 for a new wiki, add this line near the beginning of @@config.php@@ (the @@docs/sample-config.php@@ file has this line already):%0a%0a%25hlt php%25[@%0a include_once("scripts/xlpage-utf-8.php");%0a@]%0a%0aThis line should come ''before'' a call to the %25hlt php%25@@XLPage()@@ function in [[internationalizations|international wikis]].%0a%0aSave your @@config.php@@ file encoded as UTF-8 (NO BOM). That allows entry of UTF-8 encoded characters in it. Make sure your editor does support this, and test by adding some non-ANSI UTF-8 characters, to see them in the text editor '^[[#notes|1]]^'.%0a%0aWith UTF-8 thus enabled you also got use of classes ''rtl'' and ''ltr'', which offer setting of the text direction to right-to-left, or left-to-right. This is useful for inclusion of right-to-left scripts like Arabic, Farsi (Persian), Hebrew, Urdu and others. %0a%0a!! Enabling UTF-8 on existing wikis%0a%0aCurrently, this is possible ''only if your group and page ''names'', as well as upload names, don't contain international characters''. The names of wiki pages are used as file names, and we don't have yet an easy way to rename the disk files.%0a%0aIf your wiki doesn't have international page/file names, first [[upgrade(s)]] to the latest PmWiki version. %0a%0aTo enable UTF-8:%0a# Delete the file @@ wiki.d/.pageindex@@. This file contains a cache of links and words from your pages and is used for searches and pagelists. PmWiki will rebuild it automatically with the new encoding.%0a# Add these lines near the beginning of @@config.php@@:%0a%0a%25hlt php%25[@%0a include_once("scripts/xlpage-utf-8.php");%0a $DefaultPageCharset = array(''=>'ISO-8859-1'); # see below%0a@]%0a%0aThese lines should come ''before'' a call to the %25hlt php%25@@XLPage()@@ function in [[internationalizations|international wikis]].%0a%0aThe $DefaultPageCharset line is there to fix and correctly handle some pages with missing or wrong attributes, created by older PmWiki versions.%0a%0a* Most wikis in European languages are likely to be in the ISO-8859-1 encoding and should use:\\%0a %25hlt php%25@@$DefaultPageCharset = array(''=>'ISO-8859-1');@@%0a* Wikis in Czech and Hungarian language are likely to be in the ISO-8859-2 encoding, they should use this line instead:\\%0a %25hlt php%25@@ $DefaultPageCharset = array(''=>'ISO-8859-2', 'ISO-8859-1'=>'ISO-8859-2'); @@%0a* Wikis in Turkish language are likely to be in the ISO-8859-9 encoding, they should use this line instead:\\%0a %25hlt php%25@@ $DefaultPageCharset = array(''=>'ISO-8859-9', 'ISO-8859-1'=>'ISO-8859-9'); @@%0a%0a%0a!!Support for RTL right-to-left languages%0aLanguages like Arabic, Hebrew, Farsi (Persian), Urdu and others are written in script flowing from right to left. Classes ''rtl'' and ''ltr'' can be used to specify direction of text independently of the general text direction within a page, for example: %0a(:markup:)%0a>>rtl%3c%3c%0aيتدفق هذا النص من اليمين إلى اليسار%0a>>ltr%3c%3c%0aThis text flows left to right.%0a>>%3c%3c%0a(:markupend:)%0a%0aTo set text direction for a wiki generally to RTL, you could add to @@config.php@@ a line like:%0a-> %25hlt php%25[@$HTMLStylesFmt['rtl'] = " body { direction:rtl; }"@]%0a%0abut the skin you use may need other modifications, for instance to swap the search box and the page actions to the other side etc. %0a%0aSome skins have full support for RTL, see for instance [[Skins:Amber|Amber]]. %0a%0a!!Using UTF-8 in page names and URLs%0aEnabling UTF-8 allows to use international characters in page names (for file names, see $UploadNameChars).%0a%0aThere are good reasons to use UTF-8 in page names. Easier configuration, works out of the box. Easier management of page titles (no need to add a %25pmhlt%25[@(:title ...:)@] directive). The possibility to have distinct pages for differently accented words, for example in a dictionary or vocabulary wiki. Better SEO if your URLs match certain search terms.%0a%0aAlso while the URLs may have URL-encoded international characters when you copy them, modern browsers display the actual characters in the URL bar, and major search engines understand the international URLs and show them decoded in the search results.%0a%0aOn the other hand, some people may prefer to restrict page names and file names to plain ASCII characters, especially if the language mostly uses the Latin alphabet.%0a%0aOne of the reasons may be to have plain URLs like %25hlt%25[@your-wiki.org/Francais/Champs-Elysees@] instead of [@your-wiki.org/Fran%25C3%25A7ais/Champs-%25C3%2589lys%25C3%25A9es@] (for a page name %25pmhlt%25[@[[Français.Champs-Élysées]]@]). See also [[Cookbook/ISO8859MakePageNamePatterns]].%0a%0aToday there shouldn't be many problems in using international characters in page and file names in UTF-8. But if some day you change servers or operating systems, plain Latin letters are more portable and there is less risk that something breaks.%0a%0aPmWiki automatically converts page text and metadata between encodings, but at the moment cannot automatically rename page files and attachments.%0a%0aIf you already have international characters in file names (page names, uploads), after enabling UTF-8, review your wiki pages and links - you may need to rename some of the files on the server.%0a%0a[[#notes]]%0a!! Notes%0a* You need to save your @@config.php@@ file in the UTF-8 encoding, and "Without Byte Order Mark (BOM)". See [[LocalCustomizations#encoding|Character encoding of config.php]].%0a%0a* This page concerns the most recent versions of PmWiki. See [[Cookbook:UTF-8]] for tips on older versions.%0a%0a* In the case your PmWiki installation displays wrong encoding, or save an UTF-8 page to an other encoding without explanation, you can double check your custom @@.htaccess@@ settings at the root of your served pages.%0a %0a -time=1676059487 +rev=47 +targets=PmWiki.Internationalizations,Cookbook.MigrateUTF8,PmWiki.Upgrades,PmWiki.I18nVariables,Skins.Amber,PmWiki.UploadVariables,Cookbook.ISO8859MakePageNamePatterns,PmWiki.LocalCustomizations,Cookbook.UTF-8 +text=(:Summary: Enabling UTF-8 Unicode language encoding in your wiki.:)%0a%0a[[Wikipedia:UTF-8|UTF-8]] supports all languages and alphabets, including Asian languages and their character depth. It is a widely supported and flexible character encoding. %0a%0aIt's fairly simple to enable UTF-8 on your wiki pages. Current PmWiki versions have the UTF-8 file which is enabled by default in the @@sample-config.php@@.%0a%0a!! Enabling UTF-8 on a new wiki%0a%0aIf you start a new wiki in any language with the latest PmWiki version, it is highly recommended to enable UTF-8. In the future, PmWiki will change to use the UTF-8 encoding by default, so if you already use it, you will not need a complex "migration" to UTF-8 later.%0a%0aTo enable UTF-8 for a new wiki, add this line near the beginning of @@config.php@@ (the @@docs/sample-config.php@@ file has this line already):%0a%0a%25hlt php%25[@%0a include_once("scripts/xlpage-utf-8.php");%0a@]%0a%0aThis line should come ''before'' a call to the %25hlt php%25@@XLPage()@@ function in [[internationalizations|international wikis]].%0a%0aSave your @@config.php@@ file encoded as UTF-8 (NO BOM). That allows entry of UTF-8 encoded characters in it. Make sure your editor does support this, and test by adding some non-ANSI UTF-8 characters, to see them in the text editor '^[[#notes|1]]^'.%0a%0aWith UTF-8 thus enabled you also got use of classes ''rtl'' and ''ltr'', which offer setting of the text direction to right-to-left, or left-to-right. This is useful for inclusion of right-to-left scripts like Arabic, Farsi (Persian), Hebrew, Urdu and others. %0a%0a!! Enabling UTF-8 on existing wikis%0a%0aUntil 2024, this was possible ''only if your group and page ''names'', as well as upload names, didn't contain international characters''. The names of wiki pages are used as file names, and we didn't have an easy way to rename the disk files.%0a%0aSee the recipe Cookbook:MigrateUTF8 which may be able to migrate wiki page files and attachments, even with international characters, from an older encoding to UTF-8.%0a%0aIf your wiki doesn't have international page/file names, first [[upgrade(s)]] to the latest PmWiki version. %0a%0aTo enable UTF-8:%0a# Delete the file @@ wiki.d/.pageindex@@. This file contains a cache of links and words from your pages and is used for searches and pagelists. PmWiki will rebuild it automatically with the new encoding.%0a# Add these lines near the beginning of @@config.php@@:%0a%0a%25hlt php%25[@%0a include_once("scripts/xlpage-utf-8.php");%0a $DefaultPageCharset = array(''=>'ISO-8859-1'); # see below%0a@]%0a%0aThese lines should come ''before'' a call to the %25hlt php%25@@XLPage()@@ function in [[internationalizations|international wikis]].%0a%0aThe $DefaultPageCharset line is there to fix and correctly handle some pages with missing or wrong attributes, created by older PmWiki versions.%0a%0a* Most wikis in European languages are likely to be in the ISO-8859-1 encoding and should use:\\%0a %25hlt php%25@@$DefaultPageCharset = array(''=>'ISO-8859-1');@@%0a* Wikis in Czech and Hungarian language are likely to be in the ISO-8859-2 encoding, they should use this line instead:\\%0a %25hlt php%25@@ $DefaultPageCharset = array(''=>'ISO-8859-2', 'ISO-8859-1'=>'ISO-8859-2'); @@%0a* Wikis in Turkish language are likely to be in the ISO-8859-9 encoding, they should use this line instead:\\%0a %25hlt php%25@@ $DefaultPageCharset = array(''=>'ISO-8859-9', 'ISO-8859-1'=>'ISO-8859-9'); @@%0a%0a%0a!!Support for RTL right-to-left languages%0aLanguages like Arabic, Hebrew, Farsi (Persian), Urdu and others are written in script flowing from right to left. Classes ''rtl'' and ''ltr'' can be used to specify direction of text independently of the general text direction within a page, for example: %0a(:markup:)%0a>>rtl%3c%3c%0aيتدفق هذا النص من اليمين إلى اليسار%0a>>ltr%3c%3c%0aThis text flows left to right.%0a>>%3c%3c%0a(:markupend:)%0a%0aTo set text direction for a wiki generally to RTL, you could add to @@config.php@@ a line like:%0a-> %25hlt php%25[@$HTMLStylesFmt['rtl'] = " body { direction:rtl; }"@]%0a%0abut the skin you use may need other modifications, for instance to swap the search box and the page actions to the other side etc. %0a%0aSome skins have full support for RTL, see for instance [[Skins:Amber|Amber]]. %0a%0a!!Using UTF-8 in page names and URLs%0aEnabling UTF-8 allows to use international characters in page names (for file names, see $UploadNameChars).%0a%0aThere are good reasons to use UTF-8 in page names. Easier configuration, works out of the box. Easier management of page titles (no need to add a %25pmhlt%25[@(:title ...:)@] directive). The possibility to have distinct pages for differently accented words, for example in a dictionary or vocabulary wiki. Better SEO if your URLs match certain search terms.%0a%0aAlso while the URLs may have URL-encoded international characters when you copy them, modern browsers display the actual characters in the URL bar, and major search engines understand the international URLs and show them decoded in the search results.%0a%0aOn the other hand, some people may prefer to restrict page names and file names to plain ASCII characters, especially if the language mostly uses the Latin alphabet.%0a%0aOne of the reasons may be to have plain URLs like %25hlt%25[@your-wiki.org/Francais/Champs-Elysees@] instead of [@your-wiki.org/Fran%25C3%25A7ais/Champs-%25C3%2589lys%25C3%25A9es@] (for a page name %25pmhlt%25[@[[Français.Champs-Élysées]]@]). See also [[Cookbook/ISO8859MakePageNamePatterns]].%0a%0aToday there shouldn't be many problems in using international characters in page and file names in UTF-8. But if some day you change servers or operating systems, plain Latin letters are more portable and there is less risk that something breaks.%0a%0aPmWiki automatically converts page text and metadata between encodings, but at the moment cannot automatically rename page files and attachments.%0a%0aIf you already have international characters in file names (page names, uploads), after enabling UTF-8, review your wiki pages and links - you may need to rename some of the files on the server.%0a%0a[[#notes]]%0a!! Notes%0a* You need to save your @@config.php@@ file in the UTF-8 encoding, and "Without Byte Order Mark (BOM)". See [[LocalCustomizations#encoding|Character encoding of config.php]].%0a%0a* This page concerns the most recent versions of PmWiki. See [[Cookbook:UTF-8]] for tips on older versions.%0a%0a* In the case your PmWiki installation displays wrong encoding, or save an UTF-8 page to an other encoding without explanation, you can double check your custom @@.htaccess@@ settings at the root of your served pages.%0a %0a +time=1720896218 diff --git a/wikilib.d/PmWiki.UploadVariables b/wikilib.d/PmWiki.UploadVariables index 5dfbf439..44d71dba 100644 --- a/wikilib.d/PmWiki.UploadVariables +++ b/wikilib.d/PmWiki.UploadVariables @@ -1,9 +1,9 @@ -version=pmwiki-2.3.31 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=$ImgDarkSuffix: only embedded, not linked (+159) +csum=$EnableUploadDrop (+266) name=PmWiki.UploadVariables -rev=103 +rev=106 targets=PmWiki.Uploads,PmWiki.UploadsAdmin,PmWiki.UploadVariables,Cookbook.Attachtable,PmWiki.PathVariables,PmWiki.LinkVariables,PmWiki.AvailableActions,Cookbook.DarkColorScheme,PmWiki.LayoutVariables,PmWiki.BasicVariables -text=(:Summary:Variables used for uploads/attachments:)%0a%0aSee also: [[Uploads]], [[Uploads admin]].%0a%0a:$EnableUpload:The upload.php script is automatically included from stdconfig.php if the $EnableUpload variable is true in config.php. Note that one may still need to set an upload password before users can upload (see [[UploadsAdmin]]).%0a%0a:$UploadExts:An array containing as keys the file extensions that can be attached to the wiki, and as values the standard MIME content types of these extensions. See [[UploadsAdmin#newuploadfiletypes|Adding new file types to permitted uploads]].%0a%0a:$EnableUploadMimeMatch:By default, PmWiki only checks file extensions, and users could upload files with wrong extensions (say, a PDF file with a DOC extension, or a file with a disallowed extension renamed to an allowed one). Setting this variable to ''true'' will check the [[https://php.net/mime-content-type|MIME content type]] of the uploaded file, and if it doesn't match the one defined in $UploadExts, the upload will be refused.%0a: : %25hlt php%25[@ $EnableUploadMimeMatch = true;@]%0a%0a: : Note that occasionally this may block valid files, for example a CSV file may be detected as "text/plain" or "application/csv", or a password-protected office file may appear as "application/encrypted". To allow such files, configure the allowed content-types for the extension as regular expressions:%0a: : %25hlt php%25[@ $EnableUploadMimeMatch = array(%0a 'csv'=>'!^(text/plain|application/csv)$!',%0a 'docx'=>'!^(application/encrypted)$!',%0a 'gpx'=>'!^(text/xml)$!', # fix mime type for uploaded gpx files%0a);@]%0a%0a: : Also note that this requires the [[https://www.php.net/manual/en/fileinfo.installation.php|PHP Fileinfo functions]] to be enabled - on most systems they are, except on Windows where a php.ini configuration and a server restart may be needed.%0a%0a:$UploadBlacklist:This array contains forbidden strings for an uploaded file (case insensitive). Some installations with the Apache server will try to execute a file which name contains ".php", ".pl" or ".cgi" even if it is not the last part of the filename. For example, a file named "test.php.txt" may be executed. To disallow such files to be uploaded, add to config.php such a line:%0a: : %25hlt php%25[@ $UploadBlacklist = array('.php', '.pl', '.cgi', '.py'); # disallow common script files@]%0a%0a:$UploadPermAdd:This variable sets additional unix permissions applied to newly uploaded files, and should be 0 (recommended as of 2013). If uploaded files cannot be downloaded and displayed on the website, for example with the error 403 Forbidden, set this value to 0444 (core setting, default since 2004).%0a: : %25hlt php%25[@$UploadPermAdd = 0; # recommended@]%0a%0a:$UploadPermSet:This variable sets unix permissions unconditionally applied to newly uploaded files, for example @@0604@@. %25note%25 '''Danger!''' Do not use this variable unless you know what you're doing! %25%25 If you make a mistake, uploaded files may be impossible to edit or delete via the FTP/SSH account (in that case, Cookbook:Attachtable may be used) or to be downloaded and displayed on the website. Note that file permissions may differ on different systems - if you copy or move your PmWiki installation, you may have to change it.%0a%0a:$UploadDir:The directory where uploads are to be stored. Defaults to ''uploads/'' in the pmwiki directory, but can be set to any location on the server. This directory must be writable by the webserver process if uploading is to occur.%0a%0a:$UploadUrlFmt:The url of the directory given by $UploadDir. By default, $UploadUrlFmt is derived from $PubDirUrl and $UploadDir.%0a%0a[[#IMapLinkFmtAttach]]%0a:%25hlt php%25@@$IMapLinkFmt[=['Attach:']=]@@: The format of the upload link displayed when an attachment exists. Can be changed with such a line in @@config.php@@:%25hlt php%25[@%0a$IMapLinkFmt['Attach:'] = "%3ca class='attachlink' href='\$LinkUrl'>\$LinkText%3c/a>";@]%0a %0a:$LinkUploadCreateFmt: The format of the upload link displayed when an attachment not present. Can be changed with such a line in @@config.php@@:%25hlt php%25[@%0a$LinkUploadCreateFmt = "%3ca class='createlinktext' href='\$LinkUpload'>\$LinkText%3c/a>%0a%3ca class='createlink' href='\$LinkUpload'> Δ%3c/a>";@]%0a%0a:$UploadPrefixFmt:Sets the prefix for uploaded files to allow attachments to be organized other than by groups. Defaults to [@'/$Group'@] (uploads are organized per-group), but can be set to other values for sitewide or per-page attachments.\\%0a %25hlt php%25@@$UploadPrefixFmt = '/$Group/$Name'; # per-page attachments@@\\%0a %25hlt php%25@@$UploadPrefixFmt = ''; # sitewide attachments@@%0a%0a: : It is recommended to have the $UploadPrefixFmt variable defined in @@config.php@@, the same for all pages in the wiki, and not in group/page local configuration files. Otherwise you ''will'' be unable to link to attachments in other wikigroups.%25%25%0a%0a:$EnableDirectDownload:When set to 1 (the default), links to attachments bypass PmWiki and come directly from the webserver. Setting $EnableDirectDownload=0; causes requests for attachments to be obtained via [[PmWiki/AvailableActions#download|[@?action=download@]]]. This allows PmWiki to protect attachments using a page's read permissions, but also increases the load on the server. Don't forget to protect your directory /uploads/ with a @@.htaccess@@ file (Order Deny,Allow / Deny from all).%0a%0a:$EnableDownloadRanges: When the wiki has protected downloads (see $EnableDirectDownload), it sends a HTTP header "Accept-Ranges" and can serve partial content if the browser requests it. This can be useful for large files such as videos, and is enabled by default. Set this variable to 0 to disable this feature and serve whole files only.%0a%0a:$EnableUploadGroupAuth:Set @@$EnableUploadGroupAuth = 1;@@ to authenticate downloads with the group password. This could be used together with @@$EnableDirectDownload = 0;@@. %25note%25 Note: $EnableUploadGroupAuth should not be enabled if your wiki uses per-page attachments.%25%25%0a%0a:$EnableUploadVersions:When set to 1 (default is 0), uploading a file to a location where a file of the same name already exists causes the old version to be renamed to @@file.ext,timestamp@@ (instead of being overwritten). @@timestamp@@ is a Unix-style timestamp.%0a: : When set to 2, and if a file with the same name already exists, it will rename the ''new'' file adding a unique suffix, for example @@existing-file%25green%25-s99hup%25%25.jpg@@. The suffix is a base-36 representation of the current Unix timestamp.%0a%0a:$EnableUploadOverwrite:When set to 1 (the default), determines if overwriting previously uploaded files is allowed.%0a%0a:$UploadNameChars:The set of characters allowed in upload names. Defaults to [@"-\w. "@], which means alphanumerics, hyphens, underscores, dots, and spaces can be used in upload names, and everything else will be stripped. It is only possible to enable characters that exist in the code page (charater set) of the wiki, see [[Wikipedia:Code page]].%0a: :%25hlt php%25@@$UploadNameChars = "-\\w."; # default: allow dash, letters, digits, underscore, and dots (no spaces)@@%0a: :%25hlt php%25@@$UploadNameChars = "-\\w. \\x80-\\xff"; # allow Unicode@@%0a: : Note: Not all characters can be used in file names, because of various limitations in protocols or operating systems, file systems and server software, or conflict with PmWiki markup:%0a** [@ +?:@#%25!=/ @] have special meanings in URL addresses, %0a** [@ |\^`[]?:@#%25/ @] may be impossible to save on some systems,%0a** [@ %3c>"|\^`(){}[]#%25 @] may conflict with PmWiki markups,%0a: : so it is strongly recommended to only enable those if you know what you're doing.%0a%0a:$MakeUploadNamePatterns: An array of regular expression replacements that is used to normalize the filename of an attached file. First, everything but $UploadNameChars will be stripped, then the file extension will be converted to lowercase. Administrators can override these replacements with a custom definition (the full array needs to be defined). Currently the default sequence is: %25hlt php%25[@%0a $MakeUploadNamePatterns = array(%0a "/[^$UploadNameChars]/" => '', # strip all not-allowed characters%0a '/\\.[^.]*$/' => 'cb_tolower', # convert extension to lowercase (callback function)%0a '/^[^[:alnum:]_]+/' => '', # strip initial spaces, dashes, dots%0a '/[^[:alnum:]_]+$/' => '')) # strip trailing spaces, dashes, dots%0a@]%0a%0a:$UploadDirQuota:Overall size limit for all uploads.%0a%0a->%25hlt php%25[@%0a $UploadDirQuota = 100*1024; # limit uploads to 100KiB%0a $UploadDirQuota = 1000*1024; # limit uploads to 1000KiB%0a $UploadDirQuota = 1024*1024; # limit uploads to 1MiB%0a $UploadDirQuota = 25*1024*1024; # limit uploads to 25MiB%0a $UploadDirQuota = 2*1024*1024*1024; # limit uploads to 2GiB%0a@]%0a%0a:$UploadPrefixQuota:Overall size limit for one directory containing uploads. This directory is usually @@uploads/GroupName@@ (one for every WikiGroup), or @@uploads/Group/PageName@@ (one for every page), depending on the variable $UploadPrefixFmt.%0a%0a:$UploadMaxSize:Maximum size for uploading files, 50000 octets (bytes) by default.%0a%0a:$UploadExtSize:Maximum size per extension, overriding the default in $UploadMaxSize.%0a%0a->%25hlt php%25[@%0a $UploadExtSize['zip'] = 2*1024*1024; # allow up to 2MiB for zip files%0a@]%0a%0a:$ImgDarkSuffix: A suffix for uploaded images adapted for a dark color theme. Enable with: \\%0a%25hlt php%25[@$ImgDarkSuffix = '-dark';@]%25%25\\%0aIf your skin supports toggling between light and dark color themes, a picture with a white or very light background may appear too bright on a dark theme. You can upload a separate picture adapted for the dark theme, with the same filename, and added a suffix, say "@@-dark@@". Your pictures could be "@@company-logo.png@@" and "@@company-logo%25red%25-dark%25%25.png@@", and to embed them, use the markup "@@[=Attach:company-logo.png=]@@". PmWiki will use the dark picture when the dark theme is active. See also $EnableDarkThemeToggle and Cookbook:DarkColorScheme. ''Only embedded pictures attached to the page are toggled. A ''link'' to such a picture will open the base (light) file even when the dark theme is enabled.''%0a%0a:$UploadRedirectFunction:The function to be called after a file was posted. By default the "Redirect" function is called with arguments $pagename and the URL of the ?action=upload page (with additional information if the upload was successful or why it wasn't, and if the file was renamed). An add-on may define its own function, for example an AJAX upload may only return some variable back to the browser.%0a -time=1708933764 +text=(:Summary:Variables used for uploads/attachments:)%0a%0aSee also: [[Uploads]], [[Uploads admin]].%0a%0a:$EnableUpload:The upload.php script is automatically included from stdconfig.php if the $EnableUpload variable is true in config.php. Note that one may still need to set an upload password before users can upload (see [[UploadsAdmin]]).%0a%0a:$EnableUploadDrop:This variable, if set to 1, enables a "drop zone" above the edit form and the upload form, allowing for files to be dragged from a file manager and dropped for upload, see [[Uploads#drop]]. (Added in 2.3.36.)%0a: :%25hlt php%25[@$EnableUploadDrop = 1;@]%0a%0a:$UploadExts:An array containing as keys the file extensions that can be attached to the wiki, and as values the standard MIME content types of these extensions. See [[UploadsAdmin#newuploadfiletypes|Adding new file types to permitted uploads]].%0a%0a:$EnableUploadMimeMatch:By default, PmWiki only checks file extensions, and users could upload files with wrong extensions (say, a PDF file with a DOC extension, or a file with a disallowed extension renamed to an allowed one). Setting this variable to ''true'' will check the [[https://php.net/mime-content-type|MIME content type]] of the uploaded file, and if it doesn't match the one defined in $UploadExts, the upload will be refused.%0a: :%25hlt php%25[@$EnableUploadMimeMatch = true;@]%0a%0a: : Note that occasionally this may block valid files, for example a CSV file may be detected as "text/plain" or "application/csv", or a password-protected office file may appear as "application/encrypted". To allow such files, configure the allowed content-types for the extension as regular expressions:%0a: : %25hlt php%25[@ $EnableUploadMimeMatch = array(%0a 'csv'=>'!^(text/plain|application/csv)$!',%0a 'docx'=>'!^(application/encrypted)$!',%0a 'gpx'=>'!^(text/xml)$!', # fix mime type for uploaded gpx files%0a);@]%0a%0a: : Also note that this requires the [[https://www.php.net/manual/en/fileinfo.installation.php|PHP Fileinfo functions]] to be enabled - on most systems they are, except on Windows where a php.ini configuration and a server restart may be needed.%0a%0a:$UploadBlacklist:This array contains forbidden strings for an uploaded file (case insensitive). Some installations with the Apache server will try to execute a file which name contains ".php", ".pl" or ".cgi" even if it is not the last part of the filename. For example, a file named "test.php.txt" may be executed. To disallow such files to be uploaded, add to config.php such a line:%0a: : %25hlt php%25[@ $UploadBlacklist = array('.php', '.pl', '.cgi', '.py'); # disallow common script files@]%0a%0a:$UploadPermAdd:This variable sets additional unix permissions applied to newly uploaded files, and should be 0 (recommended as of 2013). If uploaded files cannot be downloaded and displayed on the website, for example with the error 403 Forbidden, set this value to 0444 (core setting, default since 2004).%0a: : %25hlt php%25[@$UploadPermAdd = 0; # recommended@]%0a%0a:$UploadPermSet:This variable sets unix permissions unconditionally applied to newly uploaded files, for example @@0604@@. %25note%25 '''Danger!''' Do not use this variable unless you know what you're doing! %25%25 If you make a mistake, uploaded files may be impossible to edit or delete via the FTP/SSH account (in that case, Cookbook:Attachtable may be used) or to be downloaded and displayed on the website. Note that file permissions may differ on different systems - if you copy or move your PmWiki installation, you may have to change it.%0a%0a:$UploadDir:The directory where uploads are to be stored. Defaults to ''uploads/'' in the pmwiki directory, but can be set to any location on the server. This directory must be writable by the webserver process if uploading is to occur.%0a%0a:$UploadUrlFmt:The url of the directory given by $UploadDir. By default, $UploadUrlFmt is derived from $PubDirUrl and $UploadDir.%0a%0a[[#IMapLinkFmtAttach]]%0a:%25hlt php%25@@$IMapLinkFmt[=['Attach:']=]@@: The format of the upload link displayed when an attachment exists. Can be changed with such a line in @@config.php@@:%25hlt php%25[@%0a$IMapLinkFmt['Attach:'] = "%3ca class='attachlink' href='\$LinkUrl'>\$LinkText%3c/a>";@]%0a %0a:$LinkUploadCreateFmt: The format of the upload link displayed when an attachment not present. Can be changed with such a line in @@config.php@@:%25hlt php%25[@%0a$LinkUploadCreateFmt = "%3ca class='createlinktext' href='\$LinkUpload'>\$LinkText%3c/a>%0a%3ca class='createlink' href='\$LinkUpload'> Δ%3c/a>";@]%0a%0a:$UploadPrefixFmt:Sets the prefix for uploaded files to allow attachments to be organized other than by groups. Defaults to [@'/$Group'@] (uploads are organized per-group), but can be set to other values for sitewide or per-page attachments.\\%0a %25hlt php%25@@$UploadPrefixFmt = '/$Group/$Name'; # per-page attachments@@\\%0a %25hlt php%25@@$UploadPrefixFmt = ''; # sitewide attachments@@%0a%0a: : It is recommended to have the $UploadPrefixFmt variable defined in @@config.php@@, the same for all pages in the wiki, and not in group/page local configuration files. Otherwise you ''will'' be unable to link to attachments in other wikigroups.%25%25%0a%0a:$EnableDirectDownload:When set to 1 (the default), links to attachments bypass PmWiki and come directly from the webserver. Setting $EnableDirectDownload=0; causes requests for attachments to be obtained via [[PmWiki/AvailableActions#download|[@?action=download@]]]. This allows PmWiki to protect attachments using a page's read permissions, but also increases the load on the server. Don't forget to protect your directory /uploads/ with a @@.htaccess@@ file (Order Deny,Allow / Deny from all).%0a%0a:$EnableDownloadRanges: When the wiki has protected downloads (see $EnableDirectDownload), it sends a HTTP header "Accept-Ranges" and can serve partial content if the browser requests it. This can be useful for large files such as videos, and is enabled by default. Set this variable to 0 to disable this feature and serve whole files only.%0a%0a:$EnableUploadGroupAuth:Set @@$EnableUploadGroupAuth = 1;@@ to authenticate downloads with the group password. This could be used together with @@$EnableDirectDownload = 0;@@. %25note%25 Note: $EnableUploadGroupAuth should not be enabled if your wiki uses per-page attachments.%25%25%0a%0a:$EnableUploadVersions:When set to 1 (default is 0), uploading a file to a location where a file of the same name already exists causes the old version to be renamed to @@file.ext,timestamp@@ (instead of being overwritten). @@timestamp@@ is a Unix-style timestamp.%0a: : When set to 2, and if a file with the same name already exists, it will rename the ''new'' file adding a unique suffix, for example @@existing-file%25green%25-s99hup%25%25.jpg@@. The suffix is a base-36 representation of the current Unix timestamp.%0a%0a:$EnableUploadOverwrite:When set to 1 (the default), determines if overwriting previously uploaded files is allowed.%0a%0a:$UploadNameChars:The set of characters allowed in upload names. Defaults to [@"-\w. "@], which means alphanumerics, hyphens, underscores, dots, and spaces can be used in upload names, and everything else will be stripped. It is only possible to enable characters that exist in the code page (charater set) of the wiki, see [[Wikipedia:Code page]].%0a: :%25hlt php%25@@$UploadNameChars = "-\\w."; # default: allow dash, letters, digits, underscore, and dots (no spaces)@@%0a: :%25hlt php%25@@$UploadNameChars = "-\\w. \\x80-\\xff"; # allow Unicode@@%0a: : Note: Not all characters can be used in file names, because of various limitations in protocols or operating systems, file systems and server software, or conflict with PmWiki markup:%0a** [@ +?:@#%25!=/ @] have special meanings in URL addresses, %0a** [@ |\^`[]?:@#%25/ @] may be impossible to save on some systems,%0a** [@ %3c>"|\^`(){}[]#%25 @] may conflict with PmWiki markups,%0a: : so it is strongly recommended to only enable those if you know what you're doing.%0a%0a:$MakeUploadNamePatterns: An array of regular expression replacements that is used to normalize the filename of an attached file. First, everything but $UploadNameChars will be stripped, then the file extension will be converted to lowercase. Administrators can override these replacements with a custom definition (the full array needs to be defined). Currently the default sequence is: %25hlt php%25[@%0a $MakeUploadNamePatterns = array(%0a "/[^$UploadNameChars]/" => '', # strip all not-allowed characters%0a '/\\.[^.]*$/' => 'cb_tolower', # convert extension to lowercase (callback function)%0a '/^[^[:alnum:]_]+/' => '', # strip initial spaces, dashes, dots%0a '/[^[:alnum:]_]+$/' => '')) # strip trailing spaces, dashes, dots%0a@]%0a%0a:$UploadDirQuota:Overall size limit for all uploads.%0a%0a->%25hlt php%25[@%0a $UploadDirQuota = 100*1024; # limit uploads to 100KiB%0a $UploadDirQuota = 1000*1024; # limit uploads to 1000KiB%0a $UploadDirQuota = 1024*1024; # limit uploads to 1MiB%0a $UploadDirQuota = 25*1024*1024; # limit uploads to 25MiB%0a $UploadDirQuota = 2*1024*1024*1024; # limit uploads to 2GiB%0a@]%0a%0a:$UploadPrefixQuota:Overall size limit for one directory containing uploads. This directory is usually @@uploads/GroupName@@ (one for every WikiGroup), or @@uploads/Group/PageName@@ (one for every page), depending on the variable $UploadPrefixFmt.%0a%0a:$UploadMaxSize:Maximum size for uploading files, 50000 octets (bytes) by default.%0a%0a:$UploadExtSize:Maximum size per extension, overriding the default in $UploadMaxSize.%0a%0a->%25hlt php%25[@%0a $UploadExtSize['zip'] = 2*1024*1024; # allow up to 2MiB for zip files%0a@]%0a%0a:$ImgDarkSuffix: A suffix for uploaded images adapted for a dark color theme. Enable with: \\%0a%25hlt php%25[@$ImgDarkSuffix = '-dark';@]%25%25\\%0aIf your skin supports toggling between light and dark color themes, a picture with a white or very light background may appear too bright on a dark theme. You can upload a separate picture adapted for the dark theme, with the same filename, and added a suffix, say "@@-dark@@". Your pictures could be "@@company-logo.png@@" and "@@company-logo%25red%25-dark%25%25.png@@", and to embed them, use the markup "@@[=Attach:company-logo.png=]@@". PmWiki will use the dark picture when the dark theme is active. See also $EnableDarkThemeToggle and Cookbook:DarkColorScheme. ''Only embedded pictures attached to the page are toggled. A ''link'' to such a picture will open the base (light) file even when the dark theme is enabled.''%0a%0a:$UploadRedirectFunction:The function to be called after a file was posted. By default the "Redirect" function is called with arguments $pagename and the URL of the ?action=upload page (with additional information if the upload was successful or why it wasn't, and if the file was renamed). An add-on may define its own function, for example an AJAX upload may only return some variable back to the browser.%0a +time=1723039263 diff --git a/wikilib.d/PmWiki.Uploads b/wikilib.d/PmWiki.Uploads index aa886761..f6859b75 100644 --- a/wikilib.d/PmWiki.Uploads +++ b/wikilib.d/PmWiki.Uploads @@ -1,9 +1,9 @@ -version=pmwiki-2.3.34 ordered=1 urlencoded=1 +version=pmwiki-2.3.35 ordered=1 urlencoded=1 author=Petko charset=UTF-8 -csum=wmf is a picture, not video (+11) +csum=$EnableUploadDrop (+1134) name=PmWiki.Uploads -rev=166 +rev=168 targets=PmWiki.PmWiki,PmWiki.Images,PmWiki.UploadsAdmin,PmWiki.WikiGroup,PmWiki.Links,PmWiki.UploadVariables,PmWiki.PageDirectives,PmWiki.WikiAdministrator,PmWiki.Passwords,PmWiki.PasswordsAdmin,Cookbook.Attachtable,Cookbook.AttachLinks,Site.PageActions,PmWiki.AvailableActions,Cookbook.UploadTypes,Cookbook.PreventHotlinking,Cookbook.LinkIcons -text=(:Summary:Allow authors to upload files, also known as page attachments:)%0a(:Audience: authors (intermediate) :)%0a[[PmWiki]] can be configured to allow authors to upload and store files and [[images]] (known as attaching them).%0aThese attachments may then be referenced from any page. %0a%0a-> ''Note'': ''[[PmWiki]] is distributed with uploads disabled by default. See [[Uploads Admin]] for information about how to enable and configure the upload feature.''%0a%0a-> ''Note2'': ''Uploads can be configured site-wide, by-group, or by-page; see [[Uploads Admin]] for details. This determines whether all uploads go in one directory for the site, an individual directory for each group, or an individual directory for each page. The default is to organize uploads by [[WikiGroup | group]].''%0a%0a!! %25pmhlt%25[@Attach:@] syntax%0aTo add or link to an attachment, an author edits a page to include the markup "%25pmhlt%25[@Attach:@]" followed by a name of an attachment (e.g., "[@Attach:resume.pdf@]"). When the page is displayed, the [@Attach:@] markup becomes one of the following:%0a%0a* A link to the named attachment (if uploaded, ie already in the upload directory)%0a* A link to a form whereby the author can specify a file to be uploaded and used as the new attachment (if not yet uploaded, ie not in the upload directory)%0a* If the attachment is an [[image(s)]] file with an extension such as .gif, .jpeg, or .png, it is displayed as an [[image(s)]].%0a%0aThe behavior of links can be modified to%0a* prevent an image attachment from displaying as an image, place it in double brackets (e.g., %25pmhlt%25[@[[Attach:image.jpg]]@]).%0a* have a link to an attachment appear without the "%25pmhlt%25[@Attach:@]" at the beginning of the link, use [@[[(Attach:)file.ext]]@].%0a* display a tool tip on mouse over (e.g., %25pmhlt%25[@Attach:image.jpg"mouse over tool tip"@]).%0a* display a tool tip and a caption (e.g., %25pmhlt%25[@Attach:image.jpg"mouse over tool" | Caption text@]).%0a%0a!! Attachments on other pages and groups%0aTo link to an uploaded attachment (image or file) from another group, you simply refer the group itself (make sure "Groupname" has the dot in it).%0a->%25pmhlt%25[@Attach:Groupname./file_name.ext@] (note the dot after the groupname)%0aIf PmWiki is configured with an individual directory per page use%0a->%25pmhlt%25[@Attach:Pagename/file_name.ext@] (Pagename is in the same WikiGroup)%0a->%25pmhlt%25[@Attach:Groupname.Pagename/file_name.ext@]%0a%0a!! Names with spaces and special characters%0aTo link to a filename with spaces in it use the bracket link notation, eg%0a->%25pmhlt%25[@[[Attach:a filename with spaces.txt]]@]%0a%0aTo embed an image with spaces or special characters [[Links#escaped | escape them]] with the markup %25pmhlt%25[@Attach:[=image name.jpg=]@].%0a%0a!! International characters in file names%0aSee [[UploadsAdmin]] and $UploadNameChars.%0a%0a!! Listing uploaded files on a page%0aTo list files that have been uploaded, use the directive %25pmhlt%25[@(:attachlist:)@] -- see [[PmWiki/PageDirectives#attachlist]] for more options.%0a%0aThis will list attachments to the current group or page, depending whether attachments are organized per group (default) or per page; each instance includes a link to the attachment for viewing or downloading. A list of attachments is also shown as part of the upload file form.%0a%0a!! Upload form / upload replacement%0aOne can go directly to the upload form by appending "?action=upload" to the URI for any page that has file uploads enabled by the [[Wiki Administrator]]. Replace a file by simply uploading a new version of the file with the same name. %0a* Be sure to clear your browser cache after replacing an upload. Otherwise, it may appear that the original upload is still on the server. %0aIf you put %25pmhlt%25@@$EnableUploadVersions=1;@@ in your @@local/config.php@@, the old versions of the same files are renamed and not removed.%0a%0a[[#filetype]]%0a!! Type and size restrictions%0aFor security reasons, the upload feature is disabled when PmWiki is first installed.%0aWhen enabled uploads are restricted as to the types and sizes of files that may be uploaded to the server (see [[Uploads Admin]]). PmWiki's default configuration limits file sizes to 50 kilobytes and file extensions to common types of images, audio, video, and documents as shown below. %0a%0aIn addition, the administrator can configure the system to require an @@upload@@ password--see [[Passwords]] and [[Passwords Admin]].%0a%0aBy default the upload feature allows the following extensions. %0a(:if false:) (:comment Is this included from some page?:)%0a[[#imagetypes]] %0a gif, jpg, jpeg, png, bmp, ico, wbmp, svg, svgz, xcf, webp # image files%0aSee [[PmWiki/Images]] for the files PmWiki automatically displays as images.%0a[[#imagetypesend]]%0a(:ifend:)%0a%0a|| class="simpletable sortable filterable"%0a||!Category ||!Extensions ||%0a||image files||gif, jpg, jpeg, png, bmp, ico, wmf, wbmp, xcf, webp, avif\\%0a See [[PmWiki/Images]] for the files PmWiki automatically displays as images. ||%0a||audio ||mp3, au, wav, ogg, flac, opus, m4a ||%0a||video ||ogv, mp4, webm, mpg, mpeg, mov, qt, avi, mkv ||%0a||archives ||zip, 7z, gz, tgz, rpm, hqx, sit ||%0a||office ||pdf, odt, ods, odp, odg, doc, docx, ppt, pptx, xls, xlsx, mdb, rtf, csv ||%0a||executables||exe ||%0a||Adobe ||psd, ps, ai, eps ||%0a||text files ||txt, tex, dvi ||%0a||misc ||kml, kmz ||%0a%0a!!Removal%0aAt present uploaded files can only be deleted from the server by the [[wiki administrator]]. Any uploads-authorized user may over-write an existing file by uploading another of the same name and extension to the same location.%0a%0aThe administrator may remove an uploaded file by accessing the server via ftp (or via a control panel, if the host offers such a feature). The recipe Cookbook:Attachtable allows the deletion of the files from the wiki.%0a%0a!! FAQ%0a>>faq%3c%3c [[#faq]]%0a%0aQ: When I upload a file, how do I make the link look like "file.doc" instead of "Attach:file.doc"?%0aA: Use parentheses, as in %25pmhlt%25[@[[(Attach:)file.doc]]@]. There is also a configuration change that can eliminate the [@Attach:@] -- see [[Cookbook:AttachLinks]].%0a%0aQ: Why can't I upload files of size more than 50kB to my newly installed PmWiki?%0aA: Out of the box PmWiki limits the size of files to be uploaded to 50kB. Add%0a-> %25pmhlt%25@@$UploadMaxSize = 1000000; # limit upload file size to 1 megabyte@@%0a->to your ''config.php'' to increase limit to 1MB (for example). See [[UploadsAdmin]] for how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.%0a%0aQ: Why does my upload exit unexpectedly with "Incomplete file received"?%0aA: You may be running out of space in a 'scratch' area, used either by PmWiki or by PHP. On *nix, check that you have sufficient free space in /tmp and /var/tmp.%0a%0aQ: How do I make it so that the upload link still allows one to make another upload (if someone wants to replace the old version of a file with a newer version, for example). Currently you only get the upload link when there is no file in the upload directory.%0aA: Use the Attach [[Site/page action(s)]], and click on the delta symbol %25blue%25(Δ)%25%25 shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not authorized to upload, or the attach action has been commented out or is missing. See also [[PmWiki/available actions]].%0a%0aQ: How do I hide the " %25pmhlt%25[@Attach:@]" for all attachments%0aA: See Cookbook:AttachLinks, note that this does not currently work for %25pmhlt%25[@ [[Attach:my file.ext]] @].%0a%0aQ: How can I link a file that have a 4-letter file extension such like 'abc.pptx'?%0aA: See [[Cookbook:Upload Types]]%0a%0aQ: How can I prevent others from using the url's of my images on their site%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0aQ: How can I display a file that lacks a correct extension? [-(e.g. you are using Cookbook:LinkIcons)-]%0aA: A file can be displayed by addition of a "false" extension to the URL. For example, if the url is [@https://example.com/dox/mydoc@], add a fake query string on the end with the desired extension (e.g., [@https://example.com/dox/mydoc?format=.docx@]). If query strings are unsuitable, a fragment identifier should work, e.g. [@https://example.com/dox/mydoc#.docx@].%0a%0a%0a -time=1719307527 +text=(:Summary:Allow authors to upload files, also known as page attachments:)%0a(:Audience: authors (intermediate) :)%0a[[PmWiki]] can be configured to allow authors to upload and store files and [[images]] (known as attaching them).%0aThese attachments may then be referenced from any page. %0a%0a-> ''Note'': ''[[PmWiki]] is distributed with uploads disabled by default. See [[Uploads Admin]] for information about how to enable and configure the upload feature.''%0a%0a-> ''Note2'': ''Uploads can be configured site-wide, by-group, or by-page; see [[Uploads Admin]] for details. This determines whether all uploads go in one directory for the site, an individual directory for each group, or an individual directory for each page. The default is to organize uploads by [[WikiGroup | group]].''%0a%0a!! %25pmhlt%25[@Attach:@] syntax%0aTo add or link to an attachment, an author edits a page to include the markup "%25pmhlt%25[@Attach:@]" followed by a name of an attachment (e.g., "[@Attach:resume.pdf@]"). When the page is displayed, the [@Attach:@] markup becomes one of the following:%0a%0a* A link to the named attachment (if uploaded, ie already in the upload directory)%0a* A link to a form whereby the author can specify a file to be uploaded and used as the new attachment (if not yet uploaded, ie not in the upload directory)%0a* If the attachment is an [[image(s)]] file with an extension such as .gif, .jpeg, or .png, it is displayed as an [[image(s)]].%0a%0aThe behavior of links can be modified to%0a* prevent an image attachment from displaying as an image, place it in double brackets (e.g., %25pmhlt%25[@[[Attach:image.jpg]]@]).%0a* have a link to an attachment appear without the "%25pmhlt%25[@Attach:@]" at the beginning of the link, use [@[[(Attach:)file.ext]]@].%0a* display a tool tip on mouse over (e.g., %25pmhlt%25[@Attach:image.jpg"mouse over tool tip"@]).%0a* display a tool tip and a caption (e.g., %25pmhlt%25[@Attach:image.jpg"mouse over tool" | Caption text@]).%0a%0a!! Attachments on other pages and groups%0aTo link to an uploaded attachment (image or file) from another group, you simply refer the group itself (make sure "Groupname" has the dot in it).%0a->%25pmhlt%25[@Attach:Groupname./file_name.ext@] (note the dot after the groupname)%0aIf PmWiki is configured with an individual directory per page use%0a->%25pmhlt%25[@Attach:Pagename/file_name.ext@] (Pagename is in the same WikiGroup)%0a->%25pmhlt%25[@Attach:Groupname.Pagename/file_name.ext@]%0a%0a!! Names with spaces and special characters%0aTo link to a filename with spaces in it use the bracket link notation, eg%0a->%25pmhlt%25[@[[Attach:a filename with spaces.txt]]@]%0a%0aTo embed an image with spaces or special characters [[Links#escaped | escape them]] with the markup %25pmhlt%25[@Attach:[=image name.jpg=]@].%0a%0a!! International characters in file names%0aSee [[UploadsAdmin]] and $UploadNameChars.%0a%0a!! Listing uploaded files on a page%0aTo list files that have been uploaded, use the directive %25pmhlt%25[@(:attachlist:)@] -- see [[PmWiki/PageDirectives#attachlist]] for more options.%0a%0aThis will list attachments to the current group or page, depending whether attachments are organized per group (default) or per page; each instance includes a link to the attachment for viewing or downloading. A list of attachments is also shown as part of the upload file form.%0a%0a!! Upload form / upload replacement%0aOne can go directly to the upload form by appending "?action=upload" to the URI for any page that has file uploads enabled by the [[Wiki Administrator]]. Replace a file by simply uploading a new version of the file with the same name. %0a* Be sure to clear your browser cache after replacing an upload. Otherwise, it may appear that the original upload is still on the server. %0aIf you put %25hlt php%25@@$EnableUploadVersions=1;@@ in your @@local/config.php@@, the old versions of the same files are renamed and not removed.%0a%0a[[#drop]]%0a!! Upload drop zone%0aIf config.php has %25hlt php%25@@$EnableUploadDrop=1;@@ then a "drop zone" will appear above the edit form, and above the upload form. Users with upload permissions can drag files from a folder in their file manager, and drop them on the drop zone. The files will be uploaded one after another, if their size and extension are acceptable. %0a%0aUnlike the upload form, there is no "Name attachment as:" field, the files are uploaded with their original names. Upon reception the files may still be renamed to match the characters admissible on the server.%0a%0aIn the edit form, after an upload completes, the user can click on the filename to insert a link to the file in the text area.%0a* Clicking on a filename will insert a link like %25pmhlt%25[@Attach:New-file.jpg@].%0a* Holding down the "Ctrl" key, and clicking on a filename will insert a link like %25pmhlt%25[@Attach:Group.CurrentPage/New-file.jpg@].%0a* If the filename contains spaces, the link will be wrapped in square brackets like %25pmhlt%25[@[[Attach:Spaced name.txt]]@].%0a* Middle-clicking on the filename will open the file for preview in a new browser tab.%0a%0a[[#filetype]]%0a!! Type and size restrictions%0aFor security reasons, the upload feature is disabled when PmWiki is first installed.%0aWhen enabled uploads are restricted as to the types and sizes of files that may be uploaded to the server (see [[Uploads Admin]]). PmWiki's default configuration limits file sizes to 50 kilobytes and file extensions to common types of images, audio, video, and documents as shown below. %0a%0aIn addition, the administrator can configure the system to require an @@upload@@ password--see [[Passwords]] and [[Passwords Admin]].%0a%0aBy default the upload feature allows the following extensions. %0a(:if false:) (:comment Is this included from some page?:)%0a[[#imagetypes]] %0a gif, jpg, jpeg, png, bmp, ico, wbmp, svg, svgz, xcf, webp # image files%0aSee [[PmWiki/Images]] for the files PmWiki automatically displays as images.%0a[[#imagetypesend]]%0a(:ifend:)%0a%0a|| class="simpletable sortable filterable"%0a||!Category ||!Extensions ||%0a||image files||gif, jpg, jpeg, png, bmp, ico, wmf, wbmp, xcf, webp, avif\\%0a See [[PmWiki/Images]] for the files PmWiki automatically displays as images. ||%0a||audio ||mp3, au, wav, ogg, flac, opus, m4a ||%0a||video ||ogv, mp4, webm, mpg, mpeg, mov, qt, avi, mkv ||%0a||archives ||zip, 7z, gz, tgz, rpm, hqx, sit ||%0a||office ||pdf, odt, ods, odp, odg, doc, docx, ppt, pptx, xls, xlsx, mdb, rtf, csv ||%0a||executables||exe ||%0a||Adobe ||psd, ps, ai, eps ||%0a||text files ||txt, tex, dvi ||%0a||misc ||kml, kmz ||%0a%0a!!Removal%0aAt present uploaded files can only be deleted from the server by the [[wiki administrator]]. Any uploads-authorized user may over-write an existing file by uploading another of the same name and extension to the same location.%0a%0aThe administrator may remove an uploaded file by accessing the server via ftp (or via a control panel, if the host offers such a feature). The recipe Cookbook:Attachtable allows the deletion of the files from the wiki.%0a%0a!! FAQ%0a>>faq%3c%3c [[#faq]]%0a%0aQ: When I upload a file, how do I make the link look like "file.doc" instead of "Attach:file.doc"?%0aA: Use parentheses, as in %25pmhlt%25[@[[(Attach:)file.doc]]@]. There is also a configuration change that can eliminate the [@Attach:@] -- see [[Cookbook:AttachLinks]].%0a%0aQ: Why can't I upload files of size more than 50kB to my newly installed PmWiki?%0aA: Out of the box PmWiki limits the size of files to be uploaded to 50kB. Add%0a-> %25hlt php%25@@$UploadMaxSize = 1000000; # limit upload file size to 1 megabyte@@%0a->to your ''config.php'' to increase limit to 1MB (for example). See [[UploadsAdmin]] for how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.%0a%0aQ: Why does my upload exit unexpectedly with "Incomplete file received"?%0aA: You may be running out of space in a 'scratch' area, used either by PmWiki or by PHP. On *nix, check that you have sufficient free space in /tmp and /var/tmp.%0a%0aQ: How do I make it so that the upload link still allows one to make another upload (if someone wants to replace the old version of a file with a newer version, for example). Currently you only get the upload link when there is no file in the upload directory.%0aA: Use the Attach [[Site/page action(s)]], and click on the delta symbol %25blue%25(Δ)%25%25 shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not authorized to upload, or the attach action has been commented out or is missing. See also [[PmWiki/available actions]].%0a%0aQ: How do I hide the " %25pmhlt%25[@Attach:@]" for all attachments%0aA: See Cookbook:AttachLinks, note that this does not currently work for %25pmhlt%25[@ [[Attach:my file.ext]] @].%0a%0aQ: How can I link a file that have a 4-letter file extension such like 'abc.pptx'?%0aA: See [[Cookbook:Upload Types]]%0a%0aQ: How can I prevent others from using the url's of my images on their site%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0aQ: How can I display a file that lacks a correct extension? [-(e.g. you are using Cookbook:LinkIcons)-]%0aA: A file can be displayed by addition of a "false" extension to the URL. For example, if the url is [@https://example.com/dox/mydoc@], add a fake query string on the end with the desired extension (e.g., [@https://example.com/dox/mydoc?format=.docx@]). If query strings are unsuitable, a fragment identifier should work, e.g. [@https://example.com/dox/mydoc#.docx@].%0a%0a%0a +time=1723040643 |