Index: pmwiki.php =================================================================== --- pmwiki.php (.../pmwiki-2.2.8) (revision 2460) +++ pmwiki.php (.../pmwiki-2.2.9) (revision 2460) @@ -1,7 +1,7 @@ 1)); $npat = '[[:alpha:]][-\\w]*'; @@ -1239,7 +1244,7 @@ $iname = MakePageName($pagename, $v); if (!$args['self'] && $iname == $pagename) continue; $ipage = RetrieveAuthPage($iname, 'read', false, READPAGE_CURRENT); - $itext = @$ipage['text']; + $itext = IsEnabled($PCache[$iname]['=preview'], @$ipage['text']); } $itext = TextSection($itext, $v, array('anchors' => 1)); continue; @@ -1639,6 +1644,8 @@ } if ($nl) $t[]=''; $new['text']=implode("\n",$t); + $new['=preview'] = $new['text']; + PCache($pagename, $new); return $new['text']; } @@ -1650,9 +1657,12 @@ global $EnablePost, $ROSPatterns, $ROEPatterns; foreach ((array)@$ROEPatterns as $pat => $rep) $new['text'] = preg_replace($pat, $rep, $new['text']); - if (!$EnablePost) return; - foreach((array)@$ROSPatterns as $pat=>$rep) - $new['text'] = preg_replace($pat, $rep, $new['text']); + if ($EnablePost) { + foreach((array)@$ROSPatterns as $pat=>$rep) + $new['text'] = preg_replace($pat, $rep, $new['text']); + } + $new['=preview'] = $new['text']; + PCache($pagename, $new); } function SaveAttributes($pagename,&$page,&$new) { @@ -1674,7 +1684,7 @@ function PostPage($pagename, &$page, &$new) { global $DiffKeepDays, $DiffFunction, $DeleteKeyPattern, $EnablePost, - $Now, $Charset, $Author, $WikiDir, $IsPagePosted; + $Now, $Charset, $Author, $WikiDir, $IsPagePosted, $DiffKeepNum; SDV($DiffKeepDays,3650); SDV($DeleteKeyPattern,"^\\s*delete\\s*$"); $IsPagePosted = false; @@ -1688,9 +1698,11 @@ $new["diff:$Now:{$page['time']}:$diffclass"] = $DiffFunction($new['text'],@$page['text']); $keepgmt = $Now-$DiffKeepDays * 86400; + $keepnum = IsEnabled($DiffKeepNum, 20); $keys = array_keys($new); foreach($keys as $k) - if (preg_match("/^\\w+:(\\d+)/",$k,$match) && $match[1]<$keepgmt) + if (preg_match("/^\\w+:(\\d+)/",$k,$match) + && --$keepnum<0 && $match[1]<$keepgmt) unset($new[$k]); if (preg_match("/$DeleteKeyPattern/",$new['text'])){ if(@$new['passwdattr']>'' && !CondAuth($pagename, 'attr')) @@ -1757,13 +1769,14 @@ Lock(2); $page = RetrieveAuthPage($pagename, $auth, true); if (!$page) Abort("?cannot edit $pagename"); - PCache($pagename,$page); $new = $page; foreach((array)$EditFields as $k) if (isset($_POST[$k])) $new[$k]=str_replace("\r",'',stripmagic($_POST[$k])); $new['csum'] = $ChangeSummary; if ($ChangeSummary) $new["csum:$Now"] = $ChangeSummary; $EnablePost &= preg_grep('/^post/', array_keys(@$_POST)); + $new['=preview'] = $new['text']; + PCache($pagename, $new); UpdatePage($pagename, $page, $new); Lock(0); if ($IsPagePosted && !@$_POST['postedit']) @@ -1962,7 +1975,7 @@ if ($page) PCache($pagename, $page); } SDV($PasswdVarAuth, 'attr'); - if ($PasswdVarAuth && !@$page['=auth'][$PasswdVarAuth]) return '(protected)'; + if ($PasswdVarAuth && !@$page['=auth'][$PasswdVarAuth]) return XL('(protected)'); $pwsource = $page['=pwsource'][$level]; if (strncmp($pwsource, 'cascade:', 8) == 0) { $FmtV['$PWCascade'] = substr($pwsource, 8); Index: scripts/robots.php =================================================================== --- scripts/robots.php (.../pmwiki-2.2.8) (revision 2460) +++ scripts/robots.php (.../pmwiki-2.2.9) (revision 2460) @@ -44,7 +44,7 @@ " \n"; ## $RobotPattern is used to identify robots. -SDV($RobotPattern,'Googlebot|Slurp|msnbot|Teoma|ia_archiver|BecomeBot|HTTrack|MJ12bot|XML Sitemaps'); +SDV($RobotPattern,'Googlebot|Slurp|msnbot|Teoma|ia_archiver|BecomeBot|HTTrack|MJ12bot|XML Sitemaps|Yandex'); SDV($IsRobotAgent, $RobotPattern && preg_match("!$RobotPattern!", @$_SERVER['HTTP_USER_AGENT'])); if (!$IsRobotAgent) return; Index: scripts/stdmarkup.php =================================================================== --- scripts/stdmarkup.php (.../pmwiki-2.2.8) (revision 2460) +++ scripts/stdmarkup.php (.../pmwiki-2.2.9) (revision 2460) @@ -1,5 +1,5 @@ SetProperty(\$pagename, 'title', PSS('$1')))))"); + \$zz=array('title' => SetProperty(\$pagename, 'title', PSS('$1'), NULL, $tmpkeep))))"); +unset($tmpwhen, $tmpkeep); ## (:keywords:), (:description:) Markup('keywords', 'directives', Index: scripts/version.php =================================================================== --- scripts/version.php (.../pmwiki-2.2.8) (revision 2460) +++ scripts/version.php (.../pmwiki-2.2.9) (revision 2460) @@ -1 +1 @@ -$1'); ## == Headings == Index: scripts/xlpage-utf-8.php =================================================================== --- scripts/xlpage-utf-8.php (.../pmwiki-2.2.8) (revision 2460) +++ scripts/xlpage-utf-8.php (.../pmwiki-2.2.9) (revision 2460) @@ -1,5 +1,5 @@ [@(:if cond param:) body (:ifend:)@]%0a-> [@(:if cond param:) body (:else:) body (:ifend:)@]%0a-> [@(:if cond param:) body (:elseif cond param:) body (:ifend:)@] '^see [[PmWiki/ReleaseNotes#elseifelse|#]] [[PmWiki/ChangeLog#beta32|#]]^'%0a%0awhere "cond" names a [[#built-in-conditions | condition to be tested]], and "param" is a parameter or other argument to the condition.%0a%0a!! Markup Shortcut%0aYou can also use an abbreviated form of [@(:ifend:)@], [@(:if:)@] for brevity:%0a-> [@(:if cond1:) cond1 is true (:if:)@]%0a-> [@(:if cond1:) cond1 is true (:if cond2:) cond2 is true (:if:)@]%0aThe latter is identical to :%0a-> [@(:if cond1:) cond1 is true (:ifend:)(:if cond2:) cond2 is true (:ifend:)@]%0a%0a!! Built-in Conditions [[#built-in-conditions]]%0aThe built-in conditions include:%0a%0a(:table class='indent' border=0 cellpadding=0 cellspacing=0 valign=top:)%0a(:cellnr:)[@(:if name PAGENAME:)@]%0a(:cell:) - %0a(:cell:)current page is named "[@PAGENAME@]"%0a(:cellnr:)[@(:if group GROUPNAME:)@]%0a(:cell:) - %0a(:cell:)current group is named "[@GROUPNAME@]"%0a(:cellnr:)[@(:if auth LEVEL PAGENAME:)@]%0a(:cell:) - %0a(:cell:)viewer is authorized - meaning "what they are allowed to do" - matches a "[@LEVEL@]" where [@LEVEL@] can be: [@read@], [@edit@], [@upload@], [@attr@] or [@admin@]; [@PAGENAME@] is optional.%0a(:cellnr:)[@(:if authid:)@]%0a(:cell:) - %0a(:cell:)current viewer is authenticated - meaning they have proven who they are via login - to use this the wiki must include recipe [[PmWiki/AuthUser|AuthUser]] or others which set the [@$AuthId@] variable.%0a(:cellnr:)[@(:if enabled InvalidLogin:)@]%0a(:cell:) - %0a(:cell:)username and password not authenticated. To use this the wiki must include recipe AuthUser.%0a(:cellnr:)[@(:if true:)@]%0a(:cell:) - %0a(:cell:)always include text%0a(:cellnr:)[@(:if false:)@]%0a(:cell:) - %0a(:cell:)always exclude text (same as a comment)%0a(:cellnr:)[@(:if attachments:)@]%0a(:cell:) - %0a(:cell:)current page has one or more attachments%0aIf used in a sidebar, header, or footer the condition applies to the main page.%0a(:cellnr:)[@(:if date DATE VALUE:)@]%0a(:cell:) - %0a(:cell:)[@DATE@] may be year-month. year-month-day is optional. %0aEvaluates to true if [@VALUE@] is within [@DATE@] ("now" or "today" is assumed if VALUE is omitted, as in the following examples.) (Note that [@VALUE@] can be a recognizable date via strtotime() whereas DATE [or DATE1 and DATE2 below] have a more fixed format which explicitly must exclude spaces. Any spaces in DATE1 or DATE2 cause unpredictable results.)%0a(:cellnr:)[@(:if date DATE.. VALUE:)@]%0a(:cell:) - %0a(:cell:)true if [@VALUE@] (or current date if omitted) is [@DATE@] or later (unlimited)%0a(:cellnr:)[@(:if date ..DATE VALUE:)@]%0a(:cell:) - %0a(:cell:)true if [@VALUE@] (or current date if omitted) is [@DATE@] or earlier (unlimited)%0a(:cellnr:)[@(:if date DATE1..DATE2 VALUE:)@]%0a(:cell:) - %0a(:cell:)true if [@VALUE@] (or current date if omitted) is in range [@DATE1@] to [@DATE2@] (inclusive) %0a%25green newwin%25[-''dates are in [[http://w3.org/QA/Tips/iso-date|standard]] format yyyy-mm-dd or yyyymmdd or yyyymmddThhmm (note the "T" between the date and the hour, and also see comment above on format of VALUE).-]''%0a[[%3c%3c]][-Note the ".." cannot have leading or trailing spaces.-]%0a(:cellnr:)[@(:if enabled VAR:)@]%0a(:cell:) - %0a(:cell:)true if PHP VAR is true%0a(:cellnr:)[@(:if enabled AuthPw:)@]%0a(:cell:) - %0a(:cell:)true if user has entered any password during the current browser session.%0a- This does not mean the user has entered the correct password, just that they entered one.%0a(:cellnr:)[@(:if equal STRING1 STRING2:)@]%0a(:cell:) - %0a(:cell:)true if [@STRING1@] equals [@STRING2@], use quotes if the string or string variable contains spaces, eg [@"MY STRING"@]%0a(:cellnr:)[@(:if match REG_EXPRESSION:)@]%0a(:cell:) - %0a(:cell:)true if current page name matches the regular expression%0a(:cellnr:)[@(:if exists PAGENAME:)@]%0a(:cell:) - %0a(:cell:)true if the page ''pagename'' exists%0a(:cellnr:)[@(:if action ACTION:)@]%0a(:cell:) - %0a(:cell:)true if the action ?action=ACTION (edit, print, ...) is currently permitted. To test what the current action being requested is, use [@(:if equal {$Action} ACTION:)@].%0a(:cellnr:)[@(:if ontrail WikiTrailPage ThisPage:)@]%0a(:cell:) - %0a(:cell:)true if ThisPage is in a list used as a [[wiki trails | trail]] on WikiTrailPage%0a(:tableend:)%0a%0aThe name and group conditionals will work even for an included page, as the "name" and "group" conditionals always check the currently displayed page, as opposed to the page that the markup appears in.%0a%0a!! Negated Conditions%0aNegated forms of conditions also work:%0a%0a(:table class='indent' border=0 cellpadding=0 cellspacing=0 valign=top:)%0a(:cellnr:)[@(:if !attachments:)@]%0a(:cell:) - %0a(:cell:)this page has no attachments%0a(:cellnr colspan=3:) %0a(:cellnr:)[@(:if ! name PAGENAME:)@]%0a(:cell rowspan=3:)%0a(:cell rowspan=3 valign=middle:)current page is NOT named "[@PAGENAME@]"%0a(:cellnr:)[@(:if name -PAGENAME :)@]%0a(:cell:)%0a(:cellnr:)[@(:if name !PAGENAME :)@]%0a(:tableend:)%0a%0a!! Nesting Conditions [[#nested-conditions]]%0aConditions may be nested (from 2.2.beta 66).%0a%0aNested [@(:if:)@] works the same way as nested [@(:div:)@]. To have nested conditionals you need to number the if, and the matching else/ifend:%0a->[@%0a(:if cond1:)%0a cond1 is true%0a (:if2 cond2:)%0a cond1 and cond2 are true%0a (:else2:)%0a cond1 is true, cond2 is not%0a (:if2end:)%0a(:else:)%0a cond1 is false, cond2 testing was skipped%0a(:ifend:)%0a@]%0a[-''Spaces were added for better readability.''-]%0a%0a!! Using wildcard placeholders(:if false:)%25green%25[-(new for pmwiki 2.1.beta21)-]:(:ifend:)%0aThe character [@*@] can be used as a wildcard to represent any character, zero, one, or multiple times.\\%0aThe character [@?@] can be used as a wildcard to represent any character exactly once.\\%0aWildcard characters ([@*@] and [@?@]) can be used with the ''name'' and ''group'' conditional markups, thus:%0a%0a(:table class='indent' border=0 cellpadding=0 cellspacing=0 valign=top:)%0a(:cellnr:)[@(:if name PmCal.2005* :)@]%0a(:cell:) - %0a(:cell:)current page is in group PmCal and begins with 2005%0a(:cellnr:)[@(:if group PmWiki* :)@]%0a(:cell:) - %0a(:cell:)current page is in group PmWiki or a group beginning with PmWiki%0a(:cellnr:)[@(:if name Profiles.*,-Profiles.Profiles :)@]%0a(:cell:) - %0a(:cell:)current page is in group [@Profiles@] but not [@Profiles.Profiles@]%0a(:tableend:)%0a%0a!!Using [[PmWiki/page text variables]], [[PmWiki/page variables]] and [[PmWiki/markup expressions]]%0aPage text variables (PTVs), page variables (PVs) and markup expressions can be used in conditional markup. They will be assigned/evaluated before the condition(s). %0a%0a!! Use with [[PmWiki/page list templates]]%0aConditional markup is used extensively with [[Site/page list templates]].%0a%0aUse with page variables:%0a-> = current item%0a-> %3c previous item%0a-> > next item%0a%0aConditionals used to structure pagelist output:%0a [@(:if equal {%3c$Group}:)@] deprecated in favour of [@(:template first:)@] At beginning of list%0a [@(:if equal {>$Group}:)@] deprecated in favour of [@(:template last:)@] At end of list%0a [@(:if ! equal {=$Group} {%3c$Group}:)@] deprecated in favour of [@(:template first {=$Group}:)@] First item in group%0a [@(:if ! equal {=$Group} {>$Group}:)@] deprecated in favour of [@(:template last {=$Group}:)@] Last item in group%0a%0a!! Combining conditions%0aConditions (as previously defined) may be combined into more complex conditional expressions using one of these three equivalent forms:%0a%0a->[@%0a(:if expr EXPRESSION :)%0a(:if [ EXPRESSION ] :)%0a(:if ( EXPRESSION ) :)@]%0a%0aConditions are combined into expressions with boolean operators and brackets. In the next table, A and B are either regular conditions or (round-)bracketed sub-expressions of regular conditions:%0a%0a>>indent%3c%3c%0a|| border=1 cellpadding=2 cellspacing=0%0a||! Expression ||! Operator ||! Result ||%0a|| [@A and B@] || And ||TRUE if both A and B are TRUE.||%0a|| [@A or B@] || Or ||TRUE if either A or B is TRUE.||%0a|| [@A xor B@] || Xor ||TRUE if either A or B is TRUE, but not both.||%0a|| [@! A@] || Not ||TRUE if A is not TRUE.||%0a|| [@A && B@] || And ||TRUE if both A and B are TRUE.||%0a|| [@A || B@] || Or ||TRUE if either A or B is TRUE.||%0a>>%3c%3c%0a%0aExample%0a->[@%0a(:if [ name SomePage and group SomeGroup ]:) equivalent to (:if name SomeGroup.SomePage:)@]%0a%0aNote:%0a* Spaces around operators and brackets are required.%0a* No specific feedback is given for syntax errors or unbalanced brackets.%0a* Use round brackets (not square) for nested expressions.%0a%0aThus, the following is a valid way of building an expression that shows the following contents only when the user is either the administrator, or is logged in and the time is later than the given date:%0a%0a->[@(:if [ auth admin || ( authid && date 2006-06-01.. ) ] :)@]%0a%0aNesting with square brackets will silently fail to work as expected:%0a%0a->[@(:if [ auth admin || [ authid && date 2006-06-01 ] ] :) @]   %25red%25NOTE: Doesn't Work!%0a%0aA common use of these complex tests are for expressions like:%0a%0a->[@(:if expr auth admin || auth attr || auth edit :)@]%0a->[@[[Logout -> {$Name}?action=logout]]@]%0a->[@(:ifend:)@]%0a%0awhich provides a ''logout'' link only when the browser has admin, attr, or edit permissions.%0a%0a%25audience%25 admins (advanced)%0a!! Creating new conditions%0aSee [[Cookbook:ConditionalMarkupSamples]].%0a%0aSee also [[PmWiki/PageVariables#specialreferences|special references]] for the use of [={*$Variables}=].%0a%0a>>faq%3c%3c [[#faq]] -time=1257000872 +text=(:Summary:The if directive allows portions of a page to be included or excluded from rendering:)%0a%25define=indent block margin-left=2em%25%0a(:Audience: authors, admins (advanced) :)%0a!! Using the [=(:if:)=] Directive%0aThe [@(:if:)@] directive allows portions of a page to be included or %0aexcluded from rendering. The generic forms of the [@(:if:)@] directive are%0a%0a-> [@(:if cond param:) body (:ifend:)@]%0a-> [@(:if cond param:) body (:else:) body (:ifend:)@]%0a-> [@(:if cond param:) body (:elseif cond param:) body (:ifend:)@] '^see [[PmWiki/ReleaseNotes#elseifelse|#]] [[PmWiki/ChangeLog#beta32|#]]^'%0a%0awhere "cond" names a [[#built-in-conditions | condition to be tested]], and "param" is a parameter or other argument to the condition.%0a%0a!! Markup Shortcut%0aYou can also use an abbreviated form of [@(:ifend:)@], [@(:if:)@] for brevity:%0a-> [@(:if cond1:) cond1 is true (:if:)@]%0a-> [@(:if cond1:) cond1 is true (:if cond2:) cond2 is true (:if:)@]%0aThe latter is identical to :%0a-> [@(:if cond1:) cond1 is true (:ifend:)(:if cond2:) cond2 is true (:ifend:)@]%0a%0a!! Built-in Conditions [[#built-in-conditions]]%0aThe built-in conditions include:%0a%0a(:table class='indent' border=0 cellpadding=0 cellspacing=0 valign=top:)%0a(:cellnr:)[@(:if name PAGENAME:)@]%0a(:cell:) - %0a(:cell:)current page is named "[@PAGENAME@]"%0a(:cellnr:)[@(:if group GROUPNAME:)@]%0a(:cell:) - %0a(:cell:)current group is named "[@GROUPNAME@]"%0a(:cellnr:)[@(:if auth LEVEL PAGENAME:)@]%0a(:cell:) - %0a(:cell:)viewer is authorized - meaning "what they are allowed to do" - matches a "[@LEVEL@]" where [@LEVEL@] can be: [@read@], [@edit@], [@upload@], [@attr@] or [@admin@]; [@PAGENAME@] is optional.%0a(:cellnr:)[@(:if authid:)@]%0a(:cell:) - %0a(:cell:)current viewer is authenticated - meaning they have proven who they are via login - to use this the wiki must include recipe [[PmWiki/AuthUser|AuthUser]] or others which set the [@$AuthId@] variable.%0a(:cellnr:)[@(:if enabled InvalidLogin:)@]%0a(:cell:) - %0a(:cell:)username and password not authenticated. To use this the wiki must include recipe AuthUser.%0a(:cellnr:)[@(:if true:)@]%0a(:cell:) - %0a(:cell:)always include text%0a(:cellnr:)[@(:if false:)@]%0a(:cell:) - %0a(:cell:)always exclude text (same as a comment)%0a(:cellnr:)[@(:if attachments:)@]%0a(:cell:) - %0a(:cell:)current page has one or more attachments%0aIf used in a sidebar, header, or footer the condition applies to the main page.%0a(:cellnr:)[@(:if date DATE VALUE:)@]%0a(:cell:) - %0a(:cell:)[@DATE@] may be year-month. year-month-day is optional. %0aEvaluates to true if [@VALUE@] is within [@DATE@] ("now" or "today" is assumed if VALUE is omitted, as in the following examples.) (Note that [@VALUE@] can be a recognizable date via strtotime() whereas DATE [or DATE1 and DATE2 below] have a more fixed format which explicitly must exclude spaces. Any spaces in DATE1 or DATE2 cause unpredictable results.)%0a(:cellnr:)[@(:if date DATE.. VALUE:)@]%0a(:cell:) - %0a(:cell:)true if [@VALUE@] (or current date if omitted) is [@DATE@] or later (unlimited)%0a(:cellnr:)[@(:if date ..DATE VALUE:)@]%0a(:cell:) - %0a(:cell:)true if [@VALUE@] (or current date if omitted) is [@DATE@] or earlier (unlimited)%0a(:cellnr:)[@(:if date DATE1..DATE2 VALUE:)@]%0a(:cell:) - %0a(:cell:)true if [@VALUE@] (or current date if omitted) is in range [@DATE1@] to [@DATE2@] (inclusive) %0a%25green newwin%25[-''dates are in [[http://w3.org/QA/Tips/iso-date|standard]] format yyyy-mm-dd or yyyymmdd or yyyymmddThhmm (note the "T" between the date and the hour, and also see comment above on format of VALUE).-]''%0a[[%3c%3c]][-Note the ".." cannot have leading or trailing spaces.-]%0a(:cellnr:)[@(:if enabled VAR:)@]%0a(:cell:) - %0a(:cell:)true if PHP VAR is true%0a(:cellnr:)[@(:if enabled AuthPw:)@]%0a(:cell:) - %0a(:cell:)true if user has entered any password during the current browser session.%0a- This does not mean the user has entered the correct password, just that they entered one.%0a(:cellnr:)[@(:if equal STRING1 STRING2:)@]%0a(:cell:) - %0a(:cell:)true if [@STRING1@] equals [@STRING2@], use quotes if the string or string variable contains spaces, eg [@"MY STRING"@]%0a(:cellnr:)[@(:if match REG_EXPRESSION:)@]%0a(:cell:) - %0a(:cell:)true if current page name matches the regular expression%0a(:cellnr:)[@(:if exists PAGENAME:)@]%0a(:cell:) - %0a(:cell:)true if the page ''pagename'' exists%0a(:cellnr:)[@(:if action ACTION:)@]%0a(:cell:) - %0a(:cell:)true if the action ?action=ACTION (edit, print, ...) is currently permitted. To test what the current action being requested is, use [@(:if equal {$Action} ACTION:)@].%0a(:cellnr:)[@(:if ontrail WikiTrailPage ThisPage:)@]%0a(:cell:) - %0a(:cell:)true if ThisPage is in a list used as a [[wiki trails | trail]] on WikiTrailPage%0a(:tableend:)%0a%0aThe name and group conditionals will work even for an included page, as the "name" and "group" conditionals always check the currently displayed page, as opposed to the page that the markup appears in.%0a%0a!! Negated Conditions%0aNegated forms of conditions also work:%0a%0a(:table class='indent' border=0 cellpadding=0 cellspacing=0 valign=top:)%0a(:cellnr:)[@(:if !attachments:)@]%0a(:cell:) - %0a(:cell:)this page has no attachments%0a(:cellnr colspan=3:) %0a(:cellnr:)[@(:if ! name PAGENAME:)@]%0a(:cell rowspan=3:)%0a(:cell rowspan=3 valign=middle:)current page is NOT named "[@PAGENAME@]"%0a(:cellnr:)[@(:if name -PAGENAME :)@]%0a(:cell:)%0a(:cellnr:)[@(:if name !PAGENAME :)@]%0a(:tableend:)%0a%0a!! Nesting Conditions [[#nested-conditions]]%0aConditions may be nested (from 2.2.beta 66).%0a%0aNested [@(:if:)@] works the same way as nested [@(:div:)@]. To have nested conditionals you need to number the if, and the matching else/ifend:%0a->[@%0a(:if cond1:)%0a cond1 is true%0a (:if2 cond2:)%0a cond1 and cond2 are true%0a (:else2:)%0a cond1 is true, cond2 is not%0a (:if2end:)%0a(:else:)%0a cond1 is false, cond2 testing was skipped%0a(:ifend:)%0a@]%0a[-''Spaces were added for better readability.''-]%0a%0a!! Using wildcard placeholders(:if false:)%25green%25[-(new for pmwiki 2.1.beta21)-]:(:ifend:)%0aThe character [@*@] can be used as a wildcard to represent any character, zero, one, or multiple times.\\%0aThe character [@?@] can be used as a wildcard to represent any character exactly once.\\%0aWildcard characters ([@*@] and [@?@]) can be used with the ''name'' and ''group'' conditional markups, thus:%0a%0a(:table class='indent' border=0 cellpadding=0 cellspacing=0 valign=top:)%0a(:cellnr:)[@(:if name PmCal.2005* :)@]%0a(:cell:) - %0a(:cell:)current page is in group PmCal and begins with 2005%0a(:cellnr:)[@(:if group PmWiki* :)@]%0a(:cell:) - %0a(:cell:)current page is in group PmWiki or a group beginning with PmWiki%0a(:cellnr:)[@(:if name Profiles.*,-Profiles.Profiles :)@]%0a(:cell:) - %0a(:cell:)current page is in group [@Profiles@] but not [@Profiles.Profiles@]%0a(:tableend:)%0a%0a!!Using [[PmWiki/page text variables]], [[PmWiki/page variables]] and [[PmWiki/markup expressions]]%0aPage text variables (PTVs), page variables (PVs) and markup expressions can be used in conditional markup. They will be assigned/evaluated before the condition(s). %0a%0a!! Use with [[PmWiki/page list templates]]%0aConditional markup is used extensively with [[Site/page list templates]].%0a%0aUse with page variables:%0a-> = current item%0a-> %3c previous item%0a-> > next item%0a%0aConditionals used to structure pagelist output:%0a [@(:if equal {%3c$Group}:)@] deprecated in favour of [@(:template first:)@] At beginning of list%0a [@(:if equal {>$Group}:)@] deprecated in favour of [@(:template last:)@] At end of list%0a [@(:if ! equal {=$Group} {%3c$Group}:)@] deprecated in favour of [@(:template first {=$Group}:)@] First item in group%0a [@(:if ! equal {=$Group} {>$Group}:)@] deprecated in favour of [@(:template last {=$Group}:)@] Last item in group%0a%0a!! Combining conditions%0aConditions (as previously defined) may be combined into more complex conditional expressions using one of these three equivalent forms:%0a%0a->[@%0a(:if expr EXPRESSION :)%0a(:if [ EXPRESSION ] :)%0a(:if ( EXPRESSION ) :)@]%0a%0aConditions are combined into expressions with boolean operators and brackets. In the next table, A and B are either regular conditions or (round-)bracketed sub-expressions of regular conditions:%0a%0a>>indent%3c%3c%0a|| border=1 cellpadding=2 cellspacing=0%0a||! Expression ||! Operator ||! Result ||%0a|| [@A and B@] || And ||TRUE if both A and B are TRUE.||%0a|| [@A or B@] || Or ||TRUE if either A or B is TRUE.||%0a|| [@A xor B@] || Xor ||TRUE if either A or B is TRUE, but not both.||%0a|| [@! A@] || Not ||TRUE if A is not TRUE.||%0a|| [@A && B@] || And ||TRUE if both A and B are TRUE.||%0a|| [@A || B@] || Or ||TRUE if either A or B is TRUE.||%0a>>%3c%3c%0a%0aExample%0a->[@%0a(:if [ name SomePage and group SomeGroup ]:) equivalent to (:if name SomeGroup.SomePage:)@]%0a%0a'''Important Notes:'''%0a* Spaces are ''required'' around operators and brackets.%0a* No specific feedback is given for syntax errors or unbalanced brackets.%0a* Use round brackets (not square) for nested expressions.%0a%0aThus, the following is a valid way of building an expression that shows the following contents only when the user is either the administrator, or is logged in and the time is later than the given date:%0a%0a->[@(:if [ auth admin || ( authid && date 2006-06-01.. ) ] :)@]%0a%0aNesting with square brackets will silently fail to work as expected:%0a%0a->[@(:if [ auth admin || [ authid && date 2006-06-01 ] ] :) @]   %25red%25NOTE: Doesn't Work!%0a%0aA common use of these complex tests are for expressions like:%0a%0a->[@(:if expr auth admin || auth attr || auth edit :)@]%0a->[@[[Logout -> {$Name}?action=logout]]@]%0a->[@(:ifend:)@]%0a%0awhich provides a ''logout'' link only when the browser has admin, attr, or edit permissions.%0a%0a%25audience%25 admins (advanced)%0a!! Creating new conditions%0aSee [[Cookbook:ConditionalMarkupSamples]].%0a%0aSee also [[PmWiki/PageVariables#specialreferences|special references]] for the use of [={*$Variables}=].%0a%0a>>faq%3c%3c [[#faq]] +time=1261527274 Index: wikilib.d/PmWiki.UploadsAdmin =================================================================== --- wikilib.d/PmWiki.UploadsAdmin (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.UploadsAdmin (.../pmwiki-2.2.9) (revision 2460) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.7 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 FirePHP/0.3 -author=Frank +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 +author=Petko charset=ISO-8859-1 -csum= -host=145.18.27.32 +csum=corrected note about .htaccess +host=81.65.12.233 name=PmWiki.UploadsAdmin -rev=134 -targets=PmWiki.PmWiki,PmWiki.Uploads,PmWiki.Security,PmWiki.WikiAdministrator,PmWiki.PasswordsAdmin,PmWiki.Passwords,PmWiki.GroupCustomizations,PmWiki.LocalCustomizations,PmWiki.WikiGroup,PmWiki.PageDirectives -text=(:title Uploads Administration:)%0a(:Summary:Administration of PmWiki [[uploads]]:)%0a[[PmWiki]] includes a script called ''upload.php'' that allows users to [[upload(s)]] files to the wiki server using a web browser. Uploaded files (also called ''attachments'') can then be easily accessed using markup within wiki pages. This page describes how to install and configure the upload feature.%0a%0a%0a!! Some notes about [[security]]%0a%0aPmWiki takes a somewhat, but justifiable, paranoid stance%0awhen it comes to the uploads feature. Thus, the default settings for%0auploads tend to try to restrict the feature as much as possible:%0a%0a* The upload function is disabled by default%0a* Even if you enable it, the function is password locked by default%0a* Even if you remove the password, you're restricted to uploading files with certain names, extensions, and sizes%0a* The characters that may appear in upload filenames are (default) alphanumerics, hyphen, underscore, dot, and space ([[#restrictinguploadedfiles|see also here]]).%0a* The maximum upload size is small (50K by default)%0a%0aThis way the potential damage is limited until/unless the wiki%0aadministrator explicitly relaxes the restrictions.%0a%0aKeep in mind that letting users (anonymously!) upload files to your web server does entail some amount of risk. The ''upload.php'' script has been designed to reduce the hazards, but [[wiki administrator]]s should be aware that the potential for vulnerabilities exist, and that misconfiguration of the upload utility could lead to unwanted consequences.%0a%0aBy default, authorized users are able to overwrite files that have already been uploaded, without the possibility of restoring the previous version of the file. If you want to disallow users from being able to overwrite files that have already been uploaded, add the following line to ''config.php'':%0a%0a->[@$EnableUploadOverwrite = 0;@]%0a%0aAlternatively, an administrator can [[#upload_versions|keep older versions]] of uploads.%0a%0aAn administrator can also [[#direct_download|configure]] PmWiki so the password mechanism controls access to uploaded files.%0a%0a%0a!! Basic installation%0a%0aThe ''upload.php'' script is automatically included from ''stdconfig.php'' if the $EnableUpload variable is true in ''config.php''. In addition, ''config.php'' can set the $UploadDir and $UploadUrlFmt variables to specify the local directory where uploaded files should be stored, and the URL that can be used to access that directory. By default, $UploadDir and $UploadUrlFmt assume that uploads will be stored in a directory called ''uploads/'' within the current directory (usually the one containing ''pmwiki.php''). In addition, ''config.php'' should also set a default upload password (see [[PasswordsAdmin]]).%0a%0aThus, a basic ''config.php'' for uploads might look like:%0a%0a->[@%0a%3c?php if (!defined('PmWiki')) exit();%0a## Enable uploads and set a site-wide default upload password.%0a$EnableUpload = 1;%0a$DefaultPasswords['upload'] = crypt('secret');%0a@]%0a%0aIf you have edit passwords and wish to allow all users with edit rights to upload, instead of $DefaultPasswords['upload'], you can set @@$HandleAuth['upload'] = 'edit';@@ in config.php.%0a%0a'''Important''': do NOT create the uploads directory yet! See the next paragraph.%0a%0aYou may also need to explicitly set which filesystem directory will hold uploads and provide a URL that corresponds to that directory like:%0a%0a->[@%0a$UploadDir = "/home/foobar/public_html/uploads";%0a$UploadUrlFmt = "http://example.com/~foobar/uploads";%0a@]%0a%0a[[#uploaddirectoryconfiguration]]%0a!!! Upload directory configuration%0aUploads can be configured site-wide, by-group, or by-page by changing $UploadPrefixFmt. 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 upload by group.%0a%0a[[#sitewideprefix]]For site-wide uploads, use%0a%0a->[@$UploadPrefixFmt = '';@]%0a%0aTo organize uploads by page, use:%0a->[@%0a$UploadPrefixFmt = '/$Group/$Name';%0a@]%0a%0a!!! The upload directory%0a%0aFor the upload feature to work properly, the directory given by [=$UploadDir=] must be writable by the web server process, and it usually must be in a location that is accessible to the web somewhere (e.g., in a subdirectory of ''public_html''). Executing PmWiki with uploads enabled will prompt you with the set of steps required to create the uploads directory on your server (it differs from one server to the next). ''Note that you are likely to be required to explicitly create writable group- or page-specific subdirectories as well!''%0a%0a%0a!!! Uploading a file%0a%0aOnce the upload feature is enabled, users can access the upload form by adding "@@?action=upload@@" to the end of a normal PmWiki URL. The user will be prompted for an upload password similar to the way other pages ask for passwords (see [[Passwords]] and [[PasswordsAdmin]] for information about setting passwords on pages, groups, and the entire site).%0a%0aAnother way to access the upload form is to insert the markup "[@Attach:filename.ext@]" into an existing page, where @@filename.ext@@ is the name of a new file to be uploaded. When the page is displayed, a '?-link' will be added to the end of the markup to take the author to the upload page. (See [[Uploads]] for syntax variations.)%0a%0aBy default, PmWiki will organize the uploaded files into separate subdirectories for each group. This can be changed by modifying the $UploadPrefixFmt variable. See [[Cookbook:UploadGroups]] for details.%0a%0a%0a!! [[#upload_versions]] Versioning Uploaded Files%0a%0aPmWiki does not manage versioning of uploaded files by default. However, by setting $EnableUploadVersions=1; an administrator can have older versions of uploads preserved in the uploads directory along with the most recent version.%0a%0a!! Upload restrictions%0a!!! Restricting uploaded files for groups and pages%0a%0aUploads can be enabled only for specific groups or pages by using a [[group customization(s)]]. Simply set @@$EnableUpload=1;@@ for those groups or pages where uploading is to be enabled; alternately, set @@$EnableUpload=1;@@ in the config.php file and then set @@$EnableUpload=0;@@ in the per-group or per-page customization files where uploads are to be disabled.%0a%0a!!! Restricting total upload size for a group or the whole wiki%0a%0aUploads can be restricted to an overall size limit for groups. In the group configuration file (i.e., local/Group.php), add the line%0a%0a->$UploadPrefixQuota = 1000000; # limit group uploads to 1000KB (1MB)%0a%0aThis will limit the total size of uploads for that group to 1000KB --any upload that pushes the total over the limit will be rejected with an error message. This value defaults to zero (unlimited).%0a%0aUploads can also be restricted to an overall size limit for all uploads. Add the line%0a%0a->$UploadDirQuota = 10000000; # limit total uploads to 10000KB (10MB)%0a%0aThis will limit the total size of uploads for the whole wiki to 10000KB --any upload that pushes the total over the limit will be rejected with an error message. This value defaults to zero (unlimited).%0a%0a%0a[[#restrictinguploadedfiles]]%0a!!!Restricting uploaded files type and size%0a%0aThe upload script performs a number of verifications on an uploaded file before storing it in the upload directory. The basic verifications are described below.%0a:'''filenames''': the name for the uploaded file can contain only letters, digits, underscores, hyphens, spaces, and periods, and the name must begin and end with a letter or digit. %0a:'''file extension''': only files with approved extensions such as "@@.gif@@", "@@.jpeg@@", "@@.doc@@", etc. are allowed to be uploaded to the web server. This is vitally important for server security, since the web server might attempt to execute or specially process files with extensions like "@@.php@@", "@@.cgi@@", etc. %0a:'''file size''': By default all uploads are limited to 50K bytes, as specified by the $UploadMaxSize variable. Thus, to limit all uploads to 100KB, simply specify a new value for $UploadMaxSize in ''config.php'':%0a%0a->[@$UploadMaxSize = 100000;@]%0a%0aHowever, maximum file sizes can also be specified for each type of file uploaded. Thus, an administrator can restrict "@@.gif@@" and "@@.jpeg@@" files to 20K, "@@.doc@@" files to 200K, and all others to the size given by $UploadMaxSize. The $UploadExtSize array is used to determine which file extensions are valid and the maximum upload size (in bytes) for each file type. For example:%0a%0a->[@$UploadExtSize['gif'] = 20000; # limit .gif files to 20KB@]%0a%0aSetting an entry to zero disables file uploads of that type altogether:%0a%0a->[@$UploadExtSize['zip'] = 0; # disallow .zip files@]%0a%0aYou can limit which types of files are uploadable by disabling all defaults and specifying only desired types%0aSetting the variable $UploadMax to zero will disable all default file types. Individual file types may then be enabled by setting their maximum size with the variable $UploadExtSize.%0a%0a-> [@# turns off all upload extensions%0a$UploadMaxSize = 0;%0a%0a# enable only these file types for uploading%0a$aSize=100000; // 100 KB file size limitation%0a$UploadExtSize['jpg' ] = $aSize;%0a$UploadExtSize['gif' ] = $aSize;%0a$UploadExtSize['png' ] = $aSize;%0a@]%0a%0a[[#newuploadfiletypes]]%0a!! Adding new file types to permitted uploads%0a%0aTo add a new extension to the list of allowed upload types, add a line like the following to a [[local customization(s)]] file:%0a%0a->[@$UploadExts['ext'] = 'content-type';@]%0a%0awhere ''ext'' is the extension to be added, and ''content-type'' is the "[[(Wikipedia:)MIME type]]", or content-type (which you may find %25newwin%25[[http://www.iana.org/assignments/media-types/ | here]] or on the lower part of %25newwin%25[[http://www.w3schools.com/media/media_mimeref.asp | this page]]) to be used for files with that extension. For example, to add the '[@dxf@]' extension with a Content-Type of '[@image/x-dxf@]', place the line%0a%0a->[@$UploadExts['dxf'] = 'image/x-dxf';@]%0a%0aEach entry in $UploadExts needs to be the extension and the%0amime-type associated with that extension, thus:%0a%0a->[@%0a$UploadExts = array(%0a 'gif' => 'image/gif',%0a 'jpeg' => 'image/jpeg',%0a 'jpg' => 'image/jpeg',%0a 'png' => 'image/png',%0a 'xxx' => 'yyyy/zzz'%0a);%0a@]%0a%0aFor the types that PmWiki already knows about it's not necessary to repeat them here (the ''upload.php'' script adds PmWiki's defaults to whatever the administrator supplies).%0a[[#newuploadfiletypesend]]%0aSee also Cookbook:UploadTypes for additional types.%0a%0a[[#otherfilesizelimits]]%0a!!Other file size limits%0a%0aThere are other factors involved that affect upload file sizes. In Apache 2.0, there is a `[[http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody|LimitRequestBody]] directive that controls the maximum size of anything that is posted (including file uploads). Apache has this defaulted to unlimited size. However, some Linux distributions (e.g., Red Hat Linux) limit postings to 512K so this may need to be changed or increased. (Normally these settings are in an ''httpd.conf'' configuration file or in a file in ''/etc/httpd/conf.d''.)%0a%0aProblem noted on Red Hat 8.0/9.0 with Apache 2.0.x, the error "Requested content-length of 670955 is larger than the configured limit of 524288" was occurring under Apache and a "Page not found" would appear in the browser. Trying the above settings made no change with PHP, but on Red Hat 8.0/9.0 there is an additional PHP config file, /etc/httpd/conf.d/php.conf, and increasing the number on the line "`LimitRequestBody 524288" solves the issue.%0a%0aPHP itself has two limits on file uploads (usually located in @@/etc/php.ini@@). The first is the @@upload_max_filesize@@ parameter, which is set to 2MB by default. The second is @@post_max_size@@, which is set to 6MB by default.%0a%0aWith the variables in place--PmWiki's maximum file size, Apache's request-size limits, and the PHP file size parameters, the maximum uploaded file size will be the smallest of the three variables.%0a%0a!!! [[#direct_download]] Password protecting uploaded files%0aSetting a read password for pages (and groups) will prevent an attached file from being seen or accessed through the page, but to prevent direct access to the file location (the uploads/ directory) one can do the following:%0a %0a* In local/config.php set @@$EnableDirectDownload=0@@;%0a* If you use per-group upload directories (PmWiki default, see $UploadPrefixFmt), add to config.php @@$EnableUploadGroupAuth = 1;@@%0a* Deny public access to the uploads/ directory through moving it out of the html/ or public_html/ directory tree, or through a .htaccess file.%0a%0a%0aSee [[Cookbook:Secure attachments]] {Cookbook.SecureAttachments$:Summary}%0a%0a%0a!! Other notes%0a%0a* If uploads doesn't seem to work, make sure that your PHP installation allows uploads. The ''php.ini'' file (usually ''/etc/php.ini'' or ''/usr/local/lib/php.ini'') should have %0a%0a->[@file_uploads = On@]%0a%0a* Another source of error in the ''php.ini'' file is a not defined ''upload_tmp_dir''. Just set this variable to your temp directory, e.g.%0a%0a->[@upload_tmp_dir = /tmp@]%0a%0a%0aNote that if you change this values, httpd must generally be restarted. Another way to check if uploads are allowed by the server is to set $EnableDiag to 1 in ''config.php'', and set ?action=phpinfo on a URL. The "@@file_uploads@@" variable must have a value of 1 (if it says "@@no value@@", that means it's off).%0a%0a%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I disable uploading of a certain type of file?%0aA: Here's an example of what to add to your ''local/config.php'' file to disable uploading of .zip files:%0a%0a->[@$UploadExtSize['zip'] = 0; # Disallow uploading .zip files.@]%0a%0a%0aQ: How do I attach uploads to individual pages or the entire site, instead of organizing them by [[wiki group]]?%0aA: Use the $UploadPrefixFmt variable (see also the Cookbook:UploadGroups recipe).%0a%0a->[@$UploadPrefixFmt = '/$FullName'; # per-page@]%0a->[@$UploadPrefixFmt = ''; # site-wide@]%0a%0aQ:For $UploadDirQuota - can you provide some units and numbers? Is the specification in bytes or bits? What is the number for 100K? 1 Meg? 1 Gig? 1 Terabyte?%0aA: Units are in bytes. %0a%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%0aQ: Is there a way to allow file names with Unicode or addtiional characters? %0aA: Yes, see $UploadNameChars%0a%0aQ:Where is the list of attachments stored?%0aA: It is generated on the fly by the [[PageDirectives#attachlist|(:attachlist:)]] markup.%0a%0aQ: How can I find orphaned or missing attachments%0aA: See [[Cookbook:Attachlist enhanced]] {Cookbook.AttachlistEnhanced$:Summary}%0a%0aQ: How can I prevent hotlinking of my uploaded images%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0aQ: I have limited the max upload size to 8 MB in config.php, however only files smaller than 2MB can be uploaded.%0aA: Check your php.ini for ''upload_max_filesize''%0a->[@%0aupload_max_filesize = 8M%0a@]%0a%0aIf you cannot access your php.ini directly try to soften server limits in an .htaccess file, e.g. in the uploads/ directory:%0a%0a->[@php_value post_max_size 63M%0aphp_value upload_max_filesize 62M%0aphp_value memory_limit 64M%0aphp_value max_execution_time 600%0aphp_value default_socket_timeout 600%0a@] -time=1259351049 +rev=139 +targets=PmWiki.PmWiki,PmWiki.Uploads,PmWiki.Security,PmWiki.WikiAdministrator,PmWiki.PasswordsAdmin,PmWiki.Passwords,Cookbook.UploadGroups,PmWiki.GroupCustomizations,PmWiki.LocalCustomizations,Cookbook.UploadTypes,Cookbook.SecureAttachments,PmWiki.WikiGroup,PmWiki.PageDirectives,Cookbook.AttachlistEnhanced,Cookbook.PreventHotlinking +text=(:title Uploads Administration:)%0a(:Summary:Administration of PmWiki [[uploads]]:)%0a[[PmWiki]] includes a script called ''upload.php'' that allows users to [[upload(s)]] files to the wiki server using a web browser. Uploaded files (also called ''attachments'') can then be easily accessed using markup within wiki pages. This page describes how to install and configure the upload feature.%0a%0a%0a!! Some notes about [[security]]%0a%0aPmWiki takes a somewhat, but justifiable, paranoid stance%0awhen it comes to the uploads feature. Thus, the default settings for%0auploads tend to try to restrict the feature as much as possible:%0a%0a* The upload function is disabled by default%0a* Even if you enable it, the function is password locked by default%0a* Even if you remove the password, you're restricted to uploading files with certain names, extensions, and sizes%0a* The characters that may appear in upload filenames are (default) alphanumerics, hyphen, underscore, dot, and space ([[#restrictinguploadedfiles|see also here]]).%0a* The maximum upload size is small (50K by default)%0a%0aThis way the potential damage is limited until/unless the wiki%0aadministrator explicitly relaxes the restrictions.%0a%0aKeep in mind that letting users (anonymously!) upload files to your web server does entail some amount of risk. The ''upload.php'' script has been designed to reduce the hazards, but [[wiki administrator]]s should be aware that the potential for vulnerabilities exist, and that misconfiguration of the upload utility could lead to unwanted consequences.%0a%0aBy default, authorized users are able to overwrite files that have already been uploaded, without the possibility of restoring the previous version of the file. If you want to disallow users from being able to overwrite files that have already been uploaded, add the following line to ''config.php'':%0a%0a->[@$EnableUploadOverwrite = 0;@]%0a%0aAlternatively, an administrator can [[#upload_versions|keep older versions]] of uploads.%0a%0aAn administrator can also [[#direct_download|configure]] PmWiki so the password mechanism controls access to uploaded files.%0a%0a%0a!! Basic installation%0a%0aThe ''upload.php'' script is automatically included from ''stdconfig.php'' if the $EnableUpload variable is true in ''config.php''. In addition, ''config.php'' can set the $UploadDir and $UploadUrlFmt variables to specify the local directory where uploaded files should be stored, and the URL that can be used to access that directory. By default, $UploadDir and $UploadUrlFmt assume that uploads will be stored in a directory called ''uploads/'' within the current directory (usually the one containing ''pmwiki.php''). In addition, ''config.php'' should also set a default upload password (see [[PasswordsAdmin]]).%0a%0aThus, a basic ''config.php'' for uploads might look like:%0a%0a->[@%0a%3c?php if (!defined('PmWiki')) exit();%0a## Enable uploads and set a site-wide default upload password.%0a$EnableUpload = 1;%0a$DefaultPasswords['upload'] = crypt('secret');%0a@]%0a%0aIf you have edit passwords and wish to allow all users with edit rights to upload, instead of $DefaultPasswords['upload'], you can set @@$HandleAuth['upload'] = 'edit';@@ in config.php.%0a%0a'''Important''': do NOT create the uploads directory yet! See the next paragraph.%0a%0aYou may also need to explicitly set which filesystem directory will hold uploads and provide a URL that corresponds to that directory like:%0a%0a->[@%0a$UploadDir = "/home/foobar/public_html/uploads";%0a$UploadUrlFmt = "http://example.com/~foobar/uploads";%0a@]%0a%0a[[#uploaddirectoryconfiguration]]%0a!!! Upload directory configuration%0aUploads can be configured site-wide, by-group, or by-page by changing $UploadPrefixFmt. 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 upload by group. ''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.''%0a%0a[[#sitewideprefix]]For site-wide uploads, use%0a%0a->[@$UploadPrefixFmt = '';@]%0a%0aTo organize uploads by page, use:%0a->[@%0a$UploadPrefixFmt = '/$Group/$Name';%0a@]%0a%0a!!! The upload directory%0a%0aFor the upload feature to work properly, the directory given by [=$UploadDir=] must be writable by the web server process, and it usually must be in a location that is accessible to the web somewhere (e.g., in a subdirectory of ''public_html''). Executing PmWiki with uploads enabled will prompt you with the set of steps required to create the uploads directory on your server (it differs from one server to the next). ''Note that you are likely to be required to explicitly create writable group- or page-specific subdirectories as well!''%0a%0a%0a!!! Uploading a file%0a%0aOnce the upload feature is enabled, users can access the upload form by adding "@@?action=upload@@" to the end of a normal PmWiki URL. The user will be prompted for an upload password similar to the way other pages ask for passwords (see [[Passwords]] and [[PasswordsAdmin]] for information about setting passwords on pages, groups, and the entire site).%0a%0aAnother way to access the upload form is to insert the markup "[@Attach:filename.ext@]" into an existing page, where @@filename.ext@@ is the name of a new file to be uploaded. When the page is displayed, a '?-link' will be added to the end of the markup to take the author to the upload page. (See [[Uploads]] for syntax variations.)%0a%0aBy default, PmWiki will organize the uploaded files into separate subdirectories for each group. This can be changed by modifying the $UploadPrefixFmt variable. See [[Cookbook:UploadGroups]] for details.%0a%0a%0a!! [[#upload_versions]] Versioning Uploaded Files%0a%0aPmWiki does not manage versioning of uploaded files by default. However, by setting $EnableUploadVersions=1; an administrator can have older versions of uploads preserved in the uploads directory along with the most recent version.%0a%0a!! Upload restrictions%0a!!! Restricting uploaded files for groups and pages%0a%0aUploads can be enabled only for specific groups or pages by using a [[group customization(s)]]. Simply set @@$EnableUpload=1;@@ for those groups or pages where uploading is to be enabled; alternately, set @@$EnableUpload=1;@@ in the config.php file and then set @@$EnableUpload=0;@@ in the per-group or per-page customization files where uploads are to be disabled.%0a%0a!!! Restricting total upload size for a group or the whole wiki%0a%0aUploads can be restricted to an overall size limit for groups. In the group configuration file (i.e., local/Group.php), add the line%0a%0a->$UploadPrefixQuota = 1000000; # limit group uploads to 1000KB (1MB)%0a%0aThis will limit the total size of uploads for that group to 1000KB --any upload that pushes the total over the limit will be rejected with an error message. This value defaults to zero (unlimited).%0a%0aUploads can also be restricted to an overall size limit for all uploads. Add the line%0a%0a->$UploadDirQuota = 10000000; # limit total uploads to 10000KB (10MB)%0a%0aThis will limit the total size of uploads for the whole wiki to 10000KB --any upload that pushes the total over the limit will be rejected with an error message. This value defaults to zero (unlimited).%0a%0a%0a[[#restrictinguploadedfiles]]%0a!!!Restricting uploaded files type and size%0a%0aThe upload script performs a number of verifications on an uploaded file before storing it in the upload directory. The basic verifications are described below.%0a:'''filenames''': the name for the uploaded file can contain only letters, digits, underscores, hyphens, spaces, and periods, and the name must begin and end with a letter or digit. %0a:'''file extension''': only files with approved extensions such as "@@.gif@@", "@@.jpeg@@", "@@.doc@@", etc. are allowed to be uploaded to the web server. This is vitally important for server security, since the web server might attempt to execute or specially process files with extensions like "@@.php@@", "@@.cgi@@", etc. %0a:'''file size''': By default all uploads are limited to 50K bytes, as specified by the $UploadMaxSize variable. Thus, to limit all uploads to 100KB, simply specify a new value for $UploadMaxSize in ''config.php'':%0a%0a->[@$UploadMaxSize = 100000;@]%0a%0aHowever, maximum file sizes can also be specified for each type of file uploaded. Thus, an administrator can restrict "@@.gif@@" and "@@.jpeg@@" files to 20K, "@@.doc@@" files to 200K, and all others to the size given by $UploadMaxSize. The $UploadExtSize array is used to determine which file extensions are valid and the maximum upload size (in bytes) for each file type. For example:%0a%0a->[@$UploadExtSize['gif'] = 20000; # limit .gif files to 20KB@]%0a%0aSetting an entry to zero disables file uploads of that type altogether:%0a%0a->[@%0a$UploadExtSize['zip'] = 0; # disallow .zip files%0a$UploadExtSize[''] = 0; # disallow files with no extension@]%0a%0aYou can limit which types of files are uploadable by disabling all defaults and specifying only desired types%0aSetting the variable $UploadMax to zero will disable all default file types. Individual file types may then be enabled by setting their maximum size with the variable $UploadExtSize.%0a%0a-> [@# turns off all upload extensions%0a$UploadMaxSize = 0;%0a%0a# enable only these file types for uploading%0a$aSize=100000; // 100 KB file size limitation%0a$UploadExtSize['jpg' ] = $aSize;%0a$UploadExtSize['gif' ] = $aSize;%0a$UploadExtSize['png' ] = $aSize;%0a@]%0a%0a[[#newuploadfiletypes]]%0a!! Adding new file types to permitted uploads%0a%0aTo add a new extension to the list of allowed upload types, add a line like the following to a [[local customization(s)]] file:%0a%0a->[@$UploadExts['ext'] = 'content-type';@]%0a%0awhere ''ext'' is the extension to be added, and ''content-type'' is the "[[(Wikipedia:)MIME type]]", or content-type (which you may find %25newwin%25[[http://www.iana.org/assignments/media-types/ | here]] or on the lower part of %25newwin%25[[http://www.w3schools.com/media/media_mimeref.asp | this page]]) to be used for files with that extension. For example, to add the '[@dxf@]' extension with a Content-Type of '[@image/x-dxf@]', place the line%0a%0a->[@$UploadExts['dxf'] = 'image/x-dxf';@]%0a%0aEach entry in $UploadExts needs to be the extension and the%0amime-type associated with that extension, thus:%0a%0a->[@%0a$UploadExts = array(%0a 'gif' => 'image/gif',%0a 'jpeg' => 'image/jpeg',%0a 'jpg' => 'image/jpeg',%0a 'png' => 'image/png',%0a 'xxx' => 'yyyy/zzz'%0a);%0a@]%0a%0aFor the types that PmWiki already knows about it's not necessary to repeat them here (the ''upload.php'' script adds PmWiki's defaults to whatever the administrator supplies).%0a[[#newuploadfiletypesend]]%0aSee also Cookbook:UploadTypes for additional types.%0a%0a[[#otherfilesizelimits]]%0a!!Other file size limits%0a%0aThere are other factors involved that affect upload file sizes. In Apache 2.0, there is a `[[http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody|LimitRequestBody]] directive that controls the maximum size of anything that is posted (including file uploads). Apache has this defaulted to unlimited size. However, some Linux distributions (e.g., Red Hat Linux) limit postings to 512K so this may need to be changed or increased. (Normally these settings are in an ''httpd.conf'' configuration file or in a file in ''/etc/httpd/conf.d''.)%0a%0aProblem noted on Red Hat 8.0/9.0 with Apache 2.0.x, the error "Requested content-length of 670955 is larger than the configured limit of 524288" was occurring under Apache and a "Page not found" would appear in the browser. Trying the above settings made no change with PHP, but on Red Hat 8.0/9.0 there is an additional PHP config file, /etc/httpd/conf.d/php.conf, and increasing the number on the line "`LimitRequestBody 524288" solves the issue.%0a%0aPHP itself has two limits on file uploads (usually located in @@/etc/php.ini@@). The first is the @@upload_max_filesize@@ parameter, which is set to 2MB by default. The second is @@post_max_size@@, which is set to 6MB by default.%0a%0aWith the variables in place--PmWiki's maximum file size, Apache's request-size limits, and the PHP file size parameters, the maximum uploaded file size will be the smallest of the three variables.%0a%0a!!! [[#direct_download]] Password protecting uploaded files%0aSetting a read password for pages (and groups) will prevent an attached file from being seen or accessed through the page, but to prevent direct access to the file location (the uploads/ directory) one can do the following:%0a %0a* In local/config.php set @@$EnableDirectDownload=0@@;%0a* If you use per-group upload directories (PmWiki default, see $UploadPrefixFmt), add to config.php @@$EnableUploadGroupAuth = 1;@@%0a* Deny public access to the uploads/ directory through moving it out of the html/ or public_html/ directory tree, or through a .htaccess file.%0a%0a%0aSee [[Cookbook:Secure attachments]] {Cookbook.SecureAttachments$:Summary}%0a%0a%0a!! Other notes%0a%0a* If uploads doesn't seem to work, make sure that your PHP installation allows uploads. The ''php.ini'' file (usually ''/etc/php.ini'' or ''/usr/local/lib/php.ini'') should have %0a%0a->[@file_uploads = On@]%0a%0a* Another source of error in the ''php.ini'' file is a not defined ''upload_tmp_dir''. Just set this variable to your temp directory, e.g.%0a%0a->[@upload_tmp_dir = /tmp@]%0a%0a%0aNote that if you change this values, httpd must generally be restarted. Another way to check if uploads are allowed by the server is to set $EnableDiag to 1 in ''config.php'', and set ?action=phpinfo on a URL. The "@@file_uploads@@" variable must have a value of 1 (if it says "@@no value@@", that means it's off).%0a%0a%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I disable uploading of a certain type of file?%0aA: Here's an example of what to add to your ''local/config.php'' file to disable uploading of .zip files, or of files with no extension:%0a%0a->[@%0a$UploadExtSize['zip'] = 0; # Disallow uploading .zip files%0a$UploadExtSize[''] = 0; # Disallow files with no extension@]%0a%0aQ: How do I attach uploads to individual pages or the entire site, instead of organizing them by [[wiki group]]?%0aA: Use the $UploadPrefixFmt variable (see also the Cookbook:UploadGroups recipe).%0a%0a->[@$UploadPrefixFmt = '/$FullName'; # per-page@]%0a->[@$UploadPrefixFmt = ''; # site-wide@]%0a%0aQ:For $UploadDirQuota - can you provide some units and numbers? Is the specification in bytes or bits? What is the number for 100K? 1 Meg? 1 Gig? 1 Terabyte?%0aA: Units are in bytes. %0a%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%0aQ: Is there a way to allow file names with Unicode or addtiional characters? %0aA: Yes, see $UploadNameChars%0a%0aQ:Where is the list of attachments stored?%0aA: It is generated on the fly by the [[PageDirectives#attachlist|(:attachlist:)]] markup.%0a%0aQ: How can I find orphaned or missing attachments%0aA: See [[Cookbook:Attachlist enhanced]] {Cookbook.AttachlistEnhanced$:Summary}%0a%0aQ: How can I prevent hotlinking of my uploaded images%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0aQ: I have limited the max upload size to 8 MB in config.php, however only files smaller than 2MB can be uploaded.%0aA: Check your php.ini for ''upload_max_filesize''%0a->[@%0aupload_max_filesize = 8M%0a@]%0a%0aIf you cannot access your php.ini directly try to soften server limits in the root .htaccess file:%0a%0a->[@php_value post_max_size 63M%0aphp_value upload_max_filesize 62M%0aphp_value memory_limit 64M%0aphp_value max_execution_time 600%0aphp_value default_socket_timeout 600%0a@] +time=1263683961 title=Uploads Administration Index: wikilib.d/PmWiki.InitialSetupTasks =================================================================== --- wikilib.d/PmWiki.InitialSetupTasks (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.InitialSetupTasks (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.2 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 -author=Petko +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 +author=Peter Bowers charset=ISO-8859-1 -csum= -host=81.65.14.164 +csum=add scripturl and pubdirurl +host=92.60.31.216 name=PmWiki.InitialSetupTasks -rev=90 +rev=91 targets=PmWiki.Installation,Site.Site,SiteAdmin.SiteAdmin,Site.SideBar,PmWiki.Variables,PmWiki.UTF-8,PmWiki.Security,PmWiki.PasswordsAdmin,PmWiki.Upgrades,PmWiki.UploadsAdmin,PmWiki.LocalCustomizations,PmWiki.WikiFarms,PmWiki.MailingLists,PmWiki.WikiAdministrator -text=(:Summary:First steps following a fresh installation:)%0a(:Audience: administrators (basic) :)%0aOnce you have PmWiki running on your site (see [[Installation]]), you can customize it for your particular needs.%0a%0aMost PmWiki configuration is performed in files called ''local/config.php'' and ''pub/css/local.css''. %0aSome configuration is done on special pages in the [[{$SiteGroup}/]] and [[SiteAdmin/]] groups, such as the [[{$SiteGroup}.SideBar]] menu.%0a%0a!! The local configuration file (''local/config.php'')%0aWhen you first install PmWiki, the ''local/config.php'' file does not exist. Copy the ''sample-config.php'' file (in the ''docs/'' directory) to ''local/config.php'' and use it as a starting point. You could create ''local/config.php'' from scratch, but ''sample-config.php'' is already populated with many of the options you might want to adjust.%0a%0aHere is a simple ''config.php'' file:%0a%0a-> [@%0a%3c?php if (!defined('PmWiki')) exit();%0a$WikiTitle = "My New Wiki";%0a$PageLogoUrl = "http://example.com/mylogo.gif";%0a%0a$DefaultPasswords['admin'] = crypt('onesecret');%0a%0a$EnableUpload = 1;%0a$DefaultPasswords['upload'] = crypt('secrettwo');%0a%0aputenv("TZ=EST5EDT");%0a$TimeFmt = '%25B %25d, %25Y, at %25I:%25M %25p EST';%0a@]%0a%0aNote that ''config.php'' begins with @@%3c?php@@ . The PHP end tag @@?>@@ is optional, and can be left off to improve compatibility with some operating systems. Be sure there aren't any blank lines or spaces before the @@%3c?php@@ or after any closing @@?>@@, or else you may get strange PHP error messages at the beginning of your wiki pages.%0a%0aThe ''config.php'' file above sets the value of PHP variables used by PmWiki:%0a* The $WikiTitle variable gives the name of your site as it will appear in a user's browser title bar.%0a* The $PageLogoUrl variable specifies the URL of the icon image that will appear in the upper-left corner of each wiki page.%0a* The @@$DefaultPasswords['admin']@@ sets an administrative password.%0a* Setting $EnableUpload to "1" enables Uploads ("Attached files"). @@$DefaultPasswords['upload']@@ sets an upload password.%0a* The TZ environment variable defines a particular time zone (see [[Cookbook:ChangeTimeFormat]]).%0a* The $TimeFmt variable defines the appearance of time strings and (along with TZ) localizes the wiki to a specific time zone (see [[Cookbook:ChangeTimeFormat]]).%0a%0aBy setting these (and other) variables in ''local/config.php'', you can change the look and feel of PmWiki from its default, sometimes substantially so. See [[PmWiki.Variables]] for a list of variables that PmWiki uses, and see PmWiki:PmWikiUsers for examples of sites that use PmWiki in customized ways.%0a%0a!!! Other common setup tasks%0aThe following [[variables]] are often requested when preparing a new wiki%0a* Author required when editing a page @@$EnablePostAuthorRequired = 1;@@ %0a* Set the $DefaultGroup %0a%0aThese common [[(Cookbook:)Cookbook]] recipes are also often installed immediately%0a* [[(Cookbook:)Clean Urls]] - Remove the @@?n=Group.Page@@ arguments from the end of URLs%0a%0aIf you prepare an international wiki, potentially with characters in different alphabets (Cyrillic, Greek, Chinese) or many diacritical symbols (Czech + French), please look at [[PmWiki.UTF-8]] and Cookbook:UTF-8.%0a%0a!! Security%0aReview and set up any [[security]] required.%0a%0a!!!Setting an administrative password%0a%0aThe pages in the [[{$SiteGroup}/Site]] group (except the {$SiteGroup}.SideBar) are locked by default. In order to edit pages in this group you need to create a site-wide admin password in ''local/config.php''. To set the site-wide admin password to "@@mysecret@@", change the line to the following:%0a%0a->[@$DefaultPasswords['admin'] = crypt('mysecret');@]%0a%0aYou must use the [@crypt()@] function, but set the password to a value with meaning for you. See [[PasswordsAdmin]] for details about making the password more secure.%0a%0a!![[#dontmodify]]Don't modify or rename ''pmwiki.php''%0a%0aPmWiki has been designed so that all customizations can be made without changing the distribution files -- one of its design goals is to provide seamless upgrades. PmWiki never writes to files in the ''local/'' or ''cookbook/'' directories, so placing your customizations here makes it easier to track the changes and [[upgrades | upgrade PmWiki]] without losing the changes.%0a%0aWhen changing the configuration of your site, always change the ''local/config.php'' file or add files to the ''cookbook/'' or ''pub'' directories. Do not change ''pmwiki.php'' or the files in the ''scripts/'' directory because the files are supposed to be overwritten upon upgrading.%0a%0aYou shouldn't rename ''pmwiki.php'' either. If you rename the file it will not be overwritten during an upgrade of the software and there will be a version mismatch. Many administrators add an ''index.php'' "wrapper script" in the pmwiki directory that contains the following single line:%0a%0a->[@%3c?php include('pmwiki.php');@]%0a%0aJust make an text-file. Paste %3c?php include('pmwiki.php'); into it.%0aSave the file as index.php%0aSend it via FTP to the same directory as pmwiki.php is located. %0a%0a!! Other organisation%0a!!! Upload directories%0aBy default Pmwiki uses an upload directory for each group%0a(see [[Uploads admin(#uploaddirectoryconfiguration)]]istration.%0aDeciding on accepting the default, or choosing an alternative (eg one directory for the entire wiki, or one directory per page) is best done when setting up your wiki.%0a%0a!!! Page store directories%0aBy default Pmwiki uses a single page store directory (wiki.d).%0aDeciding on accepting the default (recommended), or choosing the alternative (one directory per group) is best done when setting up your wiki. '^[[Cookbook:PerGroupSubDirectories|#]]^'%0a%0a!!Other customization%0a%0aAfter setting up ''local/config.php'' file, you may wish to make other [[local customizations]]. See the [[Cookbook:CookbookBasics | PmWiki Cookbook]] for a large number of customizations that have been contributed. And don't fear Cookbook recipes - they're well prepared, so that most of them require only to download a single file, add a one-line include command to @@config.php@@, and ''voilà!'' - they're working!%0a%0aIf you (or others sharing your server) want to maintain more than one wiki on the same server, see [[Wiki Farms]].%0a%0a!!Now what?%0a%0aDon't forget to join a [[MailingLists | PmWiki mailing list]], where you can email other [[wiki administrator]]s for help on customizing PmWiki and participate in discussions about PmWiki improvements. Once you have your site operational, be sure to add it to PmWiki:PmWikiUsers so others will know about it!%0a -time=1246997224 +text=(:Summary:First steps following a fresh installation:)%0a(:Audience: administrators (basic) :)%0aOnce you have PmWiki running on your site (see [[Installation]]), you can customize it for your particular needs.%0a%0aMost PmWiki configuration is performed in files called ''local/config.php'' and ''pub/css/local.css''. %0aSome configuration is done on special pages in the [[{$SiteGroup}/]] and [[SiteAdmin/]] groups, such as the [[{$SiteGroup}.SideBar]] menu.%0a%0a!! The local configuration file (''local/config.php'')%0aWhen you first install PmWiki, the ''local/config.php'' file does not exist. Copy the ''sample-config.php'' file (in the ''docs/'' directory) to ''local/config.php'' and use it as a starting point. You could create ''local/config.php'' from scratch, but ''sample-config.php'' is already populated with many of the options you might want to adjust.%0a%0aHere is a simple ''config.php'' file:%0a%0a-> [@%0a%3c?php if (!defined('PmWiki')) exit();%0a$WikiTitle = "My New Wiki";%0a$PageLogoUrl = "http://example.com/mylogo.gif";%0a%0a# Uncomment these if needed%0a#$ScriptUrl = 'http://example.com/pmwiki/pmwiki.php';%0a#$PubDirUrl = 'http://example.com/pmwiki/pub';%0a%0a$DefaultPasswords['admin'] = crypt('onesecret');%0a%0a$EnableUpload = 1;%0a$DefaultPasswords['upload'] = crypt('secrettwo');%0a%0aputenv("TZ=EST5EDT");%0a$TimeFmt = '%25B %25d, %25Y, at %25I:%25M %25p EST';%0a@]%0a%0aNote that ''config.php'' begins with @@%3c?php@@ . The PHP end tag @@?>@@ is optional, and can be left off to improve compatibility with some operating systems. Be sure there aren't any blank lines or spaces before the @@%3c?php@@ or after any closing @@?>@@, or else you may get strange PHP error messages at the beginning of your wiki pages.%0a%0aThe ''config.php'' file above sets the value of PHP variables used by PmWiki:%0a* The $WikiTitle variable gives the name of your site as it will appear in a user's browser title bar.%0a* The @@$ScriptUrl@@ and @@$PubDirUrl@@ variables tell your wiki where it is located. Often pmwiki can guess, but if you have difficulty with links not working or skins not being found then try uncommenting these lines.%0a* The $PageLogoUrl variable specifies the URL of the icon image that will appear in the upper-left corner of each wiki page.%0a* The @@$DefaultPasswords['admin']@@ sets an administrative password.%0a* Setting $EnableUpload to "1" enables Uploads ("Attached files"). @@$DefaultPasswords['upload']@@ sets an upload password.%0a* The TZ environment variable defines a particular time zone (see [[Cookbook:ChangeTimeFormat]]).%0a* The $TimeFmt variable defines the appearance of time strings and (along with TZ) localizes the wiki to a specific time zone (see [[Cookbook:ChangeTimeFormat]]).%0a%0aBy setting these (and other) variables in ''local/config.php'', you can change the look and feel of PmWiki from its default, sometimes substantially so. See [[PmWiki.Variables]] for a list of variables that PmWiki uses, and see PmWiki:PmWikiUsers for examples of sites that use PmWiki in customized ways.%0a%0a!!! Other common setup tasks%0aThe following [[variables]] are often requested when preparing a new wiki%0a* Author required when editing a page @@$EnablePostAuthorRequired = 1;@@ %0a* Set the $DefaultGroup %0a%0aThese common [[(Cookbook:)Cookbook]] recipes are also often installed immediately%0a* [[(Cookbook:)Clean Urls]] - Remove the @@?n=Group.Page@@ arguments from the end of URLs%0a%0aIf you prepare an international wiki, potentially with characters in different alphabets (Cyrillic, Greek, Chinese) or many diacritical symbols (Czech + French), please look at [[PmWiki.UTF-8]] and Cookbook:UTF-8.%0a%0a!! Security%0aReview and set up any [[security]] required.%0a%0a!!!Setting an administrative password%0a%0aThe pages in the [[{$SiteGroup}/Site]] group (except the {$SiteGroup}.SideBar) are locked by default. In order to edit pages in this group you need to create a site-wide admin password in ''local/config.php''. To set the site-wide admin password to "@@mysecret@@", change the line to the following:%0a%0a->[@$DefaultPasswords['admin'] = crypt('mysecret');@]%0a%0aYou must use the [@crypt()@] function, but set the password to a value with meaning for you. See [[PasswordsAdmin]] for details about making the password more secure.%0a%0a!![[#dontmodify]]Don't modify or rename ''pmwiki.php''%0a%0aPmWiki has been designed so that all customizations can be made without changing the distribution files -- one of its design goals is to provide seamless upgrades. PmWiki never writes to files in the ''local/'' or ''cookbook/'' directories, so placing your customizations here makes it easier to track the changes and [[upgrades | upgrade PmWiki]] without losing the changes.%0a%0aWhen changing the configuration of your site, always change the ''local/config.php'' file or add files to the ''cookbook/'' or ''pub'' directories. Do not change ''pmwiki.php'' or the files in the ''scripts/'' directory because the files are supposed to be overwritten upon upgrading.%0a%0aYou shouldn't rename ''pmwiki.php'' either. If you rename the file it will not be overwritten during an upgrade of the software and there will be a version mismatch. Many administrators add an ''index.php'' "wrapper script" in the pmwiki directory that contains the following single line:%0a%0a->[@%3c?php include('pmwiki.php');@]%0a%0aJust make an text-file. Paste %3c?php include('pmwiki.php'); into it.%0aSave the file as index.php%0aSend it via FTP to the same directory as pmwiki.php is located. %0a%0a!! Other organisation%0a!!! Upload directories%0aBy default Pmwiki uses an upload directory for each group%0a(see [[Uploads admin(#uploaddirectoryconfiguration)]]istration.%0aDeciding on accepting the default, or choosing an alternative (eg one directory for the entire wiki, or one directory per page) is best done when setting up your wiki.%0a%0a!!! Page store directories%0aBy default Pmwiki uses a single page store directory (wiki.d).%0aDeciding on accepting the default (recommended), or choosing the alternative (one directory per group) is best done when setting up your wiki. '^[[Cookbook:PerGroupSubDirectories|#]]^'%0a%0a!!Other customization%0a%0aAfter setting up ''local/config.php'' file, you may wish to make other [[local customizations]]. See the [[Cookbook:CookbookBasics | PmWiki Cookbook]] for a large number of customizations that have been contributed. And don't fear Cookbook recipes - they're well prepared, so that most of them require only to download a single file, add a one-line include command to @@config.php@@, and ''voilà!'' - they're working!%0a%0aIf you (or others sharing your server) want to maintain more than one wiki on the same server, see [[Wiki Farms]].%0a%0a!!Now what?%0a%0aDon't forget to join a [[MailingLists | PmWiki mailing list]], where you can email other [[wiki administrator]]s for help on customizing PmWiki and participate in discussions about PmWiki improvements. Once you have your site operational, be sure to add it to PmWiki:PmWikiUsers so others will know about it!%0a +time=1261647603 Index: wikilib.d/PmWiki.WebFeeds =================================================================== --- wikilib.d/PmWiki.WebFeeds (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.WebFeeds (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.4 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 -author=Petko +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7 +author=Diafygi charset=ISO-8859-1 -csum=core docs are not signed -host=86.69.109.9 +csum=added edit notifications config +host=99.163.92.40 name=PmWiki.WebFeeds -rev=69 -targets=PmWiki.WikiTrails,Site.AllRecentChanges,PmWiki.WikiGroup,PmWiki.Categories,PmWiki.PageLists,PmWiki.LocalCustomizations -text=(:Summary:Web feed notification of changes:)%0a(:Audience: visitors (intermediate) :)%0aWeb feeds are a convenient mechanism to let visitors be notified of changes to a site. Instead of repeatedly checking [=RecentChanges=] every day to see what is new, a visitor can use a [[news aggregator -> Wikipedia:Aggregator]] to quickly see what pages of interest have changed on a site. Web feeds are commonly recognized by terms such as [[(Wikipedia:)RSS]], [[(Wikipedia:)Atom(_%2528standard%2529)]], and ''[[Wikipedia:web_syndication | web syndication]]''. They are also the foundation for podcasting.%0a%0aIn its simplest form, web feeds in PmWiki are built on [[WikiTrails]]. Using a feed action such as [@?action=rss@] or [@?action=atom@] on a trail generates a web feed (often called a "channel") where each page on the trail is an item in the feed. Since the RecentChanges and [[{$SiteGroup}.AllRecentChanges]] pages are effectively trails, one can easily get an RSS feed for a group or site by simply adding [@?action=rss@] to the url for a RecentChanges page. For example, to get the site feed for pmwiki.org, one would use%0a%0a->http://pmwiki.org/wiki/Site/AllRecentChanges?action=rss%0a%0aAuthors can also create custom feeds by simply creating a wiki trail of the pages they want included in the feed. Feeds can also be generated from [[groups -> WikiGroup]], [[categories]], and %25newwin%25[[Cookbook:Backlinks|backlinks]], and the order and number of items in the feed can be changed using options in the feed url. Thus, one can obtain a feed for the ''Skins'' category (sorted with most recent items first) by using%0a%0a->http://pmwiki.org/wiki/Category/Skins?action=rss&order=-time%0a%0aPmWiki is able to generate feeds in many formats, including RSS 2.0 ([@?action=rss@]), Atom 1.0 ([@?action=atom@]), and RSS 1.0 ([@?action=rdf@]). In addition, although it is not normally considered a web feed, PmWiki can generate metadata information using the Dublin Core Metadata extensions ([@?action=dc@]).%0a%0a!!How to read a PmWiki syndicated feed%0a%0a# You'll need a [[news aggregator -> Wikipedia:List_of_feed_aggregators]], which is a piece of software designed to read news feeds. Many different news aggregators are available. Some run on your own computer, either on their own or as plugins for email clients, web browsers, or newsreaders. Others are web applications that you can use from any Internet-connected computer. Some are in between (technically web applications, but ones designed to run on your computer, not some remote server). Get one that you like.%0a# Subscribe to the [[WikiTrail(s)]] you desire by supplying the feed url to the aggregator. The feed url will be the name of a trail page with [@?action=rss@] or [@?action=atom@] added to the end of the url.%0a%0a!!Feed options%0a%0aAdd any of the following options to the end of a PmWiki web feed url to change its output (basically any [[pagelist->PageLists]] option is available for web feeds):%0a%0a:?count=''n'': Limit feed to ''n'' items%0a:?order=-time : Display most recently changed items first%0a:?trail=''page'': Obtain items from trail on ''page''%0a:?group=''group'': Limit feed to pages in ''group''%0a:?name=''name'': Limit feed to pages with specific ''name''%0a:?link=''page'': Create feed from pages linked to ''page''%0a:?list=normal: Exclude things like RecentChanges, AllRecentChanges, etc.%0a%0a%25audience%25 authors (intermediate)%0a!!Configure PmWiki for feeds%0a%0aThis section describes how to syndicate portions of a wiki to appear in a web feed. It does not describe how to display a web feed within a wiki page -- for that, see Cookbook:RssFeedDisplay.%0a%0aTo enable web feed generation for a site, add one or more of the following to a [[local customization(s)]] file:%0a%0a->[@%0aif ($action == 'rss') include_once("$FarmD/scripts/feeds.php");%0aif ($action == 'atom') include_once("$FarmD/scripts/feeds.php");%0aif ($action == 'rdf') include_once("$FarmD/scripts/feeds.php");%0aif ($action == 'dc') include_once("$FarmD/scripts/feeds.php");%0a@]%0a%0aor you can combine multiple feeds into a single expression using "||" to separate each feed type. For example, if you want to enable RSS and Atom feeds you would use%0a%0a->[@%0aif ($action == 'rss' ||%0a $action == 'atom' ||%0a $action == 'rdf' ||%0a $action == 'dc') include_once("$FarmD/scripts/feeds.php");%0a@]%0a%0a!!Configure feed content%0aWeb feeds are highly configurable, new elements can be easily added to feeds via the $FeedFmt array. Elements in $FeedFmt look like%0a%0a[@$FeedFmt['atom']['feed']['rights'] = 'All Rights Reserved';@]%0a%0awhere the first index corresponds to the action (?action=atom), the second index indicates a per-feed or per-item element, and%0athe third index is the name of the element being generated. The above setting would therefore generate a "%3crights>All Rights Reserved%3c/rights>" in the feed for ?action=atom.%0a%0a[[#pitfall1]]%0aIf the value of an entry begins with a '%3c', then feeds.php doesn't automatically add the tag around it. Elements can also be callable functions which are called to generate the appropriate output. See [[http://blogs.law.harvard.edu/tech/rss | RSS specification]] or other feed specifications for what feed content you can use.%0a%0aYou can also change an existing element rather than add a new one. You can use the following lines to ensure that changes made to the wiki will be picked up by some RSS readers that wouldn't otherwise "notice" a page has been changed:%0a%0a->[@%0a# Change the link URL when an item is edited.%0a$FeedFmt['rss']['item']['link'] = '{$PageUrl}?when=$ItemISOTime';%0a$FeedFmt['atom']['item']['link'] =%0a "%3clink rel=\"alternate\" href=\"{\$PageUrl}?when=\$ItemISOTime\" />\n";%0a@]%0a%0a%0a!!See Also%0a%0a* [[Cookbook:FeedLinks]] - Add HTML %3chead> links for auto-discovery of your feeds.%0a* [[WikiTrails]]%0a* Wikipedia:Web_feed, Wikipedia:Web_syndication, Wikipedia:RSS_%2528file_format%2529, Wikipedia:Atom_%2528standard%2529%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I include text from the page (whole page, or first X characters) in the feed body? (note: markup NOT digested)%0a%0a function MarkupExcerpt($pagename) {%0a $page = RetrieveAuthPage($pagename, 'read', false);%0a return substr(@$page['text'], 0, 200);%0a }%0a%0a $FmtPV['$MarkupExcerpt'] = 'MarkupExcerpt($pn)';%0a $FeedFmt['rss']['item']['description'] = '$MarkupExcerpt';%0a%0a%25green%25 Q:Does this mean if I want to include the time in the rss title and "summary" to rss body I call [@$FeedFmt@] twice like so:%0a->[@$FeedFmt['rss']['item']['description'] = '$LastSummary'; %0a$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} @ $ItemISOTime';@] %25%25%0a%0a---> From mailing list Feb 13,2007, a response by Pm: Yes%0a%0aQ: How can I use the RSS %3cenclosure> tag for podcasting?%0a%0aA: For podcasting of mp3 files, simply attach an mp3 file to the page%0awith the same name as the page (i.e., for a page named Podcast.Episode4,%0aone would attach to that page a file named "Episode4.mp3"). The%0afile is automatically picked up by ?action=rss and used as an%0aenclosure.%0a%0aThe set of potential enclosures is given by the $RSSEnclosureFmt%0aarray, thus%0a%0a->[@$RSSEnclosureFmt = array('{$Name}.mp3', '{$Name}.wma', '{$Name}.ogg');@]%0a%0aallows podcasting in mp3, wma, and ogg formats.%0a%0a%0aQ: [[#AddSummary]] How to add "summary" to the title in a rss feed (ie. with [@?action=rss@])?%0a%0aA: Add this line in you [@local/config.php@]%0a%0a->[@$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : $LastModifiedSummary';@]%0a%0a%0aQ: [[#AddDescriptionSummary]] How to add "description" to the title in an rss feed, and summary to the body?%0a%0aA: Add these lines to your [@local/config.php@]%0a%0a->[@$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : {$Description}';@]%0a->[@$FeedFmt['rss']['item']['description'] = '$LastModifiedSummary';@]%0a%0a%0a'''NOTES:'''%0a* you need to replicate these lines for each type (atom, rdf, dc) of feed you provide.%0a* the RSS '''[@description@]'''-tag is not equivalent to the pmWiki ''[@$Description@]'' variable, despite the confusing similarity.%0a%0aQ: Some of my password-protected pages aren't appearing in the feed... how do I work around this?%0a%0aA: From a similar question on the newsgroup, Pm's reply:%0a%0aThe last time I checked, RSS and other syndication protocols didn't%0areally have a well-established interface or mechanism for performing%0aaccess control (i.e., authentication). As far as I know this is%0astill the case.%0a%0aPmWiki's WebFeeds capability is built on top of pagelists, so it%0acould simply be that the $EnablePageListProtect option is preventing%0athe updated pages from appearing in the feed. You might try%0asetting $EnablePageListProtect=0; and see if the password-protected%0apages start appearing in the RSS feed.%0a%0aThe "downside" to setting $EnablePageListProtect to zero is that%0aanyone doing a search on your site will see the existence of the%0apages in the locked section. They won't be able to read any of%0athem, but they'll know they are there!%0a%0aYou could also set $EnablePageListProtect to zero only if ?action=rss:%0a%0a if ($action == 'rss') $EnablePageListProtect = 0;%0a%0aThis limits the ability to see the protected pages to RSS feeds;%0anormal pagelists and searches wouldn't see them.%0a%0aLastly, it's also possible to configure the webfeeds to obtain%0athe authentication information from the url directly, as in:%0a%0a .../Site/AllRecentChanges?action=rss&authpw=secret%0a%0aThe big downside to this is that the cleartext password will%0aend up traveling across the net with every RSS request, and%0amay end up being recorded in Apache's access logs.%0a%0aQ: How to add feed image?%0a%0aA: Add the following to ''local/config.php'' (this example is for [@?action=rss@]):%0a%0a->[@%0a$FeedFmt['rss']['feed']['image'] =%0a" %3ctitle>Logo title%3c/title>%0a %3clink>http://example.com/%3c/link>%0a %3curl>http://example.com/images/logo.gif%3c/url>%0a %3cwidth>120%3c/width>%0a %3cheight>60%3c/height>";%0a@]%0a%0a-> %25red%25Do not forget NOT to start with a '%3c' as there would be no %3cimage> tag around this... See [[#pitfall1|here]].%0a%0aQ: How do I insert RSS news feeds into PmWiki pages?%0a%0aA: See [[Cookbook:RssFeedDisplay]].%0a%0aQ: How can I specify default feed options in a configuration file instead of always placing them in the url?%0aA: For example, if you want [@?action=rss@] to default to [@?action=rss&group=News&order=-time&count=10@], try the following in a [[local customization(s)]] file:%0a%0a->[@%0a if ($action == 'rss')%0a SDVA($_REQUEST, array(%0a 'group' => 'News',%0a 'order' => '-time',%0a 'count' => 10));%0a@]%0a%0aQ: Are there ways to let people easily subscribe to a feed?%0a%0aA: On some browsers (Mozilla Firefox), the visitor can see an orange RSS icon in the address bar, and subscribe to the feed by clicking on it. To enable the RSS icon, add this to config.php :[@%0a$HTMLHeaderFmt['feedlinks'] = '%3clink rel="alternate" type="application/rss+xml" %0a title="$WikiTitle" href="$ScriptUrl?n=Site.AllRecentChanges&action=rss" />%0a%3clink rel="alternate" type="application/atom+xml" title="$WikiTitle"%0a href="$ScriptUrl?n=Site.AllRecentChanges&action=atom" />';@]%0a%0aYou can also add such a link, for example in your SideBar, @@[=[[Site.AllRecentChanges?action=atom | Subscribe to feed]]=]@@. %0a%0aQ: Can I create an RSS feed for individual page histories?%0aA: See Cookbook:PageFeed.%0a%0a%0aQ: How do I create a custom FeedPage similar to RecentChanges or AllRecentChanges, but with only certain groups or pages recorded?%0aA: See Cookbook:CustomRecentChanges. In a nutshell, you'll declare a $RecentChangesFmt variable with your dedicated FeedPage, and then wrap it in a condition of your choice. For example:%0a[@%0a if (PageVar($pagename, '$Group')!='ForbiddenGroup') {%0a $RecentChangesFmt['Site.MyFeedPage'] =%0a '* [[{$FullName}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a }%0a@]%0a -time=1251047385 +rev=70 +targets=PmWiki.WikiTrails,Site.AllRecentChanges,PmWiki.WikiGroup,PmWiki.Categories,PmWiki.PageLists,PmWiki.LocalCustomizations,PITS.01161 +text=(:Summary:Web feed notification of changes:)%0a(:Audience: visitors (intermediate) :)%0aWeb feeds are a convenient mechanism to let visitors be notified of changes to a site. Instead of repeatedly checking [=RecentChanges=] every day to see what is new, a visitor can use a [[news aggregator -> Wikipedia:Aggregator]] to quickly see what pages of interest have changed on a site. Web feeds are commonly recognized by terms such as [[(Wikipedia:)RSS]], [[(Wikipedia:)Atom(_%2528standard%2529)]], and ''[[Wikipedia:web_syndication | web syndication]]''. They are also the foundation for podcasting.%0a%0aIn its simplest form, web feeds in PmWiki are built on [[WikiTrails]]. Using a feed action such as [@?action=rss@] or [@?action=atom@] on a trail generates a web feed (often called a "channel") where each page on the trail is an item in the feed. Since the RecentChanges and [[{$SiteGroup}.AllRecentChanges]] pages are effectively trails, one can easily get an RSS feed for a group or site by simply adding [@?action=rss@] to the url for a RecentChanges page. For example, to get the site feed for pmwiki.org, one would use%0a%0a->http://pmwiki.org/wiki/Site/AllRecentChanges?action=rss%0a%0aAuthors can also create custom feeds by simply creating a wiki trail of the pages they want included in the feed. Feeds can also be generated from [[groups -> WikiGroup]], [[categories]], and %25newwin%25[[Cookbook:Backlinks|backlinks]], and the order and number of items in the feed can be changed using options in the feed url. Thus, one can obtain a feed for the ''Skins'' category (sorted with most recent items first) by using%0a%0a->http://pmwiki.org/wiki/Category/Skins?action=rss&order=-time%0a%0aPmWiki is able to generate feeds in many formats, including RSS 2.0 ([@?action=rss@]), Atom 1.0 ([@?action=atom@]), and RSS 1.0 ([@?action=rdf@]). In addition, although it is not normally considered a web feed, PmWiki can generate metadata information using the Dublin Core Metadata extensions ([@?action=dc@]).%0a%0a!!How to read a PmWiki syndicated feed%0a%0a# You'll need a [[news aggregator -> Wikipedia:List_of_feed_aggregators]], which is a piece of software designed to read news feeds. Many different news aggregators are available. Some run on your own computer, either on their own or as plugins for email clients, web browsers, or newsreaders. Others are web applications that you can use from any Internet-connected computer. Some are in between (technically web applications, but ones designed to run on your computer, not some remote server). Get one that you like.%0a# Subscribe to the [[WikiTrail(s)]] you desire by supplying the feed url to the aggregator. The feed url will be the name of a trail page with [@?action=rss@] or [@?action=atom@] added to the end of the url.%0a%0a!!Feed options%0a%0aAdd any of the following options to the end of a PmWiki web feed url to change its output (basically any [[pagelist->PageLists]] option is available for web feeds):%0a%0a:?count=''n'': Limit feed to ''n'' items%0a:?order=-time : Display most recently changed items first%0a:?trail=''page'': Obtain items from trail on ''page''%0a:?group=''group'': Limit feed to pages in ''group''%0a:?name=''name'': Limit feed to pages with specific ''name''%0a:?link=''page'': Create feed from pages linked to ''page''%0a:?list=normal: Exclude things like RecentChanges, AllRecentChanges, etc.%0a%0a%25audience%25 authors (intermediate)%0a!!Configure PmWiki for feeds%0a%0aThis section describes how to syndicate portions of a wiki to appear in a web feed. It does not describe how to display a web feed within a wiki page -- for that, see Cookbook:RssFeedDisplay.%0a%0aTo enable web feed generation for a site, add one or more of the following to a [[local customization(s)]] file:%0a%0a->[@%0aif ($action == 'rss') include_once("$FarmD/scripts/feeds.php");%0aif ($action == 'atom') include_once("$FarmD/scripts/feeds.php");%0aif ($action == 'rdf') include_once("$FarmD/scripts/feeds.php");%0aif ($action == 'dc') include_once("$FarmD/scripts/feeds.php");%0a@]%0a%0aor you can combine multiple feeds into a single expression using "||" to separate each feed type. For example, if you want to enable RSS and Atom feeds you would use%0a%0a->[@%0aif ($action == 'rss' ||%0a $action == 'atom' ||%0a $action == 'rdf' ||%0a $action == 'dc') include_once("$FarmD/scripts/feeds.php");%0a@]%0a%0a!!Configure feed content%0aWeb feeds are highly configurable, new elements can be easily added to feeds via the $FeedFmt array. Elements in $FeedFmt look like%0a%0a[@$FeedFmt['atom']['feed']['rights'] = 'All Rights Reserved';@]%0a%0awhere the first index corresponds to the action (?action=atom), the second index indicates a per-feed or per-item element, and%0athe third index is the name of the element being generated. The above setting would therefore generate a "%3crights>All Rights Reserved%3c/rights>" in the feed for ?action=atom.%0a%0a[[#pitfall1]]%0aIf the value of an entry begins with a '%3c', then feeds.php doesn't automatically add the tag around it. Elements can also be callable functions which are called to generate the appropriate output. See [[http://blogs.law.harvard.edu/tech/rss | RSS specification]] or other feed specifications for what feed content you can use.%0a%0aYou can also change an existing element rather than add a new one. You can use the following lines to ensure that changes made to the wiki will be picked up by some RSS readers that wouldn't otherwise "notice" a page has been changed:%0a%0a->[@%0a# Change the link URL when an item is edited.%0a$FeedFmt['rss']['item']['link'] = '{$PageUrl}?when=$ItemISOTime';%0a$FeedFmt['atom']['item']['link'] =%0a "%3clink rel=\"alternate\" href=\"{\$PageUrl}?when=\$ItemISOTime\" />\n";%0a@]%0a%0a%0a!!See Also%0a%0a* [[Cookbook:FeedLinks]] - Add HTML %3chead> links for auto-discovery of your feeds.%0a* [[WikiTrails]]%0a* Wikipedia:Web_feed, Wikipedia:Web_syndication, Wikipedia:RSS_%2528file_format%2529, Wikipedia:Atom_%2528standard%2529%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I include text from the page (whole page, or first X characters) in the feed body? (note: markup NOT digested)%0a%0a function MarkupExcerpt($pagename) {%0a $page = RetrieveAuthPage($pagename, 'read', false);%0a return substr(@$page['text'], 0, 200);%0a }%0a%0a $FmtPV['$MarkupExcerpt'] = 'MarkupExcerpt($pn)';%0a $FeedFmt['rss']['item']['description'] = '$MarkupExcerpt';%0a%0a%25green%25 Q:Does this mean if I want to include the time in the rss title and "summary" to rss body I call [@$FeedFmt@] twice like so:%0a->[@$FeedFmt['rss']['item']['description'] = '$LastSummary'; %0a$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} @ $ItemISOTime';@] %25%25%0a%0a---> From mailing list Feb 13,2007, a response by Pm: Yes%0a%0aQ: How can I use the RSS %3cenclosure> tag for podcasting?%0a%0aA: For podcasting of mp3 files, simply attach an mp3 file to the page%0awith the same name as the page (i.e., for a page named Podcast.Episode4,%0aone would attach to that page a file named "Episode4.mp3"). The%0afile is automatically picked up by ?action=rss and used as an%0aenclosure.%0a%0aThe set of potential enclosures is given by the $RSSEnclosureFmt%0aarray, thus%0a%0a->[@$RSSEnclosureFmt = array('{$Name}.mp3', '{$Name}.wma', '{$Name}.ogg');@]%0a%0aallows podcasting in mp3, wma, and ogg formats.%0a%0a%0aQ: [[#AddSummary]] How to add "summary" to the title in a rss feed (ie. with [@?action=rss@])?%0a%0aA: Add this line in you [@local/config.php@]%0a%0a->[@$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : $LastModifiedSummary';@]%0a%0a%0aQ: [[#AddDescriptionSummary]] How to add "description" to the title in an rss feed, and summary to the body?%0a%0aA: Add these lines to your [@local/config.php@]%0a%0a->[@$FeedFmt['rss']['item']['title'] = '{$Group} / {$Title} : {$Description}';@]%0a->[@$FeedFmt['rss']['item']['description'] = '$LastModifiedSummary';@]%0a%0a%0a'''NOTES:'''%0a* you need to replicate these lines for each type (atom, rdf, dc) of feed you provide.%0a* the RSS '''[@description@]'''-tag is not equivalent to the pmWiki ''[@$Description@]'' variable, despite the confusing similarity.%0a%0aQ: Some of my password-protected pages aren't appearing in the feed... how do I work around this?%0a%0aA: From a similar question on the newsgroup, Pm's reply:%0a%0aThe last time I checked, RSS and other syndication protocols didn't%0areally have a well-established interface or mechanism for performing%0aaccess control (i.e., authentication). As far as I know this is%0astill the case.%0a%0aPmWiki's WebFeeds capability is built on top of pagelists, so it%0acould simply be that the $EnablePageListProtect option is preventing%0athe updated pages from appearing in the feed. You might try%0asetting $EnablePageListProtect=0; and see if the password-protected%0apages start appearing in the RSS feed.%0a%0aThe "downside" to setting $EnablePageListProtect to zero is that%0aanyone doing a search on your site will see the existence of the%0apages in the locked section. They won't be able to read any of%0athem, but they'll know they are there!%0a%0aYou could also set $EnablePageListProtect to zero only if ?action=rss:%0a%0a if ($action == 'rss') $EnablePageListProtect = 0;%0a%0aThis limits the ability to see the protected pages to RSS feeds;%0anormal pagelists and searches wouldn't see them.%0a%0aLastly, it's also possible to configure the webfeeds to obtain%0athe authentication information from the url directly, as in:%0a%0a .../Site/AllRecentChanges?action=rss&authpw=secret%0a%0aThe big downside to this is that the cleartext password will%0aend up traveling across the net with every RSS request, and%0amay end up being recorded in Apache's access logs.%0a%0aQ: How to add feed image?%0a%0aA: Add the following to ''local/config.php'' (this example is for [@?action=rss@]):%0a%0a->[@%0a$FeedFmt['rss']['feed']['image'] =%0a" %3ctitle>Logo title%3c/title>%0a %3clink>http://example.com/%3c/link>%0a %3curl>http://example.com/images/logo.gif%3c/url>%0a %3cwidth>120%3c/width>%0a %3cheight>60%3c/height>";%0a@]%0a%0a-> %25red%25Do not forget NOT to start with a '%3c' as there would be no %3cimage> tag around this... See [[#pitfall1|here]].%0a%0aQ: How do I insert RSS news feeds into PmWiki pages?%0a%0aA: See [[Cookbook:RssFeedDisplay]].%0a%0aQ: How can I specify default feed options in a configuration file instead of always placing them in the url?%0aA: For example, if you want [@?action=rss@] to default to [@?action=rss&group=News&order=-time&count=10@], try the following in a [[local customization(s)]] file:%0a%0a->[@%0a if ($action == 'rss')%0a SDVA($_REQUEST, array(%0a 'group' => 'News',%0a 'order' => '-time',%0a 'count' => 10));%0a@]%0a%0aQ: Are there ways to let people easily subscribe to a feed?%0a%0aA: On some browsers (Mozilla Firefox), the visitor can see an orange RSS icon in the address bar, and subscribe to the feed by clicking on it. To enable the RSS icon, add this to config.php :[@%0a$HTMLHeaderFmt['feedlinks'] = '%3clink rel="alternate" type="application/rss+xml" %0a title="$WikiTitle" href="$ScriptUrl?n=Site.AllRecentChanges&action=rss" />%0a%3clink rel="alternate" type="application/atom+xml" title="$WikiTitle"%0a href="$ScriptUrl?n=Site.AllRecentChanges&action=atom" />';@]%0a%0aYou can also add such a link, for example in your SideBar, @@[=[[Site.AllRecentChanges?action=atom | Subscribe to feed]]=]@@. %0a%0aQ: Can I create an RSS feed for individual page histories?%0aA: See Cookbook:PageFeed.%0a%0a%0aQ: How do I create a custom FeedPage similar to RecentChanges or AllRecentChanges, but with only certain groups or pages recorded?%0aA: See Cookbook:CustomRecentChanges. In a nutshell, you'll declare a $RecentChangesFmt variable with your dedicated FeedPage, and then wrap it in a condition of your choice. For example:%0a[@%0a if (PageVar($pagename, '$Group')!='ForbiddenGroup') {%0a $RecentChangesFmt['Site.MyFeedPage'] =%0a '* [[{$FullName}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a }%0a@]%0a%0aQ: How can I update my RSS feed to show every edit for pages on that feed, not just new pages added to the feed?%0aA: Add unique guid links for each edit to your to congif.php file (see PITS [[PITS/01161|entry]]):%0a[@%0a $FeedFmt['rss']['item']['guid'] = '{$PageUrl}?guid=$ItemISOTime';%0a@] +time=1263049990 Index: wikilib.d/PmWiki.ReleaseNotes =================================================================== --- wikilib.d/PmWiki.ReleaseNotes (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.ReleaseNotes (.../pmwiki-2.2.9) (revision 2460) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.7 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 author=Petko charset=ISO-8859-1 -csum=2.2.8 +csum=EnablePageTitlePriority host=81.65.12.233 name=PmWiki.ReleaseNotes -rev=434 -targets=PmWiki.Uploads,PmWiki.Passwords,PmWiki.SiteAnalyzer,PmWiki.WikiTrails,Site.Site,SiteAdmin.SiteAdmin,Site.PageActions,Site.EditForm,Site.PageNotFound,PmWiki.PageLists,PmWiki.Blocklist,SiteAdmin.AuthList,PmWiki.SkinTemplates,PmWiki.AuthUser,Site.AuthUser,PmWiki.WikiFarms,PmWiki.Notify,PmWiki.LocalCustomizations,Site.PageListTemplates,Site.SideBar,PmWiki.PageVariables,PmWiki.WebFeeds,PmWiki.InterMap,PmWiki.WikiStyles,PmWiki.ConditionalMarkup -text=(:title Release Notes:)%0a(:Summary: PmWiki release notes:)%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!! 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!! Version 2.1.27 (2006-12-11)%0a%0aThis version backports from 2.2.0-beta a bugfix for $TableRowIndexMax and also support for the [@{*$Variable}@] markup.%0a%0a!! Version 2.1.26 (2006-09-11)%0a%0aThis version fixes a bug in feeds.php that would cause feed entries to be mixed up.%0a%0a!! Version 2.1.25 (2006-09-08)%0a%0aThis release fixes a bug in authuser.php introduced by the 2.1.24 release.%0a%0aThe skin template code has also been extended to allow [@%3c!--XMLHeader-->@] and [@%3c!--XMLFooter-->@] as aliases for [@%3c!--HTMLHeader-->@] and [@%3c!--HTMLFooter-->@].%0a%0a!! Version 2.1.24 (2006-09-06)%0a%0aThis release makes some improvements and fixes to the [[AuthUser]]%0acapability.%0a%0aA bug in authuser.php that had trouble dealing with non-array values in $AuthUser has been fixed.%0a%0aIt is now possible to specify group memberships from ''local/config.php'' (remember that such entries must come ''before'' including the ''authuser.php'' script):%0a%0a # alice and bob's passwords%0a $AuthUser['alice'] = crypt('alicepassword');%0a $AuthUser['bob'] = crypt('bobpassword');%0a%0a # members of the @writers and @admins groups%0a $AuthUser['@writers'] = array('alice', 'bob');%0a $AuthUser['@admins'] = array('alice', 'dave');%0a%0a # carol is a member of @editors and @writers%0a $AuthUser['carol'] = array('@editors', '@writers');%0a%0aAuthUser can now read from Apache-formatted .htgroup files. The location of the .htgroup file can be done either in ''local/config.php'' or [[Site.AuthUser]]%0a%0a # local/config.php:%0a $AuthUser['htgroup'] = '/path/to/.htgroup';%0a%0a # Site.AuthUser%0a htgroup: /path/to/.htgroup%0a%0a%0a!! Versions 2.1.21, 2.1.22, 2.1.23 (2006-09-05, 2006-09-06)%0a%0aThis release closes a potential security vulnerability for sites %0athat are running with 'register_globals' set to on. Details of%0athe vulnerability will be forthcoming on the mailing list%0aand site.%0a%0aSites that are running with PHP 'register_globals' and 'allow_url_fopen'%0aset to 'On' should upgrade to this release at the earliest%0aopportunity. If upgrading isn't an option, contact Pm for%0aa patch to older versions.%0a%0aThere is now a tool available to analyze PmWiki sites for security%0aand other configuration settings, see [[PmWiki:SiteAnalyzer]].%0a%0aVersion 2.1.23 also corrects a bug that prevented PmWiki from being%0aable to read pagefiles created by versions of PmWiki before 0.5.6.%0a%0a!! Version 2.1.20 (2006-09-04)%0a%0aMore minor bugfixes:%0a* Corrected a bug with WikiWord references appearing in the [@(:attachlist:)@] markup.%0a* Restore ability to remove/override PmWiki's default CSS settings.%0a%0a!! Version 2.1.19 (2006-08-30)%0a%0aThis release provides a number of very minor bugfixes and%0aenhancements:%0a%0a* Fixed a bug in the pageindex code that was causing it to not regenerate as quickly as it should.%0a* Fixed image/object/embed handling in wikistyles to better support the [[Cookbook:Flash]] recipe.%0a* Fixed a bug with wikistyles and input form tags.%0a%0aThe next release(s) may have a number of substantial code%0aenhancements and changes, so this release simply closes out%0aa few items before introducing those changes.%0a%0a%0a!! Version 2.1.18 (2006-08-28)%0a%0aThis release closes a potential cross-site scripting vulnerability%0athat could allow authors to inject Javascript code through the%0avarious table markups.%0a%0aThe release also adds a new [@(:input image:)@] markup to generate%0aimage input tags in forms.%0a%0aFinally, this release corrects a problem with [@?action=print@]%0afailing to properly set the [@{$Action}@] page variable.%0a%0a!! Version 2.1.17 (2006-08-26)%0a%0aThis release fixes a long-standing bug with $EnableIMSCaching%0a(PITS:00573), whereby login/logout operations wouldn't invalidate %0abrowser caches, causing some people to see versions of a page prior%0ato the login/logout taking place. %0a%0aThe new IMS caching code maintains a "imstime" cookie in the %0avisitor's browser that keeps track of the time of last login, %0alogout, author name change, or site modification. This cookie%0ais then used to determine the proper response to browser requests%0acontaining If-Modified-Since headers. (Previously only the%0atime of the last site modification was available.) %0a%0aBrowsers which do not accept cookies will effectively act as%0athough IMS caching is disabled.%0a%0a%0a!! Version 2.1.16 (2006-08-26) [[#v2116]]%0a%0aThis release makes some improvements to skin handling -- primarily%0athis improves the capability of relocating skin files to other%0alocations, and to provide the ability for recipes to insert items%0aat the ''end'' of HTML output.%0a%0aThis release introduces a [@%3c!--HTMLFooter-->@] directive into%0a[[skin templates]], which allows recipes and local%0acustomizations to insert output near the end of a document %0ausing a $HTMLFooterFmt array from PHP.%0a%0aAlso, the [@%3c!--HeaderText-->@] directive, which inserts the%0acontents of $HTMLHeaderFmt into the output, has now been%0arenamed to [@%3c!--HTMLHeader-->@]. PmWiki will continue to%0arecognize [@%3c!--HeaderText-->@] to preserve compatibility with%0aexisting skins, but [@%3c!--HTMLHeader-->@] is preferred.%0a%0aA new $SkinLibDirs array has been introduced which allows%0athe source locations and urls for skins to be specified from%0aa customization file. By default $SkinLibDirs is set as%0a%0a $SkinLibDirs = array("./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a%0aThe keys (on the left) indicate the places to look for a "skin .tmpl %0afile" in the filesystem, while the values (on the right) indicate the%0aurl location of the "skin css file". Modifying the value of %0a$SkinLibDirs allows a skin .tmpl file to be located anywhere on the %0afilesystem.%0a%0aAs far as I can see, none of the changes introduced by this%0arelease should have any sort of negative impact on existing%0asites, so it should be safe to upgrade. (If I'm wrong, please%0alet me know.)%0a%0a%0a!! Version 2.1.15 (2006-08-25)%0a%0aThis release includes a number of feature enhancements and code cleanups%0aas reported or requested by administrators.%0a%0aFirst, AuthUser's LDAP authentication system now allows the use of%0aa [@?filter@] parameter, consistent with urls used for mod_auth_ldap%0aauthorization in Apache. See the newly updated LDAP section of the%0a[[AuthUser]] documentation for more details.%0a%0aA chicken-and-egg problem with the [@@_site_*@] authorization groups%0ahas been resolved. It's now possible to have a page's read authorization%0arefer to things such as [@_site_edit@].%0a%0aAlso, the RetrieveAuthPage() function -- used for retrieving pages only%0aif the visitor is authorized to do so -- now recognizes a special%0alevel parameter of 'ALWAYS', which means to always authorize access%0aregardless of the browser or visitors current permissions. This%0amay be useful for allowing certain operations to take place from%0awithin trusted scripts without having to grant full authorization%0ato the browser.%0a%0aHardcoded instances of the ''local/'' directory now use a%0acustomizable $LocalDir variable. This variable controls where%0aPmWiki looks for ''local/config.php'' and per-group customization %0afiles. It may be useful for some [[Wiki Farm(s)]] contexts. Note that%0athis does not change or affect the location of %0a''$FarmD/local/farmconfig.php''.%0a%0aSome minor internal changes have been made to %0a''scripts/wikistyles.php'' to better accommodate the %0awikipublisher recipe. It's probably better if we don't try%0ato explain them. :-)%0a%0a%0a!! Version 2.1.13, 2.1.14 (2006-08-15, 2006-08-16)%0a%0aThis release fixes a bug in handling numeric passwords, and also%0aallows ldaps:// authentication sources.%0a%0a!! Version 2.1.12 (2006-08-07)%0a%0aThis version introduces the ability to nest divs and tables.%0aThe standard [@(:table:)@] and [@(:div:)@] markups are still%0aavailable, except that a [@(:div:)@] may contain a [@(:table:)@]%0aand vice-versa. %0a%0aAs in previous versions of PmWiki, the [@(:div:)@] markup%0aautomatically closes any previous [@(:div:)@]. However, there%0aare now [@(:div1:)@], [@(:div2:)@], etc. markups (and the%0acorresponding [@(:div1end:)@], [@(:div2end:)@], ...) which can be%0aused to uniquely distinguish divs for nesting purposes.%0a%0aTo restore PmWiki's previous "non-nested" div behavior, set%0a$Transition['nodivnest'] = 1; in a local customization file.%0a%0aOther changes in this release:%0a* Add a [@(:noaction:)@] directive to suppress display of page actions.%0a* Allow anchor tags to contain colons, hyphens, and dots.%0a* Add "white-space" as an allowed wikistyle.%0a* Other minor bug fixes and typographical corrections.%0a%0a%0a!! Version 2.1.11 (2006-06-09)%0a%0aThis is a minor update that prevents [@%25define=%25@] wikistyles%0afrom generating empty paragraphs in the HTML output. Prior to%0athis release, markup lines containing only wikistyle definitions%0awould often generate empty paragraphs (%3cp>%3c/p>), this release%0achanges things so that a markup line beginning with [@%25define=@]%0aand containing only wikistyle definitions will not initiate%0aa new paragraph.%0a%0a%0a!! Version 2.1.10 (2006-06-03)%0a%0aVersion 2.1.4 introduced an [@{$Action}@] page variable that would%0acontain the current [@?action=@] value. Unfortunately, this page%0avariable conflicted with a pre-existing [@$Action@] global variable%0athat was being used by skins to display a human-friendly form of%0athe current action. Since there's not really a clean way to resolve%0athis, I've decided to keep [@{$Action}@] as a page variable%0awith the current action value (as introduced in 2.1.4), and change %0athe global for skins to be $ActionTitle. This will require updating%0askins to use $ActionTitle instead of $Action. I apologize for the%0aconflict.%0a%0aThis release adds a Site.LocalTemplates page for the [@fmt=#xyz@]%0aoption in pagelist and search results. The list of pages to be%0asearched can be customized via the $FPLTemplatePageFmt variable.%0aThe [@fmt=#xyz@] option will now also search the current page for%0aa matching template before searching Site.LocalTemplates%0aand Site.PageListTemplates.%0a%0aThe 'pmwiki' skin now places a %3cspan> around the "Recent Changes"%0alink in the header to make it somewhat easier to style.%0a%0a!! Version 2.1.9 (2006-06-02)%0a%0aThis release fixes a long-standing and difficult-to-find bug with%0athe handling of [@[[~Author]]@] links.%0a%0a!! Version 2.1.8 (2006-06-01)%0a%0aThis release simply changes the $NotifyListFmt variable to be%0a$NotifyListPageFmt (more descriptive), and adds a $NotifyList%0aarray that can be used to specify notification entries from%0aa configuration file.%0a%0a!! Version 2.1.7 (2006-05-31)%0a%0aThis release introduces a variety of improvements and bugfixes.%0a%0a'''Vspace paragraphs are now divs:'''%0aVersion 2.1.7 changes the way that PmWiki handles vertical%0aspace in output (the infamous [@%3cp class='vspace>%3c/p>@] sequence).%0aInstead of using paragraphs, PmWiki now generates %0a[@%3cdiv class='vspace'>%3c/div>@] for vertical space sequences.%0aIn addition, PmWiki is able to collapse the vspace %3cdiv> with%0aany subsequent paragraph tags, such that a sequence like%0a%0a %3cdiv class='vspace>%3c/div>%3cp>...paragraph text...%3c/p>%0a%0ais automatically converted to%0a%0a %3cp class='vspace'>...paragraph text...%3c/p>%0a%0aThis allows for better control over paragraph spacing. It is%0aexpected that this change in vspace handling will not have%0aany detrimental effects on existing sites. Sites that have%0aset custom values for $HTMLVSpace will continue to use the%0acustom value. A site that wants to restore PmWiki's earlier%0ahandling of vspace can do so by adding the following to%0a''local/config.php'':%0a%0a $HTMLVSpace = "%3cp class='vspace'>%3c/p>";%0a%0a'''Improved email notifications of changes:''' Version 2.1.7%0aincorporates a ''notify.php'' script that provides improved%0acapabilities for sending email notifications in response to%0apage changes. This script is intended to replace the previous%0a[[(PmWiki:)MailPosts]] capability, which is now deprecated (but will%0acontinue to be supported in PmWiki 2.1.x). Details and %0ainstructions for using notify.php are in the [[PmWiki.Notify]] page.%0a%0a'''Added 'group home page' syntax:''' A group name followed%0aby only a dot or slash is automatically treated as a reference%0ato the group's home page, whatever it happens to be. This simplifies%0asome pagelist templates as well as a number of other items. %0aIn particular, group links in pagelist output now points to the%0acorrect locations (instead of being a page in the current group).%0a%0aSeveral bugs and vulnerabilities have been fixed:%0a* The default width of edit forms is now more appropriate for Internet Explorer.%0a* Authentication failure messages from LDAP are now suppressed.%0a* Some cross-site scripting vulnerabilities in uploads and page links have been corrected (courtesy Moritz Naumann, http://moritz-naumann.com).%0a* A problem with invalid pagenames resulting in redirect loops has been corrected.%0a%0a!! Version 2.1.6 (2006-05-22)%0a%0aThe primary improvement in this release is the addition of %0aa pagename argument to the [@(:if auth:)@] conditional markup.%0aThus one can display markup based on a visitor's authorization%0ato a page other than the current one. For example, to test%0afor edit privileges to `Main.WikiSandbox, one would use%0a[@(:if auth edit Main.WikiSandbox:)@]. As before, if the%0apagename is omitted the directive tests authorization to%0athe current page.%0a%0aThis release also restores the ability to have hyphens in%0aInterMap link names.%0a%0aLastly, the release closes a potential cross-site scripting%0avulnerability in the WikiTrail markup, and provides some small%0aperformance improvements.%0a%0a!! Version 2.1.4, 2.1.5 (2006-03-29)%0a%0aThis release fixes a few more bugs:%0a* Pagelist-based feeds using ?action=rss work again.%0a* Multi-term searches with special characters is fixed.%0a%0aThe release also adds a couple of items:%0a* There is now an [@{$Action}@] page variable.%0a* Usernames and passwords submitted to authuser.php can contain quotes.%0a* The [@(:attachlist:)@] command now uses a natural case sort.%0a%0a!! Version 2.1.3 (2006-03-17)%0a%0aThis release fixes a bug that prevents the [@lines=@] option from%0aworking on sites running PHP 5.1.1 or later. It also re-fixes%0aa bug involving empty passwords and LDAP authentication.%0a%0a!! Version 2.1.2 (2006-03-16)%0a%0aThis release fixes a bug with handling "nopass" passwords. It also%0amakes some speed improvements to large web feeds, and fixes a couple%0aof minor HTML tag mismatches.%0a%0a!! Version 2.1.1 (2006-03-13)%0a%0aThis release primarily fixes a bug with passwords containing%0amultiple authorization groups, and in the process slightly liberalized%0athe formatting of "@group" and "id:name" handling. This release also %0aadds a new mechanism for managing and displaying FAQ pages.%0a%0a!! Version 2.1.0 (2006-03-12)%0a%0aThis set of release notes is fairly lengthy, as it chronicles all of the changes since 2.0.13 (four months of development). A lot remains the same, but some changes warrant extra care when upgrading from a 2.0.x version to 2.1.0 (thus the major revision number change). As always, questions and issues can be mailed to the pmwiki-users mailing list.%0a%0aHere's the list:%0a%0a* WikiWords are now disabled by default. To enable them, set "$LinkWikiWords = 1;" in a [[local customization(s)]] file. As of 2.1.beta2, you can now leave WikiWords enabled but have links to non-existent pages display without decoration -- to do this, place the following lines in ''pub/css/local.css'':%0a%0a span.wikiword a.createlink { display:none; }%0a span.wikiword a.createlinktext %0a { border-bottom:none; text-decoration:none; color:inherit; }%0a%0a* The [@(:pagelist:)@] code has been substantially revised. Pagelist formatting can now be specified using markup, and several defaults are available from [[Site.PageListTemplates]]. Also, several built-in pagelist formatting functions (FPLSimple, FPLByGroup, FPLGroup) are now removed in favor of the template code. The FPLByGroup function can be restored by setting $Transition['fplbygroup']=1; . '''Remark:''' Check to see if your page [[Site.PageListTemplates]] is not passwordprotected for viewing, otherwise the resulting pagelist will not be shown. %0a%0a* [@(:pagelist:)@] now also understands wildcards in @@group=@@ and @@name=@@ arguments, as well as excluding specific names and groups.%0a%0a* [@(:pagelist:)@] now has an "order=random" option.%0a%0a* [@(:searchbox:)@] now accepts "group=", "link=", "list=", etc. options to be passed along to the search results. It also accepts a "target=" option that identifies the page on which to send the search query.%0a%0a* [@?action=search@] will display the contents of the current page if it contains a [@(:@][@searchresults:)@] directive, otherwise it uses the content of the page identified by $PageSearchForm (default is the search page for the current language translation). %0a%0a* PmWiki no longer maintains a ".linkindex" file -- it now has a ".pageindex" file that contains not only a table of links, but also words used in each page (to speed up term searches). The maintenance of the .pageindex file can be disabled by setting $PageIndexFile=''; %0a %0a* The $EnablePageListProtect variable now defaults to true, so that read-only pages appear in pagelists only if the visitor has read authorization. Note that this can also slow down some [@(:pagelist:)@] and search commands, so if the site doesn't have any read-only pages or if you aren't worried with cloaking read-only pages from searchlists, it might be worth setting $EnablePageListProtect=0; .%0a%0a* Whitespace indentation rules now exist and are enabled by default. Any line that begins with whitespace and aligns with a previous list item is considered to be "within" that list item. Text folds and wraps as normal, and the [@(:linebreaks:)@] directive is honored. To turn off whitespace indentation, use [@DisableMarkup('^ws');@].%0a%0a* A single blank line after a [@!!Heading@] is silently ignored.%0a%0a* The [@(:redirect:)@] directive is now a true markup, and can be embedded inside conditional markups or includes. It also allows redirecting to an anchor in a page, such as [@(:redirect PageName#anchor:)@]. A new [@from=@] option allows the redirect to take place only from pages that match the given wildcard specification. The [@status=@] option allows a 301, 302, 303, or 307 HTTP status code to be returned.%0a%0a* The built-in authorization function has gone through some substantial internal changes, however these changes should be fully backward compatible so that it doesn't impact any existing sites. (If it ''does'' cause a problem, please let me know so I can investigate why!) The password prompts are now specified by an admin-customizable Site.AuthForm page. In addition, the authorization function no longer creates PHP sessions for visitors that aren't being authenticated.%0a%0a* The authuser.php has likewise been substantially updated. The new version should have complete backwards compatibility with previous authuser.php settings, but this version also offers the ability to configure authentication resources and authorization groups through the [[Site.AuthUser]] page. Note that by default the Site.AuthUser page can only be edited using the admin password.%0a%0a* The $EnableSessionPasswords variable can be used to control whether passwords are held in PHP sessions. (This does not affect user authentication via [[AuthUser]], however.)%0a%0a* The $Author variable now defaults to $AuthId if not otherwise set by a script or cookie.%0a%0a* The [[Site.SideBar]] page now defaults its edit password to the sitewide edit password (in $DefaultPasswords['edit']).%0a%0a* PmWiki now supports a "draft edit" mode, enabled by $EnableDrafts = 1. This creates a "Save as draft" button that will save a page under a "-Draft" suffix, for intermediate edits.%0a%0a* There is now an ?action=login action available.%0a%0a* A potential security vulnerability for sites running PHP 5 with register_globals enabled has been fixed.%0a%0a* The [@[[PageName |+]]@] markup is now available by default; this creates a link to `PageName and uses that page's title as the link text.%0a%0a* What used to be "markup variables" are now "[[page variables]]". These are always specified using the @@{$''variable''}@@ syntax, and can be used in markup and in $...Fmt strings. In addition, one can request a value for a specific page by placing the pagename in front of the variable, as in @@{''pagename''$''variable''}@@.%0a%0a* The ''scripts/rss.php'' script is now ''scripts/feeds.php'', and is a complete redesign for [[web feed(s)]] generation. The new version supports UTF-8 and other encodings, can generate Atom 1.0 ([@?action=atom@]), Dublin Core Metadata ([@?action=dc@]) output, and enclosures for podcasting. It also allows feeds to be generated from trails, groups, categories, and backlinks, and provides options (same as pagelists) for sorting and filtering the contents of the feed. Most sites can simply switch to using [@include_once("scripts/feeds.php");@] instead of the previous ''rss.php'' include. The ''rss.php'' file has been removed from the distribution (but still works with PmWiki 2.1 for those sites that wish to continue using it).%0a%0a* [[PmWiki/InterMap]] entries can now come from a `Site.InterMap page as well as the ''local/localmap.txt'' and ''local/farmmap.txt'' files. The format of these files has changed slightly, in that the InterMap name should now have a colon after it (previously the colon was omitted).%0a%0a* We can now provide better control of robot (webcrawler) interactions with a site to reduce server load and bandwidth. The $RobotPattern variable is used to detect robots based on the user-agent string, and any actions not listed in the $RobotActions array will return a 403 Forbidden response to robots. In addition, setting $EnableRobotCloakActions will eliminate any forbidden ?action= values from page links returned to robots, which will reduce bandwidth loads from robots even further (PITS:00563).%0a%0a* Non-existent page handling has been improved; whenever a browser hits a non-existent page, PmWiki returns the contents of Site.PageNotFound and a 404 ("Not Found") status code.%0a%0a* Page links that have "?action=" in their query arguments are now treated as "existing page" links even if the page does not exist.%0a%0a* The PmWiki default skin now adds rel='nofollow' to various action links.%0a%0a* Some of the CSS styles in the PmWiki default skin have been changed for better presentation.%0a%0a* The gui edit buttons have transparent (instead of white) borders so they integrate better into skins.%0a%0a* The $EnableIMSCaching variable is now much smarter, it can detect changes in local customization files as well as pages.%0a%0a* [[PmWiki/WikiStyles]] can now make percentage specifications by using "pct" to mean "%25".%0a%0a* Class attributes in [[WikiStyle(s)]] shortcuts are now cumulative, so that [@%25class1 class2%25@] results in [@class='class1 class2'@] instead of just [@class='class2'@] in the output.%0a%0a* A problem with the [@(:include PageName#from#:)@] markup not working has been fixed (PITS:00560).%0a%0a* Viewing a GroupHeader or GroupFooter page no longer displays the contents twice.%0a%0a* It's now easier to share pages among multiple sites (e.g., [[WikiFarms]]), see Cookbook:SharedPages (PITS:00459).%0a%0a* A problem with nested apostrophe markups has been fixed (PITS:00590).%0a%0a* PmWiki is now smarter about not surrounding block HTML tags with %3cp>...%3c/p> tags.%0a%0a* If an [@[[#anchor]]@] is used more than once in a page, only the first generates an actual anchor (to preserve XHTML validity).%0a%0a* There are now [@(:if equal ...:)@] and [@(:if exists pagename:)@] [[conditional markup]]s.%0a%0a* Compound conditional markup expressions are now possible -- e.g. [@(:if [ group PmWiki && ! name PmWiki ] :)@] .%0a%0a* Added an $InputValues array that can supply default values for certain form controls (PITS:00566).%0a%0a* The default setting of $UploadUrlFmt is now based on $PubDirUrl instead of $ScriptUrl.%0a%0a* The $text global variable has been removed (use $_GET['text'], $_POST['text'], or $_REQUEST['text']).%0a%0a* A possible problem with url-encoding of attachments with non-ASCII characters has been addressed (PITS:00588).%0a%0a* Page actions in non-existent pages no longer display with non-existent link decorations.%0a%0a* A README.txt file has been added, and several documentation files are now available through the docs/ directory.%0a %0a* PmWiki is no longer available through CVS on sourceforge.net. It is now available via SVN on pmwiki.org, at svn://pmwiki.org/pmwiki/tags/latest . For more details, see PmWiki:Subversion.%0a%0a* The $NewlineXXX variable (deprecated in 2.0.0) has been removed.%0a%0a* There is experimental support for server-side caching of pages that take a long time to render; this is currently an unsupported feature and may be removed in future releases.%0a%0a%25red%25Wiki administrators should note that from this release on PmWiki defaults to having WikiWords disabled.%0a%0aTo make sure WikiWords are enabled, use [@$LinkWikiWords = 1;@] in%0athe ''local/config.php'' file.%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.1.0.%0a%0a%0a%0a%0a%0a%0a%0a%0a%0a%0a -time=1260140569 +rev=438 +targets=PmWiki.Uploads,PmWiki.Passwords,PmWiki.SiteAnalyzer,PmWiki.WikiTrails,Site.Site,SiteAdmin.SiteAdmin,PITS.00961,Site.PageActions,Site.EditForm,Site.PageNotFound,PmWiki.PageLists,PmWiki.Drafts,PmWiki.Blocklist,SiteAdmin.AuthList,Cookbook.Cookbook,Cookbook.DebuggingForCookbookAuthors,PmWiki.SkinTemplates,PmWiki.AuthUser,Site.AuthUser,Cookbook.Flash,PITS.00573,PmWiki.WikiFarms,PmWiki.MailPosts,PmWiki.Notify,PmWiki.LocalCustomizations,Site.PageListTemplates,Site.SideBar,PmWiki.PageVariables,PmWiki.WebFeeds,PmWiki.InterMap,PITS.00563,PmWiki.WikiStyles,PITS.00560,Cookbook.SharedPages,PITS.00459,PITS.00590,PmWiki.ConditionalMarkup,PITS.00566,PITS.00588,PmWiki.Subversion,PmWiki.ReleaseNotesArchive +text=(:title Release Notes:)%0a(:Summary: PmWiki release notes:)%0a!! Version 2.2.9 (2010-01-??)%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!! 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!! Version 2.1.27 (2006-12-11)%0a%0aThis version backports from 2.2.0-beta a bugfix for $TableRowIndexMax and also support for the [@{*$Variable}@] markup.%0a%0a!! Version 2.1.26 (2006-09-11)%0a%0aThis version fixes a bug in feeds.php that would cause feed entries to be mixed up.%0a%0a!! Version 2.1.25 (2006-09-08)%0a%0aThis release fixes a bug in authuser.php introduced by the 2.1.24 release.%0a%0aThe skin template code has also been extended to allow [@%3c!--XMLHeader-->@] and [@%3c!--XMLFooter-->@] as aliases for [@%3c!--HTMLHeader-->@] and [@%3c!--HTMLFooter-->@].%0a%0a!! Version 2.1.24 (2006-09-06)%0a%0aThis release makes some improvements and fixes to the [[AuthUser]]%0acapability.%0a%0aA bug in authuser.php that had trouble dealing with non-array values in $AuthUser has been fixed.%0a%0aIt is now possible to specify group memberships from ''local/config.php'' (remember that such entries must come ''before'' including the ''authuser.php'' script):%0a%0a # alice and bob's passwords%0a $AuthUser['alice'] = crypt('alicepassword');%0a $AuthUser['bob'] = crypt('bobpassword');%0a%0a # members of the @writers and @admins groups%0a $AuthUser['@writers'] = array('alice', 'bob');%0a $AuthUser['@admins'] = array('alice', 'dave');%0a%0a # carol is a member of @editors and @writers%0a $AuthUser['carol'] = array('@editors', '@writers');%0a%0aAuthUser can now read from Apache-formatted .htgroup files. The location of the .htgroup file can be done either in ''local/config.php'' or [[Site.AuthUser]]%0a%0a # local/config.php:%0a $AuthUser['htgroup'] = '/path/to/.htgroup';%0a%0a # Site.AuthUser%0a htgroup: /path/to/.htgroup%0a%0a%0a!! Versions 2.1.21, 2.1.22, 2.1.23 (2006-09-05, 2006-09-06)%0a%0aThis release closes a potential security vulnerability for sites %0athat are running with 'register_globals' set to on. Details of%0athe vulnerability will be forthcoming on the mailing list%0aand site.%0a%0aSites that are running with PHP 'register_globals' and 'allow_url_fopen'%0aset to 'On' should upgrade to this release at the earliest%0aopportunity. If upgrading isn't an option, contact Pm for%0aa patch to older versions.%0a%0aThere is now a tool available to analyze PmWiki sites for security%0aand other configuration settings, see [[PmWiki:SiteAnalyzer]].%0a%0aVersion 2.1.23 also corrects a bug that prevented PmWiki from being%0aable to read pagefiles created by versions of PmWiki before 0.5.6.%0a%0a!! Version 2.1.20 (2006-09-04)%0a%0aMore minor bugfixes:%0a* Corrected a bug with WikiWord references appearing in the [@(:attachlist:)@] markup.%0a* Restore ability to remove/override PmWiki's default CSS settings.%0a%0a!! Version 2.1.19 (2006-08-30)%0a%0aThis release provides a number of very minor bugfixes and%0aenhancements:%0a%0a* Fixed a bug in the pageindex code that was causing it to not regenerate as quickly as it should.%0a* Fixed image/object/embed handling in wikistyles to better support the [[Cookbook:Flash]] recipe.%0a* Fixed a bug with wikistyles and input form tags.%0a%0aThe next release(s) may have a number of substantial code%0aenhancements and changes, so this release simply closes out%0aa few items before introducing those changes.%0a%0a%0a!! Version 2.1.18 (2006-08-28)%0a%0aThis release closes a potential cross-site scripting vulnerability%0athat could allow authors to inject Javascript code through the%0avarious table markups.%0a%0aThe release also adds a new [@(:input image:)@] markup to generate%0aimage input tags in forms.%0a%0aFinally, this release corrects a problem with [@?action=print@]%0afailing to properly set the [@{$Action}@] page variable.%0a%0a!! Version 2.1.17 (2006-08-26)%0a%0aThis release fixes a long-standing bug with $EnableIMSCaching%0a(PITS:00573), whereby login/logout operations wouldn't invalidate %0abrowser caches, causing some people to see versions of a page prior%0ato the login/logout taking place. %0a%0aThe new IMS caching code maintains a "imstime" cookie in the %0avisitor's browser that keeps track of the time of last login, %0alogout, author name change, or site modification. This cookie%0ais then used to determine the proper response to browser requests%0acontaining If-Modified-Since headers. (Previously only the%0atime of the last site modification was available.) %0a%0aBrowsers which do not accept cookies will effectively act as%0athough IMS caching is disabled.%0a%0a%0a!! Version 2.1.16 (2006-08-26) [[#v2116]]%0a%0aThis release makes some improvements to skin handling -- primarily%0athis improves the capability of relocating skin files to other%0alocations, and to provide the ability for recipes to insert items%0aat the ''end'' of HTML output.%0a%0aThis release introduces a [@%3c!--HTMLFooter-->@] directive into%0a[[skin templates]], which allows recipes and local%0acustomizations to insert output near the end of a document %0ausing a $HTMLFooterFmt array from PHP.%0a%0aAlso, the [@%3c!--HeaderText-->@] directive, which inserts the%0acontents of $HTMLHeaderFmt into the output, has now been%0arenamed to [@%3c!--HTMLHeader-->@]. PmWiki will continue to%0arecognize [@%3c!--HeaderText-->@] to preserve compatibility with%0aexisting skins, but [@%3c!--HTMLHeader-->@] is preferred.%0a%0aA new $SkinLibDirs array has been introduced which allows%0athe source locations and urls for skins to be specified from%0aa customization file. By default $SkinLibDirs is set as%0a%0a $SkinLibDirs = array("./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a%0aThe keys (on the left) indicate the places to look for a "skin .tmpl %0afile" in the filesystem, while the values (on the right) indicate the%0aurl location of the "skin css file". Modifying the value of %0a$SkinLibDirs allows a skin .tmpl file to be located anywhere on the %0afilesystem.%0a%0aAs far as I can see, none of the changes introduced by this%0arelease should have any sort of negative impact on existing%0asites, so it should be safe to upgrade. (If I'm wrong, please%0alet me know.)%0a%0a%0a!! Version 2.1.15 (2006-08-25)%0a%0aThis release includes a number of feature enhancements and code cleanups%0aas reported or requested by administrators.%0a%0aFirst, AuthUser's LDAP authentication system now allows the use of%0aa [@?filter@] parameter, consistent with urls used for mod_auth_ldap%0aauthorization in Apache. See the newly updated LDAP section of the%0a[[AuthUser]] documentation for more details.%0a%0aA chicken-and-egg problem with the [@@_site_*@] authorization groups%0ahas been resolved. It's now possible to have a page's read authorization%0arefer to things such as [@_site_edit@].%0a%0aAlso, the RetrieveAuthPage() function -- used for retrieving pages only%0aif the visitor is authorized to do so -- now recognizes a special%0alevel parameter of 'ALWAYS', which means to always authorize access%0aregardless of the browser or visitors current permissions. This%0amay be useful for allowing certain operations to take place from%0awithin trusted scripts without having to grant full authorization%0ato the browser.%0a%0aHardcoded instances of the ''local/'' directory now use a%0acustomizable $LocalDir variable. This variable controls where%0aPmWiki looks for ''local/config.php'' and per-group customization %0afiles. It may be useful for some [[Wiki Farm(s)]] contexts. Note that%0athis does not change or affect the location of %0a''$FarmD/local/farmconfig.php''.%0a%0aSome minor internal changes have been made to %0a''scripts/wikistyles.php'' to better accommodate the %0awikipublisher recipe. It's probably better if we don't try%0ato explain them. :-)%0a%0a%0a!! Version 2.1.13, 2.1.14 (2006-08-15, 2006-08-16)%0a%0aThis release fixes a bug in handling numeric passwords, and also%0aallows ldaps:// authentication sources.%0a%0a!! Version 2.1.12 (2006-08-07)%0a%0aThis version introduces the ability to nest divs and tables.%0aThe standard [@(:table:)@] and [@(:div:)@] markups are still%0aavailable, except that a [@(:div:)@] may contain a [@(:table:)@]%0aand vice-versa. %0a%0aAs in previous versions of PmWiki, the [@(:div:)@] markup%0aautomatically closes any previous [@(:div:)@]. However, there%0aare now [@(:div1:)@], [@(:div2:)@], etc. markups (and the%0acorresponding [@(:div1end:)@], [@(:div2end:)@], ...) which can be%0aused to uniquely distinguish divs for nesting purposes.%0a%0aTo restore PmWiki's previous "non-nested" div behavior, set%0a$Transition['nodivnest'] = 1; in a local customization file.%0a%0aOther changes in this release:%0a* Add a [@(:noaction:)@] directive to suppress display of page actions.%0a* Allow anchor tags to contain colons, hyphens, and dots.%0a* Add "white-space" as an allowed wikistyle.%0a* Other minor bug fixes and typographical corrections.%0a%0a%0a!! Version 2.1.11 (2006-06-09)%0a%0aThis is a minor update that prevents [@%25define=%25@] wikistyles%0afrom generating empty paragraphs in the HTML output. Prior to%0athis release, markup lines containing only wikistyle definitions%0awould often generate empty paragraphs (%3cp>%3c/p>), this release%0achanges things so that a markup line beginning with [@%25define=@]%0aand containing only wikistyle definitions will not initiate%0aa new paragraph.%0a%0a%0a!! Version 2.1.10 (2006-06-03)%0a%0aVersion 2.1.4 introduced an [@{$Action}@] page variable that would%0acontain the current [@?action=@] value. Unfortunately, this page%0avariable conflicted with a pre-existing [@$Action@] global variable%0athat was being used by skins to display a human-friendly form of%0athe current action. Since there's not really a clean way to resolve%0athis, I've decided to keep [@{$Action}@] as a page variable%0awith the current action value (as introduced in 2.1.4), and change %0athe global for skins to be $ActionTitle. This will require updating%0askins to use $ActionTitle instead of $Action. I apologize for the%0aconflict.%0a%0aThis release adds a Site.LocalTemplates page for the [@fmt=#xyz@]%0aoption in pagelist and search results. The list of pages to be%0asearched can be customized via the $FPLTemplatePageFmt variable.%0aThe [@fmt=#xyz@] option will now also search the current page for%0aa matching template before searching Site.LocalTemplates%0aand Site.PageListTemplates.%0a%0aThe 'pmwiki' skin now places a %3cspan> around the "Recent Changes"%0alink in the header to make it somewhat easier to style.%0a%0a!! Version 2.1.9 (2006-06-02)%0a%0aThis release fixes a long-standing and difficult-to-find bug with%0athe handling of [@[[~Author]]@] links.%0a%0a!! Version 2.1.8 (2006-06-01)%0a%0aThis release simply changes the $NotifyListFmt variable to be%0a$NotifyListPageFmt (more descriptive), and adds a $NotifyList%0aarray that can be used to specify notification entries from%0aa configuration file.%0a%0a!! Version 2.1.7 (2006-05-31)%0a%0aThis release introduces a variety of improvements and bugfixes.%0a%0a'''Vspace paragraphs are now divs:'''%0aVersion 2.1.7 changes the way that PmWiki handles vertical%0aspace in output (the infamous [@%3cp class='vspace>%3c/p>@] sequence).%0aInstead of using paragraphs, PmWiki now generates %0a[@%3cdiv class='vspace'>%3c/div>@] for vertical space sequences.%0aIn addition, PmWiki is able to collapse the vspace %3cdiv> with%0aany subsequent paragraph tags, such that a sequence like%0a%0a %3cdiv class='vspace>%3c/div>%3cp>...paragraph text...%3c/p>%0a%0ais automatically converted to%0a%0a %3cp class='vspace'>...paragraph text...%3c/p>%0a%0aThis allows for better control over paragraph spacing. It is%0aexpected that this change in vspace handling will not have%0aany detrimental effects on existing sites. Sites that have%0aset custom values for $HTMLVSpace will continue to use the%0acustom value. A site that wants to restore PmWiki's earlier%0ahandling of vspace can do so by adding the following to%0a''local/config.php'':%0a%0a $HTMLVSpace = "%3cp class='vspace'>%3c/p>";%0a%0a'''Improved email notifications of changes:''' Version 2.1.7%0aincorporates a ''notify.php'' script that provides improved%0acapabilities for sending email notifications in response to%0apage changes. This script is intended to replace the previous%0a[[(PmWiki:)MailPosts]] capability, which is now deprecated (but will%0acontinue to be supported in PmWiki 2.1.x). Details and %0ainstructions for using notify.php are in the [[PmWiki.Notify]] page.%0a%0a'''Added 'group home page' syntax:''' A group name followed%0aby only a dot or slash is automatically treated as a reference%0ato the group's home page, whatever it happens to be. This simplifies%0asome pagelist templates as well as a number of other items. %0aIn particular, group links in pagelist output now points to the%0acorrect locations (instead of being a page in the current group).%0a%0aSeveral bugs and vulnerabilities have been fixed:%0a* The default width of edit forms is now more appropriate for Internet Explorer.%0a* Authentication failure messages from LDAP are now suppressed.%0a* Some cross-site scripting vulnerabilities in uploads and page links have been corrected (courtesy Moritz Naumann, http://moritz-naumann.com).%0a* A problem with invalid pagenames resulting in redirect loops has been corrected.%0a%0a!! Version 2.1.6 (2006-05-22)%0a%0aThe primary improvement in this release is the addition of %0aa pagename argument to the [@(:if auth:)@] conditional markup.%0aThus one can display markup based on a visitor's authorization%0ato a page other than the current one. For example, to test%0afor edit privileges to `Main.WikiSandbox, one would use%0a[@(:if auth edit Main.WikiSandbox:)@]. As before, if the%0apagename is omitted the directive tests authorization to%0athe current page.%0a%0aThis release also restores the ability to have hyphens in%0aInterMap link names.%0a%0aLastly, the release closes a potential cross-site scripting%0avulnerability in the WikiTrail markup, and provides some small%0aperformance improvements.%0a%0a!! Version 2.1.4, 2.1.5 (2006-03-29)%0a%0aThis release fixes a few more bugs:%0a* Pagelist-based feeds using ?action=rss work again.%0a* Multi-term searches with special characters is fixed.%0a%0aThe release also adds a couple of items:%0a* There is now an [@{$Action}@] page variable.%0a* Usernames and passwords submitted to authuser.php can contain quotes.%0a* The [@(:attachlist:)@] command now uses a natural case sort.%0a%0a!! Version 2.1.3 (2006-03-17)%0a%0aThis release fixes a bug that prevents the [@lines=@] option from%0aworking on sites running PHP 5.1.1 or later. It also re-fixes%0aa bug involving empty passwords and LDAP authentication.%0a%0a!! Version 2.1.2 (2006-03-16)%0a%0aThis release fixes a bug with handling "nopass" passwords. It also%0amakes some speed improvements to large web feeds, and fixes a couple%0aof minor HTML tag mismatches.%0a%0a!! Version 2.1.1 (2006-03-13)%0a%0aThis release primarily fixes a bug with passwords containing%0amultiple authorization groups, and in the process slightly liberalized%0athe formatting of "@group" and "id:name" handling. This release also %0aadds a new mechanism for managing and displaying FAQ pages.%0a%0a!! Version 2.1.0 (2006-03-12)%0a%0aThis set of release notes is fairly lengthy, as it chronicles all of the changes since 2.0.13 (four months of development). A lot remains the same, but some changes warrant extra care when upgrading from a 2.0.x version to 2.1.0 (thus the major revision number change). As always, questions and issues can be mailed to the pmwiki-users mailing list.%0a%0aHere's the list:%0a%0a* WikiWords are now disabled by default. To enable them, set "$LinkWikiWords = 1;" in a [[local customization(s)]] file. As of 2.1.beta2, you can now leave WikiWords enabled but have links to non-existent pages display without decoration -- to do this, place the following lines in ''pub/css/local.css'':%0a%0a span.wikiword a.createlink { display:none; }%0a span.wikiword a.createlinktext %0a { border-bottom:none; text-decoration:none; color:inherit; }%0a%0a* The [@(:pagelist:)@] code has been substantially revised. Pagelist formatting can now be specified using markup, and several defaults are available from [[Site.PageListTemplates]]. Also, several built-in pagelist formatting functions (FPLSimple, FPLByGroup, FPLGroup) are now removed in favor of the template code. The FPLByGroup function can be restored by setting $Transition['fplbygroup']=1; . '''Remark:''' Check to see if your page [[Site.PageListTemplates]] is not passwordprotected for viewing, otherwise the resulting pagelist will not be shown. %0a%0a* [@(:pagelist:)@] now also understands wildcards in @@group=@@ and @@name=@@ arguments, as well as excluding specific names and groups.%0a%0a* [@(:pagelist:)@] now has an "order=random" option.%0a%0a* [@(:searchbox:)@] now accepts "group=", "link=", "list=", etc. options to be passed along to the search results. It also accepts a "target=" option that identifies the page on which to send the search query.%0a%0a* [@?action=search@] will display the contents of the current page if it contains a [@(:@][@searchresults:)@] directive, otherwise it uses the content of the page identified by $PageSearchForm (default is the search page for the current language translation). %0a%0a* PmWiki no longer maintains a ".linkindex" file -- it now has a ".pageindex" file that contains not only a table of links, but also words used in each page (to speed up term searches). The maintenance of the .pageindex file can be disabled by setting $PageIndexFile=''; %0a %0a* The $EnablePageListProtect variable now defaults to true, so that read-only pages appear in pagelists only if the visitor has read authorization. Note that this can also slow down some [@(:pagelist:)@] and search commands, so if the site doesn't have any read-only pages or if you aren't worried with cloaking read-only pages from searchlists, it might be worth setting $EnablePageListProtect=0; .%0a%0a* Whitespace indentation rules now exist and are enabled by default. Any line that begins with whitespace and aligns with a previous list item is considered to be "within" that list item. Text folds and wraps as normal, and the [@(:linebreaks:)@] directive is honored. To turn off whitespace indentation, use [@DisableMarkup('^ws');@].%0a%0a* A single blank line after a [@!!Heading@] is silently ignored.%0a%0a* The [@(:redirect:)@] directive is now a true markup, and can be embedded inside conditional markups or includes. It also allows redirecting to an anchor in a page, such as [@(:redirect PageName#anchor:)@]. A new [@from=@] option allows the redirect to take place only from pages that match the given wildcard specification. The [@status=@] option allows a 301, 302, 303, or 307 HTTP status code to be returned.%0a%0a* The built-in authorization function has gone through some substantial internal changes, however these changes should be fully backward compatible so that it doesn't impact any existing sites. (If it ''does'' cause a problem, please let me know so I can investigate why!) The password prompts are now specified by an admin-customizable Site.AuthForm page. In addition, the authorization function no longer creates PHP sessions for visitors that aren't being authenticated.%0a%0a* The authuser.php has likewise been substantially updated. The new version should have complete backwards compatibility with previous authuser.php settings, but this version also offers the ability to configure authentication resources and authorization groups through the [[Site.AuthUser]] page. Note that by default the Site.AuthUser page can only be edited using the admin password.%0a%0a* The $EnableSessionPasswords variable can be used to control whether passwords are held in PHP sessions. (This does not affect user authentication via [[AuthUser]], however.)%0a%0a* The $Author variable now defaults to $AuthId if not otherwise set by a script or cookie.%0a%0a* The [[Site.SideBar]] page now defaults its edit password to the sitewide edit password (in $DefaultPasswords['edit']).%0a%0a* PmWiki now supports a "draft edit" mode, enabled by $EnableDrafts = 1. This creates a "Save as draft" button that will save a page under a "-Draft" suffix, for intermediate edits.%0a%0a* There is now an ?action=login action available.%0a%0a* A potential security vulnerability for sites running PHP 5 with register_globals enabled has been fixed.%0a%0a* The [@[[PageName |+]]@] markup is now available by default; this creates a link to `PageName and uses that page's title as the link text.%0a%0a* What used to be "markup variables" are now "[[page variables]]". These are always specified using the @@{$''variable''}@@ syntax, and can be used in markup and in $...Fmt strings. In addition, one can request a value for a specific page by placing the pagename in front of the variable, as in @@{''pagename''$''variable''}@@.%0a%0a* The ''scripts/rss.php'' script is now ''scripts/feeds.php'', and is a complete redesign for [[web feed(s)]] generation. The new version supports UTF-8 and other encodings, can generate Atom 1.0 ([@?action=atom@]), Dublin Core Metadata ([@?action=dc@]) output, and enclosures for podcasting. It also allows feeds to be generated from trails, groups, categories, and backlinks, and provides options (same as pagelists) for sorting and filtering the contents of the feed. Most sites can simply switch to using [@include_once("scripts/feeds.php");@] instead of the previous ''rss.php'' include. The ''rss.php'' file has been removed from the distribution (but still works with PmWiki 2.1 for those sites that wish to continue using it).%0a%0a* [[PmWiki/InterMap]] entries can now come from a `Site.InterMap page as well as the ''local/localmap.txt'' and ''local/farmmap.txt'' files. The format of these files has changed slightly, in that the InterMap name should now have a colon after it (previously the colon was omitted).%0a%0a* We can now provide better control of robot (webcrawler) interactions with a site to reduce server load and bandwidth. The $RobotPattern variable is used to detect robots based on the user-agent string, and any actions not listed in the $RobotActions array will return a 403 Forbidden response to robots. In addition, setting $EnableRobotCloakActions will eliminate any forbidden ?action= values from page links returned to robots, which will reduce bandwidth loads from robots even further (PITS:00563).%0a%0a* Non-existent page handling has been improved; whenever a browser hits a non-existent page, PmWiki returns the contents of Site.PageNotFound and a 404 ("Not Found") status code.%0a%0a* Page links that have "?action=" in their query arguments are now treated as "existing page" links even if the page does not exist.%0a%0a* The PmWiki default skin now adds rel='nofollow' to various action links.%0a%0a* Some of the CSS styles in the PmWiki default skin have been changed for better presentation.%0a%0a* The gui edit buttons have transparent (instead of white) borders so they integrate better into skins.%0a%0a* The $EnableIMSCaching variable is now much smarter, it can detect changes in local customization files as well as pages.%0a%0a* [[PmWiki/WikiStyles]] can now make percentage specifications by using "pct" to mean "%25".%0a%0a* Class attributes in [[WikiStyle(s)]] shortcuts are now cumulative, so that [@%25class1 class2%25@] results in [@class='class1 class2'@] instead of just [@class='class2'@] in the output.%0a%0a* A problem with the [@(:include PageName#from#:)@] markup not working has been fixed (PITS:00560).%0a%0a* Viewing a GroupHeader or GroupFooter page no longer displays the contents twice.%0a%0a* It's now easier to share pages among multiple sites (e.g., [[WikiFarms]]), see Cookbook:SharedPages (PITS:00459).%0a%0a* A problem with nested apostrophe markups has been fixed (PITS:00590).%0a%0a* PmWiki is now smarter about not surrounding block HTML tags with %3cp>...%3c/p> tags.%0a%0a* If an [@[[#anchor]]@] is used more than once in a page, only the first generates an actual anchor (to preserve XHTML validity).%0a%0a* There are now [@(:if equal ...:)@] and [@(:if exists pagename:)@] [[conditional markup]]s.%0a%0a* Compound conditional markup expressions are now possible -- e.g. [@(:if [ group PmWiki && ! name PmWiki ] :)@] .%0a%0a* Added an $InputValues array that can supply default values for certain form controls (PITS:00566).%0a%0a* The default setting of $UploadUrlFmt is now based on $PubDirUrl instead of $ScriptUrl.%0a%0a* The $text global variable has been removed (use $_GET['text'], $_POST['text'], or $_REQUEST['text']).%0a%0a* A possible problem with url-encoding of attachments with non-ASCII characters has been addressed (PITS:00588).%0a%0a* Page actions in non-existent pages no longer display with non-existent link decorations.%0a%0a* A README.txt file has been added, and several documentation files are now available through the docs/ directory.%0a %0a* PmWiki is no longer available through CVS on sourceforge.net. It is now available via SVN on pmwiki.org, at svn://pmwiki.org/pmwiki/tags/latest . For more details, see PmWiki:Subversion.%0a%0a* The $NewlineXXX variable (deprecated in 2.0.0) has been removed.%0a%0a* There is experimental support for server-side caching of pages that take a long time to render; this is currently an unsupported feature and may be removed in future releases.%0a%0a%25red%25Wiki administrators should note that from this release on PmWiki defaults to having WikiWords disabled.%0a%0aTo make sure WikiWords are enabled, use [@$LinkWikiWords = 1;@] in%0athe ''local/config.php'' file.%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.1.0.%0a%0a%0a%0a%0a%0a%0a%0a%0a%0a%0a +time=1263765170 title=Release Notes Index: wikilib.d/PmWiki.Variables =================================================================== --- wikilib.d/PmWiki.Variables (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.Variables (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.6 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 -author=OliverBetz +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5 +author=simon charset=ISO-8859-1 -csum=clarification, uncreep. Should be reviewed by a native speaker -host=87.163.84.111 +csum=smaller +host=203.97.214.12 name=PmWiki.Variables -rev=72 +rev=73 targets=PmWiki.LocalCustomizations,PmWiki.PageVariables,PmWiki.PageTextVariables,PmWiki.BasicVariables,PmWiki.DebugVariables,PmWiki.EditVariables,PmWiki.I18nVariables,PmWiki.LayoutVariables,PmWiki.LinkVariables,PmWiki.OtherVariables,PmWiki.PagelistVariables,PmWiki.PageLists,PmWiki.PathVariables,PmWiki.SecurityVariables,PmWiki.UploadVariables,PmWiki.Blocklist,PmWiki.Notify,PmWiki.Functions -text=(:Summary:Variables available for local customisation:)%0a(:Audience: administrators (basic) :)%0a%0aThis page documents the PHP variables available in PmWiki for [[local customizations]]. Much of this documentation is still incomplete but people are working on it now. Feel free to add placeholders for variables you want to have documented if you don't know what the variable does.%0a%0aNote: Do not confuse these PHP variables with [[Page Variables]] and [[Page TextVariables]] being used in page markup.%0a%0aThe variables documentation is divided into several pages:%0a%0a* [[Basic Variables]] - {BasicVariables$:Summary}%0a* [[Debug Variables]] - {DebugVariables$:Summary}%0a* [[Edit Variables]] - {EditVariables$:Summary}%0a* [[I18n Variables]] - {I18nVariables$:Summary}%0a* [[Layout Variables]] - {LayoutVariables$:Summary}%0a* [[Link Variables]] - {LinkVariables$:Summary}%0a* [[Other Variables]] - {OtherVariables$:Summary}%0a* [[Pagelist Variables]] - {PagelistVariables$:Summary}%0a* [[Path Variables]] - {PathVariables$:Summary}%0a* [[Security Variables]] - {SecurityVariables$:Summary}%0a* [[Upload Variables]] - {UploadVariables$:Summary}%0a%0aThe following functions are also controlled by several variables:%0a* [[Blocklist(#variables)]] - {Blocklist$:Summary}%0a* [[Notify(#variables)]] - {Notify$:Summary}%0a* [[Basic Variables]] %25item comment%25 to provide circular trail%0a%0aAn complete index of documented PHP variables is given below.%0a%0aIn general, variables with names ending in 'Fmt' (such as $PageLayoutFmt) have their values processed for $-variable substitutions prior to being output. Thus strings such as [@{$Name}@] and [@{$PageUrl}@] are replaced with the name and URL of the page when the string is printed.%0a%0aNote: The automatic variable index and link generation is done by scripts/vardoc.php using $VarPagesFmt to find the pages containing trails of pages with the variable documentation.%0a%0aThere is a slight discrepancy between index generation and link generation: The index generation finds lines starting with a colon followed by "$" and an uppercase word. In contrast, the automatic link generation works only with WikiWords ($WikiWordPattern) preceded by "$". Therefore all "non WikiWord" variables are shown as link only in the list below, but not elsewhere in PmWiki, as $Author, $Version and $XL.%0a%0a!!See Also%0a%0a* %25%25 [[PmWiki/Functions]] - {Functions$:Summary} (:comment why? Could be removed IMO --OliverBetz:)%0a----%0a[[#index]]List of documented PHP variables%0a(:varindex:)%0a -time=1254737854 +text=(:Summary:Variables available for local customisation:)%0a(:Audience: administrators (basic) :)%0a%0aThis page documents the PHP variables available in PmWiki for [[local customizations]]. Much of this documentation is still incomplete but people are working on it now. Feel free to add placeholders for variables you want to have documented if you don't know what the variable does.%0a%0aNote: Do not confuse these PHP variables with [[Page Variables]] and [[Page TextVariables]] being used in page markup.%0a%0aThe variables documentation is divided into several pages:%0a%0a* [[Basic Variables]] - {BasicVariables$:Summary}%0a* [[Debug Variables]] - {DebugVariables$:Summary}%0a* [[Edit Variables]] - {EditVariables$:Summary}%0a* [[I18n Variables]] - {I18nVariables$:Summary}%0a* [[Layout Variables]] - {LayoutVariables$:Summary}%0a* [[Link Variables]] - {LinkVariables$:Summary}%0a* [[Other Variables]] - {OtherVariables$:Summary}%0a* [[Pagelist Variables]] - {PagelistVariables$:Summary}%0a* [[Path Variables]] - {PathVariables$:Summary}%0a* [[Security Variables]] - {SecurityVariables$:Summary}%0a* [[Upload Variables]] - {UploadVariables$:Summary}%0a%0aThe following functions are also controlled by several variables:%0a* [[Blocklist(#variables)]] - {Blocklist$:Summary}%0a* [[Notify(#variables)]] - {Notify$:Summary}%0a* [[Basic Variables]] %25item comment%25 to provide circular trail%0a%0aAn complete index of documented PHP variables is given below.%0a%0aIn general, variables with names ending in 'Fmt' (such as $PageLayoutFmt) have their values processed for $-variable substitutions prior to being output. Thus strings such as [@{$Name}@] and [@{$PageUrl}@] are replaced with the name and URL of the page when the string is printed.%0a%0aNote: The automatic variable index and link generation is done by scripts/vardoc.php using $VarPagesFmt to find the pages containing trails of pages with the variable documentation.%0a%0aThere is a slight discrepancy between index generation and link generation: The index generation finds lines starting with a colon followed by "$" and an uppercase word. In contrast, the automatic link generation works only with WikiWords ($WikiWordPattern) preceded by "$". Therefore all "non WikiWord" variables are shown as link only in the list below, but not elsewhere in PmWiki, as $Author, $Version and $XL.%0a%0a!!See Also%0a%0a* %25%25 [[PmWiki/Functions]] - {Functions$:Summary} (:comment why? Could be removed IMO --OliverBetz:)%0a----%0a[[#index]]List of documented PHP variables%0a>>font-size:smaller%3c%3c%0a(:varindex:) %25comment%25 where is this documented?%25%25%0a>>%3c%3c%0a +time=1262759520 Index: wikilib.d/PmWiki.IncludeOtherPages =================================================================== --- wikilib.d/PmWiki.IncludeOtherPages (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.IncludeOtherPages (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.7 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 author=Petko charset=ISO-8859-1 -csum=new line +csum= host=81.65.12.233 name=PmWiki.IncludeOtherPages -rev=117 +rev=118 targets=PmWiki.Links,PmWiki.WikiGroup,PmWiki.PageTextVariables,Site.PageListTemplates,PmWiki.WikiStyles,PmWiki.ConditionalMarkup,PmWiki.PageVariables,PmWiki.WikiAdministrator,PmWiki.PageLists -text=(:Summary: Include contents from other PmWiki pages:)%0a(:Audience: authors (intermediate) :)%0aThe [@(:include:)@] directive makes it possible to insert (or [[Wikipedia:Transclusion|"transclude"]]) the contents of other pages into the current wiki page. All of the include directives below perform a straight text inclusion. In particular, any page [[links]] in the included text are assumed to link to pages in the current [[(wiki) group]] if not otherwise qualified.%0a%0a!! Syntax%0aThe basic syntax is%0a* [=(:=]include PageName:)%0a-> with pagename includes the full page from the same group.%0a* [={Group/PageName$:=][[#includeptv|PTVar]]}%0a-> includes a [[PageTextVariables|named variable]] from a page, [[(Wiki)Group]] and PageName are options%0a%0aThe full syntax is%0a* [=(:=]include%0a [[#includefullname|FullName]]#[[#includeanchor|fromanchor]]#[[#includeanchor|toanchor]] \%0a [[#includelines|lines]]=''123'' \%0a [[#includeself|self]]=''0'' \%0a [[#includebasepage|basepage]]=''abc'' \%0a [[#includevariable|variable]]=''value'' \%0a :)%0a-> includes a page or pages according to the parameters supplied. Parameters are optional.%0a[[#firstanchor]]%0a%0a!! Parameters%0aName parameters with or without anchors, and [[#includevariable| variable]] parameters, may be repeated.%0a%0a[[#includefullname]]%0a!!! Named pages%0a-%3c [@(:include PageName:)@]%0a-%3c [@(:include Group.PageName:)@]%0a-%3c [@(:include Page1 Page2 Group1.Page3 Group2.Page4:)@]%0a-> Includes the entire text of another page into the current page. Multiple pages may be specified, but only the first available is included.%0a%0a[[#errormessage]]%0aYou can use the above feature to '''display an error message if an include fails'''. Create a page, eg. Site.IncludeFailed containing the error message. You can use any page name. Then, in your include markup, append this page at the end of the page list:%0a [=(:include Page1 Page2 Page3 Site.IncludeFailed:)=]%0aA slightly more complex approach is outlined at [[PmWiki:IncludeOtherPages-Talk|the talk page]].%0a%0a[[#includeanchor]]%0a!!! Anchors%0a|| width=*%0a||[@(:include PageName#from#to:)@] ||include lines from ''`PageName'' between the [@[[#from]]@] and [@[[#to]]@] [[Links#anchors|anchors]]%0a||[@(:include PageName#from#:)@] ||include all lines after [@[[#from]]@] to the end of the page%0a||[@(:include PageName##to:)@] ||include all lines from the start of the page to [@[[#to]]@]%0a||[@(:include PageName#from:)@] ||include everything between [@[[#from]]@] and the next anchor%0a||[@(:include PageName#:)@] ||include everything from the top of the page to the first anchor%0a||[@(:include PageName##:)@] ||include everything from the top of the page to the bottom of the page%0a-> %25note%25 Note: do not put whitespace between "#from" "#to"%0a%0a-> %25note%25 Note: text on the same line as a closing anchor but preceding the closing anchor will '''NOT''' be included in the text. Example Below:%0a--> [@[[#start]]some text on the first line@]%0a--> [@some text on the last line [[#end]]@]%0a-> %25note%25The above, when included via [@(:include PageName#start:)@] will have the text on the first line but not the text on the last line.%0a%0a-%3c [@(:include Page1 Page2 #from#to:)@]%0a-> Include from the first available of Page1, Page2 between the [@[[#from]]@] and [@[[#to]]@] %0a-> %25note%25 Note: put whitespace between "Page2" and "#from#to". The same anchors "#from#to" should be in both pages. If proper anchors are missing in the first available of Page1, Page2 the whole contents of the page is included.%0a-> This does not seem to work in 2.2 betas. See Cookbook:IncludeSection for a fix.%0a%0a-%3c [@(:include Page1#from1#to1 Page2#from2#to2:)@]%0a-> Include the first from the first available of Page1 (between the [@[[#from1]]@] and [@[[#to1]]@]) or Page2 (between the [@[[#from2]]@] and [@[[#to2]]@] ) %0a%0a-%3c %25green%25Note%25%25: Previous versions of PmWiki allowed whitespace between [@#from@] and [@#to@] anchors even though it was not designed to. Newer versions do not allow whitespace anymore. To re-enable this "exploited misbehavior" put this into your config.php or farmconfig.php%0a%0a-> [@Markup('includeanchors', '%3cinclude', '/(\\(:include.*?#\\w+)\\s+(#\\w+)/', '$1$2');@]%0a%0a[[#includelines]]%0a!!! Lines=%0a-%3c [@(:include PageName lines=10:)@]%0a-%3c [@(:include PageName lines=5..10:)@]%0a-%3c [@(:include PageName lines=5..:)@]%0a-> Include the first 10 lines, lines 5-10, or lines 5 and up from ''`PageName''. A "line" in this context refers to a line of source. ''Thus a line may be a paragraph that wraps over several lines on the screen, or a completely blank line.''%0a%0a-%3c [@(:include Page1 Page2 Page3 lines=1..5:)@]%0a-> Include the first five lines from the first available of Page1, Page2, or Page3. (To include lines from a list of pages, use a separate include for each.)%0a%0a[[#includeself]]%0a!!! Self=%0a-%3c [@(:include PageName self=0:)@]%0a-> The parameter @@self@@ can be @@0@@ or @@1@@. It tells the include directive if it is allowed to include the current page. This is useful if PageName is a variable like [@{$Name}@] and you want to prevent the directive from including the current page.%0a%0a[[#includeptv]]%0a!!! [[Page text variables]]%0a-%3c [@{Group/PageName$:Var}@]%0a-> Includes definition list values from an (optional) page as [[page text variables]]. These are defined using a definition list ([@:item:description@]), simple colon delimiter ([@item:description@]), or special markup ([@(:item:description:)@]).%0a%0a[[#includebasepage]]%0a!!! Basepage=%0a%0a-%3c [@(:include PageName basepage=BasePageName:)@]%0a-> Include PageName, but treat all relative links and page variables on ''PageName`'' as relative to ''BasePageName''.%0aIf @@basepage=@@ is provided all relative links and page variables are interpreted relative %0ato basepage.%0aSo, if one creates [@TemplateName@] as%0a-> [@Name: {$:Name}%0aAddress: {$:Address}@]%0athen the directive%0a-> [@(:include TemplateName basepage=PageName:)@]%0awill retrieve the contents of [@TemplateName@], treating any page variables and links as being relative to [@PageName@]. %0aIn particular, the values for [@{$:Name}@] and [@{$:Address}@] will be taken from [@PageName@], but things like [@{$Title}@] and [@{$LastModifiedBy}@] would also work here.%0a%0a!!!! Basepage usage%0aThe primary purpose of basepage is to allow the include of pages in a way that mimics the 2.1.x behavior where page variables %0aand links are interpreted relative to the currently displayed page.%0aThis is done with:%0a-> [@(:include SomeOtherPage basepage='' :)@]%0a -or-%0a-> [@(:include SomeOtherPage basepage={*$FullName} :)@]%0a%0aIt also allows [=GroupHeader and GroupFooter=] to have their page variables and links be relative to the currently displayed page %0a(instead of [=GroupHeader and GroupFooter=]):%0a>>pre%3c%3c%0a ## PmWiki default $GroupHeaderFmt setting%0a $GroupHeaderFmt = %0a [='(:include {$Group}.GroupHeader self=0 basepage={*$FullName}:)(:nl:)';=]%0a>>%3c%3c%0a%0aOtherwise, using {$Name} inside of a [=GroupHeader=] would display '[=GroupHeader=]' and not the name of the currently displayed page.%0a%0aAs has been discovered, the basepage= parameter is general enough that it can also be used as a templating engine, so that%0awe can grab a template page containing variables that are then filled in with values from another page:%0a->[@(:include TemplatePage basepage=DataPage :)@]%0a%0aAnd, of course, a single TemplatePage can actually contain multiple templates delimited by anchors, so that we end up with a syntax eerily similar'^[[#footnote|#]]^' to pagelist-templates:%0a>>pre%3c%3c%0a [@(:include TemplatePage#abc basepage=DataPage :)@]%0a (:include TemplatePage#def basepage=DataPage :)%0a (:include TemplatePage#xyz basepage=DataPage :)%0a>>%3c%3c%0a%0aSo then [=TemplatePage=] can use a syntax like:%0a>>pre%3c%3c%0a [@%0a [[#abc]]%0a ...template stuff here...%0a [[#abcend]]%0a @]%0a>>%3c%3c%0a%0aand it's possible to display [=TemplatePage=] as a template without it being interpreted... same as we do for [[Site.PageListTemplates]].%0a%0a%0a-%3c [[#footnote]] [- '^[1]^'Okay, maybe it's not so eerie, given that the pagelist template code actually uses the same function as (:include:) to grab its templates. But it's still a useful parallel. -]%0a%0a[[#includevariable]]%0a!!! Specifying variables as parameters%0aYou can also specify variable values inline with the include statement, and refer to the variables in the template using the [@{$$variable1}@] format:%0a-> [@(:include TemplatePage variable1="value" variable2="value2":)@]%0a%0aThis assumes that a site has $EnableRelativePageVars enabled, which is recommended in PmWiki 2.2.0 -- but disabled by default to help people upgrading from 2.1.x.%0a%0aFor example, on my included page ("template") I might have this:%0a%0a(:markup class=horiz:)%0a[[#ivars]]%0aHi, {$$Name}, how are you today?%0a[[#ivarsend]]%0a(:markupend:)%0a%0aThen, including that section above (that section is available via the section @@[@{$FullName}#ivars)@]@@) you get this type of behavior:%0a%0a(:markup class=horiz:)%0a(:include {$FullName}#ivars Name=Sam:)%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a(:include {$FullName}#ivars Name=Sally:)%0a(:markupend:)%0a%0a!! See Also%0a* [[PmWiki/Page text variables]] {PmWiki/PageTextVariables$:Summary}%0a* [[Cookbook:IncludeUrl]] {Cookbook.IncludeUrl$:Summary}%0a%0a!! Styling Note%0aBy default, Included pages or lines cannot be distinguished from other text on the page. To provide a visual indication that this text is special, you can apply [[PmWiki/Wiki Styles]]. For example:%0a%0a(:markup:)%0a%25define=leftborder border-left="2px solid #88f" margin-left="2px" padding="1px 0 3px 10px"%25%0aWhat is PmWiki?%0a>>leftborder%3c%3c (:include PmWiki.PmWiki lines=1..4:) %0a>>%3c%3c%0a''Have a very nice day!''%0a(:markupend:)%0a%0a!!! Parameter References%0a%0aAny parameters supplied to an include statement (whether they are keywords or not) are accessible inside the included page as a special [@{$$...}@] variable of the same name. This feature can be used to provide extra information to use when displaying the included page.%0a%0a!!! Notes%0a* You can also say [@(:include My/Page#myanchor lines=4:)@] which starts from, and includes, the line with the anchor [@[[#myanchor]]@] for four lines.%0a%0a!! Notes about use with [[conditional markup]]%0aThe [@(:include ...:)@] markup is processed after conditional markup is evaluated.\\%0aTherefor you can include a page or page section as part of a condition, like%0a->[@(:if some condition:)(:include SomePage#section:)(:if:) @] %0aBut [@(:include SomePage#section:)@] doesn't look to see if [@[[#section]]@] is part of a conditional, like %0a->[@(:if some condition:)[[#section]]...[[#sectionend]](:ifend:)@]%0a[@(:include SomePage#section:)@] will ignore such a condition. %0a%0aWhen [[Conditional Markup|testing variables]] in included pages the context of the page (source or target) can be useful.%0aSee [[PmWiki/PageVariables|special references]] for details.%0a%0a----%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: [[#maxincludes]] What's the maximum number of includes that can exist in a page? %0a-> My site seems to stop including after 48 includes. ($MaxIncludes)%0a%0aA: By default, PmWiki places a limit of 50 include directives for any given page, to prevent runaway infinite loops and other situations that might eat up server resources. (Two of these are GroupHeader and GroupFooter.) The limit can be modified by the [[wiki administrator]] via the $MaxIncludes variable.%0a%0aQ: Is there any way to include from a group of pages without specifying by exact name, e.g. between Anchor X and Y from all pages named IFClass-* ?%0aA: This can be achieved using [[page lists]].%0a%0a%0aQ: There appears to be a viewing issue when the included page contains the [=(:title:)=] directive.%0aA: As of version 2.2.0, the ''last'' title in the page overrides previous ones. In future versions, this may be configurable, but for the moment, best is to place your [=(:title :)=] directive at the bottom of the page, after any includes.%0a -time=1259649590 +text=(:Summary: Include contents from other PmWiki pages:)%0a(:Audience: authors (intermediate) :)%0aThe [@(:include:)@] directive makes it possible to insert (or [[Wikipedia:Transclusion|"transclude"]]) the contents of other pages into the current wiki page. All of the include directives below perform a straight text inclusion. In particular, any page [[links]] in the included text are assumed to link to pages in the current [[(wiki) group]] if not otherwise qualified.%0a%0a!! Syntax%0aThe basic syntax is%0a* [=(:=]include PageName:)%0a-> with pagename includes the full page from the same group.%0a* [={Group/PageName$:=][[#includeptv|PTVar]]}%0a-> includes a [[PageTextVariables|named variable]] from a page, [[(Wiki)Group]] and PageName are options%0a%0aThe full syntax is%0a* [=(:=]include%0a [[#includefullname|FullName]]#[[#includeanchor|fromanchor]]#[[#includeanchor|toanchor]] \%0a [[#includelines|lines]]=''123'' \%0a [[#includeself|self]]=''0'' \%0a [[#includebasepage|basepage]]=''abc'' \%0a [[#includevariable|variable]]=''value'' \%0a :)%0a-> includes a page or pages according to the parameters supplied. Parameters are optional.%0a[[#firstanchor]]%0a%0a!! Parameters%0aName parameters with or without anchors, and [[#includevariable| variable]] parameters, may be repeated.%0a%0a[[#includefullname]]%0a!!! Named pages%0a-%3c [@(:include PageName:)@]%0a-%3c [@(:include Group.PageName:)@]%0a-%3c [@(:include Page1 Page2 Group1.Page3 Group2.Page4:)@]%0a-> Includes the entire text of another page into the current page. Multiple pages may be specified, but only the first available is included.%0a%0a[[#errormessage]]%0aYou can use the above feature to '''display an error message if an include fails'''. Create a page, eg. Site.IncludeFailed containing the error message. You can use any page name. Then, in your include markup, append this page at the end of the page list:%0a [=(:include Page1 Page2 Page3 Site.IncludeFailed:)=]%0aA slightly more complex approach is outlined at [[PmWiki:IncludeOtherPages-Talk|the talk page]].%0a%0a[[#includeanchor]]%0a!!! Anchors%0a|| width=*%0a||[@(:include PageName#from#to:)@] ||include lines from ''`PageName'' between the [@[[#from]]@] and [@[[#to]]@] [[Links#anchors|anchors]]%0a||[@(:include PageName#from#:)@] ||include all lines after [@[[#from]]@] to the end of the page%0a||[@(:include PageName##to:)@] ||include all lines from the start of the page to [@[[#to]]@]%0a||[@(:include PageName#from:)@] ||include everything between [@[[#from]]@] and the next anchor%0a||[@(:include PageName#:)@] ||include everything from the top of the page to the first anchor%0a||[@(:include PageName##:)@] ||include everything from the top of the page to the bottom of the page%0a-> %25note%25 Note: do not put whitespace between "#from" "#to"%0a%0a-> %25note%25 Note: text on the same line as a closing anchor but preceding the closing anchor will '''NOT''' be included in the text. Example Below:%0a--> [@[[#start]]some text on the first line@]%0a--> [@some text on the last line [[#end]]@]%0a-> %25note%25The above, when included via [@(:include PageName#start:)@] will have the text on the first line but not the text on the last line.%0a%0a-%3c [@(:include Page1 Page2 #from#to:)@]%0a-> Include from the first available of Page1, Page2 between the [@[[#from]]@] and [@[[#to]]@] %0a-> %25note%25 Note: put whitespace between "Page2" and "#from#to". The same anchors "#from#to" should be in both pages. If proper anchors are missing in the first available of Page1, Page2 the whole contents of the page is included.%0a-> This does not seem to work in 2.2 betas. See Cookbook:IncludeSection for a fix.%0a%0a-%3c [@(:include Page1#from1#to1 Page2#from2#to2:)@]%0a-> Include the first from the first available of Page1 (between the [@[[#from1]]@] and [@[[#to1]]@]) or Page2 (between the [@[[#from2]]@] and [@[[#to2]]@] ) %0a%0a-%3c %25green%25Note%25%25: Previous versions of PmWiki allowed whitespace between [@#from@] and [@#to@] anchors even though it was not designed to. Newer versions do not allow whitespace anymore. To re-enable this "exploited misbehavior" put this into your config.php or farmconfig.php%0a%0a-> [@Markup('includeanchors', '%3cinclude', '/(\\(:include.*?#\\w+)\\s+(#\\w+)/', '$1$2');@]%0a%0a[[#includelines]]%0a!!! Lines=%0a-%3c [@(:include PageName lines=10:)@]%0a-%3c [@(:include PageName lines=5..10:)@]%0a-%3c [@(:include PageName lines=5..:)@]%0a-> Include the first 10 lines, lines 5-10, or lines 5 and up from ''`PageName''. A "line" in this context refers to a line of source. ''Thus a line may be a paragraph that wraps over several lines on the screen, or a completely blank line.''%0a%0a-%3c [@(:include Page1 Page2 Page3 lines=1..5:)@]%0a-> Include the first five lines from the first available of Page1, Page2, or Page3. (To include lines from a list of pages, use a separate include for each.)%0a%0a[[#includeself]]%0a!!! Self=%0a-%3c [@(:include PageName self=0:)@]%0a-> The parameter @@self@@ can be @@0@@ or @@1@@. It tells the include directive if it is allowed to include the current page. This is useful if PageName is a variable like [@{$Name}@] and you want to prevent the directive from including the current page.%0a%0a[[#includeptv]]%0a!!! [[Page text variables]]%0a-%3c [@{Group/PageName$:Var}@]%0a-> Includes definition list values from an (optional) page as [[page text variables]]. These are defined using a definition list ([@:item:description@]), simple colon delimiter ([@item:description@]), or special markup ([@(:item:description:)@]).%0a%0a[[#includebasepage]]%0a!!! Basepage=%0a%0a-%3c [@(:include PageName basepage=BasePageName:)@]%0a-> Include PageName, but treat all relative links and page variables on ''PageName`'' as relative to ''BasePageName''.%0aIf @@basepage=@@ is provided all relative links and page variables are interpreted relative %0ato basepage.%0aSo, if one creates [@TemplateName@] as%0a-> [@Name: {$:Name}%0aAddress: {$:Address}@]%0athen the directive%0a-> [@(:include TemplateName basepage=PageName:)@]%0awill retrieve the contents of [@TemplateName@], treating any page variables and links as being relative to [@PageName@]. %0aIn particular, the values for [@{$:Name}@] and [@{$:Address}@] will be taken from [@PageName@], but things like [@{$Title}@] and [@{$LastModifiedBy}@] would also work here.%0a%0a!!!! Basepage usage%0aThe primary purpose of basepage is to allow the include of pages in a way that mimics the 2.1.x behavior where page variables %0aand links are interpreted relative to the currently displayed page.%0aThis is done with:%0a-> [@(:include SomeOtherPage basepage='' :)@]%0a -or-%0a-> [@(:include SomeOtherPage basepage={*$FullName} :)@]%0a%0aIt also allows [=GroupHeader and GroupFooter=] to have their page variables and links be relative to the currently displayed page %0a(instead of [=GroupHeader and GroupFooter=]):%0a>>pre%3c%3c%0a ## PmWiki default $GroupHeaderFmt setting%0a $GroupHeaderFmt = %0a [='(:include {$Group}.GroupHeader self=0 basepage={*$FullName}:)(:nl:)';=]%0a>>%3c%3c%0a%0aOtherwise, using {$Name} inside of a [=GroupHeader=] would display '[=GroupHeader=]' and not the name of the currently displayed page.%0a%0aAs has been discovered, the basepage= parameter is general enough that it can also be used as a templating engine, so that%0awe can grab a template page containing variables that are then filled in with values from another page:%0a->[@(:include TemplatePage basepage=DataPage :)@]%0a%0aAnd, of course, a single TemplatePage can actually contain multiple templates delimited by anchors, so that we end up with a syntax eerily similar'^[[#footnote|#]]^' to pagelist-templates:%0a>>pre%3c%3c%0a [@(:include TemplatePage#abc basepage=DataPage :)@]%0a (:include TemplatePage#def basepage=DataPage :)%0a (:include TemplatePage#xyz basepage=DataPage :)%0a>>%3c%3c%0a%0aSo then [=TemplatePage=] can use a syntax like:%0a>>pre%3c%3c%0a [@%0a [[#abc]]%0a ...template stuff here...%0a [[#abcend]]%0a @]%0a>>%3c%3c%0a%0aand it's possible to display [=TemplatePage=] as a template without it being interpreted... same as we do for [[Site.PageListTemplates]].%0a%0a%0a-%3c [[#footnote]] [- '^[1]^'Okay, maybe it's not so eerie, given that the pagelist template code actually uses the same function as (:include:) to grab its templates. But it's still a useful parallel. -]%0a%0a[[#includevariable]]%0a!!! Specifying variables as parameters%0aYou can also specify variable values inline with the include statement, and refer to the variables in the template using the [@{$$variable1}@] format:%0a-> [@(:include TemplatePage variable1="value" variable2="value2":)@]%0a%0aThis assumes that a site has $EnableRelativePageVars enabled, which is recommended in PmWiki 2.2.0 -- but disabled by default to help people upgrading from 2.1.x.%0a%0aFor example, on my included page ("template") I might have this:%0a%0a(:markup class=horiz:)%0a[[#ivars]]%0aHi, {$$Name}, how are you today?%0a[[#ivarsend]]%0a(:markupend:)%0a%0aThen, including that section above (that section is available via the section @@[@{$FullName}#ivars)@]@@) you get this type of behavior:%0a%0a(:markup class=horiz:)%0a(:include {$FullName}#ivars Name=Sam:)%0a(:markupend:)%0a%0aIf a value contains spaces, quote it:%0a%0a(:markup class=horiz:)%0a(:include {$FullName}#ivars Name="my friend":)%0a(:markupend:)%0a%0a!! See Also%0a* [[PmWiki/Page text variables]] {PmWiki/PageTextVariables$:Summary}%0a* [[Cookbook:IncludeUrl]] {Cookbook.IncludeUrl$:Summary}%0a%0a!! Styling Note%0aBy default, Included pages or lines cannot be distinguished from other text on the page. To provide a visual indication that this text is special, you can apply [[PmWiki/Wiki Styles]]. For example:%0a%0a(:markup:)%0a%25define=leftborder border-left="2px solid #88f" margin-left="2px" padding="1px 0 3px 10px"%25%0aWhat is PmWiki?%0a>>leftborder%3c%3c (:include PmWiki.PmWiki lines=1..4:) %0a>>%3c%3c%0a''Have a very nice day!''%0a(:markupend:)%0a%0a!!! Parameter References%0a%0aAny parameters supplied to an include statement (whether they are keywords or not) are accessible inside the included page as a special [@{$$...}@] variable of the same name. This feature can be used to provide extra information to use when displaying the included page.%0a%0a!!! Notes%0a* You can also say [@(:include My/Page#myanchor lines=4:)@] which starts from, and includes, the line with the anchor [@[[#myanchor]]@] for four lines.%0a%0a!! Notes about use with [[conditional markup]]%0aThe [@(:include ...:)@] markup is processed after conditional markup is evaluated.\\%0aTherefor you can include a page or page section as part of a condition, like%0a->[@(:if some condition:)(:include SomePage#section:)(:if:) @] %0aBut [@(:include SomePage#section:)@] doesn't look to see if [@[[#section]]@] is part of a conditional, like %0a->[@(:if some condition:)[[#section]]...[[#sectionend]](:ifend:)@]%0a[@(:include SomePage#section:)@] will ignore such a condition. %0a%0aWhen [[Conditional Markup|testing variables]] in included pages the context of the page (source or target) can be useful.%0aSee [[PmWiki/PageVariables|special references]] for details.%0a%0a----%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: [[#maxincludes]] What's the maximum number of includes that can exist in a page? %0a-> My site seems to stop including after 48 includes. ($MaxIncludes)%0a%0aA: By default, PmWiki places a limit of 50 include directives for any given page, to prevent runaway infinite loops and other situations that might eat up server resources. (Two of these are GroupHeader and GroupFooter.) The limit can be modified by the [[wiki administrator]] via the $MaxIncludes variable.%0a%0aQ: Is there any way to include from a group of pages without specifying by exact name, e.g. between Anchor X and Y from all pages named IFClass-* ?%0aA: This can be achieved using [[page lists]].%0a%0a%0aQ: There appears to be a viewing issue when the included page contains the [=(:title:)=] directive.%0aA: As of version 2.2.0, the ''last'' title in the page overrides previous ones. In future versions, this may be configurable, but for the moment, best is to place your [=(:title :)=] directive at the bottom of the page, after any includes.%0a +time=1262907918 Index: wikilib.d/PmWiki.Notify =================================================================== --- wikilib.d/PmWiki.Notify (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.Notify (.../pmwiki-2.2.9) (revision 2460) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.6 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 FirePHP/0.3 -author=frank +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 +author=Petko charset=ISO-8859-1 -csum= +csum=fix link for a release ctime=1149115706 -host=77.249.44.121 +host=81.65.12.233 name=PmWiki.Notify -rev=67 -targets=PmWiki.LocalCustomizations,SiteAdmin.NotifyList,PmWiki.PageLists,PmWiki.WikiTrails,PmWiki.UTF-8 -text=(:Summary:Allows a site administrator to configure PmWiki to send email messages whenever pages are changed on the wiki site:)%0a(:Audience: administrators (basic) :)%0aThe ''notify.php'' script allows a site administrator to configure PmWiki to send email messages whenever pages are changed on the wiki site. Notifications can be configured so that multiple page changes over a short period of time are combined into a single email message (to avoid flooding mailboxes).%0a%0aThis feature is useful for sites and pages that have infrequent updates, as it eliminates the need to frequently check `RecentChanges pages just to see if anything has changed.%0a%0aIn order for notifications to work, the notify.php script must be enabled in the site's [[local customization(s)]]. Usually this is as simple as placing the following in ''local/config.php'':%0a%0a->$EnableNotify = 1;%0a%0a!! Notification configuration%0aOnce enabled, the notification system gets its configuration from the [[SiteAdmin.NotifyList]] wiki page. The SiteAdmin.NotifyList page contains entries of the form:%0a%0a->notify=alice@example.com%0a%0aThis says that information about page changes should be periodically emailed to ''alice@example.com''. The SiteAdmin.NotifyList page can contain multiple "notify=" lines to cause notifications to be sent to multiple addresses; the "notify=" lines can be concealed by placing them inside of an [@(:if false:)@] conditional section on the page.%0a%0aNOTE: Do not put any spaces around the equal sign! Notifications will fail silently if you have%0a->notify = fred@example.com%0arather than%0a->notify=fred@example.com%0a(:comment this is a really easy mistake to make because all of the other assignments have spaces around the equal sign.:)%0a%0a!! Notification options%0aThe basic syntax is %0a->@@notify=''email@address'' \%0a [[#notifyname|name]]=''abc'' \%0a [[#notifygroup|group]]=''def'' \%0a [[#notifytrail|trail]]=''ghi'' \%0a [[#notifysquelch|squelch]]=''123'' \%0a [[#notifydelay|delay]]=''123'' \%0a @@%0a%0aA number of options exist for limiting the pages that result in a notification. The [@group=@] and [@name=@] parameters can be used to restrict notifications to specific pages or groups:%0a%0a[[#notifygroup]]%0a-># send notifications about the Main group to alice@example.com%0a->notify=alice@example.com '''group'''=Main%0a%0a[[#notifyname]]%0a-># notify bob@example.com of any changes to the home page%0a->notify=bob@example.com '''name'''=Main.HomePage%0a%0a-># notify charles@example.com of changes to pages except in Main%0a->notify=charles@example.com '''group'''=-Main%0a%0a(Note: The options are similar to [[PmWiki/PageLists | the PageList syntax]].)%0a%0a[[#notifytrail]]%0aFor maintaining arbitrary lists of pages, i.e., "watchlists", it's generally easier to build a [[trail -> WikiTrails]] of pages to be watched. The following entry in SiteAdmin.NotifyList will send alice@example.com an email containing changes to any of the pages listed in the Profiles.Alice trail:%0a%0a-># notify Alice of changes to pages listed in Profiles.Alice%0a->notify=alice@example.com '''trail'''=Profiles.Alice%0a%0aNote that once this entry has been added to SiteAdmin.NotifyList, Alice can easily change her watchlist by editing the Profiles.Alice page, and doesn't need to edit the SiteAdmin.NotifyList page. In particular, this means that an administrator can restrict editing of SiteAdmin.NotifyList, yet allow individuals to maintain custom watchlists in other pages. %0a%0aLimitations of this feature:%0a* only manually-added links on a trail will be acknowledged by the Notify List (no "group=" or other pagelist syntax, nor any "Group.RecentChanges" links, will generate notifications)%0a* using an [@(:include:)@] directive on the page SiteAdmin.NotifyList is not an operational work-around.%0a%0aThis is probably a good place to point out that edit access to SiteAdmin.NotifyList should be controlled, otherwise malicious persons can use the notification capability to flood others' electronic mailboxes. By default, SiteAdmin.NotifyList is blocked against reading or edits except by the admin (as is the case for most pages in the SiteAdmin group).%0a%0a!! Adding notification entries via local customizations%0a%0aNotification entries can also be added via the $NotifyList array in ''local/config.php''. Simply add a line like the following:%0a->$EnableNotify = 1;%0a->$NotifyList[] = 'notify=alice@example.com group=Main';%0a->$NotifyList[] = 'notify=bob@example.com name=Main.HomePage';%0a%0a[[#controlling_notification_frequency]]%0a[[#notifysquelch]]%0a!! Controlling notification frequency%0a%0aTo prevent flooding of recipients' mailboxes, the notify script uses a "'''squelch'''" value as the minimum amount of time that must elapse between messages sent to any given email address. The ''default squelch setting is 10800 seconds (three hours)'', which means that once a recipient address is sent a notification message, it will not receive another for at least three hours. Any edits that occur during the squelch interval are queued for the next notification message.%0a%0aThe site administrator can change the default squelch interval via the $NotifySquelch parameter %0a%0a-># enable notifications%0a->$EnableNotify = 1;%0a->$NotifySquelch = 86400; # wait at least one day (in seconds) between notifications%0a%0aIn addition, individual addresses can specify a custom squelch parameter in the SiteAdmin.NotifyList page:%0a%0a-># Alice receives at most one email per day%0a->notify=alice@example.com '''squelch'''=86400%0a%0a-># Bob can get notifications hourly%0a->notify=bob@example.com trail=Profiles.Bob '''squelch'''=3600%0a%0a-># Charles uses the site default squelch%0a->notify=charles@example.com %0a%0a[[#notifydelay]]%0a!! Controlling notification delay%0aBecause a page will often receive several edits in rapid succession (e.g., a long post followed by several minor edits), a site administrator can also set a $NotifyDelay value that specifies how long to wait after an initial post before sending notifications:%0a%0a-># enable notifications%0a->$EnableNotify = 1;%0a->$NotifySquelch = 86400; # wait at least one day between notifications%0a->$NotifyDelay = 300; # wait five minutes after initial post%0a%0aNote that the squelch and delay values are minimums; notifications are sent on the first execution of PmWiki after the delay period has expired. For inactive sites, this could be much longer than the specified delay periods. This isn't really considered an issue since timely notifications are less important on relatively inactive sites. However, changes within the squelch time after the last notification will remain unnoticed if the wiki is not even visited for a long period after. If this matters it might be necessary to make the server call pmwiki.php regularly (e.g. [[Wikipedia:Cron | cron job]]).%0a%0aCustom delay parameters cannot be specified for individual addresses in the [[SiteAdmin.NotifyList]] page:%0a%0a-># the @@delay=@@ parameter will be ignored%0a->notify=edgar@example.com trail=Profiles.Edgar '''delay'''=600%0a%0a!! Note for Windows installations%0a%0aSites running PHP under Windows may not have PHP's [[http://php.net/mail | mail]] function configured correctly. Such sites may need to add a line like%0a%0a->ini_set('SMTP','smtp.server.com');%0a%0ato ''config.php'', where ''smtp.server.com'' is the name of your host's preferred outgoing mail server. You may also need to set the sendmail_from value if that is not configured:%0a%0a->ini_set('sendmail_from','noreply@foo.com');%0a%0a%0a!![[#variables]] Notify Variables%0a%0a:$EnableNotify:Tells ''stdconfig.php'' to enable the notify script.%0a: :$EnableNotify = 1; # enable notify%0a: :$EnableNotify = 0; # disable notify%0a%0a:$NotifyFrom:Return email address to be used in the sent email.%0a: :$NotifyFrom = 'wiki@example.com';%0a: :$NotifyFrom = 'Wiki server %3cwiki@example.com>';%0a%0a:$NotifyDelay:The length of time (seconds) to wait before sending mail after the first post. Defaults to zero - posts are sent as soon as any squelch period has expired.%0a: :$NotifyDelay = 300; # send mail 5+ min after first post%0a%0a:$NotifySquelch:The default minimum time (seconds) that must elapse between sending mail messages. Useful when $NotifyDelay is set to a small value to keep the number of mail notification messages down. Defaults to 10800 (three hours). Individual recipients can override this value in the SiteAdmin.NotifyList page.%0a: :$NotifySquelch = 43200; # wait 12+ hours between mailings%0a%0a:$NotifyItemFmt:The text to be sent for each changed item in the post. The string "$PostTime" is substituted with the time of the post (controlled by $NotifyTimeFmt below).%0a: :# default%0a: :$NotifyItemFmt = ' * $FullName . . . $PostTime by $Author';%0a%0a: :# include the page's URL in the message%0a: :$NotifyItemFmt =%0a: :" * \$FullName . . . \$PostTime by \$Author\n \$PageUrl";%0a%0a: :# include the change summary and link to the page's history in the message%0a: :$NotifyItemFmt = %0a: :" * {\$FullName} . . . \$PostTime by {\$Author}%0a: :\n Summary: {\$LastModifiedSummary}\n {\$PageUrl}?action=diff";%0a%0a%0a:$NotifyTimeFmt:The format for dates/times in $PostTime above. Defaults to the value of $TimeFmt.%0a: :$NotifyTimeFmt = [='%25Y-%25m-%25d %25H:%25M'=]; # 2004-03-20 17:44%0a%0a:$NotifyBodyFmt:The body of the message to be sent. The string "$NotifyItems" is replaced with the list of posts (as formatted by $NotifyItemFmt above). Use single quotation marks ' to prevent substring "$NotifyItems" from being untimely evaluated as variable in config.php. %0a: :$NotifyBodyFmt = "Changed items:\n\n" . '$NotifyItems' . "\n\n Best regards...";%0a%0a:$NotifySubjectFmt:The subject line of the mail to be sent.%0a%0a:$NotifyHeaders:String of extra mail headers to be passed to the mail() function.%0a%0a:$NotifyParameters:String of additional parameters to be passed to PHP's mail() function [[http://www.php.net/mail|#]].%0a%0a:$NotifyFile:The scratch file where Notify keeps track of recent posting information. Defaults to @@[="$WorkDir/.notifylist"=]@@. Note that this file must generally be writable by the webserver process.%0a%0a:$NotifyListPageFmt:The name of the page containing [@notify=@] lines for use by ''notify.php''. Defaults to [@$SiteAdminGroup.NotifyList@].%0a%0a:$NotifyList:An array of [@notify=@] specifications that can be specified from a local customization file (used in addition to entries in SiteAdmin.NotifyList).%0a: :# send notifications to alice@example.com%0a: :$NotifyList[] = 'notify=alice@example.com';%0a%0a:$EnableNotifySubjectEncode:Apply a standard (base64) encoding for the e-mail subject. Notify e-mails from international wikis may otherwise have unreadable subjects (added for version 2.2.2).%0a: :$EnableNotifySubjectEncode = 1; # encode subject%0a: :$EnableNotifySubjectEncode = 0; # use subject as is (default)%0a: : To fix encodings with the message body, add to config.php the following line (after XLPage and/or [[UTF-8]]):\\%0a @@$NotifyHeaders = "Content-type: text/plain; charset=$Charset";@@%0a%0a!! Notification only for major edits%0a%0aIt is possible to send notifications only in case of major edits. In your config.php, recplace "$EnabelNotify=1;" with the following: %0a%0aif ( @$_POST['diffclass'] != 'minor' ) $EnableNotify=1;%0a%0aThis way, only 'major' edits send notify messages (when the author doesn't select the checkbox for minor edit). If you want minor edits and not major edits to send the message then you would use:%0a%0aif ( @$_POST['diffclass'] == 'minor' ) $EnableNotify=1;%0a%0ainstead. -time=1254784636 +rev=69 +targets=PmWiki.LocalCustomizations,SiteAdmin.NotifyList,PmWiki.PageLists,PmWiki.WikiTrails,PmWiki.UTF-8,PITS.01159 +text=(:Summary:Allows a site administrator to configure PmWiki to send email messages whenever pages are changed on the wiki site:)%0a(:Audience: administrators (basic) :)%0aThe ''notify.php'' script allows a site administrator to configure PmWiki to send email messages whenever pages are changed on the wiki site. Notifications can be configured so that multiple page changes over a short period of time are combined into a single email message (to avoid flooding mailboxes).%0a%0aThis feature is useful for sites and pages that have infrequent updates, as it eliminates the need to frequently check `RecentChanges pages just to see if anything has changed.%0a%0aIn order for notifications to work, the notify.php script must be enabled in the site's [[local customization(s)]]. Usually this is as simple as placing the following in ''local/config.php'':%0a%0a->$EnableNotify = 1;%0a%0a!! Notification configuration%0aOnce enabled, the notification system gets its configuration from the [[SiteAdmin.NotifyList]] wiki page. The SiteAdmin.NotifyList page contains entries of the form:%0a%0a->notify=alice@example.com%0a%0aThis says that information about page changes should be periodically emailed to ''alice@example.com''. The SiteAdmin.NotifyList page can contain multiple "notify=" lines to cause notifications to be sent to multiple addresses; the "notify=" lines can be concealed by placing them inside of an [@(:if false:)@] conditional section on the page.%0a%0aNOTE: Do not put any spaces around the equal sign! Notifications will fail silently if you have%0a->notify = fred@example.com%0arather than%0a->notify=fred@example.com%0a(:comment this is a really easy mistake to make because all of the other assignments have spaces around the equal sign.:)%0a%0a!! Notification options%0aThe basic syntax is %0a->@@notify=''email@address'' \%0a [[#notifyname|name]]=''abc'' \%0a [[#notifygroup|group]]=''def'' \%0a [[#notifytrail|trail]]=''ghi'' \%0a [[#notifysquelch|squelch]]=''123'' \%0a [[#notifydelay|delay]]=''123'' \%0a @@%0a%0aA number of options exist for limiting the pages that result in a notification. The [@group=@] and [@name=@] parameters can be used to restrict notifications to specific pages or groups:%0a%0a[[#notifygroup]]%0a-># send notifications about the Main group to alice@example.com%0a->notify=alice@example.com '''group'''=Main%0a%0a[[#notifyname]]%0a-># notify bob@example.com of any changes to the home page%0a->notify=bob@example.com '''name'''=Main.HomePage%0a%0a-># notify charles@example.com of changes to pages except in Main%0a->notify=charles@example.com '''group'''=-Main%0a%0a(Note: The options are similar to [[PmWiki/PageLists | the PageList syntax]].)%0a%0a[[#notifytrail]]%0aFor maintaining arbitrary lists of pages, i.e., "watchlists", it's generally easier to build a [[trail -> WikiTrails]] of pages to be watched. The following entry in SiteAdmin.NotifyList will send alice@example.com an email containing changes to any of the pages listed in the Profiles.Alice trail:%0a%0a-># notify Alice of changes to pages listed in Profiles.Alice%0a->notify=alice@example.com '''trail'''=Profiles.Alice%0a%0aNote that once this entry has been added to SiteAdmin.NotifyList, Alice can easily change her watchlist by editing the Profiles.Alice page, and doesn't need to edit the SiteAdmin.NotifyList page. In particular, this means that an administrator can restrict editing of SiteAdmin.NotifyList, yet allow individuals to maintain custom watchlists in other pages. %0a%0aLimitations of this feature:%0a* only manually-added links on a trail will be acknowledged by the Notify List (no "group=" or other pagelist syntax, nor any "Group.RecentChanges" links, will generate notifications)%0a* using an [@(:include:)@] directive on the page SiteAdmin.NotifyList is not an operational work-around.%0a%0aThis is probably a good place to point out that edit access to SiteAdmin.NotifyList should be controlled, otherwise malicious persons can use the notification capability to flood others' electronic mailboxes. By default, SiteAdmin.NotifyList is blocked against reading or edits except by the admin (as is the case for most pages in the SiteAdmin group).%0a%0a!! Adding notification entries via local customizations%0a%0aNotification entries can also be added via the $NotifyList array in ''local/config.php''. Simply add a line like the following:%0a->$EnableNotify = 1;%0a->$NotifyList[] = 'notify=alice@example.com group=Main';%0a->$NotifyList[] = 'notify=bob@example.com name=Main.HomePage';%0a%0a[[#controlling_notification_frequency]]%0a[[#notifysquelch]]%0a!! Controlling notification frequency%0a%0aTo prevent flooding of recipients' mailboxes, the notify script uses a "'''squelch'''" value as the minimum amount of time that must elapse between messages sent to any given email address. The ''default squelch setting is 10800 seconds (three hours)'', which means that once a recipient address is sent a notification message, it will not receive another for at least three hours. Any edits that occur during the squelch interval are queued for the next notification message.%0a%0aThe site administrator can change the default squelch interval via the $NotifySquelch parameter %0a%0a-># enable notifications%0a->$EnableNotify = 1;%0a->$NotifySquelch = 86400; # wait at least one day (in seconds) between notifications%0a%0aIn addition, individual addresses can specify a custom squelch parameter in the SiteAdmin.NotifyList page:%0a%0a-># Alice receives at most one email per day%0a->notify=alice@example.com '''squelch'''=86400%0a%0a-># Bob can get notifications hourly%0a->notify=bob@example.com trail=Profiles.Bob '''squelch'''=3600%0a%0a-># Charles uses the site default squelch%0a->notify=charles@example.com %0a%0a[[#notifydelay]]%0a!! Controlling notification delay%0aBecause a page will often receive several edits in rapid succession (e.g., a long post followed by several minor edits), a site administrator can also set a $NotifyDelay value that specifies how long to wait after an initial post before sending notifications:%0a%0a-># enable notifications%0a->$EnableNotify = 1;%0a->$NotifySquelch = 86400; # wait at least one day between notifications%0a->$NotifyDelay = 300; # wait five minutes after initial post%0a%0aNote that the squelch and delay values are minimums; notifications are sent on the first execution of PmWiki after the delay period has expired. For inactive sites, this could be much longer than the specified delay periods. This isn't really considered an issue since timely notifications are less important on relatively inactive sites. However, changes within the squelch time after the last notification will remain unnoticed if the wiki is not even visited for a long period after. If this matters it might be necessary to make the server call pmwiki.php regularly (e.g. [[Wikipedia:Cron | cron job]]).%0a%0aCustom delay parameters cannot be specified for individual addresses in the [[SiteAdmin.NotifyList]] page:%0a%0a-># the @@delay=@@ parameter will be ignored%0a->notify=edgar@example.com trail=Profiles.Edgar '''delay'''=600%0a%0a!! Note for Windows installations%0a%0aSites running PHP under Windows may not have PHP's [[http://php.net/mail | mail]] function configured correctly. Such sites may need to add a line like%0a%0a->ini_set('SMTP','smtp.server.com');%0a%0ato ''config.php'', where ''smtp.server.com'' is the name of your host's preferred outgoing mail server. You may also need to set the sendmail_from value if that is not configured:%0a%0a->ini_set('sendmail_from','noreply@foo.com');%0a%0a%0a!![[#variables]] Notify Variables%0a%0a:$EnableNotify:Tells ''stdconfig.php'' to enable the notify script.%0a: :$EnableNotify = 1; # enable notify%0a: :$EnableNotify = 0; # disable notify%0a%0a:$NotifyFrom:Return email address to be used in the sent email.%0a: :$NotifyFrom = 'wiki@example.com';%0a: :$NotifyFrom = 'Wiki server %3cwiki@example.com>';%0a%0a:$NotifyDelay:The length of time (seconds) to wait before sending mail after the first post. Defaults to zero - posts are sent as soon as any squelch period has expired.%0a: :$NotifyDelay = 300; # send mail 5+ min after first post%0a%0a:$NotifySquelch:The default minimum time (seconds) that must elapse between sending mail messages. Useful when $NotifyDelay is set to a small value to keep the number of mail notification messages down. Defaults to 10800 (three hours). Individual recipients can override this value in the SiteAdmin.NotifyList page.%0a: :$NotifySquelch = 43200; # wait 12+ hours between mailings%0a%0a:$NotifyItemFmt:The text to be sent for each changed item in the post. The string "$PostTime" is substituted with the time of the post (controlled by $NotifyTimeFmt below).%0a: :# default%0a: :$NotifyItemFmt = ' * $FullName . . . $PostTime by $Author';%0a%0a: :# include the page's URL in the message%0a: :$NotifyItemFmt =%0a: :" * \$FullName . . . \$PostTime by \$Author\n \$PageUrl";%0a%0a: :# include the change summary and link to the page's history in the message%0a: :$NotifyItemFmt = %0a: :" * {\$FullName} . . . \$PostTime by {\$Author}%0a: :\n Summary: {\$LastModifiedSummary}\n {\$PageUrl}?action=diff";%0a%0a%0a:$NotifyTimeFmt:The format for dates/times in $PostTime above. Defaults to the value of $TimeFmt.%0a: :$NotifyTimeFmt = [='%25Y-%25m-%25d %25H:%25M'=]; # 2004-03-20 17:44%0a%0a:$NotifyBodyFmt:The body of the message to be sent. The string "$NotifyItems" is replaced with the list of posts (as formatted by $NotifyItemFmt above). Use single quotation marks ' to prevent substring "$NotifyItems" from being untimely evaluated as variable in config.php. %0a: :$NotifyBodyFmt = "Changed items:\n\n" . '$NotifyItems' . "\n\n Best regards...";%0a%0a:$NotifySubjectFmt:The subject line of the mail to be sent.%0a%0a:$NotifyHeaders:String of extra mail headers to be passed to the mail() function.%0a%0a:$NotifyParameters:String of additional parameters to be passed to PHP's mail() function [[http://www.php.net/mail|#]].%0a%0a:$NotifyFile:The scratch file where Notify keeps track of recent posting information. Defaults to @@[="$WorkDir/.notifylist"=]@@. Note that this file must generally be writable by the webserver process.%0a%0a:$NotifyListPageFmt:The name of the page containing [@notify=@] lines for use by ''notify.php''. Defaults to [@$SiteAdminGroup.NotifyList@].%0a%0a:$NotifyList:An array of [@notify=@] specifications that can be specified from a local customization file (used in addition to entries in SiteAdmin.NotifyList).%0a: :# send notifications to alice@example.com%0a: :$NotifyList[] = 'notify=alice@example.com';%0a%0a:$EnableNotifySubjectEncode:Apply a standard (base64) encoding for the e-mail subject. Notify e-mails from international wikis may otherwise have unreadable subjects (added for version 2.2.2).%0a: :$EnableNotifySubjectEncode = 1; # encode subject%0a: :$EnableNotifySubjectEncode = 0; # use subject as is (default)%0a: : To fix encodings with the message body, add to config.php the following line (after XLPage and/or [[UTF-8]]):\\%0a @@$NotifyHeaders = "Content-type: text/plain; charset=$Charset";@@%0a%0a!! Notification only for major edits%0a%0aIt is possible to send notifications only in case of major edits. In your config.php, replace "$EnableNotify=1;" with the following: %0a%0aif ( @$_POST['diffclass'] != 'minor' ) $EnableNotify=1;%0a%0aThis way, only 'major' edits send notify messages (when the author doesn't select the checkbox for minor edit). If you want minor edits and not major edits to send the message then you would use:%0a%0aif ( @$_POST['diffclass'] == 'minor' ) $EnableNotify=1;%0a%0ainstead.%0a%0a!! Disabling notifications for downloads%0a%0aIf you use "$EnableDirectDownloads=0;" (eg. for privacy on a password-protected wiki) then attached images may generate duplicate notification messages. To prevent that disable notifications for downloads via%0a%0aif ( $action != 'download' ) $EnableNotify=1;%0a%0aThat way, only page views (and not images within the page) will generate notifications. See PITS:01159 for more information.%0a +time=1263683730 Index: wikilib.d/PmWiki.ChangeLog =================================================================== --- wikilib.d/PmWiki.ChangeLog (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.ChangeLog (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.7 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 author=Petko charset=ISO-8859-1 -csum=2.2.8 +csum=$EnablePageTitlePriority host=81.65.12.233 name=PmWiki.ChangeLog -rev=950 -targets=PmWiki.MailingLists,PmWiki.CustomMarkup,PmWiki.ReleaseNotes,PmWiki.WikiFarms,SiteAdmin.SiteAdmin,PmWiki.Version,SiteAdmin.Status,SiteAdmin.AuthList,PmWiki.PageTextVariables,PmWiki.Links,PmWiki.WikiStyles,PmWiki.PageLists,PmWiki.Forms,PmWiki.PageListTemplates,PmWiki.FAQ,PmWiki.Passwords,PmWiki.Skins,PmWiki.PageVariables,PmWiki.MarkupExpressions,Site.PageListTemplates,PmWiki.PageDirectives,PmWiki.ConditionalMarkup,PmWiki.AuthUser,PmWiki.PagelistVariables,PmWiki.Uploads -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/MailingLists | pmwiki mailing lists]] to discuss feature development with us.%0a%0a(:comment Changes made to the [[PmWiki:Subversion | subversion pre-release ]] of PmWiki.:)%0a!!! [[#v228]] Version 2.2.8 (2009-12-07)%0a* Fix apostrophes in Author field (PITS:01155).%0a* Fix Condition "exists" for PHP 5.3 (PITS:01156).%0a* Update documentation.%0a%0a!!! [[#v227]] Version 2.2.7 (2009-11-08)%0a* Fix GlobToPCRE() to work with !excl and -excl with PHP 5.3 (PITS:01149).%0a* Fix HandleDownload() correctly quote the filenames (PITS:01150).%0a* Fix SessionAuth() for PHP 5.3, the $_REQUEST array doesn't contain the $_COOKIE array (PITS:01141).%0a* Fix default timezone for PHP 5.3 (PITS:01141).%0a* Update documentation.%0a%0a!!! [[#v226]] Version 2.2.6 (2009-10-04)%0a* Escape apostrophes for multiline textarea/hidden form fields.%0a* Fix global unset of $MarkupRules in [[PmWiki/CustomMarkup|Markup()]] and DisableMarkup(), reported by D.Faure.%0a* Fix call to BuildMarkupRules() in MarkupToHTML(), suggested by Pm.%0a* Allow disabling of $PageListFilters and $FPLTemplateFunctions if set to -1 and thus allow replacing a core function with a custom one.%0a* Fix DRange() returned timestamps +1min or +1day when it shouldn't (PITS:01125).%0a* Add $MarkupWordwrapFunction to allow custom [@(:markup:)@] line width for multibyte wikis (PITS:00703).%0a* Add $MakeUploadNamePatterns to allow custom filename normalization for uploads.%0a* Add a fourth argument to PostRecentChanges() to allow this function to be called with a custom $RecentChangesFmt array.%0a* Add $RecentUploadsFmt, to allow logging of new uploads to the RecentChanges pages (PITS:00088).%0a* Fix Notify for some installations in safe_mode (PITS:00976).%0a* Add $HTMLHeaderFmt['guiedit'] variable in guiedit.php to allow customization (PITS:01146).%0a* Update documentation.%0a%0a!!! [[#v225]] Version 2.2.5 (2009-08-25)%0a* Add *.7z as accepted upload extension (PITS:00813).%0a* Fix global variable $HandleAttrFmt in HandleAttr (PITS:01126).%0a* Allow brackets in input element names (PITS:01131).%0a* Fix CSS class applied twice (PITS:01071).%0a* Fix Not-Modified headers could prevent caching (PITS:00802).%0a* Break FPLTemplate() into configurable sub-parts (PITS:01102).%0a* Add [@(:template none:)@] section for Pagelist templates.%0a* Fix attr-protected page could be deleted with edit permissions (PITS:00238).%0a* Update documentation.%0a%0a!!! [[#v224]] Version 2.2.4 (2009-07-16)%0a* Fix bug with page attributes, which somehow didn't make it in the 2.2.3 release.%0a* Fix bug with HTML entities in XLPages introduced earlier today in 2.2.3 (reverted, PITS:01114).%0a%0a!!! [[#v223]] Version 2.2.3 (2009-07-16)%0a* Fix action=logout could incorrectly set a session cookie (PITS:01062).%0a* Fix page history trim in vardoc.php (PITS:01103).%0a* Add $EnableUploadGroupAuth, use group password for downloads (PITS:01104).%0a* Fix recursive PTV loops, added $MaxPageTextVars (PITS:00915, PITS:01099).%0a* Fix mkdirp() messages for absolute paths (PITS:00396).%0a* Fix sample-config.php order for urlapprove.php (PITS:01037).%0a* Fix broken signature links on preview.%0a* Fix crypt.php (action=crypt) could malfunction for passwords with quotes or apostrophes.%0a* Fix @@ @_site_*@@ passwords to work in GroupAttributes (PITS:00836, PITS:00998).%0a* Fix possible XSS vulnerabilities, reported by Michael Engelke.%0a* Update documentation.%0a%0a!!! [[#v222]] Version 2.2.2 (2009-06-21)%0a* Fix class in pages not on the breadcrumbs trail, reported by Ed W.%0a* Fix @@tabindex@@ and @@onclick@@ to guiedit buttons.%0a* Fix $GroupPrintHeaderFmt in print.php (PITS:01073).%0a* Fix global vars in xlpage-utf-8.php (PITS:00980).%0a* Fix $txt in LinkPage (reported by Eemeli Aro).%0a* Add $EnableNotifySubjectEncode for international wikis (Cookbook:UTF-8).%0a* Fix international message in Abort().%0a* Fix security bug with AuthUser, reported by Eemeli Aro. See [[Release notes]].%0a* Fix $ActionTitleFmt for login and upload, reported by Eemeli Aro.%0a%0a!!! [[#v221]] Version 2.2.1 (2009-03-28)%0a* Fix $FPLTemplateMarkupFunction which somehow didn't get in the 2.2.0 archive.%0a* Fix wikitrails to work cross-group (PITS:00407).%0a* Add $EnableRedirectQuiet variable (PITS:00919).%0a* Fix [={$Title}=] could display global variables (reported by HansB).%0a* Fix reloaded form submissions could lose values (reported by DaveG).%0a* Fix preview while restoring a version from history (PITS:01081).%0a* Fix relative links with international characters (reported by G. Hermanowicz).%0a* Add in sample-config.php example call to xlpage-utf-8.php (PITS:01066).%0a* Update documentation.%0a* Fix guiedit.php to produce valid HTML.%0a%0a!! [[#v220]] Version 2.2.0 (2009-01-18)%0a* Convert beta series to official release series.%0a* Add $FPLTemplateMarkupFunction (PITS:00984, requested by John Rankin).%0a%0a!!! [[#beta68]] Version 2.2.0-beta68 (2008-08-14)%0a* Fix E_NOTICE errors reported by Dominique Faure.%0a* Enable [@(:redirect:)@] directives in pagelists.%0a%0a!!! [[#beta67]] Version 2.2.0-beta67 (2008-07-13)%0a* Add [={$LastModifiedTime}=] page variable.%0a* Add $EnableSessionPasswords variable to control session password usage.%0a* Add $SessionEncode and $SessionDecode variables to specify functions for encoding/decoding sensitive session data.%0a* Updated httpauth.php to use SessionAuth instead of poking in session guts directly.%0a%0a!!! [[#beta66]] Version 2.2.0-beta66 (2008-07-04)%0a* Add content-type/charset to Abort() output (suggested by Petko).%0a* Close minor XSS vulnerability (PITS:01030).%0a* Add "nested if" capability.%0a* Fix bug in $Transition handling that would enable all transitions if any were set (reported by John Rankin).%0a %0a%0a!!! [[#beta65]] Version 2.2.0-beta65 (2007-11-17)%0a* Fix SiteAdmin.AuthList so that it defaults to list=all (reported by Roman).%0a* Fix pmwiki skin to include xmlns= attribute in %3chtml> tag (PITS:00989, reported by Mateusz Czaplinski and Petko Yotov).%0a%0a!!! [[#beta64]] Version 2.2.0-beta64 (2007-11-13)%0a* Add times to PmWiki date parsing (e.g., 2007-08-09T12:22:04).%0a* Suppress warning from ini_set in diag.php (suggested by Petko).%0a* Fix handling of -> links in trails (reported by Eemeli Aro).%0a* Add .kml and .kmz as valid attachment types. %0a* Fix handling of [=&=] in markup (PITS:00988, reported by Stirling Westrup).%0a* Fix duplication of language markers in $XLLangs (PITS:00987, reported by Stirling Westrup).%0a* Correct typo in DRange() call in stdmarkup.php (reported by Stirling Westrup).%0a* Turn on error displays when diagnostics are enabled.%0a* Default PHP's pcre.backtrack_limit to at least 1000000.%0a%0a!!! [[#beta63]] Version 2.2.0-beta63 (2007-07-31)%0a* Added $SkinDirectivesPattern to allow adjustments to available skin directives (requested by Petko).%0a* Fix default permissions on Site.AuthUser and Site.AuthList (reported by Scott Connard).%0a* Add "monospace" to pmwiki.css default (reported by Joshua Timberman, with assistance from H. Fox)%0a* Fix problem with slashes in wildcards to name= and group= parameters (reported by Ian MacGregor).%0a%0a!!! Version 2.2.0-beta62 (2007-07-21)%0a* Fix bug in trails introduced by beta61 (reported by charlequin).%0a%0a!!! Version 2.2.0-beta61 (2007-07-19)%0a* Add ability to grab trails by section.%0a* Add an "ontrail" condition (from suggestions by charlequin).%0a%0a!!!Version 2.2.0-beta59, 2.2.0-beta60 (2007-07-18)%0a* Fix problem with upgrade.php on [[wiki farms]] (reported by Scott Connard).%0a* Fix problem with distributed version of Site.AuthUser (reported by Jon Haupt).%0a%0a!!!Version 2.2.0-beta58 (2007-07-17)%0a* Significant change: Site.AuthUser, Site.Blocklist, Site.ApprovedUrls, and Site.NotifyList now appear in the [[SiteAdmin]] group by default.%0a** Note: if you limit groups by setting $GroupPattern, you now need to include SiteAdmin (see [[Cookbook:LimitWikiGroups]])%0a* Abort if ldap: authentication requested and libraries aren't present.%0a* Added "upgrades.php" script to handle various migration issues.%0a* Current PmWiki [[version]] is now held in [[SiteAdmin.Status]] .%0a* Fix ?action=postupload to follow ?action=upload settings.%0a* Improvements to [[SiteAdmin.AuthList]] page (suggestions and fixes from Ian MacGregor).%0a* Allow leading underscores in attachment names (requested by Christophe David).%0a%0a!!!Version 2.2.0-beta57 (2007-06-15)%0a* Fix AsSpacedUTF8() to work like AsSpaced() (reported by Petko).%0a* Qualify page links that contain parentheses (reported by Petko).%0a* Fix bug in [@(:input default $:var ... :)@] (reported by Crisses).%0a%0a!!!Version 2.2.0-beta56 (2007-06-13)%0a* Fix AsSpaced() to not add spaces before leading digit, and treat hyphenated digits as complete numbers.%0a* Fix infinite recursion in self-referencing [[page text variables]] (PITS:00915).%0a* Fix bug introduced in beta55 not handling end [[links|anchors]] correctly (reported by Roman).%0a%0a!!!Version 2.2.0-beta55 (2007-06-11)%0a* Fix attributes to [@(:input e_form:)@] (PITS:00387, re-reported by Crisses).%0a* UpdatePage() now calls StopWatch() to record posting.%0a* Display stopwatch output as part of redirect.%0a* Fix [[wiki styles]] bug when $EnableLinkPageRelative is set (reported by Petko).%0a* Revise TextSection() code to hopefully avoid %25newwin%25[[http://pcre.org/|pcre]] limits (reported by Kathryn Andersen, Knut Alboldt).%0a* Add wrap=inline and wrap=none options to [[page list(s#pagelistwrap)]].%0a%0a!!!Version 2.2.0-beta53, 2.2.0-beta54 (2007-06-02)%0a* Improve error message reporting for markup rules (suggestion by Knut Alboldt).%0a* Clean up more E_NOTICE warnings (reported by Ian MacGregor).%0a* Add focus= option to [=(:=][[forms|input]]:) controls.%0a* Added CSS [@.faqtoc@] class, to be able to display only the questions coming from the #includefaq [[page list template(s)]].%0a* Changed [[PmWiki.FAQ]] to use .faqtoc class.%0a* Fix bug in TextSection (PITS:00935, reported by Jean-Fabrice).%0a* Fix bug in [[page list(s#pagelisttrail)]] caching of trails.%0a%0a!!!Version 2.2.0-beta52 (2007-05-26)%0a* Add per-PageStore attributes (from a suggestion by Tobias Thelen).%0a* Add [@{$PasswdRead}@], [@{$PasswdEdit}@], etc. to display page password settings.%0a* Add Site.AuthList to display all password permissions on a site.%0a* Reorder $PageListFilters slightly.%0a* Add "passwd=" option to [[page list(s#pagelistpasswd)]], to return only those pages that have some sort of [[password(s)]] attribute on them.%0a* Add line numbers to StopWatchHTML output.%0a* Clean up handling of $AuthCascade.%0a%0a!!!Version 2.2.0-beta51 (2007-05-23)%0a* Add fmt=count to [[page list(s#pagelistcount)]] (reminder from Hans).%0a* Ignore hidden files in [[skin(s)]] directories when searching for .tmpl (suggestion by Stephan Becker).%0a* Clean up queuing of pages to be updated in .pageindex .%0a* Reset $LinkTargets() at beginning of each UpdatePage() sequence.%0a%0a!!!Version 2.2.0-beta50 (2007-05-22)%0a* Fix HTML cache when drafts are enabled, or other recipes using CondAuth().%0a* Prevent [[page lists]] with protected pages from HTML cache.%0a%0a!!!Version 2.2.0-beta48, 2.2.0-beta49 (2007-05-21)%0a* Fix spurious value= attribute in <textarea> tag generated by [@(:input textarea ... :)@].%0a* Allow either [@(:input default ...:)@] or [@(:input defaults ...:)@].%0a* Fix problem with page text variable handling in [@(:input defaults:)@].%0a* Allow either [@(:template default:)@] or [@(:template defaults:)@] in [[page list templates]].%0a* Fix a bug handling dates with suffixes (reported by Crisses).%0a%0a!!!Version 2.2.0-beta47 (2007-05-20)%0a* Fix bug with quote handling in [@(:include:)@] options (reported by Hans).%0a%0a!!!Version 2.2.0-beta46 (2007-05-19)%0a* Moved $PageTextVarPatterns definition from scripts/stdmarkup.php to pmwiki.php.%0a* Ignore Markup() rules that have unresolved $when parameters.%0a* Fix issue in authuser.php when $auth array isn't set (contributed by Ben Stallings).%0a* The [@(:include:)@] directive now performs template argument processing on the included text.%0a* Optimized [@(:pagelist:)@] slightly when sorting on [[page variables]].%0a* Refactored [@(:input ... :)@] markups.%0a* Added HandleDispatch(), which allows action handlers to easily redispatch to other actions (and add messages).%0a* Added FmtTemplateVars(), to perform various template-substitutions.%0a%0a%0a!!!Version 2.2.0-beta45 (2007-05-02)%0a* Update pmwiki's date parsing to use a common routine, recognizing dates within strings and restricting range to 1900-2039.%0a* Add additional parameter to "date" conditional.%0a* Add if= option to [[page list(s#pagelistif)]] (suggested by Crisses).%0a* Refactor code to use TextSection() and RetrieveAuthSection() functions.%0a* The value= parameter to [@(:input textarea:)@] now works properly (including values loaded from $InputValues).%0a* The [@(:input default:)@] directive now allows loading input control defaults from another page via the [@source=@] parameter.%0a* Remove automatic call to FmtPageName() in $ROSPatterns. Add $ROEPatterns (from suggestions by JB and others).%0a* Fix minor variable bugs in scripts/crypt.php.%0a* Remove E_NOTICE errors (reported by Hans).%0a* Fix handling of page variables when pagename is empty or not provided.%0a* Add $EnableLinkPageRelative configuration option.%0a* Clean up handling of arguments to [@{(ftime ...)}@].%0a* Remove mailposts.php call in stdconfig.php (reported by Christophe David).%0a%0a!!!Version 2.2.0-beta44 (2007-04-16)%0a* Fix case conversion of U+027D and U+026B (reported by Petko).%0a* Add $FTimeFmt to set default formatting for [@{(ftime)}@].%0a* Add %25s conversion to [@{(ftime)}@] for systems that don't have it by default.%0a* Report an error if edit [[form(s)]] cannot be read (suggested by Hans).%0a* Don't report ?cannot acquire lockfile when simply browsing pages.%0a* Add $EnableReadOnly flag to signal when PmWiki is to be run in read-only mode.%0a%0a!!!Version 2.2.0-beta43 (2007-04-15)%0a* Update drafts code to add $EnablePublishAttr and change button labels when drafts are enabled (PITS:00755).%0a* Removed no-longer-needed 'compat1x.php' and 'mailposts.php' from distribution.%0a* Added $DraftRecentChangesFmt.%0a* Added "[[markup expressions]]" [@{(...)}@] into the core.%0a* Added charset= attribute to saved pages.%0a* Update pagelist.php and xlpage-utf-8.php to handle case-insensitive searches.%0a* Added some optimizations to phpdiff.php script to produce more useful history information.%0a%0a!!!Version 2.2.0-beta42 (2007-03-27)%0a* Fix a bug with order=title in pagelists (reported by Anno).%0a%0a!!!Version 2.2.0-beta41 (2007-03-26)%0a* Added $EnableWSPre option, which allows easy adjustment of the "leading space -> preformatted text" (or "whitespace") rule.%0a* Added a new "pre" wikistyle, to designate blocks that are to be treated as preformatted text.%0a%0a!!!Version 2.2.0-beta40 (2007-03-24)%0a* Fix bug with order=title in pagelists when using $Titlespaced (PITS:00906, reported by Feral).%0a* Report state of allow_url_fopen when downloads fail in blocklist.php.%0a%0a!!!Version 2.2.0-beta39 (2007-03-23)%0a* Allow page variable filters to appear as options in [@(:template defaults:)@] (reported by SteP).%0a* Updated [[Site.PageListTemplates]] to use [@(:template:)@] directives.%0a* Remove '#wikileft h1' and '#wikileft h5' from pmwiki default stylesheet.%0a%0a!!!Version 2.2.0-beta38 (2007-03-22)%0a* Strip control characters from $ChangeSummary.%0a* Fix problem with count=m..n where m..n is outside the range of available pages (reported by SteP).%0a* Allow [@(:template default ...:)@] to specify a class= option.%0a* [[PmWiki/PageDirectives#redirect|Redirect]] pagename can now include an anchor (PITS:00558)%0a%0a!!!Version 2.2.0-beta37 (2007-03-16)%0a* Allow an optional space after comma separators in wildcard patterns (reported by Han Baas).%0a%0a!!!Version 2.2.0-beta36 (2007-03-16)%0a* Allow nested [[page text variables]] to work, remove extraneous ENT_NOQUOTES parameter.%0a* Add new [@(:template ...:)@] directives for pagelist templates.%0a* Modify count= option to pagelists to allow for alternate ranges.%0a%0a!!!Version 2.2.0-beta35 (2007-03-05)%0a* Fix bug in [[conditional markup]] parsing (reported by Christophe David).%0a%0a!!!Version 2.2.0-beta33, 2.2.0-beta34 (2007-03-01)%0a* Refactor wildcard handling into its own GlobToPCRE function.%0a* Allow negated wildcards for page variable filters in pagelists (PITS:00878, reported by Jiri)%0a* Fix wildcards so that spaces no longer separate patterns (use commas).%0a* Fix handling of '&' prior to [@(:input:)@] and other directives (reported by Luigi).%0a* Adjust position of [@%25define=...%25@] [[wiki styles]] to occur after ampersands.%0a* Adjust copyright dates on many files.%0a* Allow spaces around text variable names in [[page text variable(s)]] markups.%0a%0a!!! [[#beta32]] Version 2.2.0-beta32 (2007-02-28)%0a* Fix erroneous $EnableCreole item in docs/sample-config.php (reported by Sigurd).%0a* Added [@(:elseif:)@] and [@(:else:)@] markups (PITS:00787).%0a* Fix global $Skin variable handling when using SetSkin from within markup.%0a* Make sure directives aren't treated like [[page text variables]] (reported by Petko).%0a* Remove call to ResolvePageName() from authuser.php .%0a* Simplify [[PmWiki/AuthUser#LDAP|LDAP]] authentication for Active Directory sites.%0a* Cache lowercase/uppercase patterns in AsSpacedUTF8().%0a%0a!!!Version 2.2.0-beta31 (2007-02-11)%0a* Fix bug with sorting on [[pagelist variables]] (reported by Kathryn Andersen).%0a%0a!!!Version 2.2.0-beta29, 2.2.0-beta30 (2007-02-09)%0a* MakePageName now uses the first matching entry of $PagePathFmt as the home page of groups without a home page.%0a* Add AsSpacedUTF8() to handle title spacing in utf-8 (PITS:00875, contributed by Petko, Celok)%0a* Fix $RequestedPage when running with utf-8.%0a* Add %3cmeta> content-type tag for utf-8.%0a* Add an experimental caching system for pagelists.%0a* Fix $SuffixPattern and link suffixes for utf-8 (PITS:00881, reported by ppip).%0a%0a!!!Version 2.2.0-beta28 (2007-02-03)%0a* Update blocklist.php so that all posted fields are checked for block values (PITS:00850).%0a%0a!!!Version 2.2.0-beta27 (2007-01-25)%0a* Fix markup processing sequence for [@(:input default:), (:input select:)@], etc. (problem noted by Marc).%0a* Fix default value of [@order=@] parameter to MakePageList().%0a%0a!!!Version 2.2.0-beta26 (2007-01-23)%0a* Fix a bug where pagelist list= option had no effect when reading from trails (from an rss problem noted by Russ Fink).%0a%0a!!!Version 2.2.0-beta24, 2.2.0-beta25 (2007-01-22)%0a* Add a scripts/creole.php module for Creole markup (http://www.wikicreole.org/).%0a* Move WikiWords out of the core defaults -- can be enabled via $EnableWikiWords.%0a* Fix handling of WikiWords following & or #, as in [=Æ and #FFFF00=] (reported by Moni Kellermann).%0a* Adjust FormatTableRow() to support Creole-style tables (using single |'s).%0a* Update docs/sample-config.php with new configurations and options.%0a* Added code to allow Abort() to refer to additional information on pmwiki.org.%0a* Added $EnableSkinDiag, which checks templates for required %3c!--HTMLHeader--> and %3c!--HTMLFooter--> directives.%0a* Removed deprecated $BasicLayoutVars support from skins.php.%0a%0a!!!Version 2.2.0-beta22, 2.2.0-beta23 (2007-01-17)%0a* Added $EnableActions, to allow pmwiki.php to be included without generating output (from a suggestion by Wouter Groeneveld).%0a* Fix bug in "order=" option to [@(:pagelist:)@] (reported by Mike Bishop).%0a* Change DisplayStopWatch() function to StopWatchHTML().%0a* Allow multiple lines for markup:, wiki:, and page: template directives (reported by Marc)%0a%0a!!!Version 2.2.0-beta21 (2007-01-12)%0a* Fix %3cvspace> bug in searchresults output (PITS:00846, reported by M. Czaplinski, marc, and others).%0a* Fix numerous E_NOTICE warnings and incorrect constants (PITS:00853, contributed by AndrewFyfe).%0a%0a!!!Version 2.2.0-beta20 (2007-01-11)%0a* $FeedPageListOpt needs to be declared global in feeds.php.%0a* Add "404 Not Found" status code to ?invalid page name aborts (PITS:00854, suggested by Athan).%0a* Remove stale entries from $PageExistsCache when a new PageStore is added (reported by Hans).%0a%0a!!!Version 2.2.0-beta19 (2006-12-29)%0a* Have blocklist check $_POST['text'] only when it is set (from a report by Simon).%0a%0a!!!Version 2.2.0-beta18 (2006-12-28)%0a* Change $pagename parameter in UpdatePage() to be passed by reference (suggestion by J. Meijer).%0a* Fix $EnableRobotsCloakActions so that it works again with page variables.%0a* Add "XML Sitemaps" to $RobotPattern.%0a* Change $MetaRobots to return "nofollow,noindex" for non-existent pages.%0a* Prefer "404 Not Found" to "403 Forbidden" for [[(PmWiki:)robots]] attempting to do invalid actions on non-existent pages.%0a* Add rel='nofollow' to "create attachment" links.%0a* Added class='inputbox' to select boxes (suggested by Hans).%0a* Added .odt, .ods, and .odp file extensions to allowed [[uploads]] (suggested by Algis Kabaila, Robin Sheat, and others).%0a* Clean up some error warnings (PITS:00801, contributed by psvo).%0a* Set $ScriptUrl to 'https:' when accessed via SSL link (suggestions from C. Ridderström, H. Fox, PITS:00410, PITS:00527, PITS:00595).%0a* Fix bug in link= and trail= options to [@(:pagelist:)@] (reported by C. Ridderström).%0a%0a!!!Version 2.2.0-beta17 (2006-12-13)%0a* Fix spurious hidden field in [@(:searchbox:)@] output (reported by Hans).%0a* Fix $CaseConversions array for \xc4\xb1 and \xc5\xbf (reported by Petko Yotov).%0a* Refactor [@(:input:)@] markup handling.%0a* Add [@(:input select ...:)@] markup (PITS:00567).%0a* Add [@(:input default ...:)@] markup -- may change before 2.2.0 release.%0a* Add ability to set defaults for radio/checkbox/select controls.%0a%0a%0a!!!Version 2.2.0-beta16 (2006-11-10)%0a* Fix problem with [@(:e_preview:)@] directive when viewing an edit form (reported by Dominique Faure).%0a* Fix out-of-memory problem in scripts/compat1x.php when dealing with large pages to be converted (contributed by Donald Gordon).%0a* Fix problem of Variable: lines immediately followed by newline (reported by Hans).%0a* Fix uninitialized variable errors in FormatTableRow() (reported by Bob Sanders).%0a* Fix second argument of MakeBaseName() (provided by Stirling Westrup).%0a%0a!!!Version 2.2.0-beta15 (2006-10-16)%0a* Fix bug with displaying multi-line [@(:var:value:)@] [[page text variables]] (reported by Pico).%0a* Improve PageStore ls() method slightly, to restrict pagename searches to directories of a given depth (based on an issue reported by Chris Cox).%0a* Added $IsBlocked status variable to scripts/blocklist.php.%0a* Added $UnapprovedLink array to report unapproved links.%0a* Added $TimeISOFmt, $TimeISOZFmt, and $CurrentTimeISO variables.%0a* Switched scripts/feeds.php to use $TimeISOZFmt instead of $ISOTimeFmt.%0a* Added [@request=@] option to [@(:pagelist:)@], switched pagelist to default to not use url/form parameters.%0a* Fixed bug with array [@{$$options}@] in pagelist.%0a%0a!!!Version 2.2.0-beta14 (2006-10-06)%0a* Fix problem with extra parameter to mail when $NotifyParameters is empty (reported by Tom Lederer).%0a* Improve configurability of $SearchPatterns (from suggestions by Stirling Westrup).%0a* Add ability for $WikiWordCount to disable wikiword spacing (PITS:00327).%0a%0a!!!Version 2.2.0-beta13 (2006-10-04)%0a* Fix handling of angle brackets (and potential XSS) in pagelists combined with page text variables (noted by Pico).%0a%0a!!!Version 2.2.0-beta12 (2006-10-03)%0a* Added the UpdatePage() function into the core. %0a%0a!!!Version 2.2.0-beta11 (2006-10-03)%0a* Added ability to automatically create targets.%0a* Added sample code to docs/sample-config.php for automatic generation of Category.* pages.%0a* Fixed character escapes in pagelist [@{$$option}@] variables.%0a%0a!!!Version 2.2.0-beta10 (2006-10-02)%0a* Added [@{$$option}@] variables to get option values from [@(:pagelist:)@] (based on a recipe from Martin Fick).%0a* Changed [@{$PageCount}, {$GroupPageCount}, and {$GroupCount}@] to be [@{$$PageCount}, {$$GroupPageCount}, and {$$GroupCount}@].%0a* Added [@{$BaseName}@] page variable and $BaseNamePatterns.%0a%0a!!!Version 2.2.0-beta9 (2006-10-01)%0a* Fix bug with $EnablePageListProtect (reported by Brent Zupp).%0a* Added ability to select based on page variables in [@(:pagelist:)@].%0a%0a!!!Version 2.2.0-beta8 (2006-09-30)%0a* Update scripts/blocklist.php to check only $_POST['text'] instead of entire markup text.%0a* Fix bug in pagelist.php that wouldn't return correctly formatted array in certain circumstances (noted by Florian Fischer and JDem).%0a%0a!!!Version 2.2.0-beta7 (2006-09-30)%0a* Added scripts/blocklist.php to core.%0a* Updated handling of $PageTextVarPatterns.%0a* Eliminated need for extra flush() steps in notify.php, pagelist.php.%0a%0a!!!Version 2.2.0-beta6 (2006-09-27)%0a* Fix bug with initialization of $FeedPageListOpt in scripts/feeds.php (reported by Roman).%0a* Fix bug with over-eager [@(:textvar:value:)@] markup (from a bug reported by Chris Cox).%0a%0a!!!Version 2.2.0-beta4, 2.2.0-beta5 (2006-09-27)%0a* Fix bug with name= option in pagelist (reported by Ben Wilson).%0a* Fix bug with array_merge under PHP 5 (reported by Kathryn Andersen).%0a%0a!!!Version 2.2.0-beta3 (2006-09-26)%0a* Remove extra %3c!----> comment at end of table directives (noted by Ben Stallings).%0a* Fix directive form of page text variables (reported by Kathryn Andersen).%0a* Add first version of new modular pagelist code.%0a%0a!!!Version 2.2.0-beta2 (2006-09-25)%0a* Add support for [@{$:var}@] page text variables, and [@(:var:...:)@] markup.%0a* Fix default setting of $EnableRelativePageVars in docs/sample-config.php .%0a%0a!!!Version 2.2.0-beta1 (2006-09-25)%0a* Added [@{*$var}@] page variables (always the currently browsed page).%0a* Convert link and page variable handling in [=(:include:)=] to be relative to the included page.%0a* Added $EnableRelativePageVars and $EnableRelativePageLinks variables, as well as transition options.%0a* Added basepage= option to [=(:include:)=].%0a* Updated $GroupHeaderFmt and $GroupFooterFmt to use basepage= option.%0a* Adjusted $MakePageNamePatterns to automatically strip any #... or ?... from the end of a pagename input string (solution to a problem reported by J. Meijer).%0a%0a!!!Version 2.1.27 (2006-12-11)%0a* Backport in bug fix for TableRowFormat (from 2.2.0-beta16).%0a* Add support for [@{*$Variable}@] syntax (from 2.2.0 page variables).%0a%0a!!!Version 2.1.26 (2006-09-11)%0a* Fix a bug with variable referencing that caused feeds.php to get a confused PCache (reported by Helge Larsen).%0a%0a!!!Version 2.1.25 (2006-09-08)%0a* Fixed a bug in authuser.php that would fail if $AuthUser isn't defined (reported by Hans Huijgen).%0a* Added %3c!--XMLHeader--> and %3c!--XMLFooter--> aliases to %3c!--HTMLHeader--> and %3c!--HTMLFooter--> directives in skin templates (suggested by John Rankin).%0a* Added $PageExistsCache (suggested by John Rankin).%0a%0a!!!Version 2.1.24 (2006-09-06)%0a* Fixed a bug in authuser.php that had trouble dealing with non-array entries in $AuthUser (reported by Udo).%0a* Can now specify authorization groups using $AuthUser['@group'] entries.%0a* Can now specify an Apache .htgroup-formatted file for authorization groups via $AuthUser['htgroup'].%0a%0a!!!Versions 2.1.21, 2.1.22, 2.1.23 (2006-09-05, 2006-09-06)%0a* Close a potential security hole with $FarmD when register_globals is set "On".%0a* Correct a syntax error in feeds.php (noted by Ben Wilson).%0a* Fix a bug that prevented PmWiki from reading page files generated by versions prior to 0.5.6 (discovered by Milan Avramovic).%0a%0a!!!Version 2.1.20 (2006-09-04)%0a* Fixed a bug in [[PageDirectives#attachlist| [@(:attachlist:)@] ]] when passed a wikiword argument (reported by Kathryn Andersen).%0a* Changed $HTMLStylesFmt['markup'] to honor config.php setting (reported by Hans).%0a%0a!!!Version 2.1.19 (2006-08-30)%0a* Corrected a bug in the pageindex code that was causing the .pageindex to not update as quickly as it should.%0a* Slightly changed the handling of 'width' and 'height' in wikistyles.php, so that they can be be applied as attributes to %3cobject> and %3cembed> tags.%0a* Updated the Keep() function to recognize closing block tags as being in the 'B' block pool.%0a* Fixed a bug with wikistyles and form tags.%0a%0a!!!Version 2.1.18 (2006-08-28)%0a* Closed a potential cross-site scripting vulnerability in table markups (reported by JB).%0a* Added [@(:input image:)@] markup (requested by JB).%0a* Fixed problem with ?action=print failing to set [@{$Action}@] (reported by Bart).%0a%0a!!!Version 2.1.17 (2006-08-26)%0a* Added some improvements to IMS caching to better handle logout and authorization actions (PITS:00573, reported by floozy and Henrik Bechmann).%0a%0a!!!Version 2.1.16 (2006-08-26)%0a* Added $SkinLibDirs variable, to select filesystem and url locations where skins may be found (resolves PITS:00708, as reported by Hagan Fox, with additional suggestions from Ben Wilson).%0a* Changed [@%3c!--HeaderText-->@] to [@%3c!--HTMLHeader-->@] in skin templates, and added an optional [@%3c!--HTMLFooter-->@] directive (PITS:00767).%0a* Adjusted the pmwiki and print skins to use the new directives.%0a%0a!!!Version 2.1.15 (2006-08-25)%0a* Fixed issue dealing with order of [@@_site_*@] passwords (reported by Jean-Fabrice and others).%0a* Added $LocalDir variable (requested by John Rankin).%0a* Removed an unnecessary setting of $DefaultPage in ''scripts/pgcust.php'' (it's now handled by ResolvePageName() ).%0a* Added some variables and changes in wikistyles.php to better support wikipublisher (contributed by John Rankin).%0a* RetrieveAuthPage (PmWikiAuth) now recognizes a $level of 'ALWAYS' as indicating that access should always be allowed, regardless of current passwords or identities.%0a* Added filter specifier for AuthUser LDAP authentication (contributed by Balu).%0a%0a!!!Version 2.1.13, 2.1.14 (2006-08-15, 2006-08-16)%0a* Updated scripts/authuser.php to allow ldaps://... authentications (contributed by Michael Brenner).%0a* Fixed problem with numeric passwords introduced in 2.1.beta20 (reported by Christophe David and Dirk Blaas).%0a%0a!!!Version 2.1.12 (2006-08-07)%0a* Corrected typo in Site.SideBar file (reported by Judith Zacharie).%0a* Suppressed warning message for search on sites without a wikilib.d/ directory.%0a* Added capability for nested divs.%0a* Use $Transition['nodivnest'] to restore previous non-nesting div/table behavior.%0a* Including authuser.php now automatically resolves pagename.%0a* Added [@(:noaction:)@] directive to turn off actions.%0a* Fixed bug in wikistyles prior to image blocks.%0a* Added white-space as allowed wikistyle (suggested by C. Ridderström).%0a* Allow colons, hyphens, and dots in id= tags.%0a%0a!!!Version 2.1.11 (2006-06-09)%0a* Fixed generation of empty paragraphs around [@%25define=...%25@] wikistyles (PITS:00753).%0a%0a!!!Version 2.1.10 (2006-06-04)%0a* Added a %3cspan> around the RecentChanges link in the pmwiki skin (PITS:00750, suggested by Hagan Fox).%0a* Changed the $Action variable to $ActionTitle (PITS:00749, reported by Hagan Fox).%0a* Changed $FPLTemplatePageFmt to be an array of pages to be searched for page templates, enabled searching of current page and Site.LocalTemplates page.%0a* Updated .vspace margin in sidebar for pmwiki skin (PITS:00751, by Hagan Fox).%0a%0a%0a!!!Version 2.1.9 (2006-06-02)%0a* Fixed a bug with [@[[~Author]]@] links (PITS:00530 reported by Klonk, PITS:00611 reported by weijang, PITS:00671 reported by Stirling Westrup, and helpful clues provided by Clayton Curtis).%0a%0a!!!Version 2.1.8 (2006-06-01)%0a* Added ability to specify notification entries from ''local/config.php'' as well as Site.Notify (suggested by Christophe David).%0a* Fixed $Transition['vspace'] from 2.1.7.%0a%0a!!!Version 2.1.7 (2006-05-31)%0a* Adjusted width of edit form for IE browsers (contributed by Roman and H. Fox).%0a* Suppress authentication failure error from LDAP (PITS:00739).%0a* Fixed problem with invalid page names resulting in redirect loop (PITS:00723, reported by jojoo).%0a* Added "Group." and "Group/" page name syntax, resolving PITS:00736 (from a suggestion by Pico).%0a* Changed handling of "vspace" paragraphs.%0a* Fixed some XSS vulnerabilities in uploads.php and url links (reported by Moritz Naumann, http://moritz-naumann.com).%0a* Added notify.php script, allowing finer control of email notifications.%0a%0a!!!Version 2.1.6 (2006-05-22)%0a* Optimized performance of urlapprove.php.%0a* Added [@(:if auth xyz PageName:)@] syntax.%0a* Corrected XSS bug in trails.php.%0a* Slightly improved performance of free links.%0a* Restore ability to use hyphens in InterMap links (reported by Henrik Bechmann).%0a%0a!!!Version 2.1.4, 2.1.5 (2006-03-29)%0a* Fixed problem with pagelist-based feeds (PITS:00709, reported by Jon Haupt).%0a* Added [@{$Action}@] page variable. (PITS:00696, reported by Sebastian Pipping).%0a* Added stripmagic() around variables submitted to authuser.php.%0a* Fixed problem with multi-term searches containing special characters (PITS:00713, reported by Leo).%0a* Switched [[PageDirectives#attachlist| [@(:attachlist:)@] ]] to use a natural case sort (suggested by H. Fox).%0a%0a!!!Version 2.1.3 (2006-03-17)%0a* Re-fixed problem with PHP 5.1.1 and lines= option to [@(:include:)@] (PITS:00620).%0a* Fixed empty LDAP password issue (reported by Thomas Lederer).%0a%0a!!!Version 2.1.2 (2006-03-16)%0a* Fixed %3ch1>/%3ch2> tag mismatches (PITS:00702, reported by Martin Hason).%0a* Fixed bug with $AllowPassword and "nopass" (reported by M. Weiner and bram brambring).%0a* Improved the speed of RSS and other web feeds when $EnablePageListProtect is not set.%0a%0a!!!Version 2.1.1 (2006-03-13)%0a* Fixed a bug with multiple authorization groups as a password (PITS:00699, reported by Ari Epstein).%0a* Updated the authorization code to be a bit more liberal with password/group settings.%0a* Updated PmWiki.FAQ page to be able to grab FAQ items from other pages in the documentation.%0a%0a!!Version 2.1.0 (2006-03-12)%0a* Many many documentation updates (special thanks to many authors).%0a* Allow trailing underscores in upload names (requested by Hans).%0a* Fixed 'ak_print' problem causing accesskey='a' for print (noted by Pico).%0a* Added code to make sure each anchor is generated only once per page (for XHTML validity).%0a* Added a $BlockPattern variable to recognize block HTML tags.%0a* Made an adjustment to Keep() so that it places strings with block HTML into the 'B' pool.%0a* Adjusted stdmarkup.php to not produce paragraphs for keep blocks in the 'B' pool.%0a* Corrected a variety of i18n phrases.%0a* Added class='escaped' to distinguish [=@@...@@=] from [=[@...@]=] (from a comment by Hans).%0a* Slightly changed styling of .faq divs.%0a* Made the edit textarea a couple of rows smaller to better fit on smaller displays (suggested by H. Fox).%0a----%0a[[(PmWiki:)ChangeLog Archive]] - changes prior to version 2.1.0.%0a -time=1260140664 +rev=959 +targets=Cookbook.RecentChanges,PmWiki.MailingLists,PmWiki.Subversion,PITS.01145,PITS.01098,PITS.00266,PITS.00779,PITS.01155,PITS.01156,PITS.01149,PITS.01150,PITS.01141,PmWiki.CustomMarkup,PITS.01125,PITS.00703,PITS.00088,PITS.00976,PITS.01146,PITS.00813,PITS.01126,PITS.01131,PITS.01071,PITS.00802,PITS.01102,PITS.00238,PITS.01114,PITS.01062,PITS.01103,PITS.01104,PITS.00915,PITS.01099,PITS.00396,PITS.01037,PITS.00836,PITS.00998,PITS.01073,PITS.00980,Cookbook.UTF-8,PmWiki.ReleaseNotes,PITS.00407,PITS.00919,PITS.01081,PITS.01066,PITS.00984,PITS.01030,PITS.00989,PITS.00988,PITS.00987,PmWiki.WikiFarms,SiteAdmin.SiteAdmin,Cookbook.LimitWikiGroups,PmWiki.Version,SiteAdmin.Status,SiteAdmin.AuthList,PmWiki.PageTextVariables,PmWiki.Links,PITS.00387,PmWiki.WikiStyles,PmWiki.PageLists,PmWiki.Forms,PmWiki.PageListTemplates,PmWiki.FAQ,PITS.00935,PmWiki.Passwords,PmWiki.Skins,PmWiki.PageVariables,PITS.00755,PmWiki.MarkupExpressions,PITS.00906,Site.PageListTemplates,PmWiki.PageDirectives,PITS.00558,PmWiki.ConditionalMarkup,PITS.00878,PITS.00787,PmWiki.AuthUser,PmWiki.PagelistVariables,PITS.00875,PITS.00881,PITS.00850,PITS.00846,PITS.00853,PITS.00854,PmWiki.Robots,PmWiki.Uploads,PITS.00801,PITS.00410,PITS.00527,PITS.00595,PITS.00567,PITS.00327,PITS.00573,PITS.00708,PITS.00767,PITS.00753,PITS.00750,PITS.00749,PITS.00751,PITS.00530,PITS.00611,PITS.00671,PITS.00739,PITS.00723,PITS.00736,PITS.00709,PITS.00696,PITS.00713,PITS.00620,PITS.00702,PITS.00699,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/MailingLists | pmwiki mailing lists]] to discuss feature development with us.%0a%0a(:comment Changes made to the [[PmWiki:Subversion | subversion pre-release ]] of PmWiki.:)%0aChanges made to the [[PmWiki:Subversion | subversion pre-release ]] of PmWiki.%0a* Fix i18n string in PasswdVar(), reported by SteP.%0a* Fix sample-config.php with correct information about $EnableWSPre (PITS:01145).%0a* Fix range searches for wikis in UTF-8 (reported by Maxim).%0a* Fix global variable $StringFolding in scripts/xlpage-utf-8.php.%0a* Fix markup for italics in creole.php.%0a* Fix previews for PTVs, Pagelist templates and included sections (PITS:01098).%0a* Add $DiffKeepNum - number of revisions kept, even if older than $DiffKeepDays.%0a* Add Yandex to robots.php.%0a* Change default $EnableRelativePageVars to 1 (PITS:01145).%0a* Add fifth parameter to SetProperty() : keep existing property.%0a* Add $EnablePageTitlePriority (PITS:00266, PITS:00779).%0a* Update documentation.%0a%0a!!! [[#v228]] Version 2.2.8 (2009-12-07)%0a* Fix apostrophes in Author field (PITS:01155).%0a* Fix Condition "exists" for PHP 5.3 (PITS:01156).%0a* Update documentation.%0a%0a!!! [[#v227]] Version 2.2.7 (2009-11-08)%0a* Fix GlobToPCRE() to work with !excl and -excl with PHP 5.3 (PITS:01149).%0a* Fix HandleDownload() correctly quote the filenames (PITS:01150).%0a* Fix SessionAuth() for PHP 5.3, the $_REQUEST array doesn't contain the $_COOKIE array (PITS:01141).%0a* Fix default timezone for PHP 5.3 (PITS:01141).%0a* Update documentation.%0a%0a!!! [[#v226]] Version 2.2.6 (2009-10-04)%0a* Escape apostrophes for multiline textarea/hidden form fields.%0a* Fix global unset of $MarkupRules in [[PmWiki/CustomMarkup|Markup()]] and DisableMarkup(), reported by D.Faure.%0a* Fix call to BuildMarkupRules() in MarkupToHTML(), suggested by Pm.%0a* Allow disabling of $PageListFilters and $FPLTemplateFunctions if set to -1 and thus allow replacing a core function with a custom one.%0a* Fix DRange() returned timestamps +1min or +1day when it shouldn't (PITS:01125).%0a* Add $MarkupWordwrapFunction to allow custom [@(:markup:)@] line width for multibyte wikis (PITS:00703).%0a* Add $MakeUploadNamePatterns to allow custom filename normalization for uploads.%0a* Add a fourth argument to PostRecentChanges() to allow this function to be called with a custom $RecentChangesFmt array.%0a* Add $RecentUploadsFmt, to allow logging of new uploads to the RecentChanges pages (PITS:00088).%0a* Fix Notify for some installations in safe_mode (PITS:00976).%0a* Add $HTMLHeaderFmt['guiedit'] variable in guiedit.php to allow customization (PITS:01146).%0a* Update documentation.%0a%0a!!! [[#v225]] Version 2.2.5 (2009-08-25)%0a* Add *.7z as accepted upload extension (PITS:00813).%0a* Fix global variable $HandleAttrFmt in HandleAttr (PITS:01126).%0a* Allow brackets in input element names (PITS:01131).%0a* Fix CSS class applied twice (PITS:01071).%0a* Fix Not-Modified headers could prevent caching (PITS:00802).%0a* Break FPLTemplate() into configurable sub-parts (PITS:01102).%0a* Add [@(:template none:)@] section for Pagelist templates.%0a* Fix attr-protected page could be deleted with edit permissions (PITS:00238).%0a* Update documentation.%0a%0a!!! [[#v224]] Version 2.2.4 (2009-07-16)%0a* Fix bug with page attributes, which somehow didn't make it in the 2.2.3 release.%0a* Fix bug with HTML entities in XLPages introduced earlier today in 2.2.3 (reverted, PITS:01114).%0a%0a!!! [[#v223]] Version 2.2.3 (2009-07-16)%0a* Fix action=logout could incorrectly set a session cookie (PITS:01062).%0a* Fix page history trim in vardoc.php (PITS:01103).%0a* Add $EnableUploadGroupAuth, use group password for downloads (PITS:01104).%0a* Fix recursive PTV loops, added $MaxPageTextVars (PITS:00915, PITS:01099).%0a* Fix mkdirp() messages for absolute paths (PITS:00396).%0a* Fix sample-config.php order for urlapprove.php (PITS:01037).%0a* Fix broken signature links on preview.%0a* Fix crypt.php (action=crypt) could malfunction for passwords with quotes or apostrophes.%0a* Fix @@ @_site_*@@ passwords to work in GroupAttributes (PITS:00836, PITS:00998).%0a* Fix possible XSS vulnerabilities, reported by Michael Engelke.%0a* Update documentation.%0a%0a!!! [[#v222]] Version 2.2.2 (2009-06-21)%0a* Fix class in pages not on the breadcrumbs trail, reported by Ed W.%0a* Fix @@tabindex@@ and @@onclick@@ to guiedit buttons.%0a* Fix $GroupPrintHeaderFmt in print.php (PITS:01073).%0a* Fix global vars in xlpage-utf-8.php (PITS:00980).%0a* Fix $txt in LinkPage (reported by Eemeli Aro).%0a* Add $EnableNotifySubjectEncode for international wikis (Cookbook:UTF-8).%0a* Fix international message in Abort().%0a* Fix security bug with AuthUser, reported by Eemeli Aro. See [[Release notes]].%0a* Fix $ActionTitleFmt for login and upload, reported by Eemeli Aro.%0a%0a!!! [[#v221]] Version 2.2.1 (2009-03-28)%0a* Fix $FPLTemplateMarkupFunction which somehow didn't get in the 2.2.0 archive.%0a* Fix wikitrails to work cross-group (PITS:00407).%0a* Add $EnableRedirectQuiet variable (PITS:00919).%0a* Fix [={$Title}=] could display global variables (reported by HansB).%0a* Fix reloaded form submissions could lose values (reported by DaveG).%0a* Fix preview while restoring a version from history (PITS:01081).%0a* Fix relative links with international characters (reported by G. Hermanowicz).%0a* Add in sample-config.php example call to xlpage-utf-8.php (PITS:01066).%0a* Update documentation.%0a* Fix guiedit.php to produce valid HTML.%0a%0a!! [[#v220]] Version 2.2.0 (2009-01-18)%0a* Convert beta series to official release series.%0a* Add $FPLTemplateMarkupFunction (PITS:00984, requested by John Rankin).%0a%0a!!! [[#beta68]] Version 2.2.0-beta68 (2008-08-14)%0a* Fix E_NOTICE errors reported by Dominique Faure.%0a* Enable [@(:redirect:)@] directives in pagelists.%0a%0a!!! [[#beta67]] Version 2.2.0-beta67 (2008-07-13)%0a* Add [={$LastModifiedTime}=] page variable.%0a* Add $EnableSessionPasswords variable to control session password usage.%0a* Add $SessionEncode and $SessionDecode variables to specify functions for encoding/decoding sensitive session data.%0a* Updated httpauth.php to use SessionAuth instead of poking in session guts directly.%0a%0a!!! [[#beta66]] Version 2.2.0-beta66 (2008-07-04)%0a* Add content-type/charset to Abort() output (suggested by Petko).%0a* Close minor XSS vulnerability (PITS:01030).%0a* Add "nested if" capability.%0a* Fix bug in $Transition handling that would enable all transitions if any were set (reported by John Rankin).%0a %0a%0a!!! [[#beta65]] Version 2.2.0-beta65 (2007-11-17)%0a* Fix SiteAdmin.AuthList so that it defaults to list=all (reported by Roman).%0a* Fix pmwiki skin to include xmlns= attribute in %3chtml> tag (PITS:00989, reported by Mateusz Czaplinski and Petko Yotov).%0a%0a!!! [[#beta64]] Version 2.2.0-beta64 (2007-11-13)%0a* Add times to PmWiki date parsing (e.g., 2007-08-09T12:22:04).%0a* Suppress warning from ini_set in diag.php (suggested by Petko).%0a* Fix handling of -> links in trails (reported by Eemeli Aro).%0a* Add .kml and .kmz as valid attachment types. %0a* Fix handling of [=&=] in markup (PITS:00988, reported by Stirling Westrup).%0a* Fix duplication of language markers in $XLLangs (PITS:00987, reported by Stirling Westrup).%0a* Correct typo in DRange() call in stdmarkup.php (reported by Stirling Westrup).%0a* Turn on error displays when diagnostics are enabled.%0a* Default PHP's pcre.backtrack_limit to at least 1000000.%0a%0a!!! [[#beta63]] Version 2.2.0-beta63 (2007-07-31)%0a* Added $SkinDirectivesPattern to allow adjustments to available skin directives (requested by Petko).%0a* Fix default permissions on Site.AuthUser and Site.AuthList (reported by Scott Connard).%0a* Add "monospace" to pmwiki.css default (reported by Joshua Timberman, with assistance from H. Fox)%0a* Fix problem with slashes in wildcards to name= and group= parameters (reported by Ian MacGregor).%0a%0a!!! Version 2.2.0-beta62 (2007-07-21)%0a* Fix bug in trails introduced by beta61 (reported by charlequin).%0a%0a!!! Version 2.2.0-beta61 (2007-07-19)%0a* Add ability to grab trails by section.%0a* Add an "ontrail" condition (from suggestions by charlequin).%0a%0a!!!Version 2.2.0-beta59, 2.2.0-beta60 (2007-07-18)%0a* Fix problem with upgrade.php on [[wiki farms]] (reported by Scott Connard).%0a* Fix problem with distributed version of Site.AuthUser (reported by Jon Haupt).%0a%0a!!!Version 2.2.0-beta58 (2007-07-17)%0a* Significant change: Site.AuthUser, Site.Blocklist, Site.ApprovedUrls, and Site.NotifyList now appear in the [[SiteAdmin]] group by default.%0a** Note: if you limit groups by setting $GroupPattern, you now need to include SiteAdmin (see [[Cookbook:LimitWikiGroups]])%0a* Abort if ldap: authentication requested and libraries aren't present.%0a* Added "upgrades.php" script to handle various migration issues.%0a* Current PmWiki [[version]] is now held in [[SiteAdmin.Status]] .%0a* Fix ?action=postupload to follow ?action=upload settings.%0a* Improvements to [[SiteAdmin.AuthList]] page (suggestions and fixes from Ian MacGregor).%0a* Allow leading underscores in attachment names (requested by Christophe David).%0a%0a!!!Version 2.2.0-beta57 (2007-06-15)%0a* Fix AsSpacedUTF8() to work like AsSpaced() (reported by Petko).%0a* Qualify page links that contain parentheses (reported by Petko).%0a* Fix bug in [@(:input default $:var ... :)@] (reported by Crisses).%0a%0a!!!Version 2.2.0-beta56 (2007-06-13)%0a* Fix AsSpaced() to not add spaces before leading digit, and treat hyphenated digits as complete numbers.%0a* Fix infinite recursion in self-referencing [[page text variables]] (PITS:00915).%0a* Fix bug introduced in beta55 not handling end [[links|anchors]] correctly (reported by Roman).%0a%0a!!!Version 2.2.0-beta55 (2007-06-11)%0a* Fix attributes to [@(:input e_form:)@] (PITS:00387, re-reported by Crisses).%0a* UpdatePage() now calls StopWatch() to record posting.%0a* Display stopwatch output as part of redirect.%0a* Fix [[wiki styles]] bug when $EnableLinkPageRelative is set (reported by Petko).%0a* Revise TextSection() code to hopefully avoid %25newwin%25[[http://pcre.org/|pcre]] limits (reported by Kathryn Andersen, Knut Alboldt).%0a* Add wrap=inline and wrap=none options to [[page list(s#pagelistwrap)]].%0a%0a!!!Version 2.2.0-beta53, 2.2.0-beta54 (2007-06-02)%0a* Improve error message reporting for markup rules (suggestion by Knut Alboldt).%0a* Clean up more E_NOTICE warnings (reported by Ian MacGregor).%0a* Add focus= option to [=(:=][[forms|input]]:) controls.%0a* Added CSS [@.faqtoc@] class, to be able to display only the questions coming from the #includefaq [[page list template(s)]].%0a* Changed [[PmWiki.FAQ]] to use .faqtoc class.%0a* Fix bug in TextSection (PITS:00935, reported by Jean-Fabrice).%0a* Fix bug in [[page list(s#pagelisttrail)]] caching of trails.%0a%0a!!!Version 2.2.0-beta52 (2007-05-26)%0a* Add per-PageStore attributes (from a suggestion by Tobias Thelen).%0a* Add [@{$PasswdRead}@], [@{$PasswdEdit}@], etc. to display page password settings.%0a* Add Site.AuthList to display all password permissions on a site.%0a* Reorder $PageListFilters slightly.%0a* Add "passwd=" option to [[page list(s#pagelistpasswd)]], to return only those pages that have some sort of [[password(s)]] attribute on them.%0a* Add line numbers to StopWatchHTML output.%0a* Clean up handling of $AuthCascade.%0a%0a!!!Version 2.2.0-beta51 (2007-05-23)%0a* Add fmt=count to [[page list(s#pagelistcount)]] (reminder from Hans).%0a* Ignore hidden files in [[skin(s)]] directories when searching for .tmpl (suggestion by Stephan Becker).%0a* Clean up queuing of pages to be updated in .pageindex .%0a* Reset $LinkTargets() at beginning of each UpdatePage() sequence.%0a%0a!!!Version 2.2.0-beta50 (2007-05-22)%0a* Fix HTML cache when drafts are enabled, or other recipes using CondAuth().%0a* Prevent [[page lists]] with protected pages from HTML cache.%0a%0a!!!Version 2.2.0-beta48, 2.2.0-beta49 (2007-05-21)%0a* Fix spurious value= attribute in <textarea> tag generated by [@(:input textarea ... :)@].%0a* Allow either [@(:input default ...:)@] or [@(:input defaults ...:)@].%0a* Fix problem with page text variable handling in [@(:input defaults:)@].%0a* Allow either [@(:template default:)@] or [@(:template defaults:)@] in [[page list templates]].%0a* Fix a bug handling dates with suffixes (reported by Crisses).%0a%0a!!!Version 2.2.0-beta47 (2007-05-20)%0a* Fix bug with quote handling in [@(:include:)@] options (reported by Hans).%0a%0a!!!Version 2.2.0-beta46 (2007-05-19)%0a* Moved $PageTextVarPatterns definition from scripts/stdmarkup.php to pmwiki.php.%0a* Ignore Markup() rules that have unresolved $when parameters.%0a* Fix issue in authuser.php when $auth array isn't set (contributed by Ben Stallings).%0a* The [@(:include:)@] directive now performs template argument processing on the included text.%0a* Optimized [@(:pagelist:)@] slightly when sorting on [[page variables]].%0a* Refactored [@(:input ... :)@] markups.%0a* Added HandleDispatch(), which allows action handlers to easily redispatch to other actions (and add messages).%0a* Added FmtTemplateVars(), to perform various template-substitutions.%0a%0a%0a!!!Version 2.2.0-beta45 (2007-05-02)%0a* Update pmwiki's date parsing to use a common routine, recognizing dates within strings and restricting range to 1900-2039.%0a* Add additional parameter to "date" conditional.%0a* Add if= option to [[page list(s#pagelistif)]] (suggested by Crisses).%0a* Refactor code to use TextSection() and RetrieveAuthSection() functions.%0a* The value= parameter to [@(:input textarea:)@] now works properly (including values loaded from $InputValues).%0a* The [@(:input default:)@] directive now allows loading input control defaults from another page via the [@source=@] parameter.%0a* Remove automatic call to FmtPageName() in $ROSPatterns. Add $ROEPatterns (from suggestions by JB and others).%0a* Fix minor variable bugs in scripts/crypt.php.%0a* Remove E_NOTICE errors (reported by Hans).%0a* Fix handling of page variables when pagename is empty or not provided.%0a* Add $EnableLinkPageRelative configuration option.%0a* Clean up handling of arguments to [@{(ftime ...)}@].%0a* Remove mailposts.php call in stdconfig.php (reported by Christophe David).%0a%0a!!!Version 2.2.0-beta44 (2007-04-16)%0a* Fix case conversion of U+027D and U+026B (reported by Petko).%0a* Add $FTimeFmt to set default formatting for [@{(ftime)}@].%0a* Add %25s conversion to [@{(ftime)}@] for systems that don't have it by default.%0a* Report an error if edit [[form(s)]] cannot be read (suggested by Hans).%0a* Don't report ?cannot acquire lockfile when simply browsing pages.%0a* Add $EnableReadOnly flag to signal when PmWiki is to be run in read-only mode.%0a%0a!!!Version 2.2.0-beta43 (2007-04-15)%0a* Update drafts code to add $EnablePublishAttr and change button labels when drafts are enabled (PITS:00755).%0a* Removed no-longer-needed 'compat1x.php' and 'mailposts.php' from distribution.%0a* Added $DraftRecentChangesFmt.%0a* Added "[[markup expressions]]" [@{(...)}@] into the core.%0a* Added charset= attribute to saved pages.%0a* Update pagelist.php and xlpage-utf-8.php to handle case-insensitive searches.%0a* Added some optimizations to phpdiff.php script to produce more useful history information.%0a%0a!!!Version 2.2.0-beta42 (2007-03-27)%0a* Fix a bug with order=title in pagelists (reported by Anno).%0a%0a!!!Version 2.2.0-beta41 (2007-03-26)%0a* Added $EnableWSPre option, which allows easy adjustment of the "leading space -> preformatted text" (or "whitespace") rule.%0a* Added a new "pre" wikistyle, to designate blocks that are to be treated as preformatted text.%0a%0a!!!Version 2.2.0-beta40 (2007-03-24)%0a* Fix bug with order=title in pagelists when using $Titlespaced (PITS:00906, reported by Feral).%0a* Report state of allow_url_fopen when downloads fail in blocklist.php.%0a%0a!!!Version 2.2.0-beta39 (2007-03-23)%0a* Allow page variable filters to appear as options in [@(:template defaults:)@] (reported by SteP).%0a* Updated [[Site.PageListTemplates]] to use [@(:template:)@] directives.%0a* Remove '#wikileft h1' and '#wikileft h5' from pmwiki default stylesheet.%0a%0a!!!Version 2.2.0-beta38 (2007-03-22)%0a* Strip control characters from $ChangeSummary.%0a* Fix problem with count=m..n where m..n is outside the range of available pages (reported by SteP).%0a* Allow [@(:template default ...:)@] to specify a class= option.%0a* [[PmWiki/PageDirectives#redirect|Redirect]] pagename can now include an anchor (PITS:00558)%0a%0a!!!Version 2.2.0-beta37 (2007-03-16)%0a* Allow an optional space after comma separators in wildcard patterns (reported by Han Baas).%0a%0a!!!Version 2.2.0-beta36 (2007-03-16)%0a* Allow nested [[page text variables]] to work, remove extraneous ENT_NOQUOTES parameter.%0a* Add new [@(:template ...:)@] directives for pagelist templates.%0a* Modify count= option to pagelists to allow for alternate ranges.%0a%0a!!!Version 2.2.0-beta35 (2007-03-05)%0a* Fix bug in [[conditional markup]] parsing (reported by Christophe David).%0a%0a!!!Version 2.2.0-beta33, 2.2.0-beta34 (2007-03-01)%0a* Refactor wildcard handling into its own GlobToPCRE function.%0a* Allow negated wildcards for page variable filters in pagelists (PITS:00878, reported by Jiri)%0a* Fix wildcards so that spaces no longer separate patterns (use commas).%0a* Fix handling of '&' prior to [@(:input:)@] and other directives (reported by Luigi).%0a* Adjust position of [@%25define=...%25@] [[wiki styles]] to occur after ampersands.%0a* Adjust copyright dates on many files.%0a* Allow spaces around text variable names in [[page text variable(s)]] markups.%0a%0a!!! [[#beta32]] Version 2.2.0-beta32 (2007-02-28)%0a* Fix erroneous $EnableCreole item in docs/sample-config.php (reported by Sigurd).%0a* Added [@(:elseif:)@] and [@(:else:)@] markups (PITS:00787).%0a* Fix global $Skin variable handling when using SetSkin from within markup.%0a* Make sure directives aren't treated like [[page text variables]] (reported by Petko).%0a* Remove call to ResolvePageName() from authuser.php .%0a* Simplify [[PmWiki/AuthUser#LDAP|LDAP]] authentication for Active Directory sites.%0a* Cache lowercase/uppercase patterns in AsSpacedUTF8().%0a%0a!!!Version 2.2.0-beta31 (2007-02-11)%0a* Fix bug with sorting on [[pagelist variables]] (reported by Kathryn Andersen).%0a%0a!!!Version 2.2.0-beta29, 2.2.0-beta30 (2007-02-09)%0a* MakePageName now uses the first matching entry of $PagePathFmt as the home page of groups without a home page.%0a* Add AsSpacedUTF8() to handle title spacing in utf-8 (PITS:00875, contributed by Petko, Celok)%0a* Fix $RequestedPage when running with utf-8.%0a* Add %3cmeta> content-type tag for utf-8.%0a* Add an experimental caching system for pagelists.%0a* Fix $SuffixPattern and link suffixes for utf-8 (PITS:00881, reported by ppip).%0a%0a!!!Version 2.2.0-beta28 (2007-02-03)%0a* Update blocklist.php so that all posted fields are checked for block values (PITS:00850).%0a%0a!!!Version 2.2.0-beta27 (2007-01-25)%0a* Fix markup processing sequence for [@(:input default:), (:input select:)@], etc. (problem noted by Marc).%0a* Fix default value of [@order=@] parameter to MakePageList().%0a%0a!!!Version 2.2.0-beta26 (2007-01-23)%0a* Fix a bug where pagelist list= option had no effect when reading from trails (from an rss problem noted by Russ Fink).%0a%0a!!!Version 2.2.0-beta24, 2.2.0-beta25 (2007-01-22)%0a* Add a scripts/creole.php module for Creole markup (http://www.wikicreole.org/).%0a* Move WikiWords out of the core defaults -- can be enabled via $EnableWikiWords.%0a* Fix handling of WikiWords following & or #, as in [=Æ and #FFFF00=] (reported by Moni Kellermann).%0a* Adjust FormatTableRow() to support Creole-style tables (using single |'s).%0a* Update docs/sample-config.php with new configurations and options.%0a* Added code to allow Abort() to refer to additional information on pmwiki.org.%0a* Added $EnableSkinDiag, which checks templates for required %3c!--HTMLHeader--> and %3c!--HTMLFooter--> directives.%0a* Removed deprecated $BasicLayoutVars support from skins.php.%0a%0a!!!Version 2.2.0-beta22, 2.2.0-beta23 (2007-01-17)%0a* Added $EnableActions, to allow pmwiki.php to be included without generating output (from a suggestion by Wouter Groeneveld).%0a* Fix bug in "order=" option to [@(:pagelist:)@] (reported by Mike Bishop).%0a* Change DisplayStopWatch() function to StopWatchHTML().%0a* Allow multiple lines for markup:, wiki:, and page: template directives (reported by Marc)%0a%0a!!!Version 2.2.0-beta21 (2007-01-12)%0a* Fix %3cvspace> bug in searchresults output (PITS:00846, reported by M. Czaplinski, marc, and others).%0a* Fix numerous E_NOTICE warnings and incorrect constants (PITS:00853, contributed by AndrewFyfe).%0a%0a!!!Version 2.2.0-beta20 (2007-01-11)%0a* $FeedPageListOpt needs to be declared global in feeds.php.%0a* Add "404 Not Found" status code to ?invalid page name aborts (PITS:00854, suggested by Athan).%0a* Remove stale entries from $PageExistsCache when a new PageStore is added (reported by Hans).%0a%0a!!!Version 2.2.0-beta19 (2006-12-29)%0a* Have blocklist check $_POST['text'] only when it is set (from a report by Simon).%0a%0a!!!Version 2.2.0-beta18 (2006-12-28)%0a* Change $pagename parameter in UpdatePage() to be passed by reference (suggestion by J. Meijer).%0a* Fix $EnableRobotsCloakActions so that it works again with page variables.%0a* Add "XML Sitemaps" to $RobotPattern.%0a* Change $MetaRobots to return "nofollow,noindex" for non-existent pages.%0a* Prefer "404 Not Found" to "403 Forbidden" for [[(PmWiki:)robots]] attempting to do invalid actions on non-existent pages.%0a* Add rel='nofollow' to "create attachment" links.%0a* Added class='inputbox' to select boxes (suggested by Hans).%0a* Added .odt, .ods, and .odp file extensions to allowed [[uploads]] (suggested by Algis Kabaila, Robin Sheat, and others).%0a* Clean up some error warnings (PITS:00801, contributed by psvo).%0a* Set $ScriptUrl to 'https:' when accessed via SSL link (suggestions from C. Ridderström, H. Fox, PITS:00410, PITS:00527, PITS:00595).%0a* Fix bug in link= and trail= options to [@(:pagelist:)@] (reported by C. Ridderström).%0a%0a!!!Version 2.2.0-beta17 (2006-12-13)%0a* Fix spurious hidden field in [@(:searchbox:)@] output (reported by Hans).%0a* Fix $CaseConversions array for \xc4\xb1 and \xc5\xbf (reported by Petko Yotov).%0a* Refactor [@(:input:)@] markup handling.%0a* Add [@(:input select ...:)@] markup (PITS:00567).%0a* Add [@(:input default ...:)@] markup -- may change before 2.2.0 release.%0a* Add ability to set defaults for radio/checkbox/select controls.%0a%0a%0a!!!Version 2.2.0-beta16 (2006-11-10)%0a* Fix problem with [@(:e_preview:)@] directive when viewing an edit form (reported by Dominique Faure).%0a* Fix out-of-memory problem in scripts/compat1x.php when dealing with large pages to be converted (contributed by Donald Gordon).%0a* Fix problem of Variable: lines immediately followed by newline (reported by Hans).%0a* Fix uninitialized variable errors in FormatTableRow() (reported by Bob Sanders).%0a* Fix second argument of MakeBaseName() (provided by Stirling Westrup).%0a%0a!!!Version 2.2.0-beta15 (2006-10-16)%0a* Fix bug with displaying multi-line [@(:var:value:)@] [[page text variables]] (reported by Pico).%0a* Improve PageStore ls() method slightly, to restrict pagename searches to directories of a given depth (based on an issue reported by Chris Cox).%0a* Added $IsBlocked status variable to scripts/blocklist.php.%0a* Added $UnapprovedLink array to report unapproved links.%0a* Added $TimeISOFmt, $TimeISOZFmt, and $CurrentTimeISO variables.%0a* Switched scripts/feeds.php to use $TimeISOZFmt instead of $ISOTimeFmt.%0a* Added [@request=@] option to [@(:pagelist:)@], switched pagelist to default to not use url/form parameters.%0a* Fixed bug with array [@{$$options}@] in pagelist.%0a%0a!!!Version 2.2.0-beta14 (2006-10-06)%0a* Fix problem with extra parameter to mail when $NotifyParameters is empty (reported by Tom Lederer).%0a* Improve configurability of $SearchPatterns (from suggestions by Stirling Westrup).%0a* Add ability for $WikiWordCount to disable wikiword spacing (PITS:00327).%0a%0a!!!Version 2.2.0-beta13 (2006-10-04)%0a* Fix handling of angle brackets (and potential XSS) in pagelists combined with page text variables (noted by Pico).%0a%0a!!!Version 2.2.0-beta12 (2006-10-03)%0a* Added the UpdatePage() function into the core. %0a%0a!!!Version 2.2.0-beta11 (2006-10-03)%0a* Added ability to automatically create targets.%0a* Added sample code to docs/sample-config.php for automatic generation of Category.* pages.%0a* Fixed character escapes in pagelist [@{$$option}@] variables.%0a%0a!!!Version 2.2.0-beta10 (2006-10-02)%0a* Added [@{$$option}@] variables to get option values from [@(:pagelist:)@] (based on a recipe from Martin Fick).%0a* Changed [@{$PageCount}, {$GroupPageCount}, and {$GroupCount}@] to be [@{$$PageCount}, {$$GroupPageCount}, and {$$GroupCount}@].%0a* Added [@{$BaseName}@] page variable and $BaseNamePatterns.%0a%0a!!!Version 2.2.0-beta9 (2006-10-01)%0a* Fix bug with $EnablePageListProtect (reported by Brent Zupp).%0a* Added ability to select based on page variables in [@(:pagelist:)@].%0a%0a!!!Version 2.2.0-beta8 (2006-09-30)%0a* Update scripts/blocklist.php to check only $_POST['text'] instead of entire markup text.%0a* Fix bug in pagelist.php that wouldn't return correctly formatted array in certain circumstances (noted by Florian Fischer and JDem).%0a%0a!!!Version 2.2.0-beta7 (2006-09-30)%0a* Added scripts/blocklist.php to core.%0a* Updated handling of $PageTextVarPatterns.%0a* Eliminated need for extra flush() steps in notify.php, pagelist.php.%0a%0a!!!Version 2.2.0-beta6 (2006-09-27)%0a* Fix bug with initialization of $FeedPageListOpt in scripts/feeds.php (reported by Roman).%0a* Fix bug with over-eager [@(:textvar:value:)@] markup (from a bug reported by Chris Cox).%0a%0a!!!Version 2.2.0-beta4, 2.2.0-beta5 (2006-09-27)%0a* Fix bug with name= option in pagelist (reported by Ben Wilson).%0a* Fix bug with array_merge under PHP 5 (reported by Kathryn Andersen).%0a%0a!!!Version 2.2.0-beta3 (2006-09-26)%0a* Remove extra %3c!----> comment at end of table directives (noted by Ben Stallings).%0a* Fix directive form of page text variables (reported by Kathryn Andersen).%0a* Add first version of new modular pagelist code.%0a%0a!!!Version 2.2.0-beta2 (2006-09-25)%0a* Add support for [@{$:var}@] page text variables, and [@(:var:...:)@] markup.%0a* Fix default setting of $EnableRelativePageVars in docs/sample-config.php .%0a%0a!!!Version 2.2.0-beta1 (2006-09-25)%0a* Added [@{*$var}@] page variables (always the currently browsed page).%0a* Convert link and page variable handling in [=(:include:)=] to be relative to the included page.%0a* Added $EnableRelativePageVars and $EnableRelativePageLinks variables, as well as transition options.%0a* Added basepage= option to [=(:include:)=].%0a* Updated $GroupHeaderFmt and $GroupFooterFmt to use basepage= option.%0a* Adjusted $MakePageNamePatterns to automatically strip any #... or ?... from the end of a pagename input string (solution to a problem reported by J. Meijer).%0a%0a!!!Version 2.1.27 (2006-12-11)%0a* Backport in bug fix for TableRowFormat (from 2.2.0-beta16).%0a* Add support for [@{*$Variable}@] syntax (from 2.2.0 page variables).%0a%0a!!!Version 2.1.26 (2006-09-11)%0a* Fix a bug with variable referencing that caused feeds.php to get a confused PCache (reported by Helge Larsen).%0a%0a!!!Version 2.1.25 (2006-09-08)%0a* Fixed a bug in authuser.php that would fail if $AuthUser isn't defined (reported by Hans Huijgen).%0a* Added %3c!--XMLHeader--> and %3c!--XMLFooter--> aliases to %3c!--HTMLHeader--> and %3c!--HTMLFooter--> directives in skin templates (suggested by John Rankin).%0a* Added $PageExistsCache (suggested by John Rankin).%0a%0a!!!Version 2.1.24 (2006-09-06)%0a* Fixed a bug in authuser.php that had trouble dealing with non-array entries in $AuthUser (reported by Udo).%0a* Can now specify authorization groups using $AuthUser['@group'] entries.%0a* Can now specify an Apache .htgroup-formatted file for authorization groups via $AuthUser['htgroup'].%0a%0a!!!Versions 2.1.21, 2.1.22, 2.1.23 (2006-09-05, 2006-09-06)%0a* Close a potential security hole with $FarmD when register_globals is set "On".%0a* Correct a syntax error in feeds.php (noted by Ben Wilson).%0a* Fix a bug that prevented PmWiki from reading page files generated by versions prior to 0.5.6 (discovered by Milan Avramovic).%0a%0a!!!Version 2.1.20 (2006-09-04)%0a* Fixed a bug in [[PageDirectives#attachlist| [@(:attachlist:)@] ]] when passed a wikiword argument (reported by Kathryn Andersen).%0a* Changed $HTMLStylesFmt['markup'] to honor config.php setting (reported by Hans).%0a%0a!!!Version 2.1.19 (2006-08-30)%0a* Corrected a bug in the pageindex code that was causing the .pageindex to not update as quickly as it should.%0a* Slightly changed the handling of 'width' and 'height' in wikistyles.php, so that they can be be applied as attributes to %3cobject> and %3cembed> tags.%0a* Updated the Keep() function to recognize closing block tags as being in the 'B' block pool.%0a* Fixed a bug with wikistyles and form tags.%0a%0a!!!Version 2.1.18 (2006-08-28)%0a* Closed a potential cross-site scripting vulnerability in table markups (reported by JB).%0a* Added [@(:input image:)@] markup (requested by JB).%0a* Fixed problem with ?action=print failing to set [@{$Action}@] (reported by Bart).%0a%0a!!!Version 2.1.17 (2006-08-26)%0a* Added some improvements to IMS caching to better handle logout and authorization actions (PITS:00573, reported by floozy and Henrik Bechmann).%0a%0a!!!Version 2.1.16 (2006-08-26)%0a* Added $SkinLibDirs variable, to select filesystem and url locations where skins may be found (resolves PITS:00708, as reported by Hagan Fox, with additional suggestions from Ben Wilson).%0a* Changed [@%3c!--HeaderText-->@] to [@%3c!--HTMLHeader-->@] in skin templates, and added an optional [@%3c!--HTMLFooter-->@] directive (PITS:00767).%0a* Adjusted the pmwiki and print skins to use the new directives.%0a%0a!!!Version 2.1.15 (2006-08-25)%0a* Fixed issue dealing with order of [@@_site_*@] passwords (reported by Jean-Fabrice and others).%0a* Added $LocalDir variable (requested by John Rankin).%0a* Removed an unnecessary setting of $DefaultPage in ''scripts/pgcust.php'' (it's now handled by ResolvePageName() ).%0a* Added some variables and changes in wikistyles.php to better support wikipublisher (contributed by John Rankin).%0a* RetrieveAuthPage (PmWikiAuth) now recognizes a $level of 'ALWAYS' as indicating that access should always be allowed, regardless of current passwords or identities.%0a* Added filter specifier for AuthUser LDAP authentication (contributed by Balu).%0a%0a!!!Version 2.1.13, 2.1.14 (2006-08-15, 2006-08-16)%0a* Updated scripts/authuser.php to allow ldaps://... authentications (contributed by Michael Brenner).%0a* Fixed problem with numeric passwords introduced in 2.1.beta20 (reported by Christophe David and Dirk Blaas).%0a%0a!!!Version 2.1.12 (2006-08-07)%0a* Corrected typo in Site.SideBar file (reported by Judith Zacharie).%0a* Suppressed warning message for search on sites without a wikilib.d/ directory.%0a* Added capability for nested divs.%0a* Use $Transition['nodivnest'] to restore previous non-nesting div/table behavior.%0a* Including authuser.php now automatically resolves pagename.%0a* Added [@(:noaction:)@] directive to turn off actions.%0a* Fixed bug in wikistyles prior to image blocks.%0a* Added white-space as allowed wikistyle (suggested by C. Ridderström).%0a* Allow colons, hyphens, and dots in id= tags.%0a%0a!!!Version 2.1.11 (2006-06-09)%0a* Fixed generation of empty paragraphs around [@%25define=...%25@] wikistyles (PITS:00753).%0a%0a!!!Version 2.1.10 (2006-06-04)%0a* Added a %3cspan> around the RecentChanges link in the pmwiki skin (PITS:00750, suggested by Hagan Fox).%0a* Changed the $Action variable to $ActionTitle (PITS:00749, reported by Hagan Fox).%0a* Changed $FPLTemplatePageFmt to be an array of pages to be searched for page templates, enabled searching of current page and Site.LocalTemplates page.%0a* Updated .vspace margin in sidebar for pmwiki skin (PITS:00751, by Hagan Fox).%0a%0a%0a!!!Version 2.1.9 (2006-06-02)%0a* Fixed a bug with [@[[~Author]]@] links (PITS:00530 reported by Klonk, PITS:00611 reported by weijang, PITS:00671 reported by Stirling Westrup, and helpful clues provided by Clayton Curtis).%0a%0a!!!Version 2.1.8 (2006-06-01)%0a* Added ability to specify notification entries from ''local/config.php'' as well as Site.Notify (suggested by Christophe David).%0a* Fixed $Transition['vspace'] from 2.1.7.%0a%0a!!!Version 2.1.7 (2006-05-31)%0a* Adjusted width of edit form for IE browsers (contributed by Roman and H. Fox).%0a* Suppress authentication failure error from LDAP (PITS:00739).%0a* Fixed problem with invalid page names resulting in redirect loop (PITS:00723, reported by jojoo).%0a* Added "Group." and "Group/" page name syntax, resolving PITS:00736 (from a suggestion by Pico).%0a* Changed handling of "vspace" paragraphs.%0a* Fixed some XSS vulnerabilities in uploads.php and url links (reported by Moritz Naumann, http://moritz-naumann.com).%0a* Added notify.php script, allowing finer control of email notifications.%0a%0a!!!Version 2.1.6 (2006-05-22)%0a* Optimized performance of urlapprove.php.%0a* Added [@(:if auth xyz PageName:)@] syntax.%0a* Corrected XSS bug in trails.php.%0a* Slightly improved performance of free links.%0a* Restore ability to use hyphens in InterMap links (reported by Henrik Bechmann).%0a%0a!!!Version 2.1.4, 2.1.5 (2006-03-29)%0a* Fixed problem with pagelist-based feeds (PITS:00709, reported by Jon Haupt).%0a* Added [@{$Action}@] page variable. (PITS:00696, reported by Sebastian Pipping).%0a* Added stripmagic() around variables submitted to authuser.php.%0a* Fixed problem with multi-term searches containing special characters (PITS:00713, reported by Leo).%0a* Switched [[PageDirectives#attachlist| [@(:attachlist:)@] ]] to use a natural case sort (suggested by H. Fox).%0a%0a!!!Version 2.1.3 (2006-03-17)%0a* Re-fixed problem with PHP 5.1.1 and lines= option to [@(:include:)@] (PITS:00620).%0a* Fixed empty LDAP password issue (reported by Thomas Lederer).%0a%0a!!!Version 2.1.2 (2006-03-16)%0a* Fixed %3ch1>/%3ch2> tag mismatches (PITS:00702, reported by Martin Hason).%0a* Fixed bug with $AllowPassword and "nopass" (reported by M. Weiner and bram brambring).%0a* Improved the speed of RSS and other web feeds when $EnablePageListProtect is not set.%0a%0a!!!Version 2.1.1 (2006-03-13)%0a* Fixed a bug with multiple authorization groups as a password (PITS:00699, reported by Ari Epstein).%0a* Updated the authorization code to be a bit more liberal with password/group settings.%0a* Updated PmWiki.FAQ page to be able to grab FAQ items from other pages in the documentation.%0a%0a!!Version 2.1.0 (2006-03-12)%0a* Many many documentation updates (special thanks to many authors).%0a* Allow trailing underscores in upload names (requested by Hans).%0a* Fixed 'ak_print' problem causing accesskey='a' for print (noted by Pico).%0a* Added code to make sure each anchor is generated only once per page (for XHTML validity).%0a* Added a $BlockPattern variable to recognize block HTML tags.%0a* Made an adjustment to Keep() so that it places strings with block HTML into the 'B' pool.%0a* Adjusted stdmarkup.php to not produce paragraphs for keep blocks in the 'B' pool.%0a* Corrected a variety of i18n phrases.%0a* Added class='escaped' to distinguish [=@@...@@=] from [=[@...@]=] (from a comment by Hans).%0a* Slightly changed styling of .faq divs.%0a* Made the edit textarea a couple of rows smaller to better fit on smaller displays (suggested by H. Fox).%0a----%0a[[(PmWiki:)ChangeLog Archive]] - changes prior to version 2.1.0.%0a +time=1263762783 Index: wikilib.d/PmWiki.Troubleshooting =================================================================== --- wikilib.d/PmWiki.Troubleshooting (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.Troubleshooting (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.5 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Ubuntu/8.10 (intrepid) Firefox/3.0.14 -author=Peter Bowers +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729) +author=Maddes charset=ISO-8859-1 -csum= -host=92.60.30.104 +csum=custom $GroupPattern must include Site and SiteAdmin to make PMWiki work +host=84.61.232.10 name=PmWiki.Troubleshooting -rev=91 +rev=92 targets=PmWiki.MailingLists,PmWiki.Upgrades,PmWiki.Installation,PmWiki.InitialSetupTasks,PmWiki.FilePermissions,PmWiki.WikiGroup,PmWiki.LocalCustomizations,PmWiki.UploadsAdmin,PmWiki.Tables -text=(:Summary:Advice for troubleshooting an installation:)%0a(:Audience: administrators :)%0a%0aPmwiki is pretty robust and can automatically adapt to a very wide variety of environments. %0aHowever, sometimes things don't go as we expect, so we're cataloging common errors and their fixes here.%0a%0a!! Troubleshooting Frequently Asked Questions%0a%0a->%25note%25 Note: This page on pmwiki.org is probably not the best place to post questions. Consider [[PmWiki:HowToGetAssistance | seeking assistance]] from the pmwiki-users [[mailing list(s)]], or post your question on the [[PmWiki:Questions]] page.%0a%0a>>faq%3c%3c [[#faq]]%0aQ: Why am I seeing strange errors after [[(PmWiki.)upgrad(es)]]ing?%0aA: Make sure all of the files were updated, in particular ''pmwiki.php''.%0a%0aA: This question sometimes arises when an administrator hasn't%0afollowed the advice, which used to be less prominent, on the%0a[[(PmWiki.)installation(#notes)]] and%0a[[(PmWiki.)initial setup tasks(#dontmodify)]] pages and has renamed%0a''pmwiki.php'' instead of creating an ''index.php'' wrapper script.%0aIf you have renamed ''pmwiki.php'' to ''index.php'', then the upgrade procedure%0awon't have updated your ''index.php'' file. Delete the old version and%0acreate a wrapper script so it won't happen again.%0a%0aA: Sometimes an FTP or other copy program will fail to transfer all of the%0afiles properly. One way to check for this is by comparing file sizes.%0a%0aA: Be sure all of the files in the ''wikilib.d/'' directory%0awere also upgraded. Sometimes it's a good idea to simply delete the ''wikilib.d/''%0adirectory before upgrading. (Local copies of pages are stored in ''wiki.d/'' and not ''wikilib.d/''.)%0a%0a%0aQ: I'm suddenly getting messages like "@@Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied...@@" and @@Cannot acquire lockfile@@"... what's wrong?%0a%0aA: Something (or someone) has changed the [[PmWiki/FilePermissions | permissions]] on the ''wiki.d/.flock'' file or the ''wiki.d/'' directory such that the webserver is no longer able to write the lockfile. The normal solution is to simply delete the ''.flock'' file from the ''wiki.d/'' directory -- PmWiki will then create a new one. Also be sure to check the permissions on the ''wiki.d/'' directory itself. (One can easily check and modify permissions of the ''wiki.d/'' directory in %25newwin%25[[http://filezilla-project.org/ | FileZilla]] (open-source FTP app) by right-clicking on the file > File attributes)%0a%0aQ: My links in the sidebar seem to be pointing to non-existent pages, even though I know I created the pages. Where are the pages?%0a%0aA: Links in the sidebar normally need to be qualified by a [[WikiGroup]] in order to work properly (use [=[[Group.Page]] instead of [[Page]]=]).\\%0aAlso: Make sure you type Side'''B'''ar with a capital B.%0a%0a%0aQ: Why am I seeing "@@Warning: Cannot modify header information - headers already sent ...@@" messages at the top of my page.%0a%0aA: If this is the first or only error message you're seeing, it's usually an indication that there are blank lines or spaces before the [@%3c?php@] or after the [@?>@] in a [[local customization(s)]] file. Double-check the file and make sure there aren't any blank lines or spaces before the initial [@%3c?php@]. It's often easiest and safest to eliminate any closing [@?>@] altogether. On Windows, it may be necessary to use a hex editor to convert LFCR line endings to LF line endings in the local\config.php file.%0a%0aA: If the warning is appearing after some other warning or error message, then resolve the other error and this warning may go away.%0a%0a[[#session_write_close_error]]%0aQ: How do I make a PHP Warning about @@function.session-write-close@@ go away?%0a%0aA: If you are seeing an error similar to this%0a%0a->[@%0aWarning: session_write_close() [function.session-write-close]:%0aopen(/some/filesystem/path/to/a/directory/sess_[...]) failed: No such file%0aor directory (2) in /your/filesystem/path/to/pmwiki.php on line NNN%0a@]%0a%0aPmWiki sometimes does session-tracking using PHP's%0a[[http://php.net/session | session-handling functions ]].%0aFor session-tracking to work, some information needs to be written%0ain a directory on the server. That directory needs to exist and%0abe writable by the webserver software. For this example, the%0awebserver software is configured to write sessions in this%0adirectory%0a%0a->[@/some/filesystem/path/to/a/directory/@]%0a%0abut the directory doesn't exist. The solution is to do at least one%0aof these:%0a* Create the directory and make sure it's writable by the webserver software%0a* Provide a session_save_path value that points to a directory that is writable by the server, e.g.%0a%0a->[@session_save_path('/home/someuser/tmp/sessions');@]%0a%0a%0a[[#multiplepwprompts]]%0aQ: Why is PmWiki prompting me multiple times for a password I've already entered?%0a%0aA: Usually this is an indication that the browser isn't accepting cookies, or that PHP's session handling functions on the server aren't properly configured. If the browser is accepting cookies, then try setting $EnableDiag=1; in ''local/config.php'', run PmWiki using [@?action=phpinfo@], and verify that sessions are enabled and that the session.save_path has a reasonable value. Note that several versions of PHP under Windows require that a session_save_path be explicitly set (this can be done in the ''local/config.php'' file). You might also try setting session.auto_start to 1 in your php.ini.%0a%0aQ: I edited ''config.php'', but when I look at my wiki pages, all I see is "@@Parse error: parse error, unexpected T_VARIABLE in ''somefile'' on line ''number''.@@"%0a%0aA: You've made a mistake in writing the PHP that goes into the ''config.php'' file. The most common mistake that causes the T_VARIABLE error is forgetting the semi-colon (;) at the end of a line that you added. The line number and file named are where you should look for the mistake.%0a%0a%0aQ: Searches and pagelists stopped working after I upgraded -- no errors are reported, but links to other pages do not appear (or do not appear as they should) -- what gives?%0a%0aA: Be sure all of the files in the ''wikilib.d/'' directory%0awere also upgraded. In particular, it sounds as if the Site.PageListTemplates page is either missing (if no links are displayed) or is an old version (if the links do not appear as they should). Allso make sure that read-permissions (attr) are set for the pages Site.PageListTemplates and Site.Search.%0a%0a[[#mod_security]]%0aQ: Some of my posts are coming back with "403 Forbidden" errors, "Not Acceptable", or "Internal Server Error". This happens with some posts but not others.%0a%0aA: Your webserver probably has [[http://modsecurity.org | mod_security]] enabled. The mod_security "feature" scans all incoming posts for forbidden words or phrases that might indicate someone is trying to hack the system, and if any of them are present then Apache returns the 403 Forbidden error. Common phrases that tend to trigger mod_security include "curl ", "wget", "file(", and "system(", although there are many others.%0a%0aSince mod_security intercepts the requests and sends the "forbidden"%0amessage before PmWiki ever gets a chance to run, it's not a bug in PmWiki, and%0athere's little that PmWiki can do about it. Instead, one has to alter the%0awebserver configuration to disable mod_security or reconfigure it to allow%0awhatever word it is forbidding. Some sites may be able to disable mod_security%0aby placing [@SecFilterEngine off@] in a ''.htaccess'' file.%0a%0aQ: I get the following message when attempting to upload an image, what do I do?%0a[-@@'''Warning''': move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1929 is not allowed to access /home/onscolre/public_html/pmwikiuploads/Photos owned by uid 33 in '''/home/onscolre/public_html/pmwiki/scripts/upload.php''' on line '''198'''@@-]%0a%0a@@'''PmWiki can't process your request'''@@%0a%0a[-@@?cannot move uploaded file to /home/onscolre/public_html/pmwikiuploads/Photos/FoundationPupilsIn1958.jpeg@@-]%0a%0a[-@@We are sorry for any inconvenience.@@-]%0a%0aA: Your server is configured with PHP [[http://php.net/manual/en/features.safe-mode.php|Safe Mode]] enabled. Configure your wiki to use a [[PmWiki/UploadsAdmin#sitewideprefix|site-wide uploads prefix]], then create the ''uploads/'' directory manually and set 777 permissions on it (rather than letting PmWiki create the directory).%0a%0a[[#TableRowIndexMax]] [[#divisionbyzero]]%0aQ: I'm starting to see "Division by zero error in pmwiki.php..." on my site. What's wrong?%0a%0aA: It's a bug in PmWiki that occurs only with the [[tables]] markup and only for versions of PHP >= 4.4.6 or >= 5.2.0. Often it seems to occur "out of nowhere" because the server administrator has upgraded PHP. Try [[upgrad(es)]]ing to a later version of PmWiki to remove the error, or try setting the following in ''local/config.php'':%0a%0a $TableRowIndexMax = 1;%0a%0aQ: I have to log in twice [-(two times) (2 times)-]. -or- My password is not being required even though it should. -or- I changed the password but the old password is still active. -or- My config.php password is not over-riding my farmconfig.php password.%0aA: It could happen if (farm)config.php, or an included recipe, directly calls the functions CondAuth(), or RetrieveAuthPage(), PageTextVar(), PageVar() and possibly others, before defining all passwords and before including AuthUser (if required). %0a%0aThe [[PmWiki/LocalCustomizations#configphp-order|order of config.php]] is very significant. -time=1254377872 +text=(:Summary:Advice for troubleshooting an installation:)%0a(:Audience: administrators :)%0a%0aPmwiki is pretty robust and can automatically adapt to a very wide variety of environments. %0aHowever, sometimes things don't go as we expect, so we're cataloging common errors and their fixes here.%0a%0a!! Troubleshooting Frequently Asked Questions%0a%0a->%25note%25 Note: This page on pmwiki.org is probably not the best place to post questions. Consider [[PmWiki:HowToGetAssistance | seeking assistance]] from the pmwiki-users [[mailing list(s)]], or post your question on the [[PmWiki:Questions]] page.%0a%0a>>faq%3c%3c [[#faq]]%0aQ: Why am I seeing strange errors after [[(PmWiki.)upgrad(es)]]ing?%0aA: Make sure all of the files were updated, in particular ''pmwiki.php''.%0a%0aA: This question sometimes arises when an administrator hasn't%0afollowed the advice, which used to be less prominent, on the%0a[[(PmWiki.)installation(#notes)]] and%0a[[(PmWiki.)initial setup tasks(#dontmodify)]] pages and has renamed%0a''pmwiki.php'' instead of creating an ''index.php'' wrapper script.%0aIf you have renamed ''pmwiki.php'' to ''index.php'', then the upgrade procedure%0awon't have updated your ''index.php'' file. Delete the old version and%0acreate a wrapper script so it won't happen again.%0a%0aA: Sometimes an FTP or other copy program will fail to transfer all of the%0afiles properly. One way to check for this is by comparing file sizes.%0a%0aA: Be sure all of the files in the ''wikilib.d/'' directory%0awere also upgraded. Sometimes it's a good idea to simply delete the ''wikilib.d/''%0adirectory before upgrading. (Local copies of pages are stored in ''wiki.d/'' and not ''wikilib.d/''.)%0a%0aA: If you use a custom pattern for $GroupPattern make sure that it includes Site ($SiteGroup) and since PMWiki 2.2 also SiteAdmin ($SiteAdminGroup).%0aOtherwise migration may fail (e.g. missing SiteAdmin for PMWiki 2.2 and later) and/or login does not work.\\%0aAdditionally Main ($DefaultGroup) should be included too.%0a%0aQ: I'm suddenly getting messages like "@@Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied...@@" and @@Cannot acquire lockfile@@"... what's wrong?%0a%0aA: Something (or someone) has changed the [[PmWiki/FilePermissions | permissions]] on the ''wiki.d/.flock'' file or the ''wiki.d/'' directory such that the webserver is no longer able to write the lockfile. The normal solution is to simply delete the ''.flock'' file from the ''wiki.d/'' directory -- PmWiki will then create a new one. Also be sure to check the permissions on the ''wiki.d/'' directory itself. (One can easily check and modify permissions of the ''wiki.d/'' directory in %25newwin%25[[http://filezilla-project.org/ | FileZilla]] (open-source FTP app) by right-clicking on the file > File attributes)%0a%0aQ: My links in the sidebar seem to be pointing to non-existent pages, even though I know I created the pages. Where are the pages?%0a%0aA: Links in the sidebar normally need to be qualified by a [[WikiGroup]] in order to work properly (use [=[[Group.Page]] instead of [[Page]]=]).\\%0aAlso: Make sure you type Side'''B'''ar with a capital B.%0a%0a%0aQ: Why am I seeing "@@Warning: Cannot modify header information - headers already sent ...@@" messages at the top of my page.%0a%0aA: If this is the first or only error message you're seeing, it's usually an indication that there are blank lines or spaces before the [@%3c?php@] or after the [@?>@] in a [[local customization(s)]] file. Double-check the file and make sure there aren't any blank lines or spaces before the initial [@%3c?php@]. It's often easiest and safest to eliminate any closing [@?>@] altogether. On Windows, it may be necessary to use a hex editor to convert LFCR line endings to LF line endings in the local\config.php file.%0a%0aA: If the warning is appearing after some other warning or error message, then resolve the other error and this warning may go away.%0a%0a[[#session_write_close_error]]%0aQ: How do I make a PHP Warning about @@function.session-write-close@@ go away?%0a%0aA: If you are seeing an error similar to this%0a%0a->[@%0aWarning: session_write_close() [function.session-write-close]:%0aopen(/some/filesystem/path/to/a/directory/sess_[...]) failed: No such file%0aor directory (2) in /your/filesystem/path/to/pmwiki.php on line NNN%0a@]%0a%0aPmWiki sometimes does session-tracking using PHP's%0a[[http://php.net/session | session-handling functions ]].%0aFor session-tracking to work, some information needs to be written%0ain a directory on the server. That directory needs to exist and%0abe writable by the webserver software. For this example, the%0awebserver software is configured to write sessions in this%0adirectory%0a%0a->[@/some/filesystem/path/to/a/directory/@]%0a%0abut the directory doesn't exist. The solution is to do at least one%0aof these:%0a* Create the directory and make sure it's writable by the webserver software%0a* Provide a session_save_path value that points to a directory that is writable by the server, e.g.%0a%0a->[@session_save_path('/home/someuser/tmp/sessions');@]%0a%0a%0a[[#multiplepwprompts]]%0aQ: Why is PmWiki prompting me multiple times for a password I've already entered?%0a%0aA: Usually this is an indication that the browser isn't accepting cookies, or that PHP's session handling functions on the server aren't properly configured. If the browser is accepting cookies, then try setting $EnableDiag=1; in ''local/config.php'', run PmWiki using [@?action=phpinfo@], and verify that sessions are enabled and that the session.save_path has a reasonable value. Note that several versions of PHP under Windows require that a session_save_path be explicitly set (this can be done in the ''local/config.php'' file). You might also try setting session.auto_start to 1 in your php.ini.%0a%0aQ: I edited ''config.php'', but when I look at my wiki pages, all I see is "@@Parse error: parse error, unexpected T_VARIABLE in ''somefile'' on line ''number''.@@"%0a%0aA: You've made a mistake in writing the PHP that goes into the ''config.php'' file. The most common mistake that causes the T_VARIABLE error is forgetting the semi-colon (;) at the end of a line that you added. The line number and file named are where you should look for the mistake.%0a%0a%0aQ: Searches and pagelists stopped working after I upgraded -- no errors are reported, but links to other pages do not appear (or do not appear as they should) -- what gives?%0a%0aA: Be sure all of the files in the ''wikilib.d/'' directory%0awere also upgraded. In particular, it sounds as if the Site.PageListTemplates page is either missing (if no links are displayed) or is an old version (if the links do not appear as they should). Allso make sure that read-permissions (attr) are set for the pages Site.PageListTemplates and Site.Search.%0a%0a[[#mod_security]]%0aQ: Some of my posts are coming back with "403 Forbidden" errors, "Not Acceptable", or "Internal Server Error". This happens with some posts but not others.%0a%0aA: Your webserver probably has [[http://modsecurity.org | mod_security]] enabled. The mod_security "feature" scans all incoming posts for forbidden words or phrases that might indicate someone is trying to hack the system, and if any of them are present then Apache returns the 403 Forbidden error. Common phrases that tend to trigger mod_security include "curl ", "wget", "file(", and "system(", although there are many others.%0a%0aSince mod_security intercepts the requests and sends the "forbidden"%0amessage before PmWiki ever gets a chance to run, it's not a bug in PmWiki, and%0athere's little that PmWiki can do about it. Instead, one has to alter the%0awebserver configuration to disable mod_security or reconfigure it to allow%0awhatever word it is forbidding. Some sites may be able to disable mod_security%0aby placing [@SecFilterEngine off@] in a ''.htaccess'' file.%0a%0aQ: I get the following message when attempting to upload an image, what do I do?%0a[-@@'''Warning''': move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1929 is not allowed to access /home/onscolre/public_html/pmwikiuploads/Photos owned by uid 33 in '''/home/onscolre/public_html/pmwiki/scripts/upload.php''' on line '''198'''@@-]%0a%0a@@'''PmWiki can't process your request'''@@%0a%0a[-@@?cannot move uploaded file to /home/onscolre/public_html/pmwikiuploads/Photos/FoundationPupilsIn1958.jpeg@@-]%0a%0a[-@@We are sorry for any inconvenience.@@-]%0a%0aA: Your server is configured with PHP [[http://php.net/manual/en/features.safe-mode.php|Safe Mode]] enabled. Configure your wiki to use a [[PmWiki/UploadsAdmin#sitewideprefix|site-wide uploads prefix]], then create the ''uploads/'' directory manually and set 777 permissions on it (rather than letting PmWiki create the directory).%0a%0a[[#TableRowIndexMax]] [[#divisionbyzero]]%0aQ: I'm starting to see "Division by zero error in pmwiki.php..." on my site. What's wrong?%0a%0aA: It's a bug in PmWiki that occurs only with the [[tables]] markup and only for versions of PHP >= 4.4.6 or >= 5.2.0. Often it seems to occur "out of nowhere" because the server administrator has upgraded PHP. Try [[upgrad(es)]]ing to a later version of PmWiki to remove the error, or try setting the following in ''local/config.php'':%0a%0a $TableRowIndexMax = 1;%0a%0aQ: I have to log in twice [-(two times) (2 times)-]. -or- My password is not being required even though it should. -or- I changed the password but the old password is still active. -or- My config.php password is not over-riding my farmconfig.php password.%0aA: It could happen if (farm)config.php, or an included recipe, directly calls the functions CondAuth(), or RetrieveAuthPage(), PageTextVar(), PageVar() and possibly others, before defining all passwords and before including AuthUser (if required). %0a%0aThe [[PmWiki/LocalCustomizations#configphp-order|order of config.php]] is very significant. +time=1263429745 Index: wikilib.d/PmWiki.PageDirectives =================================================================== --- wikilib.d/PmWiki.PageDirectives (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.PageDirectives (.../pmwiki-2.2.9) (revision 2460) @@ -1,13 +1,13 @@ -version=pmwiki-2.2.7 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.223.16 Safari/532.3 -author=simon +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 +author=Petko charset=ISO-8859-1 -csum=(:messages:) +csum=see also $EnablePageTitlePriority description=PmWiki Page Directives -host=203.97.214.12 +host=81.65.12.233 keywords=description, keywords, markup, header, redirect name=PmWiki.PageDirectives -rev=79 +rev=80 targets=PmWiki.Uploads,PmWiki.LayoutVariables,PmWiki.GroupHeaders,PmWiki.Skins,PmWiki.Links,PmWiki.IncludeOtherPages -text=(:description PmWiki Page Directives:)(:Summary: Directives to specify page titles, descriptions, keywords, and display:)(:Keywords description, keywords, markup, header, redirect:)%0aPmWiki uses a number of directives to specify page titles, descriptions, page keywords, and control the display of various components.%0aKeywords are not case sensitive.%0a%0a[[#attachlist]]%0a:[@(:attachlist:)@]:%0a->Shows a list of attachments of the current group or page, depending on whether attachments are organised per group or per page. The attachlist is displayed at the foot of the [[uploads]] page form.%0a->The parameter to [=(:attachlist:)=] always resolves to a pagename. The directive then displays all of the attachments currently available for that page.%0a%0a::Options: [@(:attachlist NAME:)@] shows a list of attachments of the group or page NAME. %0a-->[@(:attachlist ext=xxx:)@] specifies an extension for filtering by type of file. %0a-->[@(:attachlist *:)@] shows the uploads directory and permits browsing of all uploaded files by directory (''will not work if $EnableDirectDownload is set to 0'').%0a%0a[[#description]]%0a:[@(:description text:)@]:Descriptive text associated with the page. (Generates a [@%3cmeta name='description' content='...' />@] element in the page output.)%0a%0a[[#keywords]]%0a:[@(:keywords word1, word2, ...:)@]:Identifies keywords associated with the page. These are not displayed anywhere, but are useful to help search engines locate the page. (Essentially, this generates a [@%3cmeta name='keywords' content='...' />@] element in the output.)%0a%0a[[#linebreaks]]%0a:[@(:linebreaks:)@], [@(:nolinebreaks:)@]: Honors any newlines in the markup; i.e., text entered on separate lines in the markup will appear as separate lines in the output. Use [@(:nolinebreaks:)@] to cause text lines to automatically join again.%0a%0a[[#linkwikiwords]]%0a:[@(:linkwikiwords:), (:nolinkwikiwords:)@]: Enables/disables WikiWord links in text.%0a%0a[[#markup]]%0a:[@(:markup:) ... (:markupend:)@] or [@(:markup:)@][@[=...=]@]: Can be used for markup examples, showing first the markup and then the result of the markup. %0a%0a::Options: [@(:markup class=horiz:)@] will show the markup side by side instead of one upon the other.%0a-->[@(:markup caption='...':)@] adds a caption to the markup example.%0a-->[@(:markupend:)@] is not required when using [@(:markup:)@] [@[=...=]@].%0a%0a->''Note'' that the placement of newlines is very important for this markup. If you are using the [@[=...=]@] option then the opening [@[=@] MUST occur on the same line as the [@(:markup:)@]. If you are using the full [@(:markup:) ... (:markupend:)@] form then your markup code must appear AFTER a newline after the initial [@(:markup:)@].%0a%0a[[#message]]%0a:[@(:messages:)@]: Displays [[PmWiki/LayoutVariables#MessagesFmt|messages]] from PmWiki or recipes, for instance from editing pages.%0a%0a%0a[[#noaction]]%0a:[@(:noaction:)@]: Turns off the section of the skin marked by %3c!--PageActionFmt--> thru %3c!--/PageActionFmt-->. In the pmwiki skin, this turns off the display of the actions at the top-right of the page (other skins may locate the actions in other locations).%0a%0a[[#nogroupheader]]%0a:[@(:nogroupheader:)@]:%0a:[@(:nogroupfooter:)@]: Turns off any groupheader or groupfooter for the page. (See [[GroupHeaders]].)%0a%0a[[#noheader]]%0a:[@(:noheader:), (:nofooter:)@]: %0a:[@(:noleft:), (:noright:), (:notitle:)@]: If supported by the [[skin(s)]], each of these turns off the corresponding portion of the page.%0a%0a[[#redirect]]%0a:[@(:redirect PageName:)@]: Redirects to another wiki page.%0a:[@(:redirect PageName#anchor:)@]: Redirects to an [[PmWiki/Links#anchors|anchor]] within a page%0a:[@(:redirect PageName status=301 from=name quiet=1:)@]:Redirects the browser to another page, along with a redirect message. For security reasons this only redirects to other pages within the wiki and does not redirect to external urls. The [@status=@] option can be used to return a different HTTP status code as part of the redirect. The [@from=@] option limits redirects to occuring only on pages matching the wildcarded ''name'' (helpful when [@(:redirect:)@] is in [[include other pages|another page]]). The [@quiet=1@] option allows the target page not to display a link back to the original page ($EnableRedirectQuiet variable should be set to 1).%0a%0a[[#spacewikiwords]]%0a:[@(:spacewikiwords:), (:nospacewikiwords:)@]:%0a->Enables/disables automatic spacing of WikiWords in text.%0a%0a[[#title]]%0a:[@(:title text:)@]: Sets a page's title to be something other than the page's name. The title text can contain apostrophes and other special characters. If there are multiple titles in a page, the last one encountered wins.%0a%0a[[#nl]]%0a:[@(:nl:)@]:Creates a new line if there isn't one already there. See [[http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/15031/focus=15079 | this thread]] for more info.%0a: : Similar to [@[[%3c%3c]]@]%0a%0a%0a%0a>>faq%3c%3c [[#faq]]%0aQ: Can I get [@(:redirect:)@] to return a "moved permanently" (HTTP 301) status code?%0aA: Use [@(:redirect PageName status=301:)@].%0a%0aQ: Is there any way to prevent the "redirected from" message from showing at the top of the target page when I use [@(:redirect:)@]?%0aA: From version 2.2.1 on, set in config.php @@$EnableRedirectQuiet=1;@@ and in the page @@[=(:redirect OtherPage quiet=1:)=]@@ for a quiet redirect.%0a%0aQ: Is there any method for redirecting to the equivalent page in a different group, i.e. from BadGroup/thispage => GoodGroup/thispage using similar markup to (:redirect Goodgroup.{Name}:)?%0aA:%0a->[=(:redirect Goodgroup.{$Name}:)=] works if you want to put it in one page. %0a%0a->If you want it to work for the entire group, put [=(:redirect Goodgroup.{*$Name}:)=] into Badgroup.GroupHeader - however, that only works with pages that really exist in Goodgroup; if you visit a page in Badgroup without a corresponding page of the same name in Goodgroup, instead of being redirected to a nonexistant page, you get the redirect Directive at the top of the page.%0a%0a->With [=(:if exists Goodgroup.{*$Name}:)(:redirect Goodgroup.{*$Name}:)(:ifend:)=] in Badgroup.GroupHeader you get redirected to Goodgroup.Name if it exists, otherwise you get Badgroup.Name without the bit of code displayed. -time=1258098418 +text=(:description PmWiki Page Directives:)(:Summary: Directives to specify page titles, descriptions, keywords, and display:)(:Keywords description, keywords, markup, header, redirect:)%0aPmWiki uses a number of directives to specify page titles, descriptions, page keywords, and control the display of various components.%0aKeywords are not case sensitive.%0a%0a[[#attachlist]]%0a:[@(:attachlist:)@]:%0a->Shows a list of attachments of the current group or page, depending on whether attachments are organised per group or per page. The attachlist is displayed at the foot of the [[uploads]] page form.%0a->The parameter to [=(:attachlist:)=] always resolves to a pagename. The directive then displays all of the attachments currently available for that page.%0a%0a::Options: [@(:attachlist NAME:)@] shows a list of attachments of the group or page NAME. %0a-->[@(:attachlist ext=xxx:)@] specifies an extension for filtering by type of file. %0a-->[@(:attachlist *:)@] shows the uploads directory and permits browsing of all uploaded files by directory (''will not work if $EnableDirectDownload is set to 0'').%0a%0a[[#description]]%0a:[@(:description text:)@]:Descriptive text associated with the page. (Generates a [@%3cmeta name='description' content='...' />@] element in the page output.)%0a%0a[[#keywords]]%0a:[@(:keywords word1, word2, ...:)@]:Identifies keywords associated with the page. These are not displayed anywhere, but are useful to help search engines locate the page. (Essentially, this generates a [@%3cmeta name='keywords' content='...' />@] element in the output.)%0a%0a[[#linebreaks]]%0a:[@(:linebreaks:)@], [@(:nolinebreaks:)@]: Honors any newlines in the markup; i.e., text entered on separate lines in the markup will appear as separate lines in the output. Use [@(:nolinebreaks:)@] to cause text lines to automatically join again.%0a%0a[[#linkwikiwords]]%0a:[@(:linkwikiwords:), (:nolinkwikiwords:)@]: Enables/disables WikiWord links in text.%0a%0a[[#markup]]%0a:[@(:markup:) ... (:markupend:)@] or [@(:markup:)@][@[=...=]@]: Can be used for markup examples, showing first the markup and then the result of the markup. %0a%0a::Options: [@(:markup class=horiz:)@] will show the markup side by side instead of one upon the other.%0a-->[@(:markup caption='...':)@] adds a caption to the markup example.%0a-->[@(:markupend:)@] is not required when using [@(:markup:)@] [@[=...=]@].%0a%0a->''Note'' that the placement of newlines is very important for this markup. If you are using the [@[=...=]@] option then the opening [@[=@] MUST occur on the same line as the [@(:markup:)@]. If you are using the full [@(:markup:) ... (:markupend:)@] form then your markup code must appear AFTER a newline after the initial [@(:markup:)@].%0a%0a[[#message]]%0a:[@(:messages:)@]: Displays [[PmWiki/LayoutVariables#MessagesFmt|messages]] from PmWiki or recipes, for instance from editing pages.%0a%0a%0a[[#noaction]]%0a:[@(:noaction:)@]: Turns off the section of the skin marked by %3c!--PageActionFmt--> thru %3c!--/PageActionFmt-->. In the pmwiki skin, this turns off the display of the actions at the top-right of the page (other skins may locate the actions in other locations).%0a%0a[[#nogroupheader]]%0a:[@(:nogroupheader:)@]:%0a:[@(:nogroupfooter:)@]: Turns off any groupheader or groupfooter for the page. (See [[GroupHeaders]].)%0a%0a[[#noheader]]%0a:[@(:noheader:), (:nofooter:)@]: %0a:[@(:noleft:), (:noright:), (:notitle:)@]: If supported by the [[skin(s)]], each of these turns off the corresponding portion of the page.%0a%0a[[#redirect]]%0a:[@(:redirect PageName:)@]: Redirects to another wiki page.%0a:[@(:redirect PageName#anchor:)@]: Redirects to an [[PmWiki/Links#anchors|anchor]] within a page%0a:[@(:redirect PageName status=301 from=name quiet=1:)@]:Redirects the browser to another page, along with a redirect message. For security reasons this only redirects to other pages within the wiki and does not redirect to external urls. The [@status=@] option can be used to return a different HTTP status code as part of the redirect. The [@from=@] option limits redirects to occuring only on pages matching the wildcarded ''name'' (helpful when [@(:redirect:)@] is in [[include other pages|another page]]). The [@quiet=1@] option allows the target page not to display a link back to the original page ($EnableRedirectQuiet variable should be set to 1).%0a%0a[[#spacewikiwords]]%0a:[@(:spacewikiwords:), (:nospacewikiwords:)@]:%0a->Enables/disables automatic spacing of WikiWords in text.%0a%0a[[#title]]%0a:[@(:title text:)@]: Sets a page's title to be something other than the page's name. The title text can contain apostrophes and other special characters. If there are multiple titles in a page, the last one encountered wins (see also $EnablePageTitlePriority about how to change it).%0a%0a[[#nl]]%0a:[@(:nl:)@]:Creates a new line if there isn't one already there. See [[http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/15031/focus=15079 | this thread]] for more info.%0a: : Similar to [@[[%3c%3c]]@]%0a%0a%0a%0a>>faq%3c%3c [[#faq]]%0aQ: Can I get [@(:redirect:)@] to return a "moved permanently" (HTTP 301) status code?%0aA: Use [@(:redirect PageName status=301:)@].%0a%0aQ: Is there any way to prevent the "redirected from" message from showing at the top of the target page when I use [@(:redirect:)@]?%0aA: From version 2.2.1 on, set in config.php @@$EnableRedirectQuiet=1;@@ and in the page @@[=(:redirect OtherPage quiet=1:)=]@@ for a quiet redirect.%0a%0aQ: Is there any method for redirecting to the equivalent page in a different group, i.e. from BadGroup/thispage => GoodGroup/thispage using similar markup to (:redirect Goodgroup.{Name}:)?%0aA:%0a->[=(:redirect Goodgroup.{$Name}:)=] works if you want to put it in one page. %0a%0a->If you want it to work for the entire group, put [=(:redirect Goodgroup.{*$Name}:)=] into Badgroup.GroupHeader - however, that only works with pages that really exist in Goodgroup; if you visit a page in Badgroup without a corresponding page of the same name in Goodgroup, instead of being redirected to a nonexistant page, you get the redirect Directive at the top of the page.%0a%0a->With [=(:if exists Goodgroup.{*$Name}:)(:redirect Goodgroup.{*$Name}:)(:ifend:)=] in Badgroup.GroupHeader you get redirected to Goodgroup.Name if it exists, otherwise you get Badgroup.Name without the bit of code displayed. +time=1263764403 Index: wikilib.d/PmWiki.LayoutVariables =================================================================== --- wikilib.d/PmWiki.LayoutVariables (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.LayoutVariables (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.5 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) -author=DaveG +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 +author=Petko charset=ISO-8859-1 -csum=Added definitions for GroupPrintHeaderFmt/FooterFmt -host=173.72.59.202 +csum= +host=81.65.12.233 name=PmWiki.LayoutVariables -rev=92 -targets=PmWiki.SkinTemplates,PmWiki.WikiGroup,PmWiki.CustomWikiStyles,PmWiki.Tables,PmWiki.EditVariables -text=(:Summary:variables that control page layout:)%0a%0aVariable substitutions in the skin template are all managed by the `FmtPageName() function from pmwiki.php. Pmwiki variable substitutions available on pages are managed by the {$var} substitutions from stdmarkup.php or superseded in local/config files. %0a%0a:$ActionSkin:This array is used to override the current skin when performing a given action. The most common use is to set @@$ActionSkin['print']='foo'@@ to use the 'foo' skin when printing, regardless of what the @@$Skin@@ variable is set to.%0a%0a:$WikiTitle:A variable which contains the Wiki title as displayed by the browser%0a%0a:$HTMLStylesFmt:An array of CSS statements to be included in the page's output along with other HTML headers. This array provides an easy place for scripts to add custom CSS statements.%0a%0a:$HTMLHeaderFmt:An array of HTML text to be included in the page's %3chead> section, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLHeader-->@] directive. This array provides an easy place for scripts to add custom HTML headers.%0a%0a->For example, if you want to specify a logo for all the pages of your wiki (a png image for Firefox (and others...), an ico for Internet Explorer):%0a-->[@ %0a$HTMLHeaderFmt['logo'] =%0a '%3clink href="http://path/to/logo.png" type="image/png" rel="icon" />%0a %3clink href="http://path/to/logo.ico" type="image/x-icon" rel="shortcut icon" />';%0a@]%0a%0a->Another example, if you want to get the rss notification on some browsers (the rss icon in firefox for instance):%0a-->[@ %0a$HTMLHeaderFmt['rss'] =%0a '%3clink rel="alternate" type="application/rss+xml" title="Rss All recent Changes" %0a href="$ScriptUrl/Site/AllRecentChanges?action=rss" />';%0a@]%0a%0a:$HTMLFooterFmt:Like $HTMLHeaderFmt above, this contains an array of HTML text to be included near the end of an HTML document, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLFooter-->@] directive (usually just before a closing %3c/body> tag). Primarily used by scripts to add custom HTML output after the body of the page output. %0a%0a:$MetaRobots:Sets the value of the [@%3cmeta name='robots' ... />@] tag generated by PmWiki to control search engine robots accessing the site. PmWiki's default setting tells robots to not index anything but the normal page view, and to not index pages in the PmWiki [[wiki group]]. Explicitly setting $MetaRobots overrides this default.%0a # never index this site%0a $MetaRobots = 'noindex,nofollow';%0a # disable the robots tag entirely%0a $MetaRobots = '';%0a%0a:$MessagesFmt:An array of HTML text to be displayed at the point of any [@(:messages:)@] markup. Commonly used for displaying messages with respect to editing pages.%0a%0a:$RecentChangesFmt:An array specifying the format of the RecentChanges listing.%0a%0a->The format can be specified in your config.php using the following:%0a-->[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = %0a '* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$RecentChangesFmt['$Group.RecentChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a@]%0a%0a->Note that changes made to the format will only affect new edits. In other words, you will need to edit a page for your new format to be visible. Note also that you need to have two spaces between the page name and the other information about the edit.%0a%0a->Also note that this variable has other uses, such as not reporting at all to RecentChanges and AllRecentChanges as found here [[PmWiki:Questions|PmWiki Questions]].%0a%0a:$RecentUploadsFmt:An array specifying the format for uploaded files at the RecentChanges listing. It is similar to $RecentChangesFmt. If enabled, newly uploaded files will be logged to the RecentChanges pages. Default is disabled. See Cookbook:RecentUploadsLog for more information.%0a%0a:$DraftRecentChangesFmt:An array specifying the format of the RecentChanges listing when saving Draft pages.%0a%0a->$RecentChangesFmt is set to $DraftRecentChangesFmt when a Draft page is saved. For example, you could save drafts in a separate Recent Draft Changes page and not list in the normal group's Recent Changes page:%0a-->[@%0a$DraftRecentChangesFmt['$Group.RecentDraftChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$DraftRecentChangesFmt['$Group.RecentChanges'] = '';%0a@]%0a%0a:$RCLinesMax:The maximum number of lines to be stored in RecentChanges pages. The default is zero, meaning "no limit".%0a $RCLinesMax = 1000; # maintain at most 1000 recent changes%0a%0a:$PageRedirectFmt:The text to be used when a page is redirected via the [@(:redirect:)@] markup.%0a-->[@%0a$PageRedirectFmt = '%3cp>%3ci>redirected from $FullName%3c/p>';%0a$PageRedirectFmt = '';%0a@]%0a->For display options, see also the FAQ on [[(PmWiki:)PageDirectives(#faq)]].%0a%0a:$WikiStyle:An array which contains the predefined WikiStyles which can be used on a textpage.[[%3c%3c]]See: [[PmWiki.CustomWikiStyles]]%0a%0a:$MaxIncludes:Controls the number of times that pages can be included via the [@(:include:)@] and other directives, used to control recursion and otherwise pose a sanity check on page contents. $MaxIncludes defaults to 50, but can be set to any value by the wiki administrator.%0a $MaxIncludes = 50; # default%0a $MaxIncludes = 1000; # allow lots of includes%0a $MaxIncludes = 0; # turn off includes%0a%0a:$[=Skin=]:Lists the name(s) of skins to load, unless overridden by $ActionSkin. Normally $Skin contains a single string which is a the name of a skin directory, but it may also be an array of names, in which case the first skin found from the list is used.%0a%0a:$SkinDirUrl:Set by ''scripts/skins.php'' to be the base url of the current skin's directory (i.e., within a 'pub/skins/' directory). This variable is typically used inside of a skin .tmpl file to provide access to .css files and graphic images associated with the skin.%0a%0a:$SkinLibDirs:An array which, given the filesystem path (array key) to a skin (or a directory containing several skins), provides the corresponding URL (array value).%0a%0a->The array key is the directory containing the skin.tmpl and skin.php files, as seen by the PmWiki program. It does not have to be publicly accessible.%0a%0a-> The value is the URL (web address) of the directory containing the .css, .gif, and other files which appear in the HTML code sent by PMWiki to the browser. This directory must be publicly accessible.%0a%0a->By default $SkinLibDirs is set to:\\%0a[@%0a$SkinLibDirs = array(%0a "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a->Extra details: When PMWiki is searching for a skin it looks for a directory named for the skin in the array index/keys, and if it finds it then it will use the files in that directory and also the files in the matching array value url. The two sides normally point to the same publicly accessible directory, but they do not have to.%0a%0a:$PageLogoUrl: is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually).%0a%0a:$EnablePathInfo:Changes the handling of the page URL. When set to @@1@@ page URL will be @@...wiki.php/Main/Main@@, when set to @@0@@ (default) it will be @@...wiki.php?n=Main.Main@@.%0a%0a:$EnableFixedUrlRedirect:When PmWiki is given a partial page name (e.g., just the name of a WikiGroup), it uses $PagePathFmt in order to make a complete page name from the partial one, then issues a "redirect" to the browser to tell it to reload the page with the correct full page name. Setting $EnableFixedUrlRedirect=0; blocks the redirect, so that PmWiki continues processing with the adjusted page name rather than issuing the redirect. %0a%0a:$GroupHeaderFmt:Defines the markup placed at the top of every page. Default value is:%0a [@$GroupHeaderFmt = '(:include $Group.GroupHeader:)(:nl:)';@]%0a%0a:$GroupPrintHeaderFmt:Defines the markup placed at the top of every page when [@action=print@]. Default value is:%0a [@SDV($GroupPrintHeaderFmt,'(:include $Group.GroupPrintHeader:)(:nl:)');@]%0a%0a:$GroupFooterFmt:Defines the markup placed at the bottom of every page. Default value is:%0a [@$GroupFooterFmt = '(:include $Group.GroupFooter:)(:nl:)';@]%0a%0a:$GroupPrintFooterFmt:Defines the markup placed at the bottom of every page when [@action=print@]. Default value is:%0a [@SDV($GroupPrintFooterFmt,'(:nl:)(:include $Group.GroupPrintFooter:)');@]%0a%0a:$PageNotFoundHeaderFmt:Specifies the HTTP header to send when attempting to browse a page that doesn't exist. Some webserver packages (notably Microsoft's "Personal Web Server") require that this variable be changed in order to work.%0a%0a-->[@%0a# default%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found';%0a# return all pages as found%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';%0a@]%0a%0a->Beware when expecting to return the content of a Group(header|footer) for an non existent page! By default PmWiki returns 404 (because the page does not exist), despite there is some content to show. Firefox shows the content, while Internet Explorer displays its default 404 page. $PageNotFoundHeaderFmt MUST be set to return 200 as described above in order to get the expected behaviour with all browsers.%0a%0a:$HTMLVSpace:Setting [@$HTMLVSpace = '';@] in a local customizationfile (e.g., [@local/config.php@]) prevents insertion of spacer paragraphs ([@%3cp class='vspace'>%3c/p>@]) in generated HTML code. To limit this change to a single skin, place the [@$HTMLVSpace = '';@] statement in a skin.php file, preceded by the statement [@global $HTMLVSpace;@].%0a%0a:$TableCellAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctd>@@ or @@%3cth>@@ cell in the output. Can contain references to $TableCellCount which holds the horizontal column number of the current cell.%0a%0a:$TableRowAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctr>@@ element in the output. Can contain references to $TableRowCount to give the absolute row number within the table, or $TableRowIndex to provide a repeating row index from 1 to $TableRowIndexMax.%0a # Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )%0a $TableRowAttrFmt = "class='tr\$TableRowCount'";%0a # Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )%0a $TableRowIndexMax = 2;%0a $TableRowAttrFmt = "class='ti\$TableRowIndex'";%0a%0a:$TableRowIndexMax:The maximum value for $TableRowIndex in [[Tables]].%0a # Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...%0a $TableRowIndexMax = 3;%0a %0a:$FmtV['$TableCellCount']:PMWiki internal variable - Horizontal column number of the current cell. For use in $TableCellAttrFmt and $TableRowAttrFmt. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a [@Example: $TableCellAttrFmt = 'class=col\$TableCellCount';@] %0a%0a:$FmtV['$TableRowCount']:PMWiki internal variable - Current row number. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a [@Example: TableRowAttrFmt = "class='row\$TableRowCount'";@] %0a%0a:$FmtV['$TableRowIndex']:PMWiki internal variable - Row index number derived from $TableRowIndexMax. (1,2,3,1,2,3,...). Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a [@Example: $TableRowAttrFmt = "class='ind\$TableRowIndex'";@]%0a%0aSee also: [[Edit Variables]] -time=1253459368 +rev=99 +targets=PmWiki.PageDirectives,PmWiki.SkinTemplates,PmWiki.WikiGroup,PmWiki.Questions,Cookbook.RecentUploadsLog,PmWiki.CustomWikiStyles,PmWiki.Tables,PmWiki.EditVariables +text=(:Summary:variables that control page layout:)%0aVariable substitutions in the skin template are all managed by the `FmtPageName() function from pmwiki.php. Pmwiki variable substitutions available on pages are managed by the {$var} substitutions from stdmarkup.php or superseded in local/config files. %0a%0a:$ActionSkin:This array is used to override the current skin when performing a given action. The most common use is to set @@$ActionSkin['print']='foo'@@ to use the 'foo' skin when printing, regardless of what the @@$Skin@@ variable is set to.%0a%0a:$WikiTitle:A variable which contains the Wiki title as displayed by the browser%0a%0a:$EnablePageTitlePriority:A variable defining how to treat multiple @@ [=(:title ...:)=] @@ [[page directives]] (added in PmWiki 2.2.9).%0a: : @@$EnablePageTitlePriority = 0;@@ # PmWiki default, last encountered title wins (the title may be changed from included pages or GroupFooter).%0a: : @@$EnablePageTitlePriority = 1;@@ # First title wins; if a title is defined in the page, directives from included pages cannot change it.%0a%0a:$HTMLStylesFmt:An array of CSS statements to be included in the page's output along with other HTML headers. This array provides an easy place for scripts to add custom CSS statements.%0a%0a:$HTMLHeaderFmt:An array of HTML text to be included in the page's %3chead> section, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLHeader-->@] directive. This array provides an easy place for scripts to add custom HTML headers.%0a%0a->For example, if you want to specify a logo for all the pages of your wiki (a png image for Firefox (and others...), an ico for Internet Explorer):%0a-->[@ %0a$HTMLHeaderFmt['logo'] =%0a '%3clink href="http://path/to/logo.png" type="image/png" rel="icon" />%0a %3clink href="http://path/to/logo.ico" type="image/x-icon" rel="shortcut icon" />';%0a@]%0a%0a->Another example, if you want to get the rss notification on some browsers (the rss icon in firefox for instance):%0a-->[@ %0a$HTMLHeaderFmt['rss'] =%0a '%3clink rel="alternate" type="application/rss+xml" title="Rss All recent Changes" %0a href="$ScriptUrl/Site/AllRecentChanges?action=rss" />';%0a@]%0a%0a:$HTMLFooterFmt:Like $HTMLHeaderFmt above, this contains an array of HTML text to be included near the end of an HTML document, at the point where the [[skin template(s)]] specifies a [@%3c!--HTMLFooter-->@] directive (usually just before a closing %3c/body> tag). Primarily used by scripts to add custom HTML output after the body of the page output. %0a%0a:$MetaRobots:Sets the value of the [@%3cmeta name='robots' ... />@] tag generated by PmWiki to control search engine robots accessing the site. PmWiki's default setting tells robots to not index anything but the normal page view, and to not index pages in the PmWiki [[wiki group]]. Explicitly setting $MetaRobots overrides this default.%0a # never index this site%0a $MetaRobots = 'noindex,nofollow';%0a # disable the robots tag entirely%0a $MetaRobots = '';%0a%0a:$MessagesFmt:An array of HTML text to be displayed at the point of any [@(:messages:)@] markup. Commonly used for displaying messages with respect to editing pages.%0a%0a:$RecentChangesFmt:An array specifying the format of the RecentChanges listing.%0a%0a->The key of the array specifies the page where changes will be logged, as in%0a-->[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges']%0a@]%0a->The value of the array specifies the format in which the changes will be logged, as in%0a-->[@%0a'* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'%0a@]%0a->Note the two consecutive spaces before the three dots (@@. . .@@). The two spaces separate two parts of the format: the first part doesn't change (e.g. a link to the changed page) and the second part does change (e.g. the date and author of the change). Upon saving a page, PmWiki removes a line that matches the first part and adds a line with the current format before the first line with 2 spaces. This way, any line without two consecutive spaces stays at the top of the recent changes page.%0a%0a->You can use and adapt the following to change the format (put it in config.php):%0a-->[@%0a$RecentChangesFmt['$SiteGroup.AllRecentChanges'] = %0a '* [[{$Group}.{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$RecentChangesFmt['$Group.RecentChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a@]%0a%0a->Note that changes made to the format will only affect new edits. In other words, you will need to edit a page for your new format to be visible. Note also that you need to have two spaces between the page name and the other information about the edit.%0a%0a->Also note that this variable has other uses, such as not reporting at all to RecentChanges and AllRecentChanges as found here [[PmWiki:Questions|PmWiki Questions]].%0a%0a:$RecentUploadsFmt:An array specifying the format for uploaded files at the RecentChanges listing. It is similar to $RecentChangesFmt. If enabled, newly uploaded files will be logged to the RecentChanges pages. Default is disabled. See Cookbook:RecentUploadsLog for more information.%0a%0a:$DraftRecentChangesFmt:An array specifying the format of the RecentChanges listing when saving Draft pages.%0a%0a->$RecentChangesFmt is set to $DraftRecentChangesFmt when a Draft page is saved. For example, you could save drafts in a separate Recent Draft Changes page and not list in the normal group's Recent Changes page:%0a-->[@%0a$DraftRecentChangesFmt['$Group.RecentDraftChanges'] =%0a '* [[{$Group}/{$Name}]] . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';%0a$DraftRecentChangesFmt['$Group.RecentChanges'] = '';%0a@]%0a%0a:$RCLinesMax:The maximum number of lines to be stored in RecentChanges pages. The default is zero, meaning "no limit".%0a $RCLinesMax = 1000; # maintain at most 1000 recent changes%0a%0a:$PageRedirectFmt:The text to be used when a page is redirected via the [@(:redirect:)@] markup.%0a-->[@%0a$PageRedirectFmt = '%3cp>%3ci>redirected from $FullName%3c/p>';%0a$PageRedirectFmt = '';%0a@]%0a->For display options, see also the FAQ on [[(PmWiki:)PageDirectives(#faq)]].%0a%0a:$WikiStyle:An array which contains the predefined WikiStyles which can be used on a textpage.[[%3c%3c]]See: [[PmWiki.CustomWikiStyles]]%0a%0a:$MaxIncludes:Controls the number of times that pages can be included via the [@(:include:)@] and other directives, used to control recursion and otherwise pose a sanity check on page contents. $MaxIncludes defaults to 50, but can be set to any value by the wiki administrator.%0a $MaxIncludes = 50; # default%0a $MaxIncludes = 1000; # allow lots of includes%0a $MaxIncludes = 0; # turn off includes%0a%0a:$[=Skin=]:Lists the name(s) of skins to load, unless overridden by $ActionSkin. Normally $Skin contains a single string which is a the name of a skin directory, but it may also be an array of names, in which case the first skin found from the list is used.%0a%0a:$SkinDirUrl:Set by ''scripts/skins.php'' to be the base url of the current skin's directory (i.e., within a 'pub/skins/' directory). This variable is typically used inside of a skin .tmpl file to provide access to .css files and graphic images associated with the skin.%0a%0a:$SkinLibDirs:An array which, given the filesystem path (array key) to a skin (or a directory containing several skins), provides the corresponding URL (array value).%0a%0a->The array key is the directory containing the skin.tmpl and skin.php files, as seen by the PmWiki program. It does not have to be publicly accessible.%0a%0a-> The value is the URL (web address) of the directory containing the .css, .gif, and other files which appear in the HTML code sent by PMWiki to the browser. This directory must be publicly accessible.%0a%0a->By default $SkinLibDirs is set to:\\%0a[@%0a$SkinLibDirs = array(%0a "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a->Extra details: When PMWiki is searching for a skin it looks for a directory named for the skin in the array index/keys, and if it finds it then it will use the files in that directory and also the files in the matching array value url. The two sides normally point to the same publicly accessible directory, but they do not have to.%0a%0a:$PageLogoUrl: is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually).%0a%0a:$EnablePathInfo:Changes the handling of the page URL. When set to @@1@@ page URL will be @@...wiki.php/Main/Main@@, when set to @@0@@ (default) it will be @@...wiki.php?n=Main.Main@@.%0a%0a:$EnableFixedUrlRedirect:When PmWiki is given a partial page name (e.g., just the name of a WikiGroup), it uses $PagePathFmt in order to make a complete page name from the partial one, then issues a "redirect" to the browser to tell it to reload the page with the correct full page name. Setting $EnableFixedUrlRedirect=0; blocks the redirect, so that PmWiki continues processing with the adjusted page name rather than issuing the redirect. %0a%0a:$GroupHeaderFmt:Defines the markup placed at the top of every page. Default value is:%0a [@$GroupHeaderFmt = '(:include $Group.GroupHeader:)(:nl:)';@]%0a%0a:$GroupPrintHeaderFmt:Defines the markup placed at the top of every page when [@action=print@]. Default value is:%0a [@SDV($GroupPrintHeaderFmt,'(:include $Group.GroupPrintHeader:)(:nl:)');@]%0a%0a:$GroupFooterFmt:Defines the markup placed at the bottom of every page. Default value is:%0a [@$GroupFooterFmt = '(:include $Group.GroupFooter:)(:nl:)';@]%0a%0a:$GroupPrintFooterFmt:Defines the markup placed at the bottom of every page when [@action=print@]. Default value is:%0a [@SDV($GroupPrintFooterFmt,'(:nl:)(:include $Group.GroupPrintFooter:)');@]%0a%0a:$PageNotFoundHeaderFmt:Specifies the HTTP header to send when attempting to browse a page that doesn't exist. Some webserver packages (notably Microsoft's "Personal Web Server") require that this variable be changed in order to work.%0a%0a-->[@%0a# default%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found';%0a# return all pages as found%0a$PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';%0a@]%0a%0a->Beware when expecting to return the content of a Group(header|footer) for an non existent page! By default PmWiki returns 404 (because the page does not exist), despite there is some content to show. Firefox shows the content, while Internet Explorer displays its default 404 page. $PageNotFoundHeaderFmt MUST be set to return 200 as described above in order to get the expected behaviour with all browsers.%0a%0a:$HTMLVSpace:Setting [@$HTMLVSpace = '';@] in a local customizationfile (e.g., [@local/config.php@]) prevents insertion of spacer paragraphs ([@%3cp class='vspace'>%3c/p>@]) in generated HTML code. To limit this change to a single skin, place the [@$HTMLVSpace = '';@] statement in a skin.php file, preceded by the statement [@global $HTMLVSpace;@].%0a%0a:$TableCellAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctd>@@ or @@%3cth>@@ cell in the output. Can contain references to $TableCellCount which holds the horizontal column number of the current cell.%0a%0a:$TableRowAttrFmt:For [[Tables]], defines the HTML attributes given to each @@%3ctr>@@ element in the output. Can contain references to $TableRowCount to give the absolute row number within the table, or $TableRowIndex to provide a repeating row index from 1 to $TableRowIndexMax.%0a # Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )%0a $TableRowAttrFmt = "class='tr\$TableRowCount'";%0a # Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )%0a $TableRowIndexMax = 2;%0a $TableRowAttrFmt = "class='ti\$TableRowIndex'";%0a%0a:$TableRowIndexMax:The maximum value for $TableRowIndex in [[Tables]].%0a # Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...%0a $TableRowIndexMax = 3;%0a %0a:$FmtV['$TableCellCount']:PMWiki internal variable - Horizontal column number of the current cell. For use in $TableCellAttrFmt and $TableRowAttrFmt. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a [@Example: $TableCellAttrFmt = 'class=col\$TableCellCount';@] %0a%0a:$FmtV['$TableRowCount']:PMWiki internal variable - Current row number. Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a [@Example: TableRowAttrFmt = "class='row\$TableRowCount'";@] %0a%0a:$FmtV['$TableRowIndex']:PMWiki internal variable - Row index number derived from $TableRowIndexMax. (1,2,3,1,2,3,...). Administrators can use in $TableCellAttrFmt and/or $TableRowAttrFmt.%0a [@Example: $TableRowAttrFmt = "class='ind\$TableRowIndex'";@]%0a%0aSee also: [[Edit Variables]]%0a +time=1263764511 Index: wikilib.d/PmWiki.Security =================================================================== --- wikilib.d/PmWiki.Security (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.Security (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.4 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.6 Safari/532.0 -author=simon +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.4 +author=Petko charset=ISO-8859-1 -csum=use DeObMail -host=203.97.214.12 +csum=fix error in preg_match +host=77.195.128.219 name=PmWiki.Security -rev=80 +rev=81 targets=PmWiki.Passwords,PmWiki.PasswordsAdmin,PmWiki.UrlApprovals,PmWiki.AnalyzeResults,PmWiki.Blocklist,PmWiki.Notify,PmWiki.SecurityVariables,PmWiki.DeletingPages,PmWiki.AvailableActions,Site.AuthForm,Profiles.HomePage,PmWiki.Drafts,PmWiki.Uploads,PmWiki.UploadsAdmin -text=(:Summary: Resources for securing your PmWiki installation:)%0aAspects of PmWiki security are found on the following pages:%0a%0aPages distributed in a PmWiki release:%0a* [[PmWiki/Passwords]] {PmWiki/Passwords$:Summary}%0a* [[PmWiki/Passwords Admin]] {PmWiki/PasswordsAdmin$:Summary}%0a* [[PmWiki/Url Approvals]] {PmWiki/UrlApprovals$:Summary}%0a* [[(PmWiki:)Site Analyzer]] {PmWiki/SiteAnalyzer$:Summary}%0a* [[PmWiki/Blocklist]] {PmWiki/Blocklist$:Summary}%0a* [[PmWiki/Notify]] {PmWiki/Notify$:Summary}%0a* [[PmWiki/Security variables]] {PmWiki/SecurityVariables$:Summary}%0a%0a[[Cookbook(:/)]] Pages%0a%0a* [[Cookbook:Cookbook#Security | Cookbook index for Security recipes]]%0a* [[Cookbook:Secure attachments]] Protecting uploaded attachments%0a* [[Cookbook:Web server security]] Making the server more secure with .htaccess%0a* [[Cookbook:Farm security]] Making Farm installations secure%0a* [[Cookbook:DeObMail]] Hide e-mail address%0a* [[Cookbook:Protect email]] Obfusticate email addresses%0a* [[Cookbook:Audit images]] Check to see what images have been uploaded to your wiki.%0a* [[Cookbook:Private groups]] Create and secure private groups on a public wiki%0a* [[Cookbook:Only one login]] Only allow 1 login at the same time for a username%0a* [[Cookbook:Session guard]] Protects against Session Theft%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I report a possible security vulnerability of PmWiki?%0a%0aA: [[http://www.pmichaud.com|Pm]] wrote about this in [[http://pmichaud.com/pipermail/pmwiki-users/2006-September/031793.html | a post to pmwiki-users from September 2006]]. In a nutshell he differentiates two cases:%0a## The possible vulnerability isn't already known publicly: In this case please contact Pm by private mail.%0a## The possible vulnerability is already known publicly: In this case feel free to discuss the vulnerability in public (e.g. on [[http://www.pmichaud.com/mailman/listinfo/pmwiki-users | pmwiki-users]]).%0aSee [[http://pmichaud.com/pipermail/pmwiki-users/2006-September/031793.html | his post mentioned above]] for details and rationals.%0a%0aQ: What about the botnet security advisory at %25newwin%25[[http://isc.sans.org/diary.php?storyid=1672]]?%0a%0aA: Sites that are running with PHP's ''register_globals'' setting set to "On" and versions of PmWiki prior to 2.1.21 may be vulnerable to a botnet exploit that is taking advantage of a bug in PHP. The vulnerability can be closed by turning ''register_globals'' off, upgrading to PmWiki 2.1.21 or later, or upgrading to PHP versions 4.4.3 or 5.1.4. [[%3c%3c]]In addition, there is a test at [[PmWiki:SiteAnalyzer]] that can be used to determine if your site is vulnerable.%0a%0a[[#wikivandalism]]%0a!! Wiki Vandalism%0a:Assumptions: you are using a [[PmWiki/Blocklist]] and [[PmWiki/Url approvals]].%0a: :You don't want to resort to [[PmWiki/password(s)]] protecting the entire wiki, that's not the point after all.%0a: :Ideally these protections will be invoked in @@config.php@@%0a%0a%0aQ: How do I stop pages being [[PmWiki/DeletingPages|deleted]], eg password protect a page from deletion?%0aA: Use Cookbook:DeleteAction and password protect the page deletion [[(available) action(s)]] by adding [@$DefaultPasswords['delete'] = '*';@] to @@config.php@@ or password protect the action with @@$HandleAuth['delete'] = 'edit';@@%0a->or @@$HandleAuth['delete'] = 'admin';@@ to require the edit or admin password respectively.%0a%0aQ: How do I stop pages being replaced with an empty (all spaces) page?%0aA: Add [@block: /^\s*$/@] to your [[PmWiki/blocklist]].%0a%0aQ: how do I stop pages being completely replaced by an inane comment such as ''excellent site'', ''great information'', where the content cannot be blocked?%0aA: Try using the newer [[PmWiki/Blocklist#automaticblocklists | automatic blocklists]] that pull information and IP addresses about known wiki defacers.%0a%0aA: (OR) Try using [[Cookbook:Captchas]] or [[Cookbook:Captcha]] (note these are different).%0a%0aA: (OR) Set an edit password, but make it publicly available on the [[{$SiteGroup}.AuthForm]] template.%0a%0aQ: How do I password protect all common pages in all groups such as recent changes, search, group header, group footer, and so on?%0aA: Insert the following lines into your local/config.php file. Editing these pages then requires the admin password.%0a->[@%0a## Require admin password to edit RecentChanges (etc.) pages.%0aif ($action=='edit'%0a && preg_match('/\\.(Search|Group(Header|Footer)|(All)?RecentChanges)$/', $pagename))%0a { $DefaultPasswords['edit'] = crypt('secret phrase'); }%0a@]%0a%0aNote that all GroupAttributes pages are protected by the attr password.%0a%0a'''Alternative:''' you can require 'admin' authentication for these pages:%0a->[@%0a## Require admin password to edit RecentChanges (etc.) pages.%0aif ($action=='edit' %0a && preg_match('(Search|Group(Header|Footer)|(All)?RecentChanges)', $pagename))%0a { $HandleAuth['edit'] = 'admin'; }%0a@]%0a%0aQ: How do I password protect the creation of new groups?%0aA: See [[Cookbook:Limit Wiki Groups]] {Cookbook.LimitWikiGroups$:Summary}%0a%0aQ: How do I password protect the creation of new pages?%0aA: See [[Cookbook:Limit new pages in Wiki Groups]] {Cookbook.LimitNewPagesInWikiGroups$:Summary}%0a%0aQ: How do I take a whitelist approach where users from known or trusted IP addresses can edit, and others require a password?%0aA: Put these lines to local/config.php:%0a[@%0a## Allow passwordless editing from own turf, pass for others.%0aif ($action=='edit'%0a && !preg_match("^90.68.", $_SERVER['REMOTE_ADDR']) ) %0a { $DefaultPasswords['edit'] = crypt('foobar'); }%0a@]%0aReplace 90.68. with the preferred network prefix and foobar with the default password for others.%0a%0aQ: How do I password protect [[PmWiki/AvailableActions|page actions]]?%0aA: See [[PmWiki/Passwords]] for setting in config.php %0a-> @@$HandleAuth['[==]''pageactionname''[==]'] = 'pageactionname'; # along with :@@%0a-> @@$DefaultPasswords['[==]''pageactionname''[==]'] = crypt('secret phrase');@@%0aA: or %0a-> @@$HandleAuth['[==]''pageactionname''[==]'] = 'anotherpageactionname';@@%0a%0aQ: How to make a rule that allows only authors to edit their own wiki page in [[Profiles]] group?%0aA: Add this to your ''local/config.php''%0a%0a->@@$name = PageVar($pagename, '$Name');@@%0a->@@$group = PageVar($pagename, '$Group');@@%0a->@@if($group=='Profiles') $DefaultPasswords['edit'] = 'id:'.$name;@@%0a%0aQ: How do I moderate all postings?%0aA: Enable [[PmWiki.Drafts]]%0a* Set $EnableDrafts, this relabels the "Save" button to "Publish" and a "Save draft" button appears. %0a* Set $EnablePublish, this adds a new "publish" authorization level to distinguish editing from publishing.%0a%0aQ: How do I make a read only wiki?%0aA: In config.php [[PmWiki/PasswordsAdmin | set]] an "edit" password.%0a%0aQ: How do I restrict access to [[PmWiki/Uploads|uploaded attachments]]?%0aA: See%0a* [[PmWiki/UploadsAdmin#direct_download|instructions]] for denying public access to the uploads directory%0a* see [[Cookbook:Secure attachments]] {Cookbook.SecureAttachments$:Summary}%0a%0a%0a%0a -time=1250929240 +text=(:Summary: Resources for securing your PmWiki installation:)%0aAspects of PmWiki security are found on the following pages:%0a%0aPages distributed in a PmWiki release:%0a* [[PmWiki/Passwords]] {PmWiki/Passwords$:Summary}%0a* [[PmWiki/Passwords Admin]] {PmWiki/PasswordsAdmin$:Summary}%0a* [[PmWiki/Url Approvals]] {PmWiki/UrlApprovals$:Summary}%0a* [[(PmWiki:)Site Analyzer]] {PmWiki/SiteAnalyzer$:Summary}%0a* [[PmWiki/Blocklist]] {PmWiki/Blocklist$:Summary}%0a* [[PmWiki/Notify]] {PmWiki/Notify$:Summary}%0a* [[PmWiki/Security variables]] {PmWiki/SecurityVariables$:Summary}%0a%0a[[Cookbook(:/)]] Pages%0a%0a* [[Cookbook:Cookbook#Security | Cookbook index for Security recipes]]%0a* [[Cookbook:Secure attachments]] Protecting uploaded attachments%0a* [[Cookbook:Web server security]] Making the server more secure with .htaccess%0a* [[Cookbook:Farm security]] Making Farm installations secure%0a* [[Cookbook:DeObMail]] Hide e-mail address%0a* [[Cookbook:Protect email]] Obfusticate email addresses%0a* [[Cookbook:Audit images]] Check to see what images have been uploaded to your wiki.%0a* [[Cookbook:Private groups]] Create and secure private groups on a public wiki%0a* [[Cookbook:Only one login]] Only allow 1 login at the same time for a username%0a* [[Cookbook:Session guard]] Protects against Session Theft%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I report a possible security vulnerability of PmWiki?%0a%0aA: [[http://www.pmichaud.com|Pm]] wrote about this in [[http://pmichaud.com/pipermail/pmwiki-users/2006-September/031793.html | a post to pmwiki-users from September 2006]]. In a nutshell he differentiates two cases:%0a## The possible vulnerability isn't already known publicly: In this case please contact Pm by private mail.%0a## The possible vulnerability is already known publicly: In this case feel free to discuss the vulnerability in public (e.g. on [[http://www.pmichaud.com/mailman/listinfo/pmwiki-users | pmwiki-users]]).%0aSee [[http://pmichaud.com/pipermail/pmwiki-users/2006-September/031793.html | his post mentioned above]] for details and rationals.%0a%0aQ: What about the botnet security advisory at %25newwin%25[[http://isc.sans.org/diary.php?storyid=1672]]?%0a%0aA: Sites that are running with PHP's ''register_globals'' setting set to "On" and versions of PmWiki prior to 2.1.21 may be vulnerable to a botnet exploit that is taking advantage of a bug in PHP. The vulnerability can be closed by turning ''register_globals'' off, upgrading to PmWiki 2.1.21 or later, or upgrading to PHP versions 4.4.3 or 5.1.4. [[%3c%3c]]In addition, there is a test at [[PmWiki:SiteAnalyzer]] that can be used to determine if your site is vulnerable.%0a%0a[[#wikivandalism]]%0a!! Wiki Vandalism%0a:Assumptions: you are using a [[PmWiki/Blocklist]] and [[PmWiki/Url approvals]].%0a: :You don't want to resort to [[PmWiki/password(s)]] protecting the entire wiki, that's not the point after all.%0a: :Ideally these protections will be invoked in @@config.php@@%0a%0a%0aQ: How do I stop pages being [[PmWiki/DeletingPages|deleted]], eg password protect a page from deletion?%0aA: Use Cookbook:DeleteAction and password protect the page deletion [[(available) action(s)]] by adding [@$DefaultPasswords['delete'] = '*';@] to @@config.php@@ or password protect the action with @@$HandleAuth['delete'] = 'edit';@@%0a->or @@$HandleAuth['delete'] = 'admin';@@ to require the edit or admin password respectively.%0a%0aQ: How do I stop pages being replaced with an empty (all spaces) page?%0aA: Add [@block: /^\s*$/@] to your [[PmWiki/blocklist]].%0a%0aQ: how do I stop pages being completely replaced by an inane comment such as ''excellent site'', ''great information'', where the content cannot be blocked?%0aA: Try using the newer [[PmWiki/Blocklist#automaticblocklists | automatic blocklists]] that pull information and IP addresses about known wiki defacers.%0a%0aA: (OR) Try using [[Cookbook:Captchas]] or [[Cookbook:Captcha]] (note these are different).%0a%0aA: (OR) Set an edit password, but make it publicly available on the [[{$SiteGroup}.AuthForm]] template.%0a%0aQ: How do I password protect all common pages in all groups such as recent changes, search, group header, group footer, and so on?%0aA: Insert the following lines into your local/config.php file. Editing these pages then requires the admin password.%0a->[@%0a## Require admin password to edit RecentChanges (etc.) pages.%0aif ($action=='edit'%0a && preg_match('/\\.(Search|Group(Header|Footer)|(All)?RecentChanges)$/', $pagename))%0a { $DefaultPasswords['edit'] = crypt('secret phrase'); }%0a@]%0a%0aNote that all GroupAttributes pages are protected by the attr password.%0a%0a'''Alternative:''' you can require 'admin' authentication for these pages:%0a->[@%0a## Require admin password to edit RecentChanges (etc.) pages.%0aif ($action=='edit' %0a && preg_match('(Search|Group(Header|Footer)|(All)?RecentChanges)', $pagename))%0a { $HandleAuth['edit'] = 'admin'; }%0a@]%0a%0aQ: How do I password protect the creation of new groups?%0aA: See [[Cookbook:Limit Wiki Groups]] {Cookbook.LimitWikiGroups$:Summary}%0a%0aQ: How do I password protect the creation of new pages?%0aA: See [[Cookbook:Limit new pages in Wiki Groups]] {Cookbook.LimitNewPagesInWikiGroups$:Summary}%0a%0aQ: How do I take a whitelist approach where users from known or trusted IP addresses can edit, and others require a password?%0aA: Put these lines to local/config.php:%0a[@%0a## Allow passwordless editing from own turf, pass for others.%0aif ($action=='edit'%0a && !preg_match("/^90\\.68\\./", $_SERVER['REMOTE_ADDR']) ) %0a { $DefaultPasswords['edit'] = crypt('foobar'); }%0a@]%0aReplace 90.68. with the preferred network prefix and foobar with the default password for others.%0a%0aQ: How do I password protect [[PmWiki/AvailableActions|page actions]]?%0aA: See [[PmWiki/Passwords]] for setting in config.php %0a-> @@$HandleAuth['[==]''pageactionname''[==]'] = 'pageactionname'; # along with :@@%0a-> @@$DefaultPasswords['[==]''pageactionname''[==]'] = crypt('secret phrase');@@%0aA: or %0a-> @@$HandleAuth['[==]''pageactionname''[==]'] = 'anotherpageactionname';@@%0a%0aQ: How to make a rule that allows only authors to edit their own wiki page in [[Profiles]] group?%0aA: Add this to your ''local/config.php''%0a%0a->@@$name = PageVar($pagename, '$Name');@@%0a->@@$group = PageVar($pagename, '$Group');@@%0a->@@if($group=='Profiles') $DefaultPasswords['edit'] = 'id:'.$name;@@%0a%0aQ: How do I moderate all postings?%0aA: Enable [[PmWiki.Drafts]]%0a* Set $EnableDrafts, this relabels the "Save" button to "Publish" and a "Save draft" button appears. %0a* Set $EnablePublish, this adds a new "publish" authorization level to distinguish editing from publishing.%0a%0aQ: How do I make a read only wiki?%0aA: In config.php [[PmWiki/PasswordsAdmin | set]] an "edit" password.%0a%0aQ: How do I restrict access to [[PmWiki/Uploads|uploaded attachments]]?%0aA: See%0a* [[PmWiki/UploadsAdmin#direct_download|instructions]] for denying public access to the uploads directory%0a* see [[Cookbook:Secure attachments]] {Cookbook.SecureAttachments$:Summary}%0a%0a%0a%0a +time=1260371161 Index: wikilib.d/PmWiki.BasicVariables =================================================================== --- wikilib.d/PmWiki.BasicVariables (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.BasicVariables (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.6 ordered=1 urlencoded=1 -agent=Midori/0.1.9 (X11; Linux x86_64; U; en-us) WebKit/532+ +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 author=Petko charset=ISO-8859-1 -csum=prevent a Subversion keyword substitution +csum=rm {$Site Admin Group} there is no such PV host=81.65.12.233 name=PmWiki.BasicVariables -rev=83 +rev=85 targets=PmWiki.AuthUser,PmWiki.Categories,PmWiki.WikiFarms,PmWiki.WikiGroup,PmWiki.GroupCustomizations,PmWiki.LocalCustomizations,PmWiki.WikiWord,PmWiki.MarkupExpressions,Site.Search,Site.EditForm,Site.PageNotFound,SiteAdmin.AuthList,SiteAdmin.AuthUser,SiteAdmin.ApprovedUrls -text=(:Summary: core variables:)%0a%0a:$AsSpacedFunction:The name of the function used to convert WikiWords into normal, spaced strings. Defaults to 'AsSpaced'.%0a: :[@$AsSpacedFunction = 'MyAsSpaced';@]%0a%0a:$Author [==]: Set to the current reader, who is potentially an author ([[PmWiki:AuthoringPhilosophy|see discussion]]), as in "{$Author}". See also $EnablePostAuthorRequired.%0a%0a:$AuthorGroup: The WikiGroup for user profiles. Defaults to 'Profiles'.%0a: :[@$AuthorGroup = 'Users';@]%0a%0a:$AuthId: For sites using [[AuthUser | user-based authorization]], tracks the "reader" or login name.%0a: :[@SessionAuth($pagename);@]%0a: :[@if( isset($AuthId) ) { // this person has been authenticated@]%0a%0a:$AuthPw: Request for documentation, meanwhile see [[http://permalink.gmane.org/gmane.comp.web.wiki.pmwiki.user/30037|here]].%0a: :[@SessionAuth($pagename);@]%0a: :[@if( isset($AuthPw) ) { // this person has entered a password@] %0a%0a:$BaseNamePatterns:Allows population of the [@{$BaseName}@] PageVariable. The key to the hash is the pattern to be replaced and the value is the replacement string.%0a: :[@%0a# If {$FullName} is "Group.Page-Draft" then {$BaseName} is "Group.Page"%0a$BaseNamePatterns['/-Draft$/'] = '';%0a# If {$FullName} is "Comments-Group.Page" then {$BaseName} is "Group.Page"%0a$BaseNamePatterns['/^Comments-/'] = '';@]%0a%0a:$CategoryGroup: The WikiGroup used for categories. Defaults to 'Category'. (See [[Categories]]). {$CategoryGroup}%0a%0a:$CookiePrefix: A string prefix to be prepended to cookies set from PmWiki scripts. It defaults to '', but can be set to a different value to avoid conflicts with similar-named cookies from other applications, or to allow multiple wikis from the same domain to store separate cookies.%0a: :[@$CookiePrefix = 'pmwiki_';@] # set cookie prefix to 'pmwiki_'%0a::If you have a [[WikiFarm(s)]], use the following in each field's ''config.php'' to get a unique prefix for each field in the farm, thus isolating each field's cookies.:%0a: :[@$CookiePrefix = substr($tmp = md5(__FILE__), 0, 5).'_';@]%0a%0a:$DefaultGroup:[[WikiGroup]] used by default (on startup) when no group is specified in the URL, as in "{$DefaultGroup}". %0a%0a:$DefaultName:Name of the default HomePage of each WikiGroup. Used when the group doesn't have a page with the same name as the group, as in "{$DefaultName}".%0a%0a:$DefaultPage:Startup page when PmWiki is called without a specified page, normally ''$DefaultGroup.$DefaultName''.%0a-> Note: for $DefaultGroup, $DefaultName and $DefaultPage variables to work, they should be defined in the beginning of (farm)config.php, before any call to the function ResolvePageName(). This means, before any script from PmWiki and before any recipe that might be using this function.%0a%0a:$EnableLocalConfig:Allows/disables local/config.php customizations (usually for a farm's wikis). Can be set to zero in local/farmconfig.php to prevent the farm's wikis' local/config.php from being loaded.%0a: :[@$EnableLocalConfig = 0; # disable PmWiki's local/config@]%0a%0a:$EnablePGCust:Allows/disables per-page and [[GroupCustomizations | per-group customizations]]. Can be set to zero in any [[local customization(s)]] file to prevent remaining page/group customizations from being loaded.%0a: :[@$EnablePGCust=0; # turn off per-page/group configs@]%0a%0a:$EnableRedirect:When enabled (default), causes page redirects to automatically be performed by the browser. Setting $EnableRedirect to zero causes PmWiki to pause and issue a "Redirect to ''link''" message instead. This is sometimes useful when debugging recipes to be able to see the results of actions before page redirections occur.%0a%0a:$EnableWikiWords:Enable [[WikiWord]] processing.%0a%0a:$EnableWSPre:Enables a markup rule that causes lines with leading spaces to be treated as sections of preformatted text. If set to a value greater than 1, indicates the minimum number of leading spaces required for this treatment.%0a: :[@$EnableWSPre = 1; # leading spaces are preformatted text@]%0a: :[@$EnableWSPre = 0; # leading spaces are normal lines of text@]%0a: :[@$EnableWSPre = 4; # 4+ spaces are preformatted text@]%0a%0a:$FTimeFmt:Can be used to override the default date format used by the "ftime" function. The default $FTimeFmt is $TimeFmt. (See [[Markup Expressions]])%0a%0a:$GroupPattern: The regular expression pattern used for valid [[WikiGroup]] name specifications. Defaults to allowing any group name beginning with an uppercase letter, but can be set to limit the valid group names (see Cookbook:LimitWikiGroups).%0a: :[@# limit groups to Site, SiteAdmin, PmWiki, and MyGroup@]%0a: :[@$GroupPattern = '(?:Site|SiteAdmin|PmWiki|MyGroup)';@]%0a: :[@#for case-sensitive group names, note the ?-i switch:@]%0a: :[@$GroupPattern = '(?-i:Site|SiteAdmin|PmWiki|MyGroup)';@]%0a%0a:$LinkWikiWords:If set, then bare WikiWords in a page are automatically linked to pages of the same name. Note that this value can also be affected by the [@(:linkwikiwords:)@] and [@(:nolinkwikiwords:)@] directives.%0a: :[@$LinkWikiWords = 1; # turn on WikiWord links@]%0a: :[@$LinkWikiWords = 0; # disable WikiWord links@]%0a%0a%0a:$LogoutRedirectFmt: Identifies the page to which the visitor should be sent after an [@?action=logout@]. Defaults to the current page.%0a: :[@$LogoutRedirectFmt = 'Site.Logout'; # ?action=logout target@]%0a%0a:$LogoutCookies: An array of cookie names to be removed when [@?action=logout@] is invoked.%0a%0a:$NamePattern: The regular expression pattern used for valid page names. Defaults to allowing pages beginning with an uppercase letter or digit, followed by sequences of alphanumeric characters, hyphens, and underscores. %0a%0a:$SiteGroup:Default group for storing configuration and utility pages such as [[Site.Search]], [[Site.EditForm]], [[Site.PageNotFound]], etc, as in "{$SiteGroup}".%0a%0a:$SiteAdminGroup:Default group for locked administrative pages such as [[SiteAdmin.AuthList]], [[SiteAdmin.AuthUser]], [[SiteAdmin.ApprovedUrls]], etc, as in "SiteAdmin".%0a%0a:$SpaceWikiWords:If set, then WikiWords in pages are automatically spaced according to $AsSpacedFunction. Note that this value can also be affected by the [@(:spacewikiwords:)@] and [@(:nospacewikiwords:)@] directives.%0a: :[@$SpaceWikiWords = 1; # turn on WikiWord spacing@]%0a: :[@$SpaceWikiWords = 0; # turn off WikiWord spacing@]%0a%0a:$TimeFmt: The format to use for dates and times, in [[http://php.net/strftime | strftime()]] format. The default value is [@'%25B %25d, %25Y at %25I:%25M %25p'@], which gives dates of the form "September 8, 2005 at 10:57 PM".%0a: :[@$TimeFmt = '%25B %25d, %25Y'; # dates as "September 8, 2005"@]%0a: :[@$TimeFmt = '%25Y-%25m-%25d'; # dates as "2005-09-08"@]%0a%0a:$Version: A string representing the release version of PmWiki, as in "{$Version}".%0a%0a:$VersionNum: A number representing the release version of PmWiki,%0a with the major and minor release components padded with zeroes to%0a produce three digits. Thus, release "pmwiki-2.1.40" will have%0a $VersionNum set to 2001040, as in "{$VersionNum}".%0a%0a The first digit is a 2, the next three digits are the major%0a release number, and the last three digits are the minor release%0a number. Beta releases use 900-999 for the minor release number.%0a Thus:%0a--> [@%0a2.1.0 2001000%0a2.1.1 2001001%0a...%0a2.1.27 2001027%0a2.2.0-beta1 2001901%0a2.2.0-beta2 2001902%0a...%0a2.2.0-beta18 2001918%0a...%0a2.2.0 2002000%0a@]%0a%0a:$WikiWordPattern: The pattern that describes a WikiWord. -time=1254816401 +text=(:Summary: core variables:)%0a%0aWhere the variables are available as wiki markup they are shown as ''Variable value "[={$=]VariableName}"''.%0a%0a:$AsSpacedFunction:The name of the function used to convert WikiWords into normal, spaced strings. Defaults to 'AsSpaced'.%0a:{$AsSpacedFunction} :[@$AsSpacedFunction = 'MyAsSpaced';@]%0a%0a%25rfloat%25Variable value "{$Author}"%0a:$Author [==]: Set to the current reader, who is potentially an author ([[PmWiki:AuthoringPhilosophy|see discussion]]). See also $EnablePostAuthorRequired.%0a%0a(:if ! equal '{$AuthorGroup}' '':)%25rfloat%25Variable value "{$AuthorGroup}"(:ifend:)%0a:$AuthorGroup: The WikiGroup for user profiles. Defaults to 'Profiles'. This variable is implicit in the markup [@[[~AuthorName]]@]%0a: :[@$AuthorGroup = 'Users';@]%0a%0a(:if ! equal '{$AuthId}' '':)%25rfloat%25Variable value "{$AuthId}"(:ifend:)%0a:$AuthId: For sites using [[AuthUser | user-based authorization]], tracks the "reader" or login name.%0a: :[@SessionAuth($pagename);@]%0a: :[@if( isset($AuthId) ) { // this person has been authenticated@]%0a%0a(:if ! equal '{$AuthPw}' '':)%0a%25rfloat%25Variable value "{$AuthPw}"%0a(:ifend:)%0a:$AuthPw: Request for documentation, meanwhile see [[http://permalink.gmane.org/gmane.comp.web.wiki.pmwiki.user/30037|here]].%0a: :[@SessionAuth($pagename);@]%0a: :[@if( isset($AuthPw) ) { // this person has entered a password@] %0a%0a%25rfloat%25Variable value "{$BaseName}"%0a:$BaseName:%0a:$BaseNamePatterns:Allows population of the [@{$BaseName}@] PageVariable. The key to the hash is the pattern to be replaced and the value is the replacement string.%0a: :[@%0a# If {$FullName} is 'Group.Page-Draft' then {$BaseName} is 'Group.Page'%0a$BaseNamePatterns['/-Draft$/'] = '';%0a# If {$FullName} is 'Comments-Group.Page' then {$BaseName} is 'Group.Page'%0a$BaseNamePatterns['/^Comments-/'] = '';@]%0a%0a(:if ! equal '{$CategoryGroup}' '':)%0a%25rfloat%25Variable value "{$CategoryGroup}"%0a(:ifend:)%0a:$CategoryGroup: The WikiGroup used for categories. Defaults to 'Category'. (See [[Categories]]). This variable is implicit in the markup [@[[!CategoryName]]@]%0a%0a(:if ! equal '{$CookiePrefix}' '':)%0a%25rfloat%25Variable value "{$CookiePrefix}"%0a(:ifend:)%0a:$CookiePrefix: A string prefix to be prepended to cookies set from PmWiki scripts. It defaults to '', but can be set to a different value to avoid conflicts with similar-named cookies from other applications, or to allow multiple wikis from the same domain to store separate cookies.%0a: :[@$CookiePrefix = 'pmwiki_';@] # set cookie prefix to 'pmwiki_'%0a::If you have a [[WikiFarm(s)]], use the following in each field's ''config.php'' to get a unique prefix for each field in the farm, thus isolating each field's cookies.:%0a: :[@$CookiePrefix = substr($tmp = md5(__FILE__), 0, 5).'_';@]%0a%0a%25rfloat%25Variable value "{$DefaultGroup}"%0a:$DefaultGroup:[[WikiGroup]] used by default (on startup) when no group is specified in the URL. %0a%0a%25rfloat%25Variable value "{$DefaultName}"%0a:$DefaultName:Name of the default HomePage of each WikiGroup. Used when the group doesn't have a page with the same name as the group.%0a%0a(:if ! equal '{$DefaultPage}' '':)%0a%25rfloat%25Variable value "{$DefaultPage}"%0a(:ifend:)%0a:$DefaultPage:Startup page when PmWiki is called without a specified page, normally ''$DefaultGroup.$DefaultName''.%0a-> Note: for $DefaultGroup, $DefaultName and $DefaultPage variables to work, they should be defined in the beginning of (farm)config.php, before any call to the function ResolvePageName(). This means, before any script from PmWiki and before any recipe that might be using this function.%0a%0a(:if ! equal '{$EnableLocalConfig}' '':)%0a%25rfloat%25Variable value "{$EnableLocalConfig}"%0a(:ifend:)%0a:$EnableLocalConfig:Allows/disables local/config.php customizations (usually for a farm's wikis). Can be set to zero in local/farmconfig.php to prevent the farm's wikis' local/config.php from being loaded.%0a: :[@$EnableLocalConfig = 0; # disable PmWiki's local/config@]%0a%0a(:if ! equal '{$EnablePGCust}' '':)%0a%25rfloat%25Variable value "{$EnablePGCust}"%0a(:ifend:)%0a:$EnablePGCust:Allows/disables per-page and [[GroupCustomizations | per-group customizations]]. Can be set to zero in any [[local customization(s)]] file to prevent remaining page/group customizations from being loaded.%0a: :[@$EnablePGCust=0; # turn off per-page/group configs@]%0a%0a:$EnableRedirect:When enabled (default), causes page redirects to automatically be performed by the browser. Setting $EnableRedirect to zero causes PmWiki to pause and issue a "Redirect to ''link''" message instead. This is sometimes useful when debugging recipes to be able to see the results of actions before page redirections occur.%0a%0a(:if ! equal '{$EnableWikiWords}' '':)%0a%25rfloat%25Variable value "{$EnableWikiWords}"%0a(:ifend:)%0a:$EnableWikiWords:Enable [[WikiWord]] processing.%0a%0a:$EnableWSPre:Enables a markup rule that causes lines with leading spaces to be treated as sections of preformatted text. If set to a value greater than 1, indicates the minimum number of leading spaces required for this treatment.%0a: :[@$EnableWSPre = 1; # leading spaces are preformatted text@]%0a: :[@$EnableWSPre = 0; # leading spaces are normal lines of text@]%0a: :[@$EnableWSPre = 4; # 4+ spaces are preformatted text@]%0a%0a:$FTimeFmt:Can be used to override the default date format used by the "ftime" function. The default $FTimeFmt is $TimeFmt. (See [[Markup Expressions]])%0a%0a:$GroupPattern: The regular expression pattern used for valid [[WikiGroup]] name specifications. Defaults to allowing any group name beginning with an uppercase letter, but can be set to limit the valid group names (see Cookbook:LimitWikiGroups).%0a: :[@# limit groups to Site, SiteAdmin, PmWiki, and MyGroup@]%0a: :[@$GroupPattern = '(?:Site|SiteAdmin|PmWiki|MyGroup)';@]%0a: :[@#for case-sensitive group names, note the ?-i switch:@]%0a: :[@$GroupPattern = '(?-i:Site|SiteAdmin|PmWiki|MyGroup)';@]%0a%0a:$LinkWikiWords:If set, then bare WikiWords in a page are automatically linked to pages of the same name. Note that this value can also be affected by the [@(:linkwikiwords:)@] and [@(:nolinkwikiwords:)@] directives.%0a: :[@$LinkWikiWords = 1; # turn on WikiWord links@]%0a: :[@$LinkWikiWords = 0; # disable WikiWord links@]%0a%0a:$LogoutRedirectFmt: Identifies the page to which the visitor should be sent after an [@?action=logout@]. Defaults to the current page.%0a: :[@$LogoutRedirectFmt = 'Site.Logout'; # ?action=logout target@]%0a%0a:$LogoutCookies: An array of cookie names to be removed when [@?action=logout@] is invoked.%0a%0a(:if ! equal '{$NamePattern}' '':)%0a%25rfloat%25Variable value "{$NamePattern}"%0a(:ifend:)%0a:$NamePattern: The regular expression pattern used for valid page names. Defaults to allowing pages beginning with an uppercase letter or digit, followed by sequences of alphanumeric characters, hyphens, and underscores. %0a%0a%25rfloat%25Variable value "{$SiteGroup}"%0a:$SiteGroup:Default group for storing configuration and utility pages such as [[Site.Search]], [[Site.EditForm]], [[Site.PageNotFound]], etc.%0a%0a:$SiteAdminGroup:Default group for locked administrative pages such as [[SiteAdmin.AuthList]], [[SiteAdmin.AuthUser]], [[SiteAdmin.ApprovedUrls]], etc, defaults to 'SiteAdmin'.%0a%0a(:if ! equal '{$SpaceWikiWords}' '':)%0a%25rfloat%25Variable value "{$SpaceWikiWords}"%0a(:ifend:)%0a:$SpaceWikiWords:If set, then WikiWords in pages are automatically spaced according to $AsSpacedFunction. Note that this value can also be affected by the [@(:spacewikiwords:)@] and [@(:nospacewikiwords:)@] directives.%0a: :[@$SpaceWikiWords = 1; # turn on WikiWord spacing@]%0a: :[@$SpaceWikiWords = 0; # turn off WikiWord spacing@]%0a%0a(:if ! equal '{$TimeFmt}' '':)%0a%25rfloat%25Variable value "{$TimeFmt}"%0a(:ifend:)%0a:$TimeFmt: The format to use for dates and times, in [[http://php.net/strftime | strftime()]] format. The default value is [@'%25B %25d, %25Y at %25I:%25M %25p'@], which gives dates of the form "September 8, 2005 at 10:57 PM".%0a: :[@$TimeFmt = '%25B %25d, %25Y'; # dates as "September 8, 2005"@]%0a: :[@$TimeFmt = '%25Y-%25m-%25d'; # dates as "2005-09-08"@]%0a%0a%25rfloat%25Variable value "{$Version}"%0a:$Version: A string representing the release version of PmWiki.%0a%0a%25rfloat%25Variable value "{$VersionNum}"%0a:$VersionNum: A number representing the release version of PmWiki,%0a with the major and minor release components padded with zeroes to%0a produce three digits. Thus, release "pmwiki-2.1.40" will have $VersionNum set to 2001040.%0a%0a The first digit is a 2, the next three digits are the major%0a release number, and the last three digits are the minor release%0a number. Beta releases use 900-999 for the minor release number.%0a Thus:%0a--> [@%0a2.1.0 2001000%0a2.1.1 2001001%0a...%0a2.1.27 2001027%0a2.2.0-beta1 2001901%0a2.2.0-beta2 2001902%0a...%0a2.2.0-beta18 2001918%0a...%0a2.2.0 2002000%0a@]%0a%0a(:if ! equal '{$WikiWordPattern}' '':)%0a%25rfloat%25Variable value "{$WikiWordPattern}"%0a(:ifend:)%0a:$WikiWordPattern: The pattern that describes a WikiWord. +time=1263167742 Index: wikilib.d/PmWiki.UploadVariables =================================================================== --- wikilib.d/PmWiki.UploadVariables (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.UploadVariables (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.5 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13 +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 author=Petko charset=ISO-8859-1 -csum=more about UploadPrefixQuota +csum=no need for red color host=81.65.12.233 name=PmWiki.UploadVariables -rev=55 +rev=57 targets=PmWiki.Uploads,PmWiki.UploadsAdmin,PmWiki.AvailableActions -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:$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$IMapLinkFmt['Attach:'] %0a->The format of the upload link displayed when an attachment is present. No default is set. %0a%0a:$LinkUploadCreateFmt: The format of the upload link displayed when an attachment not present. Defaults to%0a %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 $UploadPrefixFmt = '/$Group/$Name'; # per-page attachments%0a $UploadPrefixFmt = ''; # sitewide attachments%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:$EnableUploadGroupAuth:Set @@$EnableUploadGroupAuth = 1;@@ to authenticate downloads with the group password. This could be used together with @@$EnableDirectDownload = 0;@@.%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%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.%0a: :$UploadNameChars = "-\\w. !=+"; # allow exclamations, equals, and plus%0a: :$UploadNameChars = "-\\w. \\x80-\\xff"; # allow unicode%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.%0a%0a:$UploadDirQuota:Overall size limit for all uploads.%0a%0a->[@%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 -time=1251981124 +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:$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$IMapLinkFmt['Attach:'] %0a->The format of the upload link displayed when an attachment is present. No default is set. %0a%0a:$LinkUploadCreateFmt: The format of the upload link displayed when an attachment not present. Defaults to%0a %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 $UploadPrefixFmt = '/$Group/$Name'; # per-page attachments%0a $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:$EnableUploadGroupAuth:Set @@$EnableUploadGroupAuth = 1;@@ to authenticate downloads with the group password. This could be used together with @@$EnableDirectDownload = 0;@@.%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%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.%0a: :$UploadNameChars = "-\\w. !=+"; # allow exclamations, equals, and plus%0a: :$UploadNameChars = "-\\w. \\x80-\\xff"; # allow unicode%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.%0a%0a:$UploadDirQuota:Overall size limit for all uploads.%0a%0a->[@%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 +time=1260918925 Index: wikilib.d/PmWiki.EditVariables =================================================================== --- wikilib.d/PmWiki.EditVariables (.../pmwiki-2.2.8) (revision 2460) +++ wikilib.d/PmWiki.EditVariables (.../pmwiki-2.2.9) (revision 2460) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 +version=pmwiki-2.2.8 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 author=Petko charset=ISO-8859-1 -csum= -host=81.65.14.164 +csum=$DiffKeepNum +host=81.65.12.233 name=PmWiki.EditVariables -rev=66 -targets= -text=(:Summary:variables used when editing pages:)%0aTo set many of the variables below specify them in @@config.php@@.%0a%0a:$EnableGUIButtons:When set to '1', turns on the graphical buttons in the "Edit Page" form.%0a-> # turn on graphical edit buttons%0a-> $EnableGUIButtons = 1;%0a%0a:$EnablePostAuthorRequired:When set to '1', posting of pages requires the author to provide an author name. Otherwise, authors can post without a name.%0a-> # require authors to provide a name%0a-> $EnablePostAuthorRequired = 1; %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%0a-> $EnableDrafts = 1;%0a%0a->A related variable, $EnablePublishAttr, adds a new "publish" authorization level to distinguish editing of drafts from publishing them.%0a%0a:$DraftSuffix:The suffix to use for draft versions of pages (default "-Draft").%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.:%0a-> $DiffKeepDays = 30; # keep revisions at least 30 days%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:$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).%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:$EditTemplatesFmt:Name of the page (or an array of names) to be used as the default text for any newly created pages.%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:$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 %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, %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 %0a-> [@$DefaultPageTextFmt = '(:include $[{$SiteGroup}.PageNotFound]:)';@] %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:%0a-> [@$EditFunctions = array('EditTemplate', 'RestorePage', 'ReplaceOnSave',%0a 'SaveAttributes', 'PostPage', 'PostRecentChanges', 'AutoCreateTargets', 'PreviewPage'); @]%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 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:ROEPatterns 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:$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:$HandleEditFmt: Like $HandleBrowseFmt, this specifies the entire output format for ?action=edit for a page.%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.%0a-> [@# redirect to Main.HomePage%0a$EditRedirectFmt = 'Main.HomePage'; %0a# redirect to HomePage of current group%0a$EditRedirectFmt = '{$Group}.HomePage';%0a@] -time=1234640491 +rev=68 +targets=Cookbook.EditTemplates,Cookbook.ROEPatterns,Cookbook.ROSPatterns +text=(:Summary:variables used when editing pages:)%0aTo set many of the variables below specify them in @@config.php@@.%0a%0a:$EnableGUIButtons:When set to '1', turns on the graphical buttons in the "Edit Page" form.%0a-> # turn on graphical edit buttons%0a-> $EnableGUIButtons = 1;%0a%0a:$EnablePostAuthorRequired:When set to '1', posting of pages requires the author to provide an author name. Otherwise, authors can post without a name.%0a-> # require authors to provide a name%0a-> $EnablePostAuthorRequired = 1; %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%0a-> $EnableDrafts = 1;%0a%0a->A related variable, $EnablePublishAttr, adds a new "publish" authorization level to distinguish editing of drafts from publishing them.%0a%0a:$DraftSuffix:The suffix to use for draft versions of pages (default "-Draft").%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.:%0a-> $DiffKeepDays = 30; # keep revisions at least 30 days%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.%0a-> $DiffKeepNum = 50; # keep at least 50 revisions (default is 20)%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).%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:$EditTemplatesFmt:Name of the page (or an array of names) to be used as the default text for any newly created pages.%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:$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 %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, %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 %0a-> [@$DefaultPageTextFmt = '(:include $[{$SiteGroup}.PageNotFound]:)';@] %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:%0a-> [@$EditFunctions = array('EditTemplate', 'RestorePage', 'ReplaceOnSave',%0a 'SaveAttributes', 'PostPage', 'PostRecentChanges', 'AutoCreateTargets', 'PreviewPage'); @]%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 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:ROEPatterns 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:$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:$HandleEditFmt: Like $HandleBrowseFmt, this specifies the entire output format for ?action=edit for a page.%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.%0a-> [@# redirect to Main.HomePage%0a$EditRedirectFmt = 'Main.HomePage'; %0a# redirect to HomePage of current group%0a$EditRedirectFmt = '{$Group}.HomePage';%0a@] +time=1263683153