Index: pmwiki.php =================================================================== --- pmwiki.php (.../pmwiki-2.2.2) (revision 2380) +++ pmwiki.php (.../pmwiki-2.2.3) (revision 2380) @@ -386,7 +386,7 @@ function PRR($x=NULL) { if ($x || is_null($x)) $GLOBALS['RedoMarkupLine']++; return $x; } function PUE($x) - { return preg_replace('/[\\x80-\\xff \'"]/e', "'%'.dechex(ord('$0'))", $x); } + { return preg_replace('/[\\x80-\\xff \'"<>]/e', "'%'.dechex(ord('$0'))", $x); } function PQA($x) { $out = ''; if (preg_match_all('/([a-zA-Z]+)\\s*=\\s*("[^"]*"|\'[^\']*\'|\\S*)/', @@ -539,11 +539,12 @@ rmdir($dir); } $parent = realpath(dirname($dir)); + $bdir = basename($dir); $perms = decoct(fileperms($parent) & 03777); $msg = "PmWiki needs to have a writable $dir/ directory before it can continue. You can create the directory manually by executing the following commands on your server: -
mkdir $parent/$dir\n chmod 777 $parent/$dir+
mkdir $parent/$bdir\n chmod 777 $parent/$bdirThen, reload this page."; $safemode = ini_get('safe_mode'); if (!$safemode) $msg .= "
Enter password to encrypt: - +
", Index: scripts/upload.php =================================================================== --- scripts/upload.php (.../pmwiki-2.2.2) (revision 2380) +++ scripts/upload.php (.../pmwiki-2.2.3) (revision 2380) @@ -142,12 +142,23 @@ return LinkIMap($pagename, $imap, $path, $alt, $txt, $fmt); } +# Authenticate group downloads with the group password +function UploadAuth($pagename, $auth, $cache=0){ + global $GroupAttributesFmt, $EnableUploadGroupAuth; + if (IsEnabled($EnableUploadGroupAuth,0)){ + SDV($GroupAttributesFmt,'$Group/GroupAttributes'); + $pn_upload = FmtPageName($GroupAttributesFmt, $pagename); + } else $pn_upload = $pagename; + $page = RetrieveAuthPage($pn_upload, $auth, true, READPAGE_CURRENT); + if(!$page) Abort("?No '$auth' permissions for $pagename"); + if($cache) PCache($pn_upload,$page); + return true; +} + function HandleUpload($pagename, $auth = 'upload') { global $FmtV,$UploadExtMax, $HandleUploadFmt,$PageStartFmt,$PageEndFmt,$PageUploadFmt; - $page = RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT); - if (!$page) Abort("?cannot upload to $pagename"); - PCache($pagename,$page); + UploadAuth($pagename, $auth, 1); $FmtV['$UploadName'] = MakeUploadName($pagename,@$_REQUEST['upname']); $upresult = htmlspecialchars(@$_REQUEST['upresult']); $uprname = htmlspecialchars(@$_REQUEST['uprname']); @@ -162,8 +173,7 @@ function HandleDownload($pagename, $auth = 'read') { global $UploadFileFmt, $UploadExts, $DownloadDisposition; SDV($DownloadDisposition, "inline"); - $page = RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT); - if (!$page) Abort("?cannot read $pagename"); + UploadAuth($pagename, $auth); $upname = MakeUploadName($pagename, @$_REQUEST['upname']); $filepath = FmtPageName("$UploadFileFmt/$upname", $pagename); if (!$upname || !file_exists($filepath)) { @@ -182,13 +192,12 @@ fclose($fp); } exit(); -} - +} + function HandlePostUpload($pagename, $auth = 'upload') { global $UploadVerifyFunction, $UploadFileFmt, $LastModFile, $EnableUploadVersions, $Now; - $page = RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT); - if (!$page) Abort("?cannot upload to $pagename"); + UploadAuth($pagename, $auth); $uploadfile = $_FILES['uploadfile']; $upname = $_REQUEST['upname']; if ($upname=='') $upname=$uploadfile['name']; @@ -302,11 +311,9 @@ $count = 0; $dirp = @opendir($uploaddir); if ($dirp) { - while (($file = readdir($dirp)) !== false) + while (($file = readdir($dirp)) !== false) if ($file{0} != '.') $count++; closedir($dirp); } return $count; } - - Index: docs/sample-config.php =================================================================== --- docs/sample-config.php (.../pmwiki-2.2.2) (revision 2380) +++ docs/sample-config.php (.../pmwiki-2.2.3) (revision 2380) @@ -137,8 +137,8 @@ ## are turned into links, uncomment the line below. See PmWiki.UrlApprovals. ## Also, setting $UnapprovedLinkCountMax limits the number of unapproved ## links that are allowed in a page (useful to control wikispam). +# $UnapprovedLinkCountMax = 10; # include_once("scripts/urlapprove.php"); -# $UnapprovedLinkCountMax = 10; ## The following lines make additional editing buttons appear in the ## edit page for subheadings, lists, tables, etc. Index: wikilib.d/PmWiki.WikiTrails =================================================================== --- wikilib.d/PmWiki.WikiTrails (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.WikiTrails (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 GTB5 -author=TeganDowling +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 charset=ISO-8859-1 -csum=punctuation and other minor copy-edits for clarity -host=69.131.21.195 +csum=fix stuff for a release +host=81.65.14.164 name=PmWiki.WikiTrails -rev=155 -targets=PmWiki.PageLists,PmWiki.Links,PmWiki.Installation,PmWiki.LocalCustomizations,PmWiki.PmWiki,PmWiki.PmWikiPhilosophy,PmWiki.PmWikiFeatures,PmWiki.Download,PmWiki.WikiStyles,PmWiki.Features,PmWiki.InterMap,PmWiki.TextFormattingRules,PmWiki.DesignNotes,PmWiki.Security,PmWiki.Troubleshooting,PITS.PITS,PITS.00895,PmWiki.GroupHeaders,PmWiki.FullName,PmWiki.WebFeeds -text=(:Summary: Trails from lists items from a single page:)%0a(:div class="rfloat frame" style="font-size:smaller; clear:right;" :)%0a!! Table of contents%0a* [[#creating | Creating a trail]]%0a* [[#types | Types of trail]]%0a* [[#linksyntax | Trail link syntax]]%0a* [[#using | Using a trail]]%0a** [[#pathtrail | Path trail]]%0a** [[#circular-trails | Circular trail]]%0a* [[#crossgroup | Cross group trails]]%0a* [[#trailstyle | Trail style]]%0a* [[#trailpagelists | Trail page lists]]%0a(:divend:)%0a(:Audience: authors (basic) :)%0aThe WikiTrails feature allows wiki authors to create "trails" through sequences of pages in the wiki. You simply specify pages and their order on a "trail index", and then place the navigation markup on the pages that you will be navigating. %0a%0a(Don't confuse the [[PmWiki/PageLists|pagelist]] directive with WikiTrails - they are different animals as explained in the [[#faq|Q and A]] below.)%0a%0a[[#creating]]%0a!! Creating a trail%0a%0aBefore you can use a trail through a group of pages, you have to create a "trail index" on a separate page, which we will call the "trail index page". %0aOn that trail index page, you simply create a numbered or bulleted list of links. (So every numbered or bulleted list of links implicitly creates a trail.) %0aIt is important that each page name ([[Links|link]]) be the first item following each bullet; any text or formatting in front of the page name will exclude it from the trail.%0a%0aAn example trail index page might contain the list:%0a[[#trailstart]]%0a* [[Installation]] how to install%0a* [[The customisation page->LocalCustomizations]]%0a* [[PmWiki]] some other text [[PmWiki Philosophy]] [-(The latter won't be in the trail because it is preceded by text)-]%0a* Yet some other text. [[PmWiki Features]] [-(This won't be in the trail because it follows text)-]%0a* %25center%25[[PmWiki/Download]] [-(This won't be in the trail because it is preceded by the [=%25center%25=] style.)-]%0a* [[PmWiki.WikiStyles]]%0a* Some text [-(This won't be in the trail because it is not a link)-]%0a* [[PmWiki/PageLists]] {PmWiki/PageLists$:Summary}%0a* [[http://pmwiki.org]] [-(This won't be in the trail because it is not a page link)-]%0a** [[Features]] %0a* [[PmWiki:InterMap]] [-(This won't be in the trail because it is an [[InterMap]] link)-]%0a* [[Cookbook:Cookbook]] [-(This won't be in the trail because it is an [[InterMap]] link)-] %0a: [[PmWiki philosophy]] : [[Design notes]] [-(The first link will, and the second link won't, be in the trail defined by ([[TextFormattingRules#DefinitionLists | definition list]]))-]%0a* [[#security]][[Security]] [-(This won't be in the trail because its preceded by a (hidden) [[Links#anchors | anchor]])-]%0a* %25newwin%25[[Links]] [-(This won't be in the trail because its preceded by a (hidden) [=%25newwin%25=] style)-]%0a* ''[[PmWiki/Troubleshooting]]'' [-(This won't be in the trail because its preceded by (hidden) ''italic'' style markup)-]%0a# [[PITS/]] %0a## [[PITS/00895|+]]%0a[[#trailend]]%0a%0aThe list above creates the following "wikitrail", displayed using a [[PageLists|pagelist]]:%0a(:markup:)%0a(:pagelist trail={$FullName}#trailstart#trailend fmt={$FullName}#traillist:)%0a(:markupend:)%0a%0a!!! Observations%0a%0a# In general, indentation levels in the page list don't matter -- trails are a linear sequence of pages.%0a# A page is part of the trail only if the page link immediately follows the list markup.%0a#The list itself can be [[#linksyntax|delineated]] by the use of [[#list#anchors|anchors]], allowing for multiple lists on a page, or for some list items to be excluded.%0a%0a[[#types]]%0a!! Trail types%0aPmWiki defines 2 trail markups:%0a%0a* '''[@%3c%3c|[[Trail Index Page]]|>>@]''' displays as "[=%3c%3c PreviousPage | Trail Index Page | NextPage >>=]".%0a%0a* '''[@%3c|[[Trail Index Page]]|>@]''' displays as "[=%3c PreviousPage | Trail Index Page | NextPage >=]", except the appropriate arrow is omitted at the beginning and end of the trail.%0a%0a[[#linksyntax]]%0a!! Trail link syntax%0aThe trail link has the same syntax as a standard [[link(s)]], %0athis means for example you can specify %0a* [@%3c|[[TrailIndexPage | +]]|>@]%0a%0aTrail links can be restricted by [[links#anchors|anchors]] (links to a specific location within a page),%0athis means you can have more than one trail on a page, or start a trail from a specific location in a page.%0a* [@%3c|[[Trail Index Page#trailstart#trailend]]|>@]%0a%0a[[#using]]%0a!! Using the trail%0a%0aWhat makes a trail "work" is adding ''trail markup'' on the pages in the trail (i.e. the pages that are listed in the bullet/numbered list on the trail index page).%0a%0aTo build a trail, add ''trail markup'' like [@%3c%3c|[[TrailIndexPage]]|>>@] to a page, where `TrailIndexPage is the page, described above, containing the bulleted list of pages in the trail. PmWiki will display the trail markup with links to any previous and next pages in the trail. %0a%0aThe trail markup can be placed anywhere in a page, and a page can contain multiple trail markups. If you are adding a trail to every page in a group, consider setting the trail markup in the [[Group Headers | GroupHeader]] or GroupFooter pages instead of on every individual page in your group.%0a%0a[[#pathtrail]]%0a!!! Path trail[[#path-trail]]%0a%0a[@^|[[TrailIndexPage]]|^@] treats the list levels as a hierarchy and displays the "path" to reach the current page (i.e., a "breadcrumb" trail). In the example trail above, the markup [@^|TrailIndexPage|^@] on [@TrailPage4@] would display as "[=TrailIndexPage | TrailPage2 | TrailPage4=]".%0a%0aWiki administrators can change the trail separator of the "path" trail ( [@^|[[TrailIndexPage]]|^@] ) from the default | by setting the variable $TrailPathSep in the ''config.php'' file. For instance $TrailPathSep = ' > '; will output "[=TrailIndexPage > TrailPage2 > TrailPage4=]".%0a%0a[[#circular-trails]]%0a!! Circular trails%0a%0aTypically, a trail is a linear list with a first and a last page. However, the trail can be made "circular" by repeating the first page as the last item in the trail index:%0a%0a->[@%0a * [[TrailPage1]]%0a * [[TrailPage2]]%0a ...%0a * [[TrailPageN]]%0a * [[TrailPage1]]%0a@]%0a%0aIf the trail index page is intended to be read by others, the last item can be made invisible inside an [@(:if false:)@] block:%0a%0a->[@%0a * [[TrailPage1]]%0a * [[TrailPage2]]%0a ...%0a * [[TrailPageN]]%0a (:if false:)%0a * [[TrailPage1]]%0a (:ifend:)%0a@]%0a%0a[[#crossgroup]]%0a!! Cross Group Trails%0aBefore version 2.2.1, if your trail contains pages in different groups, it should use full [=[[Group.Name]]=] links instead of just [=[[Name]]=].%0a%0a!! Other notes%0a* There is no space between @@%3c|@@ and @@[=[[link]]=]@@ and @@|>@@; same for the other trail markups.%0a* Note that non-existing pages will appear in the WikiTrail as links.%0a%0a[[#trailstyle]]%0a!!! Trail style%0aPmWiki encapsulates the trail with a ''wikitrail'' css class. %0aThis allows the wiki trail to be [[LocalCustomizations | customised]] by defining CSS for the ''wikitrail'' in the ''local.css'' file.%0a%0a%0a[[#trailpagelists]]%0a!!! Trail in [[page lists]]%0aTrails from a single page can only be displayed using the pagelist [[PmWiki/PageLists#pagelisttrail|trail]] parameter. For example%0a(:markup class="horiz":)%0a(:pagelist trail=PmWiki/WikiTrails fmt=PmWiki.WikiTrails#traillist order=random count=3:)%0a(:markupend:)%0a%0a!!!A simple example of a WikiTrail%0a%0a1) On the TrailIndexPage:%0a%0a[@%0a* [[MyTrailPage1]]%0a* [[MyTrailPage2]]%0a* [[MyTrailPage3]]%0a@]%0a%0a2) On the pages MyTrailPage1, 2, and 3:%0a%0a[@%0a%3c%3c|[[TrailIndexPage]]|>>%0a@]%0a%0a>>comment%3c%3c%0a[[#traillist]]%0a%25font-size:small green%25> [[{=$FullName}|{=$Groupspaced}.{=$Namespaced}]] %3c%0a[[#traillistend]]%0a>>%3c%3c%0a%0a!! Questions%0a[[#faq]]%0a>>faq%3c%3c%0aQ: What's the difference between a [[[[PmWiki/PageLists|PageList]] and a WikiTrail?%0aA: The pagelist directive dynamically generates a list of pages. There are many ways to generate the list, including using a WikiTrail as the source. The pagelist directive then displays the pages that match the criteria using an optional template - for example displaying each page name on a separate line as a link or including the entire content. The pagelist directive currently does not have built-in navigation markup that you can put on the pages in the list. By contrast, WikiTrails are simply specified via links on an "index" page and you ''can'' put previous-next navigation markup on each page. The two serve very different purposes. WikiTrails are useful for specifying the pages in [[PmWiki/WebFeeds|web feeds]], for creating a "tour" through a predefined set of pages, and many other things.%0a -time=1244808605 +rev=158 +targets=PmWiki.PageLists,PmWiki.Links,PmWiki.Installation,PmWiki.LocalCustomizations,PmWiki.PmWiki,PmWiki.PmWikiPhilosophy,PmWiki.WikiStyles,PmWiki.Uploads,PmWiki.InterMap,PmWiki.TextFormattingRules,PmWiki.DesignNotes,PmWiki.Security,PmWiki.Troubleshooting,PmWiki.GroupHeaders,PmWiki.FullName,PmWiki.WebFeeds +text=(:Summary: Trails from lists items from a single page:)%0a(:div class="rfloat frame" style="font-size:smaller; clear:right;" :)%0a!! Table of contents%0a* [[#creating | Creating a trail]]%0a* [[#types | Types of trail]]%0a* [[#linksyntax | Trail link syntax]]%0a* [[#using | Using a trail]]%0a** [[#pathtrail | Path trail]]%0a** [[#circular-trails | Circular trail]]%0a* [[#crossgroup | Cross group trails]]%0a* [[#trailstyle | Trail style]]%0a* [[#trailpagelists | Trail page lists]]%0a(:divend:)%0a(:Audience: authors (basic) :)%0aThe WikiTrails feature allows wiki authors to create "trails" through sequences of pages in the wiki. You simply specify pages and their order on a "trail index", and then place the navigation markup on the pages that you will be navigating. %0a%0a(Don't confuse the [[PmWiki/PageLists|pagelist]] directive with WikiTrails - they are different animals as explained in the [[#faq|Q and A]] below.)%0a%0a[[#creating]]%0a!! Creating a trail%0a%0aBefore you can use a trail through a group of pages, you have to create a "trail index" on a separate page, which we will call the "trail index page". %0aOn that trail index page, you simply create a numbered or bulleted list of links. (So every numbered or bulleted list of links implicitly creates a trail.) %0aIt is important that each page name ([[Links|link]]) be the first item following each bullet; any text or formatting in front of the page name will exclude it from the trail.%0a%0aAn example trail index page might contain the list:%0a[[#trailstart]]%0a* [[Installation]] how to install%0a* [[The customisation page->LocalCustomizations]]%0a* [[PmWiki]] some other text [[PmWiki Philosophy]] [-(The latter won't be in the trail because it is preceded by text)-]%0a* Yet some other text. [[PmWiki.WikiStyles]] [-(This won't be in the trail because it follows text)-]%0a* %25center%25[[PmWiki/Uploads]] [-(This won't be in the trail because it is preceded by the [=%25center%25=] style.)-]%0a%0a* Some text [-(This won't be in the trail because it is not a link)-]%0a* [[PmWiki/PageLists]] {PmWiki/PageLists$:Summary}%0a* [[http://pmwiki.org]] [-(This won't be in the trail because it is not a page link)-]%0a** [[PmWiki:InterMap]] [-(This won't be in the trail because it is an [[InterMap]] link)-]%0a* [[Cookbook:Cookbook]] [-(This won't be in the trail because it is an [[InterMap]] link)-] %0a: [[PmWiki philosophy]] : [[Design notes]] [-(The first link will, and the second link won't, be in the trail defined by ([[TextFormattingRules#DefinitionLists | definition list]]))-]%0a* [[#security]][[Security]] [-(This won't be in the trail because its preceded by a (hidden) [[Links#anchors | anchor]])-]%0a* %25newwin%25[[Links]] [-(This won't be in the trail because its preceded by a (hidden) [=%25newwin%25=] style)-]%0a* ''[[PmWiki/Troubleshooting]]'' [-(This won't be in the trail because its preceded by (hidden) ''italic'' style markup)-]%0a[[#trailend]]%0a%0aThe list above creates the following "wikitrail", displayed using a [[PageLists|pagelist]]:%0a(:markup:)%0a(:pagelist trail={$FullName}#trailstart#trailend fmt={$FullName}#traillist:)%0a(:markupend:)%0a%0a!!! Observations%0a%0a# In general, indentation levels in the page list don't matter -- trails are a linear sequence of pages.%0a# A page is part of the trail only if the page link immediately follows the list markup.%0a#The list itself can be [[#linksyntax|delineated]] by the use of [[#list#anchors|anchors]], allowing for multiple lists on a page, or for some list items to be excluded.%0a%0a[[#types]]%0a!! Trail types%0aPmWiki defines 2 trail markups:%0a%0a* '''[@%3c%3c|[[Trail Index Page]]|>>@]''' displays as "[=%3c%3c PreviousPage | Trail Index Page | NextPage >>=]".%0a%0a* '''[@%3c|[[Trail Index Page]]|>@]''' displays as "[=%3c PreviousPage | Trail Index Page | NextPage >=]", except the appropriate arrow is omitted at the beginning and end of the trail.%0a%0a[[#linksyntax]]%0a!! Trail link syntax%0aThe trail link has the same syntax as a standard [[link(s)]], %0athis means for example you can specify %0a* [@%3c|[[TrailIndexPage | +]]|>@]%0a%0aTrail links can be restricted by [[links#anchors|anchors]] (links to a specific location within a page),%0athis means you can have more than one trail on a page, or start a trail from a specific location in a page.%0a* [@%3c|[[Trail Index Page#trailstart#trailend]]|>@]%0a%0a[[#using]]%0a!! Using the trail%0a%0aWhat makes a trail "work" is adding ''trail markup'' on the pages in the trail (i.e. the pages that are listed in the bullet/numbered list on the trail index page).%0a%0aTo build a trail, add ''trail markup'' like [@%3c%3c|[[TrailIndexPage]]|>>@] to a page, where `TrailIndexPage is the page, described above, containing the bulleted list of pages in the trail. PmWiki will display the trail markup with links to any previous and next pages in the trail. %0a%0aThe trail markup can be placed anywhere in a page, and a page can contain multiple trail markups. If you are adding a trail to every page in a group, consider setting the trail markup in the [[Group Headers | GroupHeader]] or GroupFooter pages instead of on every individual page in your group.%0a%0a[[#pathtrail]]%0a!!! Path trail[[#path-trail]]%0a%0a[@^|[[TrailIndexPage]]|^@] treats the list levels as a hierarchy and displays the "path" to reach the current page (i.e., a "breadcrumb" trail). In the example trail above, the markup [@^|TrailIndexPage|^@] on [@TrailPage4@] would display as "[=TrailIndexPage | TrailPage2 | TrailPage4=]".%0a%0aWiki administrators can change the trail separator of the "path" trail ( [@^|[[TrailIndexPage]]|^@] ) from the default | by setting the variable $TrailPathSep in the ''config.php'' file. For instance $TrailPathSep = ' > '; will output "[=TrailIndexPage > TrailPage2 > TrailPage4=]".%0a%0a[[#circular-trails]]%0a!! Circular trails%0a%0aTypically, a trail is a linear list with a first and a last page. However, the trail can be made "circular" by repeating the first page as the last item in the trail index:%0a%0a->[@%0a * [[TrailPage1]]%0a * [[TrailPage2]]%0a ...%0a * [[TrailPageN]]%0a * [[TrailPage1]]%0a@]%0a%0aIf the trail index page is intended to be read by others, the last item can be made invisible inside an [@(:if false:)@] block:%0a%0a->[@%0a * [[TrailPage1]]%0a * [[TrailPage2]]%0a ...%0a * [[TrailPageN]]%0a (:if false:)%0a * [[TrailPage1]]%0a (:ifend:)%0a@]%0a%0a[[#crossgroup]]%0a!! Cross Group Trails%0aBefore version 2.2.1, if your trail contains pages in different groups, it should use full [=[[Group.Name]]=] links instead of just [=[[Name]]=].%0a%0a!! Other notes%0a* There is no space between @@%3c|@@ and @@[=[[link]]=]@@ and @@|>@@; same for the other trail markups.%0a* Note that non-existing pages will appear in the WikiTrail as links.%0a%0a[[#trailstyle]]%0a!!! Trail style%0aPmWiki encapsulates the trail with a ''wikitrail'' css class. %0aThis allows the wiki trail to be [[LocalCustomizations | customised]] by defining CSS for the ''wikitrail'' in the ''local.css'' file.%0a%0a%0a[[#trailpagelists]]%0a!!! Trail in [[page lists]]%0aTrails from a single page can only be displayed using the pagelist [[PmWiki/PageLists#pagelisttrail|trail]] parameter. For example%0a(:markup class="horiz":)%0a(:pagelist trail=PmWiki/WikiTrails fmt=PmWiki.WikiTrails#traillist order=random count=3:)%0a(:markupend:)%0a%0a!!!A simple example of a WikiTrail%0a%0a1) On the TrailIndexPage:%0a%0a[@%0a* [[MyTrailPage1]]%0a* [[MyTrailPage2]]%0a* [[MyTrailPage3]]%0a@]%0a%0a2) On the pages MyTrailPage1, 2, and 3:%0a%0a[@%0a%3c%3c|[[TrailIndexPage]]|>>%0a@]%0a%0a>>comment%3c%3c%0a[[#traillist]]%0a%25font-size:small green%25> [[{=$FullName}|{=$Groupspaced}.{=$Namespaced}]] %3c%0a[[#traillistend]]%0a>>%3c%3c%0a%0a!! Questions%0a[[#faq]]%0a>>faq%3c%3c%0aQ: What's the difference between a [[[[PmWiki/PageLists|PageList]] and a WikiTrail?%0aA: The pagelist directive dynamically generates a list of pages. There are many ways to generate the list, including using a WikiTrail as the source. The pagelist directive then displays the pages that match the criteria using an optional template - for example displaying each page name on a separate line as a link or including the entire content. The pagelist directive currently does not have built-in navigation markup that you can put on the pages in the list. By contrast, WikiTrails are simply specified via links on an "index" page and you ''can'' put previous-next navigation markup on each page. The two serve very different purposes. WikiTrails are useful for specifying the pages in [[PmWiki/WebFeeds|web feeds]], for creating a "tour" through a predefined set of pages, and many other things.%0a +time=1247527412 Index: wikilib.d/PmWiki.ConditionalMarkup =================================================================== --- wikilib.d/PmWiki.ConditionalMarkup (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.ConditionalMarkup (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 -author=Petko +version=pmwiki-2.2.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 +author=HansB charset=ISO-8859-1 -csum=fix beta (2.2.beta66) -host=86.69.109.11 +csum=added part about PTVs,PVs and MEs +host=80.41.216.53 name=PmWiki.ConditionalMarkup -rev=140 -targets=PmWiki.ReleaseNotes,PmWiki.ChangeLog,PmWiki.AuthUser,PmWiki.WikiTrails,Site.PageListTemplates,PmWiki.PageVariables -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%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%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 for VALUE. VALUE may be 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..:)@]%0a(:cell:) - %0a(:cell:)true if current date is [@DATE@] or later (unlimited)%0a(:cellnr:)[@(:if date DATE1..DATE2:)@]%0a(:cell:) - %0a(:cell:)true if current date 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 yyyymmddhhmm (but 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!! Use with [[Site/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}:)@] At beginning of list%0a [@(:if equal {>$Group}:)@] At end of list%0a [@(:if ! equal {=$Group} {%3c$Group}:)@] First item in group%0a [@(:if ! equal {=$Group} {>$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=1245515846 +rev=142 +targets=PmWiki.ReleaseNotes,PmWiki.ChangeLog,PmWiki.AuthUser,PmWiki.WikiTrails,PmWiki.PageTextVariables,PmWiki.PageVariables,PmWiki.MarkupExpressions,PmWiki.PageListTemplates,Site.PageListTemplates +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%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%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 for VALUE. VALUE may be 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..:)@]%0a(:cell:) - %0a(:cell:)true if current date is [@DATE@] or later (unlimited)%0a(:cellnr:)[@(:if date DATE1..DATE2:)@]%0a(:cell:) - %0a(:cell:)true if current date 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 yyyymmddhhmm (but 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=1247248911 Index: wikilib.d/PmWiki.LinkVariables =================================================================== --- wikilib.d/PmWiki.LinkVariables (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.LinkVariables (.../pmwiki-2.2.3) (revision 2380) @@ -1,13 +1,11 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=fix link +csum=changing $MakePageNamePatterns host=81.65.14.164 name=PmWiki.LinkVariables -passwdattr=$1$DU.9UyaK$rMGi/8lBMo6tji5HSrjxh1 -passwdedit=$1$c55p1bNa$aDxTGK97g3Q607iuzABd20 -rev=54 +rev=58 targets=PmWiki.CustomInterMap,PmWiki.PageDirectives -text=(:Summary:variables that control the display of links in pages:)%0a(:Audience: admins (advanced):)%0a%0a:$EnableLinkPageRelative:When enabled, causes PmWiki to use relative urls for page links instead of absolute urls.%0a $EnableLinkPageRelative = 1;%0a%0a:$PagePathFmt: This array lists the order in which PmWiki looks for the page that you ''most likely'' are attempting to link to. The default is listed below. Look at Cookbook:PagePaths for some ideas.%0a [=array('{$Group}.$1','$1.$1'.'$1.{$DefaultName}')=]%0a%0a:$LinkPageExistsFmt:The (HTML) string to output for links to already existing wiki pages. Defaults to %0a %3ca class='wikilink' href='\$LinkUrl'>\$LinkText%3c/a>%0a%0a:$LinkPageCreateFmt:The (HTML) string to output for links to non-existent wiki pages. The default is to add a '?' after the link text with a link to the page edit/create form. Defaults to%0a %3ca class='createlinktext' href='\$PageUrl?action=edit'>\$LinkText%3c/a>%0a %3ca class='createlink' href='\$PageUrl?action=edit'>?%3c/a>%0a%0a:$LinkPageCreateSpaceFmt:Same as $LinkPageCreateFmt, but used when the link text has a space in it. %0a%0a:$LinkPageSelfFmt:The (HTML) string to output for self-referencing links (i.e. links to the page itself). Defaults to%0a %3ca class='selflink' href='\$LinkUrl'>\$LinkText%3c/a>%0a%0a:$UrlLinkFmt:The (HTML) string to output for URL-links that begin with 'http:', 'ftp:', etc. Defaults to%0a %3ca class='urllink' href='\$LinkUrl' rel='nofollow'>\$LinkText%3c/a>%0a%0a:$IMapLinkFmt: an array of link formats for various link "schemes". Not set as default.%0a->Examples of custom formats to allow different styling via classes: %0a->Links to http: standard url links:%0a $IMapLinkFmt['http:'] = "%3ca class='httplink urllink' href='\$LinkUrl'>\$LinkText%3c/a>"; %0a->Links to https: secure pages:%0a $IMapLinkFmt['https:'] = "%3ca class='httpslink urllink' href='\$LinkUrl'>\$LinkText%3c/a>"; %0a->Links to PmWiki: InterMap shortcut:%0a $IMapLinkFmt['PmWiki:'] = "%3ca class='pmwikilink urllink' href='\$LinkUrl'>\$LinkText%3c/a>"; %0a->Links to Cookbook: InterMap shortcut %0a $IMapLinkFmt['Cookbook:'] = "%3ca class='cookbooklink urllink' href='\$LinkUrl'>\$LinkText%3c/a>"; %0a%0a:$InterMapFiles:An array consisting a list of files and pages containing InterMap entries to be loaded (see [[CustomInterMap]]).%0a%0a:$MakePageNameFunction:Name of a custom function to replace `MakePageName(), which converts strings into valid page names.%0a%0a:$MakePageNamePatterns:%0a: :$MakePageNamePatterns is an array of regular expression replacements that is used to map the page link in a ''free link'' such as [@[[free link]]@] into a page name. Currently the default sequence is: [@%0a "/'/" => '', # strip single-quotes%0a "/[^$PageNameChars]+/" => ' ', # convert non-alnums to spaces%0a "/((^|[^-\\w])\\w)/e" %0a => "strtoupper('$1')", # initial caps after spaces%0a "/ /" => '' # strip spaces%0a@]%0a%0a:$WikiWordCountMax:The maximum number of times to convert each WikiWord encountered on a page. Defaults to 1,000,000. Common settings for this variable are zero (disable WikiWord links) and one (convert only the first occurrence of each WikiWord).%0a $WikiWordCountMax = 0; # disable WikiWord links%0a $WikiWordCountMax = 1; # convert only first WikiWord%0a%0a:$WikiWordCount:An array that allows the number of WikiWord conversions to be set on a per-WikiWord basis. The default is to use $WikiWordCountMax unless a value is set in this array. By default PmWiki sets @@$WikiWordCount['PmWiki']=1@@ to limit the number of conversions of "PmWiki".%0a $WikiWordCount[=['PhD']=0; # Don't convert "PhD"=]%0a $WikiWordCount['WikiWord']=5; # Convert WikiWord 5 times%0a # the following lines keep a page from linking to itself%0a $title = [=FmtPageName=]('$Title_',$pagename);%0a $WikiWordCount[$title]=0; %0a %0a:$EnableRedirectQuiet:Enable the @@quiet=1@@ parameter for the [[PmWiki.PageDirectives#redirect|redirect directive]]. On publicly edited wikis it is advisable not to enable quiet redirects.%0a $EnableRedirectQuiet = 0; # disable quiet redirects (default)%0a $EnableRedirectQuiet = 1; # enable quiet redirects%0a -time=1233270798 +text=(:Summary:variables that control the display of links in pages:)%0a(:Audience: admins (advanced):)%0a:$EnableLinkPageRelative:When enabled, causes PmWiki to use relative urls for page links instead of absolute urls.%0a $EnableLinkPageRelative = 1;%0a%0a:$PagePathFmt: This array lists the order in which PmWiki looks for the page that you ''most likely'' are attempting to link to. The default is listed below. Look at Cookbook:PagePaths for some ideas.%0a [=array('{$Group}.$1','$1.$1'.'$1.{$DefaultName}')=]%0a%0a:$LinkPageExistsFmt:The (HTML) string to output for links to already existing wiki pages. Defaults to %0a %3ca class='wikilink' href='\$LinkUrl'>\$LinkText%3c/a>%0a%0a:$LinkPageCreateFmt:The (HTML) string to output for links to non-existent wiki pages. The default is to add a '?' after the link text with a link to the page edit/create form. Defaults to%0a %3ca class='createlinktext' href='\$PageUrl?action=edit'>\$LinkText%3c/a>%0a %3ca class='createlink' href='\$PageUrl?action=edit'>?%3c/a>%0a%0a:$LinkPageCreateSpaceFmt:Same as $LinkPageCreateFmt, but used when the link text has a space in it. %0a%0a:$LinkPageSelfFmt:The (HTML) string to output for self-referencing links (i.e. links to the page itself). Defaults to%0a %3ca class='selflink' href='\$LinkUrl'>\$LinkText%3c/a>%0a%0a:$UrlLinkFmt:The (HTML) string to output for URL-links that begin with 'http:', 'ftp:', etc. Defaults to%0a %3ca class='urllink' href='\$LinkUrl' rel='nofollow'>\$LinkText%3c/a>%0a%0a:$IMapLinkFmt: an array of link formats for various link "schemes". Not set as default.%0a->Examples of custom formats to allow different styling via classes: %0a->Links to http: standard url links:%0a $IMapLinkFmt['http:'] = "%3ca class='httplink urllink' href='\$LinkUrl'>\$LinkText%3c/a>"; %0a->Links to https: secure pages:%0a $IMapLinkFmt['https:'] = "%3ca class='httpslink urllink' href='\$LinkUrl'>\$LinkText%3c/a>"; %0a->Links to PmWiki: InterMap shortcut:%0a $IMapLinkFmt['PmWiki:'] = "%3ca class='pmwikilink urllink' href='\$LinkUrl'>\$LinkText%3c/a>";%0a%0a:$InterMapFiles:An array consisting a list of files and pages containing InterMap entries to be loaded (see [[CustomInterMap]]).%0a%0a:$MakePageNameFunction:Name of a custom function to replace `MakePageName(), which converts strings into valid page names.%0a%0a:$MakePageNamePatterns: $MakePageNamePatterns is an array of regular expression replacements that is used to map the page link in a ''free link'' such as [@[[free link]]@] into a page name. Currently the default sequence is: [@%0a "/'/" => '', # strip single-quotes%0a "/[^$PageNameChars]+/" => ' ', # convert non-alnums to spaces%0a "/((^|[^-\\w])\\w)/e" %0a => "strtoupper('$1')", # initial caps after spaces%0a "/ /" => '' # strip spaces%0a@]%0a: :Note that if you change $MakePageNamePatterns, the documentation links may break. This can be fixed by re-setting $MakePageNamePatterns to the default in local/PmWiki.php.%0a%0a:$WikiWordCountMax:The maximum number of times to convert each WikiWord encountered on a page. Defaults to 1,000,000. Common settings for this variable are zero (disable WikiWord links) and one (convert only the first occurrence of each WikiWord).%0a $WikiWordCountMax = 0; # disable WikiWord links%0a $WikiWordCountMax = 1; # convert only first WikiWord%0a%0a:$WikiWordCount:An array that allows the number of WikiWord conversions to be set on a per-WikiWord basis. The default is to use $WikiWordCountMax unless a value is set in this array. By default PmWiki sets @@$WikiWordCount['PmWiki']=1@@ to limit the number of conversions of "PmWiki".%0a $WikiWordCount[=['PhD']=0; # Don't convert "PhD"=]%0a $WikiWordCount['WikiWord']=5; # Convert WikiWord 5 times%0a # the following lines keep a page from linking to itself%0a $title = [=FmtPageName=]('$Title_',$pagename);%0a $WikiWordCount[$title]=0; %0a %0a:$EnableRedirectQuiet:Enable the @@quiet=1@@ parameter for the [[PmWiki.PageDirectives#redirect|redirect directive]]. On publicly edited wikis it is advisable not to enable quiet redirects.%0a $EnableRedirectQuiet = 0; # disable quiet redirects (default)%0a $EnableRedirectQuiet = 1; # enable quiet redirects%0a +time=1247410666 Index: wikilib.d/PmWiki.PasswordsAdmin =================================================================== --- wikilib.d/PmWiki.PasswordsAdmin (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.PasswordsAdmin (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=fix link +csum=corrected reply host=81.65.14.164 name=PmWiki.PasswordsAdmin post= Save -rev=165 +rev=166 targets=PmWiki.Passwords,PmWiki.WikiGroup,PmWiki.Security,PmWiki.WikiAdministrator,PmWiki.AvailableActions,PmWiki.AuthUser,PmWiki.PasswordsAdmin,PmWiki.ConditionalMarkup,PmWiki.PerGroupCustomizations,Site.AuthForm -text=(:Summary:More password options for the administrator:)(:Audience: administrators (basic) :)%0aPmWiki has built-in support for [[Passwords|password-protecting]] various areas of the wiki site. Passwords can be applied to individual pages, to [[Wiki Group]]s, or to the entire wiki site. Note that the password protection mechanisms described here are only a small part of overall system (and wiki) security, see [[PmWiki.Security]] for more discussion of this.%0a%0aAuthors can use PmWiki to add passwords to individual pages and WikiGroups as described in [[Passwords]]. However, [[WikiAdministrator]]s can also set passwords in ''local/config.php'' as described below. (Please note that one cannot set passwords reliably in per group or per page customization files. See the [[#faq | FAQ section]] for details.)%0a%0a[[#authlevel]]%0a!! Password basics%0a%0aPmWiki supports several levels of access to wiki pages, known as authorisation level:%0a* '''@@read@@''' passwords allow viewing the contents of wiki pages%0a* '''@@edit@@''' passwords control editing and modification of wiki pages%0a* '''@@attr@@''' passwords control who is able to set passwords on pages (and potentially other future attributes)%0a* '''@@upload@@''' password, if uploads are enabled, controls uploading of files and attachments%0a* in addition all [[available actions]] can be password authorised%0a* '''@@admin@@''' password allows an administrator to override the passwords set for any individual page or group.%0a%0aBy default, PmWiki has the following password settings:%0a* The @@admin@@ and @@upload@@ passwords are locked by default.%0a* The Main and PmWiki groups have a locked @@attr@@ password (in their respective `GroupAttributes pages).%0a* The pages in the Site group except `Site.SideBar are locked against editing; by default the Site.SideBar page requires the admin or the site-wide edit password.%0a%0aAn @@admin@@ password can be used to overcome "locked" passwords, other than that, no password will allow access.%0a%0aSee [[Passwords]] for information about setting per-page and per-group passwords. %0aThe remainder of this page describes setting site-wide passwords from the ''local/config.php'' file.%0a%0a[[#settingsitewidepasswords]]%0a!! Setting site-wide passwords%0a%0aOne of the first things an admin should do is set an @@admin@@ password for the site. This is done via a line like the following in the ''local/config.php'' file:%0a%0a-> $DefaultPasswords['admin'] = crypt('secret_password');%0a%0aNote that the crypt() call is required for this -- PmWiki stores and processes all passwords internally as encrypted strings. See the [[#crypt | crypt section]] below for details about eliminating the cleartext password from the configuration file.%0a%0aTo set the entire site to be editable only by those who know an "edit" password, add a line like the following to ''local/config.php'':%0a%0a-> $DefaultPasswords['edit'] = crypt('edit_password');%0a%0aSimilarly, you can set a password for any [[available action(s)]], viz [@$DefaultPasswords['read']@], [@$DefaultPasswords['edit']@], and [@$DefaultPasswords['upload']@] to control default @@read@@, @@edit@@, and @@upload@@ passwords for the entire site. The default passwords are used only for pages and groups which do not have passwords set. Also, each of the $DefaultPasswords values may be arrays of encrypted passwords:%0a%0a-> $DefaultPasswords['read'] = array(crypt('alpha'), crypt('beta'));%0a-> $DefaultPasswords['edit'] = crypt('beta');%0a%0aThis says that either "alpha" or "beta" can be used to read pages, but only the "beta" password will allow someone to edit a page. Since PmWiki remembers any passwords entered during the current session, the "beta" password will allow both reading and writing of pages, while the "alpha" password allows reading only. A person without either password would be unable to view pages at all.%0a%0a!! Identity-based authorization (username/password logins, [[AuthUser]])%0a%0aUnlike many systems which have '''identity-based''' systems for controlling access to pages (e.g., using a separate ''username'' and ''password'' for each person), PmWiki defaults to a ''password-based'' system as described above. In general password-based systems are often easier to maintain because they avoid the administrative overheads of creating user accounts, recovering lost passwords, and mapping usernames to permitted actions.%0a%0aHowever, PmWiki's ''authuser.php'' script augments the password-based system to allow access to pages based on a username and password combination. See [[AuthUser]] for more details on controlling access to pages based on user identity.%0a%0a!!Security holes ...%0a%0aAdministrators need to carefully plan where passwords are applied to avoid opening inadvertent security holes. If your wiki is open (anyone can read and edit), this would not seem to be a concern, '''except''', a malicious or confused user could apply a read password to a group and make the group completely unavailable to all other users. At the very least, even an open wiki should have a site-wide "admin" password and a site-wide "attr" password set in config.php. The ''sample-config.php'' file distributed with PmWiki indicates that the PmWiki and Main groups have "attr" locked by default, but if anyone creates a new group, "attr" is unlocked. Administrators must remember to set "attr" passwords for each new group (if desired) in this case. An easier solution is to include these lines in ''config.php'' :%0a%0a-> [@%0a$DefaultPasswords['admin'] = crypt('youradminpassword');%0a$DefaultPasswords['attr'] = crypt('yourattrpassword');%0a@]%0a%0a!! Encrypting passwords in ''config.php'' [[#crypt]]%0a%0aOne drawback to using the crypt() function directly to set passwords in ''config.php'' is that anyone able to view the file will see the unencrypted password. For example, if ''config.php'' contains%0a%0a-> $DefaultPasswords['admin'] = crypt('mysecret');%0a%0athen the "mysecret" password is in plain text for others to see. However, a wiki administrator can obtain and use an encrypted form of the password directly by using [@?action=crypt@] on any PmWiki url (or just jump to [[{$Name}?action=crypt]]). This action presents a form that generates encrypted versions of passwords for use in the ''config.php'' file. For example, when [@?action=crypt@] is given the password "@@mysecret@@", PmWiki will return a string like%0a%0a-> [@$1$hMMhCdfT$mZSCh.BJOidMRn4SOUUSi1@]%0a%0aThe string returned from [@?action=crypt@] can then be placed directly into config.php, as in:%0a%0a-> $DefaultPasswords['admin'] = [='$1$hMMhCdfT$mZSCh.BJOidMRn4SOUUSi1'=]; %0a%0aNote that in the encrypted form the ''crypt'' keyword and parentheses are removed, since the password is already encrypted. Also, the encrypted password must be in single quotes. In this example the password is still "@@mysecret@@", but somebody looking at ''config.php'' won't be able to see that just from looking at the encrypted form. ''Crypt'' may give you different encryptions for the same password--this is normal (and makes it harder for someone else to determine the original password).%0a%0a!! Removing passwords%0a%0aTo remove a site password entirely, such as the default locked password for uploads, just set it to empty:%0a%0a-> $DefaultPasswords['upload'] = '';%0a%0aYou can also use the special password "@nopass" via @@?action=attr@@ to have a non-password protected page within a password-protected group, or a non-password protected group with a site-wide default password set.%0a%0a!! Revoking or invalidating passwords%0a%0aIf a password is compromised and the wiki administrator wants to quickly invalidate all uses of that password on a site, a quick solution is the following in ''local/config.php'':%0a%0a-> [@%0a$ForbiddenPasswords = array('secret', 'tanstaafl');%0aif (in_array(@$_POST['authpw'], $ForbiddenPasswords)) %0a unset($_POST['authpw']);%0a@]%0a%0aThis prevents "secret" and "tanstaafl" from ever being accepted as a%0avalid authorization password, regardless of what pages may be%0ausing it.%0a%0a!! See Also%0a%0a* The $HandleAuth array, which sets the required authentication level that is necessary to perform an action.%0a* [[Cookbook:RequireAuthor]]%0a%0a!! Protecting actions (example)%0a%0aEach [[(available) action(s)]] can be password protected. Cookbook authors providing scripts with own actions can use this also, but I'll limit the example to a (by default) not protected [@?action=source@]. This action shows the wikisource of the actual page. Sometimes you don't want that especially to [[Cookbook:protect email]] or when using some [[PmWiki/conditional markup]] which should not be discovered easily or only by persons that are allowed to edit the page.%0a%0aThere are several solutions for that:%0a# Limit "source" only to editors add the following to your ''local/config.php'':%0a %0a--> [@$HandleAuth['source'] ='edit';@]%0a%0a# For using "source" with an own password, then add:%0a%0a--> [@$HandleAuth['source'] ='source';@]%0a--> [@$DefaultPasswords['source'] = crypt(secret);@] # ''see above''%0a%0aIf you additionally want to set the password in the attributes page add:%0a%0a--> [@$PageAttributes['passwdsource'] = "$['Set new source password']";@]%0a%0aIn general, adding the prefix 'passwd' to an action name in the [@$PageAttributes@] array indicates that you wish for the given field to be encrypted when saved to disk.%0a%0aThe full set of steps to add new password handling for an action such as "diff" would be:%0a%0a->[@%0a# add a new (encrypted) field to the attr page%0a$PageAttributes['passwddiff'] = '$[Set new history password]';%0a%0a# clear the default password for 'diff'%0a$DefaultPasswords['diff'] = '';%0a%0a# Tell PmWiki that the 'diff' password allows action 'diff'.%0a$HandleAuth['diff'] = 'diff';%0a%0a# Tell PmWiki that a 'read' password %0a# (or optionally the 'edit') password%0a# is also sufficient to enable 'diff'.%0a# Of course, the 'admin' password will work too.%0a$AuthCascade['diff'] = 'read'; ## or 'edit'%0a@]%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: There seems to be a default password. What is it? [[#pwlocked]]%0aA: There isn't any valid password until you set one. [[Passwords admin]] describes how to set one.%0a%0aPmWiki comes "out of the box" with $DefaultPasswords['admin'] set to '*'. This doesn't mean the password is an asterisk, it means that default admin password has to be something that encrypts to an asterisk. Since it's impossible for the crypt() function to ever return a 1-character encrypted value, the admin password is effectively locked until the admin sets one in config.php.%0a%0aQ: How do I use passwd-formatted files (like .htpasswd) for authentication?%0aA: See [[AuthUser]], Cookbook:HtpasswdForm or Cookbook:UserAuth.%0a%0aQ: Is there anything I can enter in a GroupAttributes field to say 'same as the admin password'? If not, is there anything I can put into the config.php file to have the same effect?%0a%0aA: For the sitewide edit password (in config.php), use '@_site_edit'. I haven't tested this, but I think one can also use '@_site_admin', '@_site_read', '@_site_attr', etc. for the other site-wide passwords set in config.php. '@admin' is used to specify the site admin password.%0a%0aQ: How do I edit protect, say, all RecentChanges pages?%0aA: see [[PmWiki/Security#wikivandalism]].%0a%0aQ: How can I read password protect all pages in a group except the HomePage using configuration files?%0a%0aA: As described in [[PmWiki.PerGroupCustomizations]] per-group or per-page configuration files should not be used for defining passwords. The reason is that per-group (or per-page) customization files are only loaded for the current page. So, if @@[=$DefaultPasswords['read']=]@@ is set in ''local/GroupA.php'', then someone could use a page in another group to view the contents of pages in GroupA. For example, Main.WikiSandbox could contain:%0a%0a--> [=(:include GroupA.SomePage:)=]%0a%0aand because the ''GroupA.php'' file wasn't loaded (we're looking at Main.WikiSandbox --> ''local/Main.php''), there's no read password set.%0a%0aQ: How can I password protect the creation of new pages?%0aA: See Cookbook:LimitWikiGroups, Cookbook:NewGroupWarning, Cookbook:LimitNewPagesInWikiGroups.%0a%0aQ: How do I change the password prompt screen?%0aA: If your question is about how to make changes to that page... edit [[Site.AuthForm]]. If your question is about how to change which page you are sent to when prompted for a password, you might check out the [[Cookbook:CustomAuthForm]] for help.%0a%0aQ: I get http error 500 "Internal Server Error" when I try to log in. What's wrong?%0aA: This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki.\\%0aThe crypt function changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1.\\%0aThis situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version.\\%0aThe same error occurs when you add encrypted passwords to local/config.php.%0a%0aSolution: Create the passwords on the system with the oldest PHP version and use them on all other systems.%0a%0aQ: I only want users to have to create an 'edit' password, which is automatically used for their 'upload' & 'attr' passwords (without them having to set those independently). How do I do this?%0aA: By setting [@$HandleAuth@] like so:%0a $HandleAuth['upload'] = 'edit';%0a // And to prevent a WikiSandbox from having it's 'attr' permissions changed %0a // except by the admin (but allowing editors to change it on their own pages/group)%0a if(($group=="Site") || ($group=="Main") || ($group=="Category") || %0a ($group=="SiteAdmin") || ($group=="PmWiki") ) {%0a $HandleAuth['attr'] = 'admin'; // for all main admin pages, set 'attr' to 'admin' password%0a } else { %0a $HandleAuth['attr'] = 'edit'; // if you can edit, then you can set attr%0a }%0a%0a -time=1238275636 +text=(:Summary:More password options for the administrator:)(:Audience: administrators (basic) :)%0aPmWiki has built-in support for [[Passwords|password-protecting]] various areas of the wiki site. Passwords can be applied to individual pages, to [[Wiki Group]]s, or to the entire wiki site. Note that the password protection mechanisms described here are only a small part of overall system (and wiki) security, see [[PmWiki.Security]] for more discussion of this.%0a%0aAuthors can use PmWiki to add passwords to individual pages and WikiGroups as described in [[Passwords]]. However, [[WikiAdministrator]]s can also set passwords in ''local/config.php'' as described below. (Please note that one cannot set passwords reliably in per group or per page customization files. See the [[#faq | FAQ section]] for details.)%0a%0a[[#authlevel]]%0a!! Password basics%0a%0aPmWiki supports several levels of access to wiki pages, known as authorisation level:%0a* '''@@read@@''' passwords allow viewing the contents of wiki pages%0a* '''@@edit@@''' passwords control editing and modification of wiki pages%0a* '''@@attr@@''' passwords control who is able to set passwords on pages (and potentially other future attributes)%0a* '''@@upload@@''' password, if uploads are enabled, controls uploading of files and attachments%0a* in addition all [[available actions]] can be password authorised%0a* '''@@admin@@''' password allows an administrator to override the passwords set for any individual page or group.%0a%0aBy default, PmWiki has the following password settings:%0a* The @@admin@@ and @@upload@@ passwords are locked by default.%0a* The Main and PmWiki groups have a locked @@attr@@ password (in their respective `GroupAttributes pages).%0a* The pages in the Site group except `Site.SideBar are locked against editing; by default the Site.SideBar page requires the admin or the site-wide edit password.%0a%0aAn @@admin@@ password can be used to overcome "locked" passwords, other than that, no password will allow access.%0a%0aSee [[Passwords]] for information about setting per-page and per-group passwords. %0aThe remainder of this page describes setting site-wide passwords from the ''local/config.php'' file.%0a%0a[[#settingsitewidepasswords]]%0a!! Setting site-wide passwords%0a%0aOne of the first things an admin should do is set an @@admin@@ password for the site. This is done via a line like the following in the ''local/config.php'' file:%0a%0a-> $DefaultPasswords['admin'] = crypt('secret_password');%0a%0aNote that the crypt() call is required for this -- PmWiki stores and processes all passwords internally as encrypted strings. See the [[#crypt | crypt section]] below for details about eliminating the cleartext password from the configuration file.%0a%0aTo set the entire site to be editable only by those who know an "edit" password, add a line like the following to ''local/config.php'':%0a%0a-> $DefaultPasswords['edit'] = crypt('edit_password');%0a%0aSimilarly, you can set a password for any [[available action(s)]], viz [@$DefaultPasswords['read']@], [@$DefaultPasswords['edit']@], and [@$DefaultPasswords['upload']@] to control default @@read@@, @@edit@@, and @@upload@@ passwords for the entire site. The default passwords are used only for pages and groups which do not have passwords set. Also, each of the $DefaultPasswords values may be arrays of encrypted passwords:%0a%0a-> $DefaultPasswords['read'] = array(crypt('alpha'), crypt('beta'));%0a-> $DefaultPasswords['edit'] = crypt('beta');%0a%0aThis says that either "alpha" or "beta" can be used to read pages, but only the "beta" password will allow someone to edit a page. Since PmWiki remembers any passwords entered during the current session, the "beta" password will allow both reading and writing of pages, while the "alpha" password allows reading only. A person without either password would be unable to view pages at all.%0a%0a!! Identity-based authorization (username/password logins, [[AuthUser]])%0a%0aUnlike many systems which have '''identity-based''' systems for controlling access to pages (e.g., using a separate ''username'' and ''password'' for each person), PmWiki defaults to a ''password-based'' system as described above. In general password-based systems are often easier to maintain because they avoid the administrative overheads of creating user accounts, recovering lost passwords, and mapping usernames to permitted actions.%0a%0aHowever, PmWiki's ''authuser.php'' script augments the password-based system to allow access to pages based on a username and password combination. See [[AuthUser]] for more details on controlling access to pages based on user identity.%0a%0a!!Security holes ...%0a%0aAdministrators need to carefully plan where passwords are applied to avoid opening inadvertent security holes. If your wiki is open (anyone can read and edit), this would not seem to be a concern, '''except''', a malicious or confused user could apply a read password to a group and make the group completely unavailable to all other users. At the very least, even an open wiki should have a site-wide "admin" password and a site-wide "attr" password set in config.php. The ''sample-config.php'' file distributed with PmWiki indicates that the PmWiki and Main groups have "attr" locked by default, but if anyone creates a new group, "attr" is unlocked. Administrators must remember to set "attr" passwords for each new group (if desired) in this case. An easier solution is to include these lines in ''config.php'' :%0a%0a-> [@%0a$DefaultPasswords['admin'] = crypt('youradminpassword');%0a$DefaultPasswords['attr'] = crypt('yourattrpassword');%0a@]%0a%0a!! Encrypting passwords in ''config.php'' [[#crypt]]%0a%0aOne drawback to using the crypt() function directly to set passwords in ''config.php'' is that anyone able to view the file will see the unencrypted password. For example, if ''config.php'' contains%0a%0a-> $DefaultPasswords['admin'] = crypt('mysecret');%0a%0athen the "mysecret" password is in plain text for others to see. However, a wiki administrator can obtain and use an encrypted form of the password directly by using [@?action=crypt@] on any PmWiki url (or just jump to [[{$Name}?action=crypt]]). This action presents a form that generates encrypted versions of passwords for use in the ''config.php'' file. For example, when [@?action=crypt@] is given the password "@@mysecret@@", PmWiki will return a string like%0a%0a-> [@$1$hMMhCdfT$mZSCh.BJOidMRn4SOUUSi1@]%0a%0aThe string returned from [@?action=crypt@] can then be placed directly into config.php, as in:%0a%0a-> $DefaultPasswords['admin'] = [='$1$hMMhCdfT$mZSCh.BJOidMRn4SOUUSi1'=]; %0a%0aNote that in the encrypted form the ''crypt'' keyword and parentheses are removed, since the password is already encrypted. Also, the encrypted password must be in single quotes. In this example the password is still "@@mysecret@@", but somebody looking at ''config.php'' won't be able to see that just from looking at the encrypted form. ''Crypt'' may give you different encryptions for the same password--this is normal (and makes it harder for someone else to determine the original password).%0a%0a!! Removing passwords%0a%0aTo remove a site password entirely, such as the default locked password for uploads, just set it to empty:%0a%0a-> $DefaultPasswords['upload'] = '';%0a%0aYou can also use the special password "@nopass" via @@?action=attr@@ to have a non-password protected page within a password-protected group, or a non-password protected group with a site-wide default password set.%0a%0a!! Revoking or invalidating passwords%0a%0aIf a password is compromised and the wiki administrator wants to quickly invalidate all uses of that password on a site, a quick solution is the following in ''local/config.php'':%0a%0a-> [@%0a$ForbiddenPasswords = array('secret', 'tanstaafl');%0aif (in_array(@$_POST['authpw'], $ForbiddenPasswords)) %0a unset($_POST['authpw']);%0a@]%0a%0aThis prevents "secret" and "tanstaafl" from ever being accepted as a%0avalid authorization password, regardless of what pages may be%0ausing it.%0a%0a!! See Also%0a%0a* The $HandleAuth array, which sets the required authentication level that is necessary to perform an action.%0a* [[Cookbook:RequireAuthor]]%0a%0a!! Protecting actions (example)%0a%0aEach [[(available) action(s)]] can be password protected. Cookbook authors providing scripts with own actions can use this also, but I'll limit the example to a (by default) not protected [@?action=source@]. This action shows the wikisource of the actual page. Sometimes you don't want that especially to [[Cookbook:protect email]] or when using some [[PmWiki/conditional markup]] which should not be discovered easily or only by persons that are allowed to edit the page.%0a%0aThere are several solutions for that:%0a# Limit "source" only to editors add the following to your ''local/config.php'':%0a %0a--> [@$HandleAuth['source'] ='edit';@]%0a%0a# For using "source" with an own password, then add:%0a%0a--> [@$HandleAuth['source'] ='source';@]%0a--> [@$DefaultPasswords['source'] = crypt(secret);@] # ''see above''%0a%0aIf you additionally want to set the password in the attributes page add:%0a%0a--> [@$PageAttributes['passwdsource'] = "$['Set new source password']";@]%0a%0aIn general, adding the prefix 'passwd' to an action name in the [@$PageAttributes@] array indicates that you wish for the given field to be encrypted when saved to disk.%0a%0aThe full set of steps to add new password handling for an action such as "diff" would be:%0a%0a->[@%0a# add a new (encrypted) field to the attr page%0a$PageAttributes['passwddiff'] = '$[Set new history password]';%0a%0a# clear the default password for 'diff'%0a$DefaultPasswords['diff'] = '';%0a%0a# Tell PmWiki that the 'diff' password allows action 'diff'.%0a$HandleAuth['diff'] = 'diff';%0a%0a# Tell PmWiki that a 'read' password %0a# (or optionally the 'edit') password%0a# is also sufficient to enable 'diff'.%0a# Of course, the 'admin' password will work too.%0a$AuthCascade['diff'] = 'read'; ## or 'edit'%0a@]%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: There seems to be a default password. What is it? [[#pwlocked]]%0aA: There isn't any valid password until you set one. [[Passwords admin]] describes how to set one.%0a%0aPmWiki comes "out of the box" with $DefaultPasswords['admin'] set to '*'. This doesn't mean the password is an asterisk, it means that default admin password has to be something that encrypts to an asterisk. Since it's impossible for the crypt() function to ever return a 1-character encrypted value, the admin password is effectively locked until the admin sets one in config.php.%0a%0aQ: How do I use passwd-formatted files (like .htpasswd) for authentication?%0aA: See [[AuthUser]], Cookbook:HtpasswdForm or Cookbook:UserAuth.%0a%0aQ: Is there anything I can enter in a GroupAttributes field to say 'same as the admin password'? If not, is there anything I can put into the config.php file to have the same effect?%0a%0aA: Enter '@lock' in GroupAttributes?action=attr to require an admin password for that group.%0a%0aQ: How do I edit protect, say, all RecentChanges pages?%0aA: see [[PmWiki/Security#wikivandalism]].%0a%0aQ: How can I read password protect all pages in a group except the HomePage using configuration files?%0a%0aA: As described in [[PmWiki.PerGroupCustomizations]] per-group or per-page configuration files should not be used for defining passwords. The reason is that per-group (or per-page) customization files are only loaded for the current page. So, if @@[=$DefaultPasswords['read']=]@@ is set in ''local/GroupA.php'', then someone could use a page in another group to view the contents of pages in GroupA. For example, Main.WikiSandbox could contain:%0a%0a--> [=(:include GroupA.SomePage:)=]%0a%0aand because the ''GroupA.php'' file wasn't loaded (we're looking at Main.WikiSandbox --> ''local/Main.php''), there's no read password set.%0a%0aQ: How can I password protect the creation of new pages?%0aA: See Cookbook:LimitWikiGroups, Cookbook:NewGroupWarning, Cookbook:LimitNewPagesInWikiGroups.%0a%0aQ: How do I change the password prompt screen?%0aA: If your question is about how to make changes to that page... edit [[Site.AuthForm]]. If your question is about how to change which page you are sent to when prompted for a password, you might check out the [[Cookbook:CustomAuthForm]] for help.%0a%0aQ: I get http error 500 "Internal Server Error" when I try to log in. What's wrong?%0aA: This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki.\\%0aThe crypt function changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1.\\%0aThis situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version.\\%0aThe same error occurs when you add encrypted passwords to local/config.php.%0a%0aSolution: Create the passwords on the system with the oldest PHP version and use them on all other systems.%0a%0aQ: I only want users to have to create an 'edit' password, which is automatically used for their 'upload' & 'attr' passwords (without them having to set those independently). How do I do this?%0aA: By setting [@$HandleAuth@] like so:%0a $HandleAuth['upload'] = 'edit';%0a // And to prevent a WikiSandbox from having it's 'attr' permissions changed %0a // except by the admin (but allowing editors to change it on their own pages/group)%0a if(($group=="Site") || ($group=="Main") || ($group=="Category") || %0a ($group=="SiteAdmin") || ($group=="PmWiki") ) {%0a $HandleAuth['attr'] = 'admin'; // for all main admin pages, set 'attr' to 'admin' password%0a } else { %0a $HandleAuth['attr'] = 'edit'; // if you can edit, then you can set attr%0a }%0a%0a +time=1247235020 Index: wikilib.d/PmWiki.AvailableActions =================================================================== --- wikilib.d/PmWiki.AvailableActions (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.AvailableActions (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 FirePHP/0.2.4 -author=Frank +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 charset=ISO-8859-1 -csum= -host=95.36.0.159 +csum=fix links and formatting for a release +host=81.65.14.164 name=PmWiki.AvailableActions -rev=104 -targets=PmWiki.Passwords,PmWiki.PageHistory,PmWiki.BasicEditing,PmWiki.RefCount,PmWiki.Search,PmWiki.WebFeeds,PmWiki.SitePreferences,PmWiki.Uploads,PmWiki.AnalyzeResults,PmWiki.CustomMarkup,PmWiki.SiteAnalyzer,PmWiki.UrlApprovals,PmWiki.CustomActions,PmWiki.WikiFarms -text=(:Summary: All PmWiki page actions (?action=):)%0a(:div class="rfloat frame" style="font-size:smaller; clear:right;" :)%0a!!!! Table of contents%0a* [[#defaultactions| Default actions]]%0a* [[#enablediag| Enable diag actions]]%0a* [[#scriptactions | Script actions]]%0a* [[#cookbook | Cookbook actions]]%0a(:divend:)%0a%0a[[#defaultactions]]%0a!! Default Actions%0a%0a[[#attr]]%0a:?action='''attr''': displays dialog for setting/changing password of the specified page, see [[PmWiki/passwords]], see also $EnablePostAttrClearSession if you do not want to have the session cleared after validating change [-{PmWiki/Passwords$:Summary}-]%0a%0a[[#browse]]%0a:?action='''browse''': display the specified page (default action if no [@?action=@] is present)%0a%0a[[#crypt]]%0a:?action='''crypt''': displays a form for generating hashed [[Passwords | passwords]] out of clear text for usage in your config.php%0a%0a[[#diff]]%0a:?action='''diff''': show a change history of the specified page, see [[PmWiki/page history]] [-{PmWiki/PageHistory$:Summary}-]%0a%0a[[#download]]%0a:?action='''download'''&upname=''file.ext'': retrieve the page's attachment named ''file.ext'', see $EnableDirectDownload%0a%0a[[#edit]]%0a:?action='''edit''': edit the specified page, see [[PmWiki/basic editing]] [-{PmWiki/BasicEditing$:Summary}-]%0a%0a[[#login]]%0a:?action='''login''': prompt visitor for username/password%0a%0a[[#logout]]%0a:?action='''logout''': remove author, password, and login information%0a%0a[[#print]]%0a:?action='''print''': display the specified page using the skin specified by $ActionSkin['print']%0a%0a[[#refcount]]%0a:?action='''refcount''': bring up the reference count form, which allows the user to generate a list of links (all, missing, existing or orphaned) in or from specified groups. See [[Ref Count]] [-{PmWiki/RefCount$:Summary}-]. Part of the core distribution but must be enabled by the administrator.%0a%0a[[#search]]%0a:?action='''search''': displays searchbox on current page, see [[PmWiki/search]] [-{PmWiki/Search$:Summary}-]%0a%0a:?action='''search'''&q=''searchterm'': performs search with ''searchterm'' and displays results on current page%0a%0a[[#source]]%0a:?action='''source''': show page source%0a%0a[[#feed]]%0a:?action='''atom''':%0a:?action='''rdf''':%0a:?action='''rss''':%0a:?action='''dc''': If [[web feeds]] are enabled, returns a syndication feed based on the contents of the page or other options provided by the url, see [[PmWiki/web feeds]] [-{PmWiki/WebFeeds$:Summary}-]%0a%0a[[#setprefs]]%0a:?'''setprefs'''=SomeGroup.CustomPreferences: sets cookie to custom preferences page. See [[PmWiki/site preferences]] [-{PmWiki/SitePreferences$:Summary}-]%0a%0a[[#upload]]%0a:?action='''upload''': display a form to upload an attachment for the current group, see [[PmWiki/uploads]] [-{Cookbook/Uploads$:Summary}-]%0a[[#defaultactionsend]]%0a----%0a[[#enablediag]]%0a!! Actions enabled by $EnableDiag%0a[[#BEGENABLEDIAG]]%0aThe following actions are available only if you [[PmWiki/AnalyzeResults#ActionDiag_enabled|set]] [@$EnableDiag = 1@] in your configuration file. They can be used for debugging and should not be set in a production environment.%0a%0a:?action='''ruleset''': displays a list of all markups in 3 columns:%0a** column 1 = markup-name (1. parameter of markup() )%0a** column 2 = when will rule apply (2. parameter of markup() )%0a** column 3 = PmWiki's internal sort key (derived from #2)%0a->(see [[Custom Markup]] [-{PmWiki/CustomMarkup$:Summary}-]).%0a->To see more than what [@?action=ruleset@] gives you, apply the [[Cookbook:MarkupRulesetDebugging]] recipe: it can also show the pattern and the replacement strings.%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#phpinfo]]%0a:?action='''phpinfo''': displays the output of phpinfo() and exits. no page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#diag]]%0a:?action='''diag''': displays a dump of all global vars and exits. no page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#ENDENABLEDIAG]]%0a----%0a[[#scriptactions]]%0a!! Actions enabled by PmWiki Scripts%0a%0a[[#analyse]]%0a:?action='''analyze''': see [[PmWiki/Site Analyzer]] [-{PmWiki/SiteAnalyzer$:Summary}-] and [[PmWiki/Analyze Results]] [-{PmWiki/AnalyzeResults$:Summary}-]%0a%0a[[#approvesites]]%0a:?action='''approvesites''': see [[PmWiki/Url approvals]] [-{PmWiki/UrlApprovals$:Summary}-]%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#analyseend]]%0a----%0a[[#cookbook]]%0a!! Actions enabled by [[Cookbook(:.)]] recipes%0a(more information about [[Custom Actions]])%0a%0a:?action='''admin''': see [[Cookbook:UserAuth2]] [-{Cookbook/UserAuth2$:Summary}-]%0a%0a:?action='''backup''': see [[Cookbook:BackupPages]] [-{Cookbook/BackupPages$:Summary}-]%0a%0a:?action='''clearsky''': see [[Cookbook:SearchCloud]] [-{Cookbook/SearchCloud$:Summary}-]%0a%0a:?action='''comment''': see [[Cookbook:CommentBox]] [-{Cookbook/CommentBox$:Summary}-]%0a%0a:?action='''comments''': see [[Cookbook:Comments]] [-{Cookbook/Comments$:Summary}-]%0a%0a:?action='''comment-rss''': see [[Cookbook:CommentDb]] [-{Cookbook/CommentDb$:Summary}-]%0a%0a:?action='''convert''': see [[Cookbook:ROEPatterns]] [-{Cookbook/ROEPatterns$:Summary}-]%0a%0a:?action='''converttable''': [[Cookbook:ConvertTable]] [-{Cookbook/ConvertTable$:Summary}-]%0a%0a:?action='''downloaddeleted''':%0a:?action='''delattach''':%0a:?action='''undelattach''': [[Cookbook:Attachtable]] [-{Cookbook/Attachtable$:Summary}-]%0a%0a:?action='''delete''': see [[Cookbook:DeleteAction]] [-{Cookbook/DeleteAction$:Summary}-]%0a%0a:?action='''discuss''': see [[Cookbook:DiscussionTab]] [-{Cookbook/DiscussionTab$:Summary}-]%0a%0a:?action='''downloadman''': see [[Cookbook:DownloadManager]] [-{Cookbook/DownloadManager$:Summary}-]%0a%0a:?action='''expirediff''': see [[Cookbook:ExpireDiff]] [-{Cookbook/ExpireDiff$:Summary}-]%0a%0a:?action='''import''': see [[Cookbook:ImportText]] [-{Cookbook/ImportText$:Summary}-]%0a%0a:?action='''PageUrl''': see [[Cookbook:CommentBoxPlus]] [-{Cookbook/CommentBoxPlus$:Summary}-]%0a%0a:?action='''pageindex''': see [[Cookbook:ListCategories]] [-{Cookbook/ListCategories$:Summary}-]%0a%0a:?action='''pdf''': see [[Cookbook:GeneratePDF]] [-{Cookbook/GeneratePDF$:Summary}-] or [[Cookbook:PmWiki2PDF]] [-{Cookbook/PmWiki2PDF$:Summary}-]%0a%0a:?action='''publish''': see [[Cookbook:PublishPDF]] [-{Cookbook/PublishPDF$:Summary}-]%0a%0a:?action='''purgeqns''': see [[Cookbook:ASCIIMath]] [-{Cookbook/ASCIIMath$:Summary}-]%0a%0a:?action='''pwchange''': see [[Cookbook:UserAuth2]] [-{Cookbook/UserAuth2$:Summary}-]%0a%0a:?action='''imgtpl''': (the ''imgtpl'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''createthumb''': (the ''createthumb'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''mini''': (this action is called automatically and should not be called by a link in a wiki page)%0a:?action='''purgethumbs''': see [[Cookbook:ThumbList]] [-{Cookbook/ThumbList$:Summary}-] \\%0a see [[Cookbook:Mini]] [-{Cookbook/Mini$:Summary}-] %0a%0a:?action='''recipecheck''': see [[Cookbook:RecipeCheck]] [-{Cookbook/RecipeCheck$:Summary}-]%0a%0a:?action='''regen''': see [[Cookbook:PageRegenerate]] [-{Cookbook/PageRegenerate$:Summary}-]%0a%0a:?action='''rename''':%0a:?action='''links''': see [[Cookbook:RenamePage]] [-{Cookbook/RenamePage$:Summary}-]%0a%0a:?action='''share''':%0a:?action='''unshare''': see [[Cookbook:SharedPages]] [-{Cookbook/SharedPages$:Summary}-]%0a%0a:?action='''sitemapaddgroups''':%0a:?action='''sitemapupdate''': see [[Cookbook:Sitemapper]] [-{Cookbook/Sitemapper$:Summary}-]%0a%0a:?action='''totalcounter''': see [[Cookbook:TotalCounter]] [-{Cookbook/TotalCounter$:Summary}-]%0a%0a:?action='''trash''':%0a:?action='''untrash''': see [[Cookbook:Trash]] [-{Cookbook/Trash$:Summary}-]%0a%0a:?action='''webadmin''': see [[Cookbook:WebAdmin]] [-{Cookbook/WebAdmin$:Summary}-]%0a%0a:?action='''zap''': see [[Cookbook:ZAP]] [-{Cookbook/ZAP$:Summary}-]%0a[[#cookbookend]]%0a%0a -time=1238492436 +rev=105 +targets=PmWiki.Passwords,PmWiki.PageHistory,PmWiki.BasicEditing,PmWiki.RefCount,PmWiki.Search,PmWiki.WebFeeds,PmWiki.SitePreferences,PmWiki.Uploads,PmWiki.CustomMarkup,PmWiki.UrlApprovals,PmWiki.WikiFarms +text=(:Summary: All PmWiki page actions (?action=):)%0a(:div class="rfloat frame" style="font-size:smaller; clear:right;" :)%0a!!!! Table of contents%0a* [[#defaultactions| Default actions]]%0a* [[#enablediag| Enable diag actions]]%0a* [[#scriptactions | Script actions]]%0a* [[#cookbook | Cookbook actions]]%0a(:divend:)%0a%0a[[#defaultactions]]%0a!! Default Actions%0a%0a[[#attr]]%0a:?action='''attr''': displays dialog for setting/changing password of the specified page, see [[PmWiki/passwords]], see also $EnablePostAttrClearSession if you do not want to have the session cleared after validating change [- {PmWiki/Passwords$:Summary} -]%0a%0a[[#browse]]%0a:?action='''browse''': display the specified page (default action if no [@?action=@] is present)%0a%0a[[#crypt]]%0a:?action='''crypt''': displays a form for generating hashed [[Passwords | passwords]] out of clear text for usage in your config.php%0a%0a[[#diff]]%0a:?action='''diff''': show a change history of the specified page, see [[PmWiki/page history]] [- {PmWiki/PageHistory$:Summary} -]%0a%0a[[#download]]%0a:?action='''download'''&upname=''file.ext'': retrieve the page's attachment named ''file.ext'', see $EnableDirectDownload%0a%0a[[#edit]]%0a:?action='''edit''': edit the specified page, see [[PmWiki/basic editing]] [- {PmWiki/BasicEditing$:Summary} -]%0a%0a[[#login]]%0a:?action='''login''': prompt visitor for username/password%0a%0a[[#logout]]%0a:?action='''logout''': remove author, password, and login information%0a%0a[[#print]]%0a:?action='''print''': display the specified page using the skin specified by $ActionSkin['print']%0a%0a[[#refcount]]%0a:?action='''refcount''': bring up the reference count form, which allows the user to generate a list of links (all, missing, existing or orphaned) in or from specified groups. See [[Ref Count]] [- {PmWiki/RefCount$:Summary} -]. Part of the core distribution but must be enabled by the administrator.%0a%0a[[#search]]%0a:?action='''search''': displays searchbox on current page, see [[PmWiki/search]] [- {PmWiki/Search$:Summary} -]%0a%0a:?action='''search'''&q=''searchterm'': performs search with ''searchterm'' and displays results on current page%0a%0a[[#source]]%0a:?action='''source''': show page source%0a%0a[[#feed]]%0a:?action='''atom''':%0a:?action='''rdf''':%0a:?action='''rss''':%0a:?action='''dc''': If [[web feeds]] are enabled, returns a syndication feed based on the contents of the page or other options provided by the url, see [[PmWiki/web feeds]] [- {PmWiki/WebFeeds$:Summary} -]%0a%0a[[#setprefs]]%0a:?'''setprefs'''=SomeGroup.CustomPreferences: sets cookie to custom preferences page. See [[PmWiki/site preferences]] [- {PmWiki/SitePreferences$:Summary} -]%0a%0a[[#upload]]%0a:?action='''upload''': display a form to upload an attachment for the current group, see [[PmWiki/uploads]] [- {Cookbook/Uploads$:Summary} -]%0a[[#defaultactionsend]]%0a----%0a[[#enablediag]]%0a!! Actions enabled by $EnableDiag%0a[[#BEGENABLEDIAG]]%0aThe following actions are available only if you set @@$EnableDiag = 1;@@ in your configuration file. They can be used for debugging and should not be set in a production environment.%0a%0a:?action='''ruleset''': displays a list of all markups in 3 columns:%0a** column 1 = markup-name (1. parameter of markup() )%0a** column 2 = when will rule apply (2. parameter of markup() )%0a** column 3 = PmWiki's internal sort key (derived from #2)%0a->(see [[Custom Markup]] [- {PmWiki/CustomMarkup$:Summary} -]).%0a->To see more than what [@?action=ruleset@] gives you, apply the [[Cookbook:MarkupRulesetDebugging]] recipe: it can also show the pattern and the replacement strings.%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#phpinfo]]%0a:?action='''phpinfo''': displays the output of phpinfo() and exits. no page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#diag]]%0a:?action='''diag''': displays a dump of all global vars and exits. no page will be processed%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#ENDENABLEDIAG]]%0a----%0a[[#scriptactions]]%0a!! Actions enabled by PmWiki Scripts%0a%0a[[#analyse]]%0a:?action='''analyze''': see [[(PmWiki:)Site Analyzer]] and [[(PmWiki:)Analyze Results]]%0a%0a[[#approvesites]]%0a:?action='''approvesites''': see [[PmWiki/Url approvals]] [- {PmWiki/UrlApprovals$:Summary} -]%0a** doesn't make use of PmWiki's authorization mechanisms.%0a%0a[[#analyseend]]%0a----%0a[[#cookbook]]%0a!! Actions enabled by [[Cookbook(:.)]] recipes%0a(more information about [[(PmWiki:)Custom Actions]])%0a%0a:?action='''admin''': see [[Cookbook:UserAuth2]] [- {Cookbook/UserAuth2$:Summary} -]%0a%0a:?action='''backup''': see [[Cookbook:BackupPages]] [- {Cookbook/BackupPages$:Summary} -]%0a%0a:?action='''clearsky''': see [[Cookbook:SearchCloud]] [- {Cookbook/SearchCloud$:Summary} -]%0a%0a:?action='''comment''': see [[Cookbook:CommentBox]] [- {Cookbook/CommentBox$:Summary} -]%0a%0a:?action='''comments''': see [[Cookbook:Comments]] [- {Cookbook/Comments$:Summary} -]%0a%0a:?action='''comment-rss''': see [[Cookbook:CommentDb]] [- {Cookbook/CommentDb$:Summary} -]%0a%0a:?action='''convert''': see [[Cookbook:ROEPatterns]] [- {Cookbook/ROEPatterns$:Summary} -]%0a%0a:?action='''converttable''': [[Cookbook:ConvertTable]] [- {Cookbook/ConvertTable$:Summary} -]%0a%0a:?action='''downloaddeleted''':%0a:?action='''delattach''':%0a:?action='''undelattach''': [[Cookbook:Attachtable]] [- {Cookbook/Attachtable$:Summary} -]%0a%0a:?action='''delete''': see [[Cookbook:DeleteAction]] [- {Cookbook/DeleteAction$:Summary} -]%0a%0a:?action='''discuss''': see [[Cookbook:DiscussionTab]] [- {Cookbook/DiscussionTab$:Summary} -]%0a%0a:?action='''downloadman''': see [[Cookbook:DownloadManager]] [- {Cookbook/DownloadManager$:Summary} -]%0a%0a:?action='''expirediff''': see [[Cookbook:ExpireDiff]] [- {Cookbook/ExpireDiff$:Summary} -]%0a%0a:?action='''import''': see [[Cookbook:ImportText]] [- {Cookbook/ImportText$:Summary} -]%0a%0a:?action='''PageUrl''': see [[Cookbook:CommentBoxPlus]] [- {Cookbook/CommentBoxPlus$:Summary} -]%0a%0a:?action='''pageindex''': see [[Cookbook:ListCategories]] [- {Cookbook/ListCategories$:Summary} -]%0a%0a:?action='''pdf''': see [[Cookbook:GeneratePDF]] [- {Cookbook/GeneratePDF$:Summary} -] or [[Cookbook:PmWiki2PDF]] [- {Cookbook/PmWiki2PDF$:Summary} -]%0a%0a:?action='''publish''': see [[Cookbook:PublishPDF]] [- {Cookbook/PublishPDF$:Summary} -]%0a%0a:?action='''purgeqns''': see [[Cookbook:ASCIIMath]] [- {Cookbook/ASCIIMath$:Summary} -]%0a%0a:?action='''pwchange''': see [[Cookbook:UserAuth2]] [- {Cookbook/UserAuth2$:Summary} -]%0a%0a:?action='''imgtpl''': (the ''imgtpl'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''createthumb''': (the ''createthumb'' action is called automatically and should not be called by a link in a wiki page)%0a:?action='''mini''': (this action is called automatically and should not be called by a link in a wiki page)%0a:?action='''purgethumbs''': see [[Cookbook:ThumbList]] [- {Cookbook/ThumbList$:Summary} -] \\%0a see [[Cookbook:Mini]] [- {Cookbook/Mini$:Summary} -]%0a%0a:?action='''recipecheck''': see [[Cookbook:RecipeCheck]] [- {Cookbook/RecipeCheck$:Summary} -]%0a%0a:?action='''regen''': see [[Cookbook:PageRegenerate]] [- {Cookbook/PageRegenerate$:Summary} -]%0a%0a:?action='''rename''':%0a:?action='''links''': see [[Cookbook:RenamePage]] [- {Cookbook/RenamePage$:Summary} -]%0a%0a:?action='''share''':%0a:?action='''unshare''': see [[Cookbook:SharedPages]] [- {Cookbook/SharedPages$:Summary} -]%0a%0a:?action='''sitemapaddgroups''':%0a:?action='''sitemapupdate''': see [[Cookbook:Sitemapper]] [- {Cookbook/Sitemapper$:Summary} -]%0a%0a:?action='''totalcounter''': see [[Cookbook:TotalCounter]] [- {Cookbook/TotalCounter$:Summary} -]%0a%0a:?action='''trash''':%0a:?action='''untrash''': see [[Cookbook:Trash]] [- {Cookbook/Trash$:Summary} -]%0a%0a:?action='''webadmin''': see [[Cookbook:WebAdmin]] [- {Cookbook/WebAdmin$:Summary} -]%0a%0a:?action='''zap''': see [[Cookbook:ZAP]] [- {Cookbook/ZAP$:Summary} -]%0a[[#cookbookend]]%0a%0a +time=1247526840 Index: wikilib.d/PmWiki.CustomInterMap =================================================================== --- wikilib.d/PmWiki.CustomInterMap (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.CustomInterMap (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6 -author=cda +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 charset=ISO-8859-1 -csum= -host=67.159.26.71 +csum=links to pages not in the distribution should be absolute +host=81.65.14.164 name=PmWiki.CustomInterMap -rev=46 -targets=PmWiki.InterMap,PmWiki.WikiAdministrator,PmWiki.WikiFarms,PmWiki.Upgrades,Site.InterMap -text=(:Summary:PmWiki's default [[PmWiki/InterMap]] links, and how to can create additional InterMap links:)%0a(:title Custom InterMap:)%0a(:Audience: administrator (intermediate) :)%0a%0aThis page describes PmWiki's default [[InterMap]] links, and how a [[wiki administrator]] can create additional InterMap links.%0a%0aAn intermap entry takes the following format:%0a%0a-> [@%0aMapPrefix: http://example.com/partial/url/%0a@]%0a%0aYou can create your own InterMap links by doing one or more of the following:%0a%0a* Modify the page called ''Site.InterMap'' and place entries like the ones above in it.%0a* Create a file called ''local/localmap.txt'' and place entries like the%0a ones above in it.%0a* In a [[WikiFarm(s)]] installation you can create a file called%0a ''local/farmmap.txt'' and there place entries like the ones above in it.%0a These prefixes will be common to all the wikis in the farm.%0a* Ensure that there is a space after the colon%0a%0aDo not edit the file ''scripts/intermap.txt'' directly! If you do, you'll%0alose your changes when you [[PmWiki/upgrade(s)]] PmWiki.%0a%0a%0a!! Variables and InterMap links%0a%0aIt's possible to use variables within your InterMap entries. The following%0aentries create [@ThisWiki:@] and [@ThisPage:@] shortcuts:%0a%0a-> [@%0aThisWiki: $ScriptUrl%0aThisPage: {$PageUrl}%0a@]%0a%0aYou can also define InterMap entries where the text of the entry is%0asubstituted into the middle of the URL. Just include '$1' in the URL where%0ayou want the substitution to take place. For example:%0a%0a->[@Jargon: http://catb.org/~esr/jargon/html/$1.html@]%0a%0awould cause [@Jargon:F/feature-creep@] to be converted to [@http://catb.org/~esr/jargon/html/F/feature-creep.html@].%0a%0a%0a!! Tips and tricks%0a%0aIt is possible to document your intermap prefixes directly in the page%0a[[Site.InterMap]]. The extra text will not cause a performance penalty, nor%0awill it break the definition of prefixes. However, be aware that anything%0amatching a line starting with a word and a colon (''':''') will be%0aconsidered to define a prefix.%0a%0aThe order in which various sources are checked for definitions of prefixes%0ais controlled by the variable $InterMapFiles. Currently the precedence%0a(highest to lowest is as follows):%0a* ''local/localmap.txt''%0a* ''$SiteGroup.InterMap''%0a* ''$FarmD/local/farmmap.txt''%0a* ''$FarmD/scripts/intermap.txt''%0a%0a!! PmWiki InterMaps%0a(:include PmWiki/InterMap#custominclude#customincludeend:)%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: Are InterMap names case sensitive?%0aA: Yes, thus [@eAdmin:@] is a different InterMap link than [@EAdmin:@].%0a%0aQ: How can I achieve a ''localmap.txt'' mapping with the effect of [@Pics: Path:/somepathto/pics/@]?%0aA: Use the following:%0a->[@Pics: /somepathto/pics/@]%0a%0a%0aQ: How can I define an InterMap in PHP?%0aA: Use the following:%0a->[@%0a $LinkFunctions['PmWikiHome:'] = 'LinkIMap';%0a $IMap['PmWikiHome:'] = 'http://pmwiki.org/wiki/$1';%0a@]%0a%0a%0a%0a%0a -time=1235658069 +rev=48 +targets=PmWiki.InterMap,PmWiki.WikiAdministrator,Site.InterMap,PmWiki.WikiFarms,PmWiki.Upgrades +text=(:Summary:PmWiki's default [[PmWiki/InterMap]] links, and how to can create additional InterMap links:)%0a(:title Custom InterMap:)%0a(:Audience: administrator (intermediate) :)%0a%0aThis page describes PmWiki's default [[InterMap]] links, and how a [[wiki administrator]] can create additional InterMap links.%0a%0aAn intermap entry takes the following format:%0a%0a-> [@%0aMapPrefix: http://example.com/partial/url/%0a@]%0a%0aThe InterMap entry can be for any of the [[(PmWiki:)link schemes]] supported by PmWiki.%0a[[%3c%3c]]%0aYou can create your own InterMap links by doing one or more of the following:%0a%0a* Modify the page called ''[[{$SiteGroup}.InterMap]]'' and place entries like the ones above in it.%0a* Create a file called ''local/localmap.txt'' and place entries like the%0a ones above in it.%0a* In a [[WikiFarm(s)]] installation you can create a file called%0a ''local/farmmap.txt'' and there place entries like the ones above in it.%0a These prefixes will be common to all the wikis in the farm.%0a* Ensure that there is a space after the colon%0a%0aDo not edit the file ''scripts/intermap.txt'' directly! If you do, you'll%0alose your changes when you [[PmWiki/upgrade(s)]] PmWiki.%0a%0a%0a!! Variables and InterMap links%0a%0aIt's possible to use variables within your InterMap entries. The following%0aentries create [@ThisWiki:@] and [@ThisPage:@] shortcuts:%0a%0a-> [@%0aThisWiki: $ScriptUrl%0aThisPage: {$PageUrl}%0a@]%0a%0aYou can also define InterMap entries where the text of the entry is%0asubstituted into the middle of the URL. Just include '$1' in the URL where%0ayou want the substitution to take place. For example:%0a%0a->[@Jargon: http://catb.org/~esr/jargon/html/$1.html@]%0a%0awould cause [@Jargon:F/feature-creep@] to be converted to [@http://catb.org/~esr/jargon/html/F/feature-creep.html@].%0a%0a%0a!! Tips and tricks%0a%0aIt is possible to document your intermap prefixes directly in the page%0a[[Site.InterMap]]. The extra text will not cause a performance penalty, nor%0awill it break the definition of prefixes. However, be aware that anything%0amatching a line starting with a word and a colon (''':''') will be%0aconsidered to define a prefix.%0a%0aThe order in which various sources are checked for definitions of prefixes%0ais controlled by the variable $InterMapFiles. Currently the precedence%0a(highest to lowest is as follows):%0a* ''local/localmap.txt''%0a* ''$SiteGroup.InterMap''%0a* ''$FarmD/local/farmmap.txt''%0a* ''$FarmD/scripts/intermap.txt''%0a%0a!! PmWiki InterMaps%0a(:include PmWiki/InterMap#custominclude#customincludeend:)%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: Are InterMap names case sensitive?%0aA: Yes, thus [@eAdmin:@] is a different InterMap link than [@EAdmin:@].%0a%0aQ: How can I achieve a ''localmap.txt'' mapping with the effect of [@Pics: Path:/somepathto/pics/@]?%0aA: Use the following:%0a->[@Pics: /somepathto/pics/@]%0a%0a%0aQ: How can I define an InterMap in PHP?%0aA: Use the following:%0a->[@%0a $LinkFunctions['PmWikiHome:'] = 'LinkIMap';%0a $IMap['PmWikiHome:'] = 'http://pmwiki.org/wiki/$1';%0a@]%0a%0a%0a%0a%0a +time=1247526419 title=Custom InterMap Index: wikilib.d/PmWiki.InitialSetupTasks =================================================================== --- wikilib.d/PmWiki.InitialSetupTasks (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.InitialSetupTasks (.../pmwiki-2.2.3) (revision 2380) @@ -1,13 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 csum= host=81.65.14.164 name=PmWiki.InitialSetupTasks -passwdattr=$1$.X94LXDK$6T6ZIoUOIqnVMoy23IBTs0 -passwdedit=$1$o/gpkS/t$uo26lA7Vw6dCN4hPxfSEm1 -rev=87 +rev=90 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%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%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=1238269851 +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 Index: wikilib.d/PmWiki.UploadsAdmin =================================================================== --- wikilib.d/PmWiki.UploadsAdmin (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.UploadsAdmin (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=Ki, Mi, Gi -host=81.65.14.164 +csum=$EnableUploadGroupAuth +host=77.195.128.89 name=PmWiki.UploadsAdmin -rev=128 -targets=PmWiki.PmWiki,PmWiki.Uploads,PmWiki.Security,PmWiki.WikiAdministrator,PmWiki.PasswordsAdmin,PmWiki.Passwords,PmWiki.PerGroupCustomizations,PmWiki.LocalCustomizations,Category.Administration,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 [[per 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 = 1024000; # limit group uploads to 1000K%0a%0aThis will limit the total size of uploads for that group to 1000k --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 = 10240000; # limit total uploads to 10000K%0a%0aThis will limit the total size of uploads for the whole wiki to 10000k --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 100K, simply specify a new value for $UploadMaxSize in ''config.php'':%0a%0a->[@$UploadMaxSize = 102400;@]%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 20K@]%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=102400; // 100 K 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 "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 `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 2M by default. The second is @@post_max_size@@, which is set to 6M 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* 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%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%0aNote that if you change this value, 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-%3cCategory: [[!Administration]]%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 2M can be uploaded.%0aA: Check your php.ini for ''upload_max_filesize''%0a->[@%0aupload_max_filesize = 8M%0a@]%0a -time=1235243835 +rev=129 +targets=PmWiki.PmWiki,PmWiki.Uploads,PmWiki.Security,PmWiki.WikiAdministrator,PmWiki.PasswordsAdmin,PmWiki.Passwords,PmWiki.PerGroupCustomizations,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 [[per 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 = 1024000; # limit group uploads to 1000K%0a%0aThis will limit the total size of uploads for that group to 1000k --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 = 10240000; # limit total uploads to 10000K%0a%0aThis will limit the total size of uploads for the whole wiki to 10000k --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 100K, simply specify a new value for $UploadMaxSize in ''config.php'':%0a%0a->[@$UploadMaxSize = 102400;@]%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 20K@]%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=102400; // 100 K 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 "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 `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 2M by default. The second is @@post_max_size@@, which is set to 6M 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 (PmpWiki 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%0aNote that if you change this value, 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 2M can be uploaded.%0aA: Check your php.ini for ''upload_max_filesize''%0a->[@%0aupload_max_filesize = 8M%0a@]%0a +time=1246545817 title=Uploads Administration Index: wikilib.d/PmWiki.Introduction =================================================================== --- wikilib.d/PmWiki.Introduction (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Introduction (.../pmwiki-2.2.3) (revision 2380) @@ -1,4 +1,4 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 @@ -6,7 +6,7 @@ ctime=1180819909 host=81.65.14.164 name=PmWiki.Introduction -rev=21 -targets=PmWiki.PmWiki,Main.WikiSandbox,PmWiki.BasicEditing,PmWiki.TextFormattingRules,PmWiki.Requirements,PmWiki.DocumentationIndex,PmWiki.Download,PmWiki.Installation,PmWiki.HowToGetAssistance -text=>>faq%3c%3c [[#faq]]%0aQ: What is PmWiki?%0aA: PmWiki is a wiki-based system for collaborative creation and maintenance of websites. See [[PmWiki/PmWiki]].%0a%0aQ: What can I do with it?%0aA: PmWiki pages look and act like normal web pages, except they have an "[[Main/WikiSandbox?action=edit|Edit]]" link that makes it easy to modify existing pages and add new pages into the website, using [[basic editing]] rules. You do not need to know or use any HTML or CSS. Page editing can be left open to the public or restricted to small groups of authors. Feel free to experiment with the [[PmWiki/Text Formatting Rules]] in the "[[Main/WikiSandbox?action=edit | Wiki sandbox]]". The website you're currently viewing is built and maintained with PmWiki.%0a%0aQ: What are the requirements?%0aA: See the [[PmWiki.Requirements | PmWiki requirements]] page.%0a%0aQ: Where can I find documentation?%0aA: See the [[PmWiki.DocumentationIndex | documentation index]] page.%0a%0aQ: How can I download PmWiki?%0aA: See the [[PmWiki.Download | download]] page.%0a%0aQ: How do I install PmWiki?%0aA: Instructions for installation are on the [[PmWiki.Installation | installation page]].%0a%0aQ: How do I get help with PmWiki?%0aA: See [[How to get assistance]]%0a -time=1238270337 +rev=22 +targets=PmWiki.PmWiki,Main.WikiSandbox,PmWiki.BasicEditing,PmWiki.TextFormattingRules,PmWiki.Requirements,PmWiki.DocumentationIndex,PmWiki.Installation +text=>>faq%3c%3c [[#faq]]%0aQ: What is PmWiki?%0aA: PmWiki is a wiki-based system for collaborative creation and maintenance of websites. See [[PmWiki/PmWiki]].%0a%0aQ: What can I do with it?%0aA: PmWiki pages look and act like normal web pages, except they have an "[[Main/WikiSandbox?action=edit|Edit]]" link that makes it easy to modify existing pages and add new pages into the website, using [[basic editing]] rules. You do not need to know or use any HTML or CSS. Page editing can be left open to the public or restricted to small groups of authors. Feel free to experiment with the [[PmWiki/Text Formatting Rules]] in the "[[Main/WikiSandbox?action=edit | Wiki sandbox]]". The website you're currently viewing is built and maintained with PmWiki.%0a%0aQ: What are the requirements?%0aA: See the [[PmWiki.Requirements | PmWiki requirements]] page.%0a%0aQ: Where can I find documentation?%0aA: See the [[PmWiki.DocumentationIndex | documentation index]] page.%0a%0aQ: How can I download PmWiki?%0aA: See the [[PmWiki:Download | download]] page.%0a%0aQ: How do I install PmWiki?%0aA: Instructions for installation are on the [[PmWiki.Installation | installation page]].%0a%0aQ: How do I get help with PmWiki?%0aA: See [[(PmWiki:)Mailing lists]] and [[(PmWiki:)How to get assistance]].%0a +time=1247527163 Index: wikilib.d/PmWiki.SitePageActions =================================================================== --- wikilib.d/PmWiki.SitePageActions (.../pmwiki-2.2.2) (revision 0) +++ wikilib.d/PmWiki.SitePageActions (.../pmwiki-2.2.3) (revision 2380) @@ -0,0 +1,12 @@ +version=pmwiki-2.2.0 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 +author=HansB +charset=ISO-8859-1 +csum=update +ctime=1160022336 +host=80.41.219.196 +name=PmWiki.SitePageActions +rev=7 +targets=Site.PageActions,PmWiki.BasicEditing,PmWiki.Skins,PmWiki.WikiStyles,PmWiki.AccessKeys,Site.Preferences,PmWiki.Internationalizations,PmWiki.Links,PmWiki.PageVariables,PmWiki.SitePageActions,PmWiki.ConditionalMarkup,PmWiki.DocumentationIndex,PmWiki.MailingLists,PmWiki.PageActions +text=%25audience%25 authors (basic)%0a%0aThe [[Site.PageActions]] uses a large number of PmWiki features in concert. %0aThis page gives a brief explanation of the features commonly used on [[Site.PageActions]], and pointers to where more information can be found.%0a%0aTo start with, lets look at a typical Site.PageActions page.\\%0aBelow is what is currently shipping with PmWiki version 2.2.0:%0a->[@%0a* %25item rel=nofollow class=browse accesskey='$[ak_view]'%25 [[{*$FullName} | $[View] ]]%0a* %25item rel=nofollow class=edit accesskey='$[ak_edit]'%25 [[{*$FullName}?action=edit | $[Edit] ]]%0a* %25item rel=nofollow class=diff accesskey='$[ak_history]'%25 [[{*$FullName}?action=diff | $[History] ]]%0a(:if auth upload:)%0a* %25item rel=nofollow class=upload accesskey='$[ak_attach]'%25 [[{*$FullName}?action=upload | $[Attach] ]]%0a(:ifend:)%0a* %25item rel=nofollow class=print accesskey='$[ak_print]'%25 [[{*$FullName}?action=print | $[Print] ]]%0a(:if group Site,SiteAdmin,Cookbook:) (:comment delete if and ifend to enable backlinks:)%0a* %25item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'%25 [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]]%0a(:ifend:)%0a(:if enabled AuthPw:)%0a* %25item rel=nofollow class=logout accesskey='$[ak_logout]'%25'' [-[[{*$FullName}?action=logout | $[logout] ]]-]''%0a(:ifend:)%0a@]%0a%0aThat can seem a bit daunting, but we'll take it piece by piece. To start with, we'll look at just the first line, and take it apart. This will also give us a good handle on how most of the other lines work.%0a%0a!! List%0aThe first line, and in fact every line, begins with an unindented '@@*@@', which means its an item in an unordered list. %0aYou can find out more about lists on the [[Basic Editing]] page. %0aPmWiki will normally display an unordered list as a set of bulleted items, but they can appear differently depending on the context they are displayed in. This difference in display is generally controlled by CSS defined in the Skin.%0a%0aIf you take a look at the [[Site.PageActions]] page with the default PmWiki [[PmWiki.Skins|skin]], you'll see that the list appears twice, once as a normal bulleted list in the middle of the page, and once as a row of unbulleted actions at the top right corner of the page. This is controlled by the fact that they are being rendered inside an HTML [@%3cdiv>@] with an [@id@] of 'wikicmds' and the CSS for the default PmWiki skin asks that list items inside a wikicmds element be displayed that way.%0a%0aYou can see the difference for yourself since PmWiki has markup that lets you ask for something to be rendered inside a div with a given [@id@]:%0a(:markup class=horiz:)%0a* test1%0a* test2%0a* test3%0a%0a(:div id=wikicmds:)%0a* test1%0a* test2%0a* test3%0a(:divend:)%0a(:markupend:)%0a%0a!! Style%0aFollowing the '[@*@]', on the line we have [@%25item ... %25@] which is a [[WikiStyles|WikiStyle]]. It is used to control the properties of a given output element, like its size or color. By default they apply to the text between them and the end of the line or a closing [@%25%25@], whichever is sooner. So, for example, one can enter [@"this %25blue%25text%25%25 is blue"@] and it will appear as "this %25blue%25text%25%25 is blue".%0a%0aIn this case the WikiStyle starts with the word [@item@], and that says to apply the given style to the entire list item as opposed to just the text that follows. In particular, it causes PmWiki to generate HTML of%0a%0a->[@%3cli class='edit'>...%3c/li>@]%0a%0ainstead of%0a%0a->[@%3cli>%3cspan class='edit'>...%3c/span>%3c/li>@]%0a%0aSetting the class attribute of the list item allows CSS properties to be applied to the item that corresponds to the current action. For example, to have the current action display with a background color of blue, a wiki administrator can do:%0a%0a->@@$HTMLStylesFmt[]@@[@ = ' .{$Action} { background-color: blue; }';@]%0a%0aThen if the current action is 'edit' (as in "?action=edit"), the list item corresponding to the edit action will be drawn with a blue background.%0a%0aThe other property inside the [@%25item ... %25@] WikiStyle is the accesskey='$[ak_view]' statement. [[AccessKeys]] are keyboard shortcuts for tasks that would otherwise require a mouse. They can be attached to links or to form elements and the WikiStyle will use whichever it finds first on the line. In this case they will attach to the link [@[[{*$FullName} | $[View] ]]@].%0a%0a!! Accesskey%0aAn accesskey can be defined in a number of locations, but essentially it is a phrase translation following the model used for internationalizations. PmWiki's accesskey defaults are defined in @@scripts/prefs.php@@, but can be overridden in lots of different places, including skins, language translation pages (XLPage), and even per-browser preferences (see [[Site.Preferences]]).%0a%0aThe [@$[...]@] markup defines phrase translations, used for internationalizations (and access keys, as noted above). In the first line of [[Site.PageActions]] it is used in both [@$[ak_view]@] and [@$[View]@]. Essentially [@$[View]@] tells PmWiki to substitute the current translation of "View". If no translation is defined for "View", then PmWiki just uses the phrase inside the brackets.%0a%0aYou can most easily see this working in the other languages sections of PmWiki. For example, at [[(http://pmwiki.org/wiki/)PmWikiDe/PmWikiDe]] you'll notice that the default "View", "Edit", "History", and "Print" actions are displayed as "Artikel", "Bearbeiten", "Historie", and "Druckansicht".%0aThis is because the PmWikiDe group is loading in a set of translations from [[(http://pmwiki.org/wiki/)PmWikiDe.XLPage]] %0a%0aThat page defines things like%0a%0a->[@'View' => 'Artikel'%0a'Edit' => 'Bearbeiten'%0a'History' => 'Historie'%0a'Print' => 'Druckansicht'@]%0a%0awhich says that things like [@$[View]@] and [@$[Edit]@] should be replaced by "Artikel" and "Bearbeiten".%0a%0aThis makes it very easy for PmWiki to support multiple languages, since a recipe author can simply put any translatable prompts or phrases inside of [@$[...]@], and leave it to others to actually build the translation tables (either locally or on [[(http://)pmwiki.org]] for others to use). More information about [@$[...]@] is available at [[PmWiki/Internationalizations]].%0a%0a!! Link%0aAll that leaves on the first line to be explained is the [[PmWiki.Links|link]] itself: [@[[{*$FullName} | $[View] ]]@]. Links are not complex, but this one is using both the internationalization feature and a [[PageVariables|Page Variable]]. The [@$[View]@] has already been explained and it shows up in the link text section of link markup, so that, if viewed in English, the link will appear as [[[[{*$FullName} |$[View]]].%0a%0aThe link target section contains the [@{*$FullName}@] variable. This variable expands to the full name of the page on which it is being displayed, including the group and page names. For simple browsing, this is good enough, because viewing a page is the default action to perform on a page. Later lines use link targets like [@{*$FullName}?action=edit@] which says to go to the currently displayed page and start editing it.%0a%0a!! If%0aThis explains what all of the '[@*@]' lines are about. That only leaves the [@(:if auth upload:)@] and [@(:ifend:)@] lines, and they go together. The first starts some [[Conditional Markup]] and the second ends it. The [@(:if test :)@] markup only lets the following text be displayed if the test succeeds. The text that conditionally displayed ends at the next [@(:if...:)@] statement so an empty [@(:ifend:)@] is a convenient way to end the conditional block. The particular test being used here is [@auth upload@] which is only true if the current user is authorized to upload files to the wiki. Thus, the conditional block says to only display a link to perform an upload if the user is actually allowed to upload.%0a%0aDepending on the security and permissions model on a given site, its not unusual to see many more conditional markups that test if, for example, a user has editing rights to the current page. More information on all the different conditions can be found at the [[Conditional Markup]] page, and a general index of all the PmWiki documentation can be found at [[Documentation Index]].%0a%0aHopefully this bit of documentation has answered your questions about the [[Site.PageActions]] page. %0aIf not, you may wish to consult the helpful people on one of the [[MailingLists|PmWiki Mailing Lists]].%0a%0a----%0a%0a%25green%25Note that any Group can have a [[Page Actions]] page, not just '''Site''' - this page should be edited to reflect that.%0a +time=1233331974 Index: wikilib.d/PmWiki.ReleaseNotes =================================================================== --- wikilib.d/PmWiki.ReleaseNotes (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.ReleaseNotes (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 csum= -host=86.69.109.11 +host=81.65.14.164 name=PmWiki.ReleaseNotes -rev=421 -targets=Site.Site,SiteAdmin.SiteAdmin,PITS.00961,Profiles.Isidor,Site.PageActions,Site.EditForm,Site.PageNotFound,PmWiki.PageLists,PmWiki.WikiTrails,PmWiki.Blocklist,SiteAdmin.AuthList,PmWiki.SkinTemplates,PmWiki.AuthUser,Site.AuthUser,PmWiki.WikiFarms,PmWiki.MailPosts,PmWiki.Notify,PmWiki.LocalCustomizations,Site.PageListTemplates,Site.SideBar,PmWiki.PageVariables,PmWiki.WebFeeds,PmWiki.InterMap,PmWiki.WikiStyles,PmWiki.ConditionalMarkup,PmWiki.Categories,PmWiki.Images,PmWiki.ChangeLog,Site.Search,PmWiki.Tables -text=(:title Release Notes:)%0a(:Summary: PmWiki release notes:)%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; wikiTrails 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[[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%0a!! Version 2.0.13 (2005-11-10)%0a%0aThis is a release containing minor bugfixes and improvements%0ain preparation for the 2.1.beta series.%0a%0a%25red%25Wiki administrators should note that after this release PmWiki will default to having WikiWords disabled.\\%0a%0aTo make sure WikiWords are enabled, use [@$LinkWikiWords = 1;@] in%0athe ''local/config.php'' file.%0a%0a%0a!! Version 2.0.12 (19-Oct-2005)%0a%0aThis release cleans up problems with page validation for page links%0acontaining query fragments and ampersands, changes PmWiki to use a%0aPHP "return" statement instead of "exit", and fixes a warning in%0ascripts/transition.php.%0a%0a!! Version 2.0.11 (17-Oct-2005)%0a%0aThis release fixes a couple of important bugs and adds some new%0afeatures to PmWiki.%0a%0aMost importantly, this release fixes bug with ?action=attr%0aaffecting the page history.%0a%0aFor sites using LDAP authentication with authuser.php, PmWiki%0anow provides $AuthLDAPBindDN and $AuthLDAPBindPassword variables%0ato specify the binding to be used for searching. It also works%0aaround a PHP oddity that causes users to appear authenticated%0awhen an empty password is provided. Authuser.php also now%0ahandles straight md5 password encryptions (commonly used by%0a`MySQL databases).%0a%0aThe core now includes the [@(:linebreaks:)@] markup%0a(from Cookbook:LineBreaks), which causes text on separate%0alines in the markup to appear as separate lines in the output%0a(i.e., no auto-joining of one line to the previous one).%0a%0aThere have been some internal changes designed to provide%0abetter support for leading-whitespace rules (more details on%0athis in a future release).%0a%0aThe core now provides an [@(:if date:)@] markup to display%0atext only if the current day is within a range of supplied%0adates.%0a%0a!! Version 2.0.10 (29-Sep-2005)\\%0aVersion 2.0.9 (28-Sep-2005)%0a%0aThis release fixes an oversight in xlpage-utf-8.php that failed to uppercase ASCII letters when mb_strtoupper isn't present.%0a%0a!! Version 2.0.8 (27-Sep-2005)%0a%0aThis release simply adds the capability to use quotes to enter%0apass phrases (passwords containing spaces) using ?action=attr,%0aand fixes a bug with displaying the name instead of the title in%0athe default print skin.%0a%0a!! Version 2.0.7 (26-Sep-2005)%0a%0aThis version changes the xlpage-utf-8.php case conversion slightly%0ato use a more direct conversion table, and completed the table%0afor more characters in the utf-8 set.%0a%0aThis release also fixes the $VersionNum variable that was supposed to%0aappear in 2.0.6.%0a%0aAn accesskey shortcut (ak_textedit) is being added to the edit form%0atext area.%0a%0aLastly, this release adds a timelimit to the generation of .linkindex,%0ato avoid long page times when generating the .linkindex.%0a%0a%0a!! Version 2.0.6 (16-Sep-2005)%0a%0aIn this release, we provide quite a few more updates for sites that%0awant or need to use utf-8 encoding, fix a large number of utf-8 %0arelated bugs, introduce better handling of author cookies, and%0abetter support for keeping track of version releases.%0a%0aThe biggest change is to the xlpage-utf-8.php recipe, which has%0abeen substantially rewritten from the previous version. This new%0aversion of xlpage-utf-8.php no longer depends on the %0a[[http://www.php.net/mb_strtoupper | mb_strtoupper()]]%0afunction, which seems to be not available in many PHP installations.%0aThe new version of xlpage-utf-8.php uses mb_strtoupper() if it's%0aavailable, but if not available then it manually performs case %0aconversions from a Unicode table that is directly encoded in the%0ascript. At present this table only understands case conversions%0afor Western European (Latin-1 or ISO-8859-1) and Cyrillic characters,%0awe'll want to expand the table to support other language character%0asets as needed. Just contact me on the listserv if a particular%0acharacter isn't yet supported.%0a%0aIn addition to the above, author names and cookies in utf-8 environments%0anow work again, and link suffixes containing non-ASCII characters work%0aagain also.%0a%0aThe GUI button handling in IE has been greatly improved; text selection%0ain IE now works as you would expect it to work when a gui button is%0apressed. Possibly still no hope for Mac Safari browsers, unfortunately...%0a%0aA $CookiePrefix variable has been introduced; a wiki administrator%0acan set $CookiePrefix to prevent PmWiki's cookies from interfering with%0acookies set from other applications under the same domain name.%0a%0aSome XHTML validation issues surrounding the use of %3cscript> tags %0ahave been fixed.%0a%0aAnd lastly, for script and recipe authors, there is now a $VersionNum%0anumeric value that makes it easier to determine if the currently running%0aversion of PmWiki is older or newer than a known release. $VersionNum%0ais composed from the release number by padding the major and minor%0arelease numbers with zeroes to three digits, thus $VersionNum for this%0arelease (2.0.6) is 2000006, while a release like "2.1.24" will have%0a$VersionNum set to 2001024.%0a%0aAs mentioned on the pmwiki-users mailing list, we are also now maintaining%0aPITS entries for enhancements and changes to consider making in the %0acore distribution. The list can be found at %0ahttp://www.pmwiki.org/PITS/CoreCandidate, all are welcome to add %0acomments and vote on the items under consideration.%0a%0a%0a!! Version 2.0.5 (9-Sep-2005)%0a%0aThis version adds an [@?action=logout@] and cleans up a few things %0afor internationalization (i18n) support. %0a%0aWe've also formally deprecated and eliminated the $Newline variable %0afrom the core code -- sites that absolutely need pages stored in%0athe 1.x format can set $NewlineXXX. (Note that this version %0acontinues to be able to read pages from all previous PmWiki%0aformats.)%0a%0a!! Version 2.0.4 (8-Sep-2005)%0a%0aOne week after the release of 2.0.0 we're now up to 2.0.4, most%0achanges have been minor bug fixes and improvements. This release%0aprovides a few improvements here and there.%0a%0aThe biggest change is the addition of a link indexing system for%0aimproving the speed of [[Categories]] and backlinks (using the %0a[@(:pagelist link=...:)@] markup. The system uses a ''.linkindex'' %0afile to keep track of all page links within the site, generating and%0aupdating the file as needed and using the file to avoid scanning pages%0athat are known to not link to the target. The ''.linkindex''%0afile can be removed at anytime to cause it to be regenerated from%0ascratch. Link indexing can be disabled by setting $EnableLinkIndex=0;%0ain ''local/config.php''.%0a%0aThe "change summary" associated with each edit is now limited to%0aa maximum of 100 characters. A local customization can increase%0athe size of the summary.%0a%0aThe tilde sequences used to generate signatures are now precise;%0aonly a sequence of exactly three or four tildes result in a signature.%0aLonger sequences of tildes such as ~~~~~~~~ are left alone and not%0aconverted to signatures. (Generating a sequence of three or four%0atildes still requires creative use of escapes, as in [@[=~~=]~@] and%0a[@[=~~=]~~@].)%0a%0aA number of previously hard-coded prompts are now internationalized.%0a%0aMany PHP E_NOTICE messages (displayed when error_reporting() is%0aset to its maximum value) are now eliminated.%0a%0a%0a!! Version 2.0.3 (6-Sep-2005)%0a%0aThis is a minor update; it enhances the core to display change%0asummaries in the page history, and makes additional attributes%0aavailable to input forms in forms.php.%0a%0aThis release also fixes a bug in the setting of the $sub parameter%0afor LDAP authentication, improves the setting of default values%0ain scripts/urlapprove.php, and fixes the search pages and skin%0ato use $SiteGroup instead of the hard-coded "Site" variable.%0a%0aLastly, this update changes the [@(:searchbox:)@] markup to%0abe a bit smarter about form generation when $EnablePathInfo%0ais set.%0a%0a!! Version 2.0.2 (3-Sep-2005)\\%0aVersion 2.0.1 (2-Sep-2005)%0a%0aThese versions correct some minor bugs in the loading and saving%0aof pages, the MailPosts feature, and documentation.%0a%0a!! [+ Version 2.0.0 (1-Sep-2005) +]%0a%0aAt long last, I'm very pleased to announce the official release of%0aPmWiki 2.0.0, now available at http://www.pmwiki.org/pub/pmwiki .%0a%0aPmWiki 2.0 has been in development for well over a year, with more%0athan eighty development and beta releases. In addition, the%0acookbook for 2.0 continues to expand, and currently has over 200%0arecipes and more on the way.%0a%0a'''Not available at press time:''' For those who may be concerned%0athat their "must-have feature" didn't make it into the 2.0.0 release,%0adon't be. The 2.0.0 release isn't the end of development, but%0ajust the stable basis for the next set of features and improvements.%0aEven if some features (e.g., discuss/comments pages, table of%0acontents, authorization groups, faster backlinks/categories)%0aaren't in the 2.0.0 release, I'm comfortable that we're at a point%0awhere these features can be added as 2.0.x releases with minimal%0aimpact to existing 2.0 sites. And if not, then we'll start on 2.1. :-)%0a%0a'''Upgrading to 2.0.0:''' Many sites have been keeping relatively%0aup-to-date with the latest 2.0 beta releases; for most of these%0asites upgrading to 2.0.0 is a minor upgrade (but see the notes below).%0aFor sites running beta versions of PmWiki older than 2.0.beta44,%0athe upgrade may require a bit of extra work -- check the ReleaseNotes%0afor more details. For sites running 1.x or 0.6 versions of PmWiki,%0asee http://www.pmwiki.org/wiki/PmWiki/UpgradingFromPmWiki1 for%0atips on successfully migrating the site to PmWiki 2.0.0.%0a%0aPmWiki 2.0.0 does have some changes over the previous (beta55)%0arelease:%0a%0a* Lots of changes and improvements to the documentation. Some documentation pages still need work, but the documentation is now sufficiently far along that I'm comfortable with making the release.%0a%0a* The release comes with a new default skin, matching the one currently available at http://www.pmwiki.org. For those sites that wish to retain the old skin, it is available from http://www.pmwiki.org/wiki/Cookbook/PmWikiV1Skin .%0a%0a* The storage format for pages in wiki.d/ has changed somewhat. PmWiki 2.0.0 can seamlessly read and interact with pages stored in previous formats, but any external scripts that may attempt to read wiki.d/ files directly will need to be adjusted to understand the new format. In particular, the $Newline variable has been deprecated in this release and is no longer used. (Sites that need file-level compatibility with previous versions can set a value for $Newline and PmWiki 2.0 will use that, however.)%0a%0a* Deleted pages now have a ",del-1234567890" suffix instead of just the timestamp.%0a%0a* The Site.SideBar is now unprotected by default. Other pages in the Site group continue to be protected against edits and require the admin password to unlock.%0a%0a* Several relatively small improvements and bug fixes -- see the ChangeLog for details.%0a%0a'''What's next:''' Next I plan to work on getting internationalizations updated to 2.0.0 -- many i18n items "broke" in beta44 and need to be cleaned up. In conjunction with this will be page improvements and cleanups on pmwiki.org, as well as addressing outstanding PITS entries. After that will come more feature enhancements, including comments pages, section edits, and improved indexing/search capabilities.%0a%0a----%0a%0a'''Thank you:''' My sincere and humble thanks to everyone who has contributed so much of their time, ideas, opinions, writing, and code to PmWiki. I notice that the PmWiki:Contributors page is way out of date, so if you've helped at all with PmWiki core development, don't be shy or modest -- feel free to add yourself to the list and be associated with an outstanding group.%0a%0aAnd, as always, comments, suggestions, questions, and bug reports can be reported to the mailing list or the PmWiki Issue Tracking System.%0a%0aThanks again,%0a%0aPm%0a%0a----%0a%0a!!!Version 2.0.beta55 (25-Aug-2005)%0aI was really hoping that the next release would be 2.0.0, but it %0adidn't work out that way. Really all that needs to be done now is %0ato finish cleaning up the documentation.%0a%0aThis release has a number of important changes and bugfixes. First,%0athe 'value=' wikistyle is working again, having been broken in an%0aearlier release. WikiStyles now also accept dots and parens in values,%0aso that things like "1.5em" and "rgb(255,255,255)" work. There's a%0anew "[@%25cframe%25@]" wikistyle, which centers content in a 200-pixel frame%0a(this can be adjusted with a "width=" parameter in the wikistyle).%0a%0aThe [@(:include:)@] directive now allows a list of pages to be searched%0afor inclusion; the first existing page is selected. Thus the markup%0a%0a [@(:include Page1 Page2 Page3:)@]%0a%0aincludes the contents of the first available of Page1, Page2, or Page3.%0a%0aThe [=[@...@]=] markup is now the "preformatted text" markup. It can be%0aused instead of the space [@[=...=]@] markup to generate blocks of%0apreformatted and escaped text. It's also fairly smart about handling%0aextra newlines inside the [=[@...@]=], so that there isn't a lot of%0aunwanted vertical space displayed in the output.%0a%0aAnd speaking of unwanted vertical space, PmWiki's handling of "blank lines"%0ain the markup text has been changed somewhat. In previous versions%0aof PmWiki, some directives %0a(e.g., [@(:comment:), (:keyword:), (:noleft:), (:if:)@]) often %0aresulted in blank lines in the markup text, which then%0agenerated vertical space on the output. In this release, only those%0alines that are blank in the original source markup (before processing)%0aend up generating vertical space in the output. This ends up being%0amuch more natural for authors and allows cleaner markup sequences.%0a%0aThis change may have some ramifications for selected recipe authors.%0aIf a custom markup rule produces other wiki markup to be processed by%0aPmWiki, and the output wiki markup contains blank lines that is intended%0ato generate vertical space in the page output, then the custom markup rule%0aneeds to either generate '%3c:vspace>' tags for the blank lines or call%0athe PVS() function to convert blank lines into vertical space tags.%0a(For more details or assistance, query the mailing list.)%0a%0aSome may have noticed that pmwiki.org now has a new skin; some version of%0athis skin is expected to become the standard skin in the next release. %0aThe current 2.0.beta skin will be made available for download in the %0aCookbook for sites that want to continue using it.%0a%0a!!!Version 2.0.beta54 (1-Aug-2005)\\%0aVersion 2.0.beta53 (30-Jul-2005)%0a%0aThis release restores ?action=search, to be able to perform searches%0ain the context of a group or current page. It also modifies the%0a[@(:searchbox:)@] directive to allow a "group=" option to limit%0asearches to certain groups.%0a%0a!!!Version 2.0.beta52 (29-Jul-2005)%0a%0aThis release provides a number of minor bugfixes and introduces improvements%0ato image handling. Most of the improvements for images are described%0aon the [[PmWiki.Images]] page. Other changes are in the [[ChangeLog]].%0a%0a!!!Version 2.0.beta51 (22-Jul-2005)%0a%0aThis release corrects a problem introduced by the "Save and Edit"%0acapabilities introduced in 2.0.beta44 -- posts made with "Save and Edit"%0acould bypass blocklists, urlapprovals, and simultaneous edits.%0a%0aFor administrators and recipe writers who have been working with%0aposting capabilities, posting is now controlled by an $EnablePost%0avariable. Setting $EnablePost to zero suppresses the actual post --%0apreviously this was generally performed with [@unset($_POST['post'])@].%0aIf appropriate, a message for why the post was suppressed can%0ausually be placed in the $MessagesFmt array.%0a%0a!!!Version 2.0.beta50 (20-Jul-2005)%0a%0aThis release makes two major improvements to the authorization%0asemantics in PmWiki:%0a%0a1. The $HandleAuth array can be used to set the authorization%0alevel required for executing a corresponding action. For example,%0asetting $HandleAuth['diff'] to 'edit' means that edit authorizations%0aare required to view the page history ([@?action=diff@]). Similarly,%0asetting $HandleAuth['source'] to 'admin' means that only the%0aadmin would be able to use [@?action=source@].%0a%0a2. Passwords can now "cascade" -- that is, if a page sets a 'read'%0apassword but not an 'edit' password, then the read password%0ais also used as the edit password. Similarly, if a page sets%0aan 'edit' password but not an 'attr' password, then the edit%0apassword is also used as the attr password.%0a%0aThis prevents situations where authors set an edit password%0aon a page but don't set a corresponding attr password.%0a%0aThis does not change PmWiki's other passwording characteristics --%0ai.e., page passwords still override group passwords, and group%0apasswords still override site passwords. Password cascading%0ais only used where there's no page, group, or site password set %0afor a given authorization level.%0a%0a!!!Version 2.0.beta49 (19-Jul-2005)%0a%0aThis release adds a Content-Disposition: header for sites that have%0adirect downloads disabled (automatically fills in a browser's filename%0afor such downloads). It also fixes some issues with \\ markup at the%0aends of lines.%0a%0a!!!Version 2.0.beta48 (13-Jul-2005)\\%0aVersion 2.0.beta47 (12-Jul-2005)\\%0aVersion 2.0.beta46 (11-Jul-2005)\\%0aVersion 2.0.beta45 (10-Jul-2005)\\%0aVersion 2.0.beta44 (10-Jul-2005)%0a%0aThis release has a number of major changes, and is hopefully the%0alast such "major" release before 2.0.0. %0a%0aIncluded with this release is a special ''transition.php'' script%0athat reconfigures PmWiki as needed to cause it to work as it did%0ain previous releases. In the release notes below any changes%0athat are handled by the transition script are marked by [ ].%0aThis transition script is automatically loaded by default so the%0asite admin doesn't need to do anything to use it.%0a%0aEventually the transition script will also provide diagnostic%0aoptions to inform site admins of places where they may be relying%0aon outdated or deprecated features, and how they can change their%0asettings to be up-to-date.%0a%0aPmWiki now sets CSS stylings so that all images within a page are%0adisplayed without a border (HTML's default is a 1-pixel border).%0aTo restore the behavior of previous versions, add the following to%0a''local/config.php'':%0a%0a $HTMLStylesFmt['img'] = ' img { border:1px solid; } ';%0a $ImgTagFmt="%3cimg src='\$LinkUrl' style='border:0px;' alt='\$LinkAlt' />";%0a%0aWith this release we are officially initiating use of the "Site"%0agroup discussed on the pmwiki-users mailing list. The Site group %0ais intended to hold a variety of utility and configuration pages %0aused by PmWiki, and many of PmWiki's pages have moved from the %0a"Main" group into this new location. More on this in a bit.%0a%0aThe major internal change is that this release provides support%0afor input forms. Notably, the "Edit Page" form layout can now%0abe specified using wiki markup in the Site.EditForm page. ( [ ] However,%0aPmWiki still honors the $PageEditFmt variable for those sites or%0askins that may have customized edit forms.)%0a%0aThe edit form now includes a "change summary" line where authors%0acan summarize the edits. The edit form can also contain %0aa "Save and edit" button to save changes but continue editing, and%0aa "Cancel" button for abandoning changes.%0a%0aThe $EditMessageFmt variable for displaying messages to authors%0ais now the $MessagesFmt array, which can be displayed using the%0a[=(:messages:)=] markup. [ ] The transition script takes care%0aof moving messages between $EditMessageFmt and $MessagesFmt as%0aneed to preserve correct operation.%0a%0aA number of traditional locations for pages have now been moved%0ainto the Site group, many of which are handled by the transition%0ascript:%0a%0a* The new location for the `AllRecentChanges page is Site.AllRecentChanges. [ ] However, if `Main.AllRecentChanges exists then it will continue to be updated also. Administrators may wish to move `Main.AllRecentChanges to Site.AllRecentChanges and/or remove `Main.AllRecentChanges entirely.%0a%0a* The search results page is now [[Site.Search]] instead of `Main.SearchWiki. `Main.SearchWiki will be removed entirely in a future release. [ ] The transition script takes care of mapping some instances of `Main.SearchWiki in links to Site.Search.%0a%0a* Approved urls are now stored in `Site.ApprovedUrls . [ ] However, if `Main.ApprovedUrls exists it is used and updated as appropriate.%0a%0a* `Main.SideBar is now `Site.SideBar. Unfortunately, it's very difficult to manage this particular change among all possible skin combinations, so it's up to the admin to correctly move existing sidebar pages into the appropriate group, or to update the skin template accordingly.%0a%0a* `PmWiki.EditQuickReference and `PmWiki.UploadQuickReference are now stored in the Site group.%0a%0a* `PmWiki.WikiHelp is being deprecated and will be removed from a future release.%0a%0aThe $PagePreviewFmt variable no longer exists in standard PmWiki (it's now handled by Site.EditForm). [ ] However, to preserve backwards compatibility it is loaded by the transition script in certain situations.%0a%0aThe $PageName substitution (deprecated in 2.0.devel14) is now gone.%0aUse $FullName instead.%0a%0aThe GUI buttons can now have accesskeys associated with them.%0a%0aGUI buttons are now displayed via a [@(:e_guibuttons:)@] directive in Site.EditForm, instead of being attached to $EditMessagesFmt.%0a%0aThis release now provides the ability for user and browser-specific%0apreferences and customizations, including accesskeys and form element%0asizes. More details about this will be forthcoming in documentation.%0a%0aThe release adds standard [@(:noleft:)@] and [@(:noright:)@] directives for suppressing the display of the left and right sidebars (depending on skin template).%0a%0a%0a!!!Version 2.0.beta43 (8-Jul-2005)%0a%0aThis release adds the long awaited [@(:div:)@] markup. The format of%0athe markup is%0a [=%0a (:div:)%0a ...%0a (:divend:)%0a =]%0aAttributes (e.g., [@id='name'@] and [@class='class'@] can be supplied %0ato the [@(:div:)@] directive. [@(:div:)@] lives in the same markup%0alayer as advanced tables [@(:table:)@], so divs and tables do not%0anest, and any div or advanced table directive ends any previous%0a[@(:div:)@]. (We may change this in a future release; for now we'll go%0awith the non-nesting version.)%0a%0aThe release also adds a div shortcut, any line beginning with >>%3c%3c%0amarks a new div section. In addition, wikistyle specifications%0acan go between the >> and %3c%3c, thus [@>>bgcolor=#ffffdd%3c%3c@] will create%0aa division with a light yellow background. Similarly, one can%0ado things like [@>>id=foo%3c%3c@], [@>>class=bar%3c%3c@], and even make%0ause of author-defined wikistyles such as >>center%3c%3c or >>Don%3c%3c.%0a%0aLastly, the wikistyle code now supports [@%25id=name%25@], which%0aallows an HTML [@id='name'@] attribute to be added to the%0aaffected text.%0a%0a!!!Version 2.0.beta42 (7-Jul-2005)%0a%0aThis minor release adds the [@(:if attachments:)@] conditional markup, to include/exclude markup based on the (non)existence of attachments to the current page.%0a%0a!!!Version 2.0.beta41 (7-Jul-2005)%0a%0aThis is a minor release with some small bugfixes to uploads, adding the ability to set the item number for ordered lists with [@%25item value=nn%25@], and enabling nested Keep()s for module writers.%0a%0a!!!Version 2.0.beta40 (22-Jun-2005)%0a%0aThis very minor release simply updates the authuser.php script to %0asupport Apache `MD5 encryption in .htpasswd files.%0a%0a!!!Version 2.0.beta39 (20-Jun-2005)%0a%0aThis release primarily fixes some bugs with wikistyles and their interactions with block structures such as tables and headings. In addition, the release fixes some nagging errors with opening directories in PITS and other recipes.%0a%0aThis release also adds definition lists to the available syntaxes for building WikiTrails.%0a%0aFinally, this release adds ''scripts/authuser.php'', which is a preliminary script for user-authentication based on .htpasswd (and similarly formatted) files.%0a%0a!!!Version 2.0.beta38 (14-Jun-2005)%0a%0aThis version performs a minor bug fix to the `ListPages() function for those sites that are storing pages in per-group subdirectories.%0a%0a!!!Version 2.0.beta37 (26-May-2005)%0a%0aThis version performs some minor bug fixes and improvements:%0a* Changed the location in which $SearchIncl, $SearchExcl, and $SearchGroup are set %0a* Fixed bug in setting of $SearchExcl %0a* Added filesize check after new page is written to disk but before replacing existing page%0a* Added $LinkUrl and $LinkAlt to urlapprove.php %0a%0a!!!Version 2.0.beta36 (30-Apr-2005)%0a%0aThis release fixes a rather large bug with excluded terms in the %0apagelist code, and a very minor bug with generating cells if there%0aare spaces after the final '||' in a simple table.%0a%0a!!!Version 2.0.beta35 (24-Apr-2005)%0a%0aThis release fixes some bugs in the new pagelist code.%0a%0a!!!Version 2.0.beta34 (23-Apr-2005)%0a!!!Version 2.0.beta33 (22-Apr-2005)%0a%0aThis version introduce a major redesign of working and speed of scripts/pagelist.php, which defines [@(:pagelist:)@] and [@(:@][@searchresults:)@] markups. This version now have a parameter [@link=@] to display pages with links to target page (i.e. "backlinks"). There is also "order=" and "count=" parameters which can be used for sorting listed pages and limit display length.%0a%0aHowever, the changes also mean that it's possible that any%0alocal customizations or cookbook recipes that depended on the%0aprevious pagelist code will no longer work, so be careful%0awhen upgrading.%0a%0aThis release also optimizes the rendering of page links and%0afixes a performance bug in the `FmtPageName() function. These%0achanges have been observed to improve page rendering times by%0aup to 40%25.%0a%0aWhat remains before the 2.0 official release: redesign of the%0aedit page form, addition of a "comments" feature, and fixing%0aPmWiki documentation. %0a%0aLastly, the trailing ?> sequences have been removed from all%0ascripts to simplify installations on VMS and other environments%0athat have trouble with newlines after the closing ?>.%0a%0a%0a!!!Version 2.0.beta32 (17-Apr-2005)%0a%0aVersion beta32 adds the $RCLinesMax variable, which limits the maximum%0anumber of lines that are saved in `RecentChanges files. The default%0ais set to zero, meaning "no limit".%0a%0a!!!Version 2.0.beta31 (15-Apr-2005)%0a%0aThis release adds the ability to store and serve attachments (uploads)%0afrom directories that is not directly accessible to the webserver. %0aThe "download" action ([@?action=download@]) tells PmWiki to retrieve%0aan attachment associated with the current page. This can be used for%0aprotecting attachments via a page's passwords, or for working around%0awebservers that cannot access files in the PmWiki-created ''uploads/''%0adirectories.%0a%0aSetting $EnableDirectDownload=0; tells PmWiki to generate links to %0a[@?action=download@] to retrieve attachments instead of accessing%0athe attachments directly through the webserver. Note that this%0asetting by itself may not be enough to protect uploads; one may need%0aalso need to to configure the webserver or ''uploads/'' directory%0ato block direct requests to the webserver for attachment files.%0a%0aThis release also adds $EnableFixedUrlRedirect. When PmWiki receives%0aa url with a "partial pagename" (such as the name of a WikiGroup),%0ait first determines the correct "full name" for the page. Normally%0aPmWiki then issues a "redirect" to the browser requesting the browser%0ato reload the page with its full, "official" url, but setting%0a$EnableFixedUrlRedirect to zero will suppress the reload so that the%0adetermined page is sent immediately (and keeps the same url used to%0aaccess the page).%0a%0a%0a!!!Version 2.0.beta30 (14-Apr-2005)%0a%0aThis release works around some problems with PHP sessions resulting in%0adeadlocked web processes. The changes to the authorization code in%0a2.0.beta29 greatly increased the likelihood of such deadlocks, so%0aall sites running 2.0.beta29 are encouraged to upgrade to this one.%0a%0aThis release also changes the wikiword-handling functions so that%0awikiwords are no longer spaced if $LinkWikiWords is disabled.%0a%0aFinally, this release adds $PageTextStartFmt and%0a$PageTextEndFmt to allow local customization of the container%0asurrounding %3c!--`PageText--> in skin templates.%0a%0a%0a!!!Version 2.0.beta29 (11-Apr-2005)%0aThis release incorporates some significant changes in the authorization%0aand page storage code, so production-level sites might want to wait for%0aany new bugs to found and fixed before upgrading. Or, go ahead and%0aupgrade but be prepared to revert back to beta28 or earlier if you%0astart to notice problems.%0a%0aHowever, I do need lots of testers for the new code in this release,%0aof which there's a fair bit. Thus, I'd greatly appreciate any%0ahelp people can provide with testing the new system and suggesting%0aimprovements. I'm particularly looking for suggestions about how%0athe interfaces can be made easier to understand.%0a%0aThe Page Attributes form (reached via ?action=attr and used to set%0apasswords) has been improved so that it's now possible to see which%0apasswords have been set, and if those passwords are coming from the%0agroup or site defaults. For an example, see%0ahttp://www.pmwiki.org/wiki/Test/AttrExample?action=attr . These%0aprompts are not yet internationalized -- I want to get the english%0ainterface finalized first and then we'll make the i18n strings for it.%0a%0aMultiple passwords (separated by spaces) can now be set on pages and groups,%0athus entering "one two" for an edit password will means that either "one" or%0a"two" will be accepted. Because of this, passwords cannot contain%0aspaces (I hope this won't be a major loss -- let me know if it will).%0a%0aThe password request field now appears within a normal skin layout%0a(i.e., with header, sidebar, footer); previously requests for%0apasswords were undecorated forms that appeared alone in the browser%0awindow.%0a%0aThere is an [=(:if auth ...:)=] conditional markup available for%0aprocessing depending on the current authorizations in effect. For%0aexample, one can create a bullet list with%0a [=%0a (:if auth read:)* [[View page -> {$Name}?action=browse]]%0a (:if auth edit:)* [[Edit page -> {$Name}?action=edit]]%0a (:if auth upload:)* [[Attachments -> {$Name}?action=upload]]%0a (:if auth attr:)* [[Page Attributes -> {$Name}?action=attr]]%0a (:if auth admin:)* You're logged in as admin%0a (:ifend:)%0a =]%0aand only those items corresponding to the user's current authorizations%0awill appear. This should be very useful in creating action buttons.%0a%0aAssuming there's already some mechanism in place for identifying%0aand authenticating someone, pages can specify a password field of%0a"id:xyz", which means to allow only user "xyz" the specified%0aaccess. For example, specifying an edit password of "id:alice"%0ameans that only user "alice" (and the admin) is allowed to edit the%0apage. Multiple ids can be specified as either "id:alice,bob,carol"%0aor "id:alice id:bob id:carol". The special value "id:*" is used%0ato mean any authenticated user, and users can be excluded via the%0aminus sign, as in "id:-eve,*".%0a%0aUser-based authentication can completely coexist and mix freely with%0apassword-based authentication, thus an edit password of%0a"id:alice glorp" will allow Alice and anyone who knows the%0apassword "glorp" to edit the page.%0a%0a2.0.beta29 supports only REMOTE_USER authentication; future releases%0awill add other authentication mechanism.%0a%0a!!!Version 2.0.beta28 (27-Mar-2005)%0a%0aThis release makes some substantial improvements to the attachments/uploads feature in PmWiki. The specific enhancements include:%0a%0a* The Attach: markup can now be used to reference attachments on other pages; the syntax is [@Attach:pagename/file.ext@]. The "pagename" can refer to pages in other groups. %0a%0a* Attachments automatically have the file extension (if any) converted to lowercase.%0a%0a* The [@(:attachlist:)@] markup now accepts parameters; ''ext='' can be used to limit the list of attachments to specific extensions, and one can supply a page's name to obtain a list of attachments for that page (e.g., [@(:attachlist Group.PageName:)@].%0a%0a%0a!!!Version 2.0.beta27 (26-Mar-2005)%0a%0aThis release makes a number of minor changes and bugfixes. The more significant changes are listed below.%0a%0a* The localmap.txt and farmmap.txt files can now contain $-variable substitutions (same as any variables available through `FmtPageName).%0a%0a* Most built-in directives are now case insensitive.%0a%0a* The (:markup:) directive now has a (:markup:) ... (:markupend:) version. The previous [=(:markup:)=] [@[=...=]@] syntax is still supported, but may change in future releases.%0a%0a* A bug was fixed with preformatted text eating the leading whitespace character.%0a%0a* Added the missing [@{$FullName}@] markup.%0a%0a* Fixed a bug in the handling of $MetaRobots.%0a%0a!!!Version 2.0.beta26 (5-Mar-2005)%0a%0aThis release adds support for edit page templates; i.e., site administrators can specify the default text for new pages. More details are available at Cookbook:EditTemplates.%0a%0a!!!Version 2.0.beta25 (2-Mar-2005)%0a!!!Version 2.0.beta24 (1-Mar-2005)%0a%0aThis release contains an important correction to the processing of QUERY_STRING parameters, and changes to the way that `PageNotFound messages are generated. These are needed to prevent webcrawlers (notably the one used by inktomi) from generating long sequences of links to non-existent pages.%0a%0aThis release also adds a `ParseArgs() function to make it easier for cookbook recipes and other components to parse directive arguments. Documentation for the function will be forthcoming at Cookbook:ParseArgs.%0a%0aList and heading markups have been changed to consume any single space character that follows the list or heading marker.%0a%0aA $EnablePostAttrClearSession switch has been added to control whether or not changing a page's attributes causes any existing passwords to be forgotten. The default is that changing attributes forgets any passwords entered; this can be changed by setting $EnablePostAttrClearSession to zero.%0a%0a%0a!!!Version 2.0.beta23 (24-Feb-2005)%0a%0aThis release adds a couple of improvements.%0a%0aFirst, the passwording system has been improved slightly to hopefully make passwords a little less confusing (although more improvements are coming). Previously PmWiki would remember all passwords previously entered during the current browser session. In this release, changing a page's password causes PmWiki to "forget" all of the previously entered passwords, thus eliminating the confusion that arose when a page would appear unprotected when in fact a previously entered password was authorizing access.%0a%0aThis release also adds as $EnablePageListProtect option. When set, the [@(:pagelist:)@] and [@(:@][@searchresults:)@] directives will exclude pages for which the browser does not have read authorization.%0a%0a!!!Version 2.0.beta22 (23-Feb-2005)%0a%0aThis release makes some feature enhancements and some bugfixes.%0a%0aThe skins loading code has undergone some enhancements and substantial rewriting, but it should have no negative impacts on existing skins. The $BasicLayoutVars variable has been deprecated and is no longer needed. This version introduces a `SetTmplDisplay() function that makes it easier for local customizations to disable sections of a skin template.%0a%0aThe password prompt form has been customized so that the cursor is%0aautomatically placed in the form when the page is loaded.%0a%0aThe ?action=source action has been fixed for pages with characters%0aoutside of ASCII.%0a%0aThe graphical button bar can now be used for buttons with arbitrary%0aHTML elements (e.g., "save" and "preview" buttons).%0a%0aOther changes are noted in the ChangeLog.%0a%0a!!!Version 2.0.beta21 (13-Feb-2005)%0a%0aThis version has a number of changes. The major change that could (but shouldn't) affect some sites is that PmWiki has changed its default umask from 000 to 002, which will improve the default permissions for files and directories created by PmWiki for some sites, while (hopefully) not affecting others.%0a%0aMany of you probably don't know (or care) what a umask is. If everything still works after upgrading to this version, you can continue to not know or care. However, if after upgrading to this version you start seeing file permission errors where you weren't seeing them before, try adding the line%0a%0a umask(0);%0a%0ato your ''local/config.php'' and things should work again. (And be sure to report that you ran into trouble so we can investigate and improve things for the next version!)%0a%0aThis release also changes the %3ctitle> tag generated by ?action=rss%0ato properly honor the [@(:title:)@] setting on various pages.%0a%0aFinally, the release fixes some minor bugs in the HTML generation for [[tables]], corrects some bugs with settings for $AuthorPage and $AuthorLink, and makes some cookbook-related additions to the v1 conversion script.%0a%0aFor more details, see the [[ChangeLog]].%0a%0a!!!Version 2.0.beta20 (30-Jan-2005)%0a%0aThis version has a number of relatively minor changes.%0a%0aFirst, the $UrlLinkFmt variable has been modified so that links to external urls automatically have a rel='nofollow' attribute added to them, to help combat wiki spam as described in http://www.google.com/googleblog/2005/01/preventing-comment-spam.html. Site administrators can customize $UrlLinkFmt and $UnapprovedLinkFmt to supply or omit rel='nofollow' as appropriate.%0a%0aThe algorithm for creating page names from [@[[free links]]@] has been modified slightly. First, letters following a hyphen are no longer automatically capitalized, thus [@[[page-link]]@] refers to a page named "Page-link" and not "Page-Link". This is more compatible with version 1's naming syntax. Also, single quotes don't promote the following letter to uppercase, thus [@[[John's page]]@] now links to [@JohnsPage@] and not [@JohnSPage@].%0a%0aSites that want to keep PmWiki 2's prior behavior can do so with the following:%0a [=%0a $PageNameChars = '-[:alnum:]';%0a $MakePageNamePatterns = array(%0a "/[^$PageNameChars] /" => ' ',%0a "/(\\b\\w)/e" => "strtoupper('$1')",%0a "/ /" => '');%0a =]%0a%0aThe localmap.txt InterMap file can now contain comments (denoted by leading '#' in the file).%0a%0aHeadings (!! markup) can now have block wikistyles.%0a%0aMore information is available in the PmWiki.ChangeLog.%0a%0a%0a!!!Version 2.0.beta19 (17-Jan-2005)%0a%0aPmWiki uses PHP's sessions for tracking passwords and page authorizations; however, if a session times out (or is otherwise lost) while an author is in the middle of editing a password-protected page, the author's edits may be lost when re-prompted for the password. This release fixes this problem by preserving the edit text and other posted form variables when prompting for a password.%0a%0a!!!Version 2.0.beta18 (17-Jan-2005)%0a%0aThis release makes improvements to the gui buttons, fixes some bugs, and minor other improvements and changes.%0a%0aAlternate text is now valid inside of WikiTrails; i.e., one can use [@%3c%3c|[[TrailPage | alternate text]]|>>@] to change the text of the link to the trailpage.%0a%0aThe GUI button module has a number of changes. %0a* New images are provided for lists, indentation, headings, and tables, and the sample-config.php file has examples for configuring these additional buttons into the bar. %0a* The "Heading 3" button has now been changed into separate "Heading" and optional "Subheading" buttons.%0a* The "Attach:" (paperclip) button appears in the bar only if uploads are enabled for that page.%0a* For browsers that support it, clicking one of the buttons that adds text will leave the text highlighted (to make it easier to replace the text).%0a%0aThis release also eliminates the %3cp>...%3c/p> tags that were being generated around markup lines that contained other HTML block markups (e.g., search results, page listings, forms). As a result, these pages are now valid HTML and pass the `W3C validator.%0a%0a$HTMLHeaderFmt has been changed so that skin designers can completely turn off the inline-styles mechanism used by PmWiki and other cookbook modules. To disable the inline styles, use [@ $HTMLHeaderFmt['styles'] = ''; @].%0a%0aFinally, this release fixes a call to setlocale() which was supposed to only return the current locale but instead was causing the locale to change.%0a%0a%0a!!!Version 2.0.beta17 (12-Jan-2005)%0a%0aThis release simply makes some minor bug fixes to wikistyles (colors set in wikistyles extend to anchor tags), arrays of default passwords, and advanced table handling.%0a%0a!!!Version 2.0.beta16 (11-Jan-2005)%0a!!!Version 2.0.beta15 (10-Jan-2005)%0a%0aThe major feature of this release is the addition of the graphical buttons in the edit page. By default this feature is disabled -- to enable it, use the following in config.php.%0a%0a $EnableGUIButtons = 1;%0a%0aIf your site customizes the $PageEditFmt variable, then note that the buttons are placed at the end of the $EditMessageFmt and that the %3ctextarea> needs to have [@id='edit'@] in order for the buttons to work.%0a%0aThe rss.php script has also been improved -- it now automatically translates named character entities (from HTML 4) into their numeric equivalents. This eliminates a lot of feed validation errors and problems in specific RSS feed consumers.%0a%0aThis release adds a $Titlespaced variable and [@{$Titlespaced}@] markup; $Titlespaced is replaced by either a page's title (if defined by the [@(:title:)@] directive) or by the spaced version of the page's name.%0a%0aFinally, a number of WikiStyles bugs have been fixed.%0a%0a%0a!!!Version 2.0.beta14 (28-Dec-2004)%0a%0aThis release introduces a number of relatively minor optimizations and improvements, summarized below. If you don't understand what any of these mean, they probably don't affect you. :-) %0a%0a* PmWiki's %3cimg ...> tags now use style='border:0px;' instead of border='0'.%0a%0a* `PrintFmt() now calls Lock(0) to release any locks prior to sending output to the browser. This is important because some webservers (notably Apache) sometimes get stuck when they're unable to send output to the browser, and thus inadvertently lock others from being able to edit/post pages.%0a%0a* $PageEditFmt now includes id='text' to make for easier styling/referencing.%0a%0a* `MarkupToHTML()'s "posteval" code has been changed considerably.%0a%0a* `PageExists() now caches results of checking for page existence.%0a%0a* Page urls are now automatically url-encoded as needed.%0a%0a* Many of PmWiki's internal regex patterns have been optimized to (hopefully) improve matching speed.%0a%0a* Comparisons to substr() have been replaced with more efficient comparison functions.%0a%0a%0a!!!Version 2.0.beta13 (22-Dec-2004)%0a%0aThis release fixes a bug introduced in 2.0.beta7 that prevented the refcount.php (for ?action=refcount) from generating links correctly. It also cleans up the handling of wikistyles and %25-in-urls (which is what 2.0.beta7 was supposed to fix).%0a%0aIn general, all sites using the 2.0.betaXX series are recommended to upgrade to this latest release.%0a%0a%0a!!!Version 2.0.beta12 (21-Dec-2004)%0a%0aThis release adds a number of %3cdiv> tags and identifiers around the%0avarious forms that PmWiki produces (e.g., uploads, search results,%0aattribute pages, etc.). This makes such forms easier to style in CSS.%0a%0aIn addition, this release adds some functionality to the urlapprove.php%0ascript to limit the number of unapproved urls that can be saved in%0aa page (helps to combat wikispam).%0a%0aFinally the release adds the [@(:description:)@] markup for generating %3cmeta name='description' ... /> tags in the output. [@(:description:)@] may also get used for other features later on (e.g., excerpts in search results, etc.).%0a%0a!!!Version 2.0.beta11 (19-Dec-2004)%0a%0aThis release primarily cleans up a number of items in the handling of uploads:%0a# A new $LinkUpload variable has been defined for $...Fmt strings -- it contains the URL of the upload page for the current attachment%0a# [@(:attachlist:)@] automatically adds "replace-attachment" links (denoted by triangles) to the items in the list%0a# After performing an upload, the "upload name" field is automatically cleared%0a# Fixed error message when upload exceeds maximum allowed by PHP%0a%0aThis release also changes the `StopWatch() function (used internally for benchmarking/timing PmWiki performance) to only have an effect when $EnableStopWatch is set to 1 (wall clock timings only) or 2 (wall clock and user-process timings).%0a%0a!!!Version 2.0.beta10 (14-Dec-2004)%0a%0aThis release makes some substantial improvements in the installation%0aprocedure. First, the installation steps have been simplified, and PmWiki%0aprovides accurate instructions when it encounters a PHP "safe_mode"%0aenvironment. %0a%0aThe release also provides better handling of the '.flock' file -- if%0aPmWiki discovers it cannot open an existing .flock file for writing,%0ait removes the file and tries again rather than complaining about it.%0aThis makes the system more robust when page directories are going%0athrough backup restore.%0a%0a%0a!!!Version 2.0.beta9 (14-Dec-2004)%0a%0aThis release provides some very minor bugfixes to the [@[[target |#]]@] markup, to the appearance of $...variables in documentation, and extends uploads.php to be able to work better with url rewriting.%0a%0a!!!Version 2.0.beta8 (13-Dec-2004)%0a%0aThis release makes a number of reasonably significant changes. First and%0aforemost, it changes the [@?pagename=@] uri syntax to be [@?n=@], and%0ainstallation now defaults to $EnablePathInfo = 0; to make better%0acompatibility.%0a%0aSites which wish to continue using the [@.../Main/HomePage@] form of uri%0ainstead of [@?n=Main.HomePage@] should set $EnablePathInfo = 1 in%0aconfig.php. %0a%0aThis release also fixes a probable bug in the handling of author%0anames which was causing spaces to be incorrectly removed.%0a%0a2.0.beta8 includes features for advanced CSS styling of [[tables]]%0avia the $TableRowAttrFmt and $TableCellAttrFmt variables, more description %0awill be forthcoming in a Cookbook recipe. %0a%0aAlso, this release includes vastly improved support for UTF-8 sites,%0aincluding the ability to have UTF-8 characters in pagenames and%0a[@[[utf-8 links]]@]. We're still working out the details to be%0aable to support UTF-8 wikiwords -- PHP's functions don't provide%0agood support for this. See scripts/xlpage-utf-8.php for more%0ainformation on UTF-8.%0a%0aFinally, the Q: and A: markups are back, and a few other minor%0abug fixes and documentation improvements have been included.%0a%0a%0a!!!Version 2.0.beta7 (8-Dec-2004)%0a%0aThis release has a number of improvements and changes to it. First,%0athis release provides a ''scripts/xlpage-utf-8.php'' file, which adapts%0aPmWiki to be able to work somewhat with utf-8 characters in pagenames.%0aSince PHP's preg_* functions seem to be unable to detect UTF-8 alphanumeric%0acharacters, the trade-off at the moment is that WikiWord links are limited%0ato the ASCII character set. We're working on ways to get around this%0arestriction, however.%0a%0aThe xlpage-utf-8.php script can be automatically loaded by any `XLPage %0atranslation that specifies 'xlpage-i18n' => 'utf-8'.%0a%0aThis release also:%0a%0a* fixes up the .htaccess files that are placed in local/ and wiki.d/%0a* changes the default textarea size for the pmwiki skin, %0a* restores the link/citation markup ([@[[target |#]]@])%0a* fixes the default value of $DefaultPageTextFmt (note this may change again)%0a* automatically converts instances of $Newline in posted text%0a%0a%0a!!!Version 2.0.beta6 (5-Dec-2004)%0a%0aThis release contains a number of relatively minor bugfixes (see the ChangeLog), and it also restores the $WikiWordCount functionality from PmWiki 1 in which the wiki administrator can limit the number of conversions for each WikiWord.%0a%0aThe ''sample-config.php'' file has been updated with more comments and suggestions for customizations.%0a%0aFinally, this release increases the default value of $MaxIncludes to 50 (and provides better documentation of the $MaxIncludes variable).%0a%0a!!!Version 2.0.beta5 (1-Dec-2004)%0a!!!Version 2.0.beta4 (1-Dec-2004)%0a%0aThese releases fix a number of bugs introduced by the changes in 2.0.beta3.%0aUsers of 2.0.beta3 are encouraged to upgrade directly to this release.%0a%0a!!!Version 2.0.beta3 (30-Nov-2004)%0a%0aThis release provides a simple version of the [@(:attachlist:)@] markup (different sorting orders are not available yet as the syntax is likely to change), as well as fixes the `PmWiki.EditQuickReference and `PmWiki.UploadQuickReference pages. It also provides default pages to lock passwords in the Main and PmWiki groups and adds uppercase versions for ".GIF", ".JPG", and ".PNG" files.%0a%0aInternally, this release also changes the edit page sequence to use the $_POST autoglobal instead of $_REQUEST (i.e., posting edits is only allowed via method='post' and not via query string parameters).%0a%0a!!!Version 2.0.beta2%0a%0aThis release fixes the bug that caused $PageTemplateFmt to no longer%0awork in pmwiki-2.0.beta1.%0a%0a!!!Version 2.0.beta1%0a%0aThis release marks PmWiki 2.0 as entering "beta" status, as it finally%0abegins moving towards official release. The major change for this release%0ais in the skins code -- previous versions of PmWiki used $PageTemplateFmt%0ato specify the location of the template file to be used; newer versions%0anow use the $Skin variable to specify the location of the skins directory%0a(in pub/skins/) that contains the skin template file, php configuration%0ascript, and other files.%0a%0aIn general, if you previously had $PageTemplateFmt set to "pub/skins/myskin/myskin.tmpl", then you now simply set $Skin='myskin'; to get things to work. See `PmWiki.LayoutBasics for more details.%0a%0a!!!Version 2.0.devel releases%0a%0aThese are the release notes for the development releases of PmWiki 2.0.%0a%0aFirst, this is definitely still in the development stages, so many%0athings are likely to change between now and the official releases.%0a%0aSecond, at present there's not a good way to upgrade from PmWiki 1.0%0ato PmWiki 2.0, although upgrade support is expected to arrive in future%0a(development) releases. So, you can use this version just to see the%0anew developments and gain some experience, but migrating from 1.0%0ato this version is still likely to be a bit of a chore.%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%0a%0a%0a%0a%0a%0a%0a%0a%0a%0a%0a -time=1245617309 +rev=425 +targets=Site.Site,SiteAdmin.SiteAdmin,Site.PageActions,Site.EditForm,Site.PageNotFound,PmWiki.PageLists,PmWiki.WikiTrails,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.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; wikiTrails 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=1247698849 title=Release Notes Index: wikilib.d/PmWiki.CustomMarkup =================================================================== --- wikilib.d/PmWiki.CustomMarkup (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.CustomMarkup (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=fix link; examples and recipes should probably be in the cookbook +csum= host=81.65.14.164 name=PmWiki.CustomMarkup -rev=121 +rev=123 targets=PmWiki.CustomMarkup,PmWiki.LocalCustomizations,PmWiki.Skins -text=(:Summary: Using the Markup() function for custom wiki syntax:)%0a(:Audience: administrators (intermediate) :)%0a!! Introduction%0a%0aPmWiki's markup translation engine is handled by a set of rules; each rule searches for a specific pattern in the markup text and replaces it with some replacement text. Internally, this is accomplished by using PHP's "[[(http://www.php.net/)preg_replace]]" function.%0a%0aRules are added to the translation engine via PmWiki's Markup() function, which looks like%0a%0a->[@Markup($name, $when, $pattern, $replace);@]%0a%0awhere [@$name@] is a unique name (a string) given to the rule, [@$when@] says when the rule should be applied relative to other rules, [@$pattern@] is the pattern to be searched for in the markup text, and [@$replace@] is what the pattern should be replaced with.%0a%0aFor example, here's the code that creates the rule for [@''emphasized text''@] (in ''scripts/stdmarkup.php''):%0a%0a->[@Markup("em", "inline", "/''(.*?)''/", "%3cem>$1%3c/em>");@]%0a%0aBasically this statement says to create a rule called "em" to be performed with the other "inline" markups, and the rule replaces any text inside two pairs of single quotes with the same text ($1) surrounded by [@%3cem>@] and [@%3c/em>@].%0a%0aThe first two parameters to Markup() are used to specify the sequence in which rules should be applied. The first parameter provides a name for a rule -- "[@em@]" in the example above. We could've chosen other names such as "[@''@]", or even "[@twosinglequotes@]". In general PmWiki uses the markup itself to name the rule (i.e., PmWiki uses "[@''@]" instead of "[@em@]"), but to keep this example easier to read later on we'll use a mnemonic name for now.%0a%0aThe second parameter says that this rule is to be done along with the other "inline" markups. PmWiki divides the translation process into a number of phases:%0a%0a[@%0a_begin start of translation%0afulltext translations to be performed on the full text %0asplit conversion of the full markup text into lines to be processed%0adirectives directive processing%0ainline inline markups%0alinks conversion of [[links]], url-links, and WikiWords %0ablock block markups%0astyle style handling %0a_end end of translation%0a@]%0a%0aThis argument is normally specified as a left-angle bracket ("before") or a right-angle bracket ("after") followed by the name of another rule. %0a%0aThus, specifying "inline" for the second parameter says that this rule should be applied when the other "inline" rules are being performed. If we want a rule to be performed with the directives -- i.e., before inline rules are processed, we would specify "directives" or "%3cinline" for the second parameter.%0a%0a->'- A significant rule in terms of ordering is "{$var}" which substitutes variables -- if you say "%3c{$var}" then your markup will be processed before variables are substituted whereas if you say ">{$var}" then your markup will be processed after variables are substituted. -'%0a%0aThe third parameter is a Perl-compatible regular expression. Basically, it is a slash, a [[regular expression -> http://www.php.net/manual/en/reference.pcre.pattern.syntax.php]], another slash, and a set of optional [[modifiers -> http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php]].%0a%0aThe example uses the pattern string [@"/''(.*?)''/"@], which uses [@''(.*?)''@] as the regular expression and no options. (The regular expression says "find two single quotes in succession, then as few arbitrary characters as are needed to make the match find something, then two additional single quotes in succession"; the parentheses "capture" a part of the wikitext for later use.)%0a%0aThe fourth parameter is the replacement text that should be inserted instead of the marked-up wikitext. You can use [@$1@], [@$2@], etc. to insert the text from the first, second etc. parenthesised part of the regular expression.%0a%0aIn the example, we have [@"%3cem>$1%3c/em>"@], which is an [@%3cem>@], the text matched by the first parentheses (i.e. by the [@.*?@] section of the pattern), and [@%3c/em>@].%0a%0aHere's a rule for [@@@monospaced@@@] text:%0a%0a->[@Markup("@@", "inline", "/@@(.*?)@@/", "%3ccode>$1%3c/code>");@]%0a%0aand for a [@[:comment ...:]@] directive that is simply removed from the output:%0a%0a->[@Markup("comment", "directives", "/\\[:comment .*?:\\]/", '');@]%0a%0aOkay, now how about the rule for [@'''strong emphasis'''@]? We have to be a bit careful here, because although this translation should be performed along with other inline markup, we also have to make sure that the rule for [@'''@] is handled ''before'' the rule for [@''@], because [@'''@] also contains [@''@]. The second parameter to Markup() can be used to specify the new rule's relationship to any other rule:%0a%0a->[@Markup("strong", "%3cem", "/'''(.*?)'''/", "%3cstrong>$1%3c/strong>");@]%0a%0aThis creates a rule called "strong", and the second parameter "%3cem" says to be sure that this rule is processed before the "em" rule we defined above. If we wanted to do something after the "em" rule, we would use ">em" instead. Thus, it's possible to add rules at any point in PmWiki's markup translation process in an extensible manner. (In fact, the "inline", "block", "directives", etc., phases above are just placeholder rules used to provide an overall sequence for other rules. Thus one can use "%3cinline" to specify rules that should be handled before any other inline rules.) %0a%0aIf you want to disable available markup just call e.g.:%0a%0a->[@DisableMarkup("strong")@]%0a%0aPmWiki's default markup rules are defined in the ''scripts/stdmarkup.php'' file. To see the entire translation table as the program is running, the scripts/diag.php module adds "[@?action=ruleset@]", which displays the set of defined markup rules in the sequence in which they will be processed. You can see it at [[CustomMarkup?action=ruleset | CustomMarkup?action=ruleset]]. You must first enable the action by setting $EnableDiag = 1 in your configuration file.%0a%0a!! Other common examples%0a%0a!!! Define a custom markup to produce a specific HTML or Javascript sequence%0a%0aSuppose an admin wants to have a simple "[@(:example:)@]" markup that will always produce a fixed HTML string in the output, such as for a webring, Google AdSense display, or Javascript. The Markup() call to do this would be:%0a%0a->[@%0aMarkup('example', 'directives',%0a '/\\(:example:\\)/',%0a Keep("%3cdiv class='example'>%3cp>Here is a %0a %3ca target='_blank' href='http://www.example.com'>link%3c/a> to%0a %3cem>example.com%3c/em>%3c/p>%3c/div>") );%0a@]%0a%0a* The first argument is a unique name for the markup ("example").%0a* The second argument says to perform this markup along with other directives.%0a* The third argument is the pattern to look for "(:example:)".%0a* The fourth argument is the HTML that "(:example:)" is to be replaced with. We use the Keep() function here to prevent the output from being further processed by PmWiki's markup rule -- in the above example, we don't want the http://www.example.com url to be again converted to a link.%0a%0a[[#random]]%0a!!! Define a markup to call a custom function that returns content%0a%0aAn 'e' option on the [@$pattern@] parameter will cause the [@$replace@] parameter to be treated as a PHP expression to be evaluated instead of replacement text. Thus, a markup to produce a random number between 1 and 100 might look like:%0a%0a->[@%0aMarkup('random', 'directives',%0a '/\\(:random:\\)/e',%0a "rand(1, 100)");%0a@]%0a%0aThis calls the PHP built-in rand() function and substitutes the directive with the result. Any function can be called, including functions defined in a [[local customization(s)]] file.%0a%0aArguments can also be passed by using regular expression capturing parentheses, thus%0a%0a->[@%0aMarkup('randomargs', 'directives',%0a '/\\(:random (\\d+) (\\d+):\\)/e',%0a "rand('$1', '$2')");%0a@]%0a%0awill cause the markup [@(:random 50 100:)@] to generate a random number between 50 and 100.%0a%0a->%25note%25 Note: Be very careful with the /e modifier in regular expressions; malicious authors may be able to pass strings that cause arbitrary and undesirable PHP functions to be executed.%0a%0aFor a PmWiki function to help with parsing arbitrary sequences of arguments and key=value pairs, see Cookbook:ParseArgs.%0a%0a%0a>>faq%3c%3c [[#faq]]%0aQ: How can I embed JavaScript into a page's output?%0aA: There are several ways to do this. The [[Cookbook:JavaScript]] recipe describes a simple means for embedding static JavaScript into web pages using [[custom markup]]. For editing JavaScript directly in wiki pages (which can pose various security risks), see the [[(Cookbook:)JavaScript-Editable]] recipe. For JavaScript that is to appear in headers or footers of pages, the [[skin(s)]] template can be modified directly, or %3cscript> statements can be inserted using the $HTMLHeaderFmt array.%0a%0aQ: How would I create a markup (''[=(:nodiscussion:)=]'') that will set a page variable (''[={$HideDiscussion}=]'') which can be used by ''[=(:if enabled HideDiscussion:)=]'' in [=.PageActions=]?%0aA: Add the following section of code to your config.php%0a-> [@%0aSDV($HideDiscussion, 0); #define var name%0aMarkup('hideDiscussion', '%3c{$var}',%0a '/\\(:nodiscussion:\\)/e', 'setHideDiscussion(true)'); %0afunction setHideDiscussion($val) { %0a global $HideDiscussion; %0a $HideDiscussion = $val;%0a} %0a@]%0a%0aThis will enable the @@[=(:if enabled HideDiscussion:)=]@@ markup to be used. If you want to print the current value of [={$HideDiscussion}=] (for testing purposes) on the page, you'll also need to add the line: \\%0a@@[=$FmtPV['$HideDiscussion'] = '$GLOBALS["HideDiscussion"]';=]@@%0a%0a%0aQ: PmWiki only supports tool tips for external links, can I use custom markup to add tool tips to internal links?%0aA: Yes, add the following custom markup to your config.php: \\%0a[= Markup('%25title%25', 'inline', '/%25title%25(.*?)"(.*?)"(.*?)%25%25/', '%3cspan title="$2">$1$3%3c/span>'); # Add tool tips to internal links, Example: %25title%25[[link"tool tip"]]%25%25 =]%0a%0aUse the markup with internal links such as: \\%0a[= %25title%25[[CookBook "cool" | Example]]%25%25 =]%0a%0aA: See also [[Cookbook:LinkTitles]].%0a%0aQ: It appears that (.*?) does not match newlines in these functions, making the above example inoperable if the text to be wrappen in %3cem> contains new lines.%0aA: If you include the "s" modifier on the regular expression then the dot (.) will match newlines. Thus your regular expression will be "/STUFF(.*?)/s". That s at the very end is what you are looking for. If you start getting into multi-line regexes you may be forced to look at the m option as well - let's anchors (^ and $) match not begin/end of strings but also begin/end of lines (i.e., right before/after a newline).%0a%0a%0aQ: How do I get started writing recipes and creating my own custom markup?%0aA: [[PmWiki:CustomMarkupAlt|(alternate) Introduction to custom markup for Beginners]]%0a%0aA: You can also see the [[(PmWiki:)Custom Markup Examples]] page.%0a -time=1239490603 +text=(:Summary: Using the Markup() function for custom wiki syntax:)%0a(:Audience: administrators (intermediate) :)%0a!! Introduction%0a%0aPmWiki's markup translation engine is handled by a set of rules; each rule searches for a specific pattern in the markup text and replaces it with some replacement text. Internally, this is accomplished by using PHP's "[[(http://www.php.net/)preg_replace]]" function.%0a%0aRules are added to the translation engine via PmWiki's Markup() function, which looks like%0a%0a->[@Markup($name, $when, $pattern, $replace);@]%0a%0awhere [@$name@] is a unique name (a string) given to the rule, [@$when@] says when the rule should be applied relative to other rules, [@$pattern@] is the pattern to be searched for in the markup text, and [@$replace@] is what the pattern should be replaced with.%0a%0aFor example, here's the code that creates the rule for [@''emphasized text''@] (in ''scripts/stdmarkup.php''):%0a%0a->[@Markup("em", "inline", "/''(.*?)''/", "%3cem>$1%3c/em>");@]%0a%0aBasically this statement says to create a rule called "em" to be performed with the other "inline" markups, and the rule replaces any text inside two pairs of single quotes with the same text ($1) surrounded by [@%3cem>@] and [@%3c/em>@].%0a%0aThe first two parameters to Markup() are used to specify the sequence in which rules should be applied. The first parameter provides a name for a rule -- "[@em@]" in the example above. We could've chosen other names such as "[@''@]", or even "[@twosinglequotes@]". In general PmWiki uses the markup itself to name the rule (i.e., PmWiki uses "[@''@]" instead of "[@em@]"), but to keep this example easier to read later on we'll use a mnemonic name for now.%0a%0aThe second parameter says that this rule is to be done along with the other "inline" markups. PmWiki divides the translation process into a number of phases:%0a%0a[@%0a_begin start of translation%0afulltext translations to be performed on the full text %0asplit conversion of the full markup text into lines to be processed%0adirectives directive processing%0ainline inline markups%0alinks conversion of [[links]], url-links, and WikiWords %0ablock block markups%0astyle style handling %0a_end end of translation%0a@]%0a%0aThis argument is normally specified as a left-angle bracket ("before") or a right-angle bracket ("after") followed by the name of another rule. %0a%0aThus, specifying "inline" for the second parameter says that this rule should be applied when the other "inline" rules are being performed. If we want a rule to be performed with the directives -- i.e., before inline rules are processed, we would specify "directives" or "%3cinline" for the second parameter.%0a%0a->'- A significant rule in terms of ordering is "{$var}" which substitutes variables -- if you say "%3c{$var}" then your markup will be processed before variables are substituted whereas if you say ">{$var}" then your markup will be processed after variables are substituted. -'%0a%0aThe third parameter is a Perl-compatible regular expression. Basically, it is a slash, a [[regular expression -> http://www.php.net/manual/en/reference.pcre.pattern.syntax.php]], another slash, and a set of optional [[modifiers -> http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php]].%0a%0aThe example uses the pattern string [@"/''(.*?)''/"@], which uses [@''(.*?)''@] as the regular expression and no options. (The regular expression says "find two single quotes in succession, then as few arbitrary characters as are needed to make the match find something, then two additional single quotes in succession"; the parentheses "capture" a part of the wikitext for later use.)%0a%0aThe fourth parameter is the replacement text that should be inserted instead of the marked-up wikitext. You can use [@$1@], [@$2@], etc. to insert the text from the first, second etc. parenthesised part of the regular expression.%0a%0aIn the example, we have [@"%3cem>$1%3c/em>"@], which is an [@%3cem>@], the text matched by the first parentheses (i.e. by the [@.*?@] section of the pattern), and [@%3c/em>@].%0a%0aHere's a rule for [@@@monospaced@@@] text:%0a%0a->[@Markup("@@", "inline", "/@@(.*?)@@/", "%3ccode>$1%3c/code>");@]%0a%0aand for a [@[:comment ...:]@] directive that is simply removed from the output:%0a%0a->[@Markup("comment", "directives", "/\\[:comment .*?:\\]/", '');@]%0a%0aOkay, now how about the rule for [@'''strong emphasis'''@]? We have to be a bit careful here, because although this translation should be performed along with other inline markup, we also have to make sure that the rule for [@'''@] is handled ''before'' the rule for [@''@], because [@'''@] also contains [@''@]. The second parameter to Markup() can be used to specify the new rule's relationship to any other rule:%0a%0a->[@Markup("strong", "%3cem", "/'''(.*?)'''/", "%3cstrong>$1%3c/strong>");@]%0a%0aThis creates a rule called "strong", and the second parameter "%3cem" says to be sure that this rule is processed before the "em" rule we defined above. If we wanted to do something after the "em" rule, we would use ">em" instead. Thus, it's possible to add rules at any point in PmWiki's markup translation process in an extensible manner. (In fact, the "inline", "block", "directives", etc., phases above are just placeholder rules used to provide an overall sequence for other rules. Thus one can use "%3cinline" to specify rules that should be handled before any other inline rules.) %0a%0aIf you want to disable available markup just call e.g.:%0a%0a->[@DisableMarkup("strong")@]%0a%0aPmWiki's default markup rules are defined in the ''scripts/stdmarkup.php'' file. To see the entire translation table as the program is running, the scripts/diag.php module adds "[@?action=ruleset@]", which displays the set of defined markup rules in the sequence in which they will be processed. You can see it at [[CustomMarkup?action=ruleset | CustomMarkup?action=ruleset]]. You must first enable the action by setting $EnableDiag = 1 in your configuration file.%0a%0a!! Other common examples%0a%0a!!! Define a custom markup to produce a specific HTML or Javascript sequence%0a%0aSuppose an admin wants to have a simple "[@(:example:)@]" markup that will always produce a fixed HTML string in the output, such as for a webring, Google AdSense display, or Javascript. The Markup() call to do this would be:%0a%0a->[@%0aMarkup('example', 'directives',%0a '/\\(:example:\\)/',%0a Keep("%3cdiv class='example'>%3cp>Here is a %0a %3ca target='_blank' href='http://www.example.com'>link%3c/a> to%0a %3cem>example.com%3c/em>%3c/p>%3c/div>") );%0a@]%0a%0a* The first argument is a unique name for the markup ("example").%0a* The second argument says to perform this markup along with other directives.%0a* The third argument is the pattern to look for "(:example:)".%0a* The fourth argument is the HTML that "(:example:)" is to be replaced with. We use the Keep() function here to prevent the output from being further processed by PmWiki's markup rule -- in the above example, we don't want the http://www.example.com url to be again converted to a link.%0a%0a[[#random]]%0a!!! Define a markup to call a custom function that returns content%0a%0aAn 'e' option on the [@$pattern@] parameter will cause the [@$replace@] parameter to be treated as a PHP expression to be evaluated instead of replacement text. Thus, a markup to produce a random number between 1 and 100 might look like:%0a%0a->[@%0aMarkup('random', 'directives',%0a '/\\(:random:\\)/e',%0a "rand(1, 100)");%0a@]%0a%0aThis calls the PHP built-in rand() function and substitutes the directive with the result. Any function can be called, including functions defined in a [[local customization(s)]] file.%0a%0aArguments can also be passed by using regular expression capturing parentheses, thus%0a%0a->[@%0aMarkup('randomargs', 'directives',%0a '/\\(:random (\\d+) (\\d+):\\)/e',%0a "rand('$1', '$2')");%0a@]%0a%0awill cause the markup [@(:random 50 100:)@] to generate a random number between 50 and 100.%0a%0a->%25note%25 Note: Be very careful with the /e modifier in regular expressions; malicious authors may be able to pass strings that cause arbitrary and undesirable PHP functions to be executed.%0a%0aFor a PmWiki function to help with parsing arbitrary sequences of arguments and key=value pairs, see Cookbook:ParseArgs.%0a%0a%0a>>faq%3c%3c [[#faq]]%0aQ: How can I embed JavaScript into a page's output?%0aA: There are several ways to do this. The [[Cookbook:JavaScript]] recipe describes a simple means for embedding static JavaScript into web pages using [[custom markup]]. For editing JavaScript directly in wiki pages (which can pose various security risks), see the [[(Cookbook:)JavaScript-Editable]] recipe. For JavaScript that is to appear in headers or footers of pages, the [[skin(s)]] template can be modified directly, or %3cscript> statements can be inserted using the $HTMLHeaderFmt array.%0a%0aQ: How would I create a markup (''[=(:nodiscussion:)=]'') that will set a page variable (''[={$HideDiscussion}=]'') which can be used by ''[=(:if enabled HideDiscussion:)=]'' in [=.PageActions=]?%0aA: Add the following section of code to your config.php%0a-> [@%0aSDV($HideDiscussion, 0); #define var name%0aMarkup('hideDiscussion', '%3c{$var}',%0a '/\\(:nodiscussion:\\)/e', 'setHideDiscussion(true)'); %0afunction setHideDiscussion($val) { %0a global $HideDiscussion; %0a $HideDiscussion = $val;%0a} %0a@]%0a%0aThis will enable the @@[=(:if enabled HideDiscussion:)=]@@ markup to be used. If you want to print the current value of [={$HideDiscussion}=] (for testing purposes) on the page, you'll also need to add the line: \\%0a@@[=$FmtPV['$HideDiscussion'] = '$GLOBALS["HideDiscussion"]';=]@@%0a%0a%0aQ: PmWiki only supports tool tips for external links, can I use custom markup to add tool tips to internal links?%0aA: Yes, add the following custom markup to your config.php: \\%0a[= Markup('%25title%25', 'inline', '/%25title%25(.*?)"(.*?)"(.*?)%25%25/', '%3cspan title="$2">$1$3%3c/span>'); # Add tool tips to internal links, Example: %25title%25[[link"tool tip"]]%25%25 =]%0a%0aUse the markup with internal links such as: \\%0a[= %25title%25[[CookBook "cool" | Example]]%25%25 =]%0a%0aA: See also [[Cookbook:LinkTitles]].%0a%0aQ: It appears that (.*?) does not match newlines in these functions, making the above example inoperable if the text to be wrappen in %3cem> contains new lines.%0aA: If you include the "s" modifier on the regular expression then the dot (.) will match newlines. Thus your regular expression will be "/STUFF(.*?)/s". That s at the very end is what you are looking for. If you start getting into multi-line regexes you may be forced to look at the m option as well - let's anchors (^ and $) match not begin/end of strings but also begin/end of lines (i.e., right before/after a newline).%0a%0a%0aQ: How do I get started writing recipes and creating my own custom markup?%0aA: [[PmWiki:CustomMarkupAlt|(alternate) Introduction to custom markup for Beginners]]%0a +time=1247411232 Index: wikilib.d/PmWiki.TextFormattingRules =================================================================== --- wikilib.d/PmWiki.TextFormattingRules (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.TextFormattingRules (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 GTB5 +author=Ed W charset=ISO-8859-1 -csum=fix link -host=81.65.14.164 +csum= +host=94.194.201.187 name=PmWiki.TextFormattingRules post= Save -rev=473 +rev=479 targets=PmWiki.SpecialCharacters,Main.WikiSandbox,PmWiki.WikiStyles,PmWiki.WikiWord,PmWiki.Links,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.MarkupMasterIndex -text=(:Summary: A list of some of the markup sequences available:) %0a>>rframe font-size:smaller%3c%3c%0a!! Table of contents%0a* [[#Paragraphs|Paragraphs]]%0a* [[#IndentedParagraphs|Indented Paragraphs ''(Quotes)'']]%0a* [[#BulletedLists|Bulleted and Numbered Lists]]%0a* [[#DefinitionLists|Definition Lists]]%0a* [[#WhitespaceRules|Whitespace Rules]] %0a* [[#HorizontalLine|Horizontal Line]]%0a* [[#Emphasis|Emphasis]]%0a* [[#References|References]]%0a* [[#Headings|Headings]]%0a* [[#EscapeSequence|Escape sequence]]%0a* [[SpecialCharacters | Special characters]]%0a* [[#Tables | Tables]]%0a>>%3c%3c%0aThis page provides a more '''complete''' list of some of the markup sequences available in '''PmWiki'''. %0aNote that it's easy to create and edit pages without using any of the markups below, but ''if'' you ever need them, they're here. %0a%0aTo experiment with the rules, '''''please''''' try editing the [[Main/WikiSandbox]].%0a%0a----%0a%0a!! [[#Paragraphs]] Paragraphs%0a%0aTo create paragraphs, simply enter text. Use a blank line to start a new paragraph.%0a%0aWords on two lines in a row will '''wrap and fill''' as needed (the normal XHTML behavior). To turn off the automatic filling, use the [@(:linebreaks:)@] directive above the paragraph.%0a%0a* Use [@\@] (single backslash) at the end of a line to join the current line to the next one.%0a* Use [@\\@] (two backslashes) at the end of a line to force a line break.%0a* Use [@\\\@] (three backslashes) at the end of a line to force 2 line breaks.%0a* Use [@[[%3c%3c]]@] to force a line break that will clear floating elements.%0a%0a%0a!! [[#IndentedParagraphs]] Indented Paragraphs ''(Quotes)''%0a%0aArrows ([@->@]) at the beginning of a paragraph can be used to produce an indented paragraph. More hyphens at the beginning ([@--->@]) produce larger indents.%0a%0a(:markup:)%0a->Four score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal.%0a(:markupend:)%0a%0aInverted Arrows ([@-%3c@]) at the beginning of a paragraph can be used to produce a paragraph with a hanging indent. Adding hyphens at the beginning ([@---%3c@]) causes all the text to indent.%0a%0a(:markup:)%0a-%3cFour score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. %0a(:markupend:)%0a%0a(:markup:)%0a--%3cFour score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. And that food would be good too.%0a(:markupend:)%0a%0aBlocks of text to which [@(:linebreaks:)@] has been applied can be indented by preceding the first line of the block with indention arrows ([@->@]) and aligning subsequent lines under the first. An unindented line stops the block indentation. See [[Cookbook:MarkupTricks]] for an example.%0a%0a%0a!! [[#BulletedLists]] Bulleted and Numbered Lists%0a%0aBullet lists are made by placing asterisks at the left margin. Numbered lists are made by placing number-signs (#) at the left margin. More asterisks/number-signs increases the level of bullet:%0a%0a(:markup:) %0a* First-level list item%0a** Second-level list item%0a### Order this%0a#### And this (optional)%0a### Then this%0a** Another second-level item%0a* A first-level item: cooking%0a## Prepare the experiment%0a### Unwrap the pop-tart%0a### Insert the pop-tart into the toaster%0a## Begin cooking the pop tart%0a## Stand back%0a(:markupend:)%0a%0a(:markup:)%0a# A list is terminated%0aby the first line that is not a list.%0a# Continue a list item by lining%0a up the text with leading whitespace.%0a# Use a forced linebreak \\%0a to force a newline in your list item.%0a(:markupend:)%0a%0aUse [[(PmWiki:)list styles]] to control numbering of ordered lists%0a(:markup:)%0a## Text between list items can cause numbering to restart%0a## %25item value=3%25 this can be dealt with%0a(:markupend:)%0a%0aAlso see: [[(PmWiki:)ListStyles]], [[Cookbook:WikiStylesPlus]]%0a%0a%0a!! [[#DefinitionLists]] Definition Lists%0a>>rframe%3c%3c%0a'''Powerful new%25red%25*%25%25 feature'''\\%0aWhen you define terms using this markup\\%0aPmWiki will recognize them as [[(PmWiki:)PageTextVariables]]\\%0athat you can use on any page or [[(PmWiki:)PageList(s)]].\\%0a[-%25red%25* Added%25%25 in PmWiki version %25red%252.2.0%25%25-]%0a>>%3c%3c%0aDefinition lists are made by placing colons at the left margin (and between each term and definition):%0a%0a(:markup:)%0a:term:definition of term%0a::second-level item: definition of 2nd-level item%0a(:markupend:)%0a%0a[[#WhitespaceRules]]%0a!! Whitespace Rules%0a%0aWhitespace indentation in lists. Any line that begins with whitespace ''and aligns'' with a previous list item (whether bulleted, numbers or definitional) is considered to be "within" that list item. Text folds and wraps as normal, and the [@(:linebreaks:)@] directive is honored. %0a%0a(:markup:) %0a# First-level item\\%0a Whitespace used to continue item on a new line%0a# Another first-level item%0a # Whitespace combined with a single # to create a new item one level deeper%0a(:markupend:)%0a%0aOtherwise, lines that begin with whitespace are treated as ''preformatted text'', using a monospace font and not generating linebreaks except where explicitly indicated in the markup. Note to administrators: Starting with version 2.2.0-beta41, this feature can be modified using $EnableWSPre. (Another way to create preformatted text blocks is by using the [=[@...@]=] markup.)%0a%0a!! [[#HorizontalLine]] Horizontal Line%0a%0aFour or more dashes ([=----=]) at the beginning of a line produce a horizontal line.%0a%0a[[#Emphasis]]%0a!! Emphasis and character formatting%0a%0a* Enclose text in doubled single-quotes ([=''text''=]), i.e., ''two apostrophes'', for emphasis (usually ''italics'')%0a* Enclose text in tripled single-quotes ([='''text'''=]), i.e. ''three apostrophes'', for strong (usually '''bold''')%0a* Enclose text in five single-quotes ([='''''text'''''=]), or triples within doubles (''five apostrophes''), for strong emphasis (usually '''''bold italics''''')%0a* Enclose text in doubled at-signs ([=@@text@@=]) for @@monospace@@ text%0a* Use [=[+large+]=] for [+large+] text, [=[++larger++]=] for [++larger++], [=[-small-]=] for [-small-] text, and [=[--smaller--]=] for [--smaller--].%0a* Emphasis can be used multiple times within a line, but cannot span across markup line boundaries (i.e., you can't put a paragraph break in the middle of bold text).%0a* [='~italic~'=] and [='*bold*'=] are available if enabled in config.php%0a%0aOther styling %0a(:markup:)%0a'+big+', '-small-', '^super^', '_sub_', %0a%0a{+insert or underscore+}, %0a%0a{-delete or strikethrough or strikeout-}%0a(:markupend:)%0a* [@`WikiWord@] `WikiWord neutralisation%0a%0aSee also [[Wiki Styles]] for advanced text formatting options.%0a%0a[[#References]]%0a!! References%0a%0a* Use words and phrases in double brackets (e.g., [=[[text formatting rules]]=]) to create links to other pages on this wiki.%0a* On some PmWiki installations, capitalized words joined together (e.g., [[WikiWord]]s) can also be used to make references to other pages without needing the double-brackets.%0a* Precede [=URLs=] with "@@http:@@", "@@ftp:@@", "@@gopher:@@", "@@mailto:@@", or "@@news:@@" to create links automatically, as in http://www.pmichaud.com/toast.%0a* [=URLs=] ending with @@.gif@@, @@.jpg@@, or @@.png@@ are displayed as images in the page%0a* Links with arbitrary text can be created as either [=[[=]''target'' | ''text'']] or [=[[=]''text'' -> ''target''[=]]=]. ''Text'' can be an image URL, in which case the image becomes the link to the remote ''url'' or ''[[WikiWord]]''.%0a* [[#Anchors]] Anchor targets within pages (#-links) can be created using @@[=[[#target]]=]@@.%0aSee [[Links]] for details.%0a%0a[[#Headings]]%0a!!Headings%0a%0aHeadings are made by placing an exclamation mark ('''!''') at the left margin. More exclamation marks increase the level of heading. For example,%0a%0a(:markup:)%0a! Level 1 Heading%0a!! Level 2 Heading%0a!!! Level 3 Heading%0a!!!! Level 4 Heading%0a!!!!! Level 5 Heading%0a(:markupend:)%0a%0aNote that level 1 heading is already used as page title (at least in the PmWiki skin), so you should start with level 2 headings to create well formed, search enging optimized web pages.%0a%0aSee [[Cookbook:NumberedHeaders]] for numbered headings.%0a%0a[[#EscapeSequence]]%0a!!Escape sequence%0a%0aAnything placed between [=[= and =]=] is not interpreted by PmWiki, but paragraphs are reformatted. This makes it possible to turn off special formatting interpretations and neutralise [=WikiWords=] that are not links (even easier is to use a tick ` in front, like [=`WikiWord=]).%0a%0aFor preformatted text blocks, use the [=[@...@]=] markup. It does neither reformat paragraphs nor process wiki markup:%0a%0a(:markup:)%0a[@%0aCode goes here like [[PmWiki.PmWiki]]%0a'$CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'; #just some code%0a@]%0a(:markupend:)%0a%0aIt is also useful to use [=[= =]=] within other wiki structures, as this enables the inclusion of new lines in text values. The example below shows how to include a multi-line value in a hidden form field.%0a%0a->[@(:input hidden message "[=Line1%0aLine2=]":)@]%0a%0a[[#SpecialCharacters]]%0a!! Special Characters%0a(:include SpecialCharacters:)%0a%0a[[#Tables]]%0a!! Tables%0a%0a[[Tables]] are defined by enclosing cells with '||'. %0aA cell with leading and trailing spaces is centered; a cell with leading spaces is right-aligned; all other cells are left-aligned. An empty cell will cause the previous cell to span multiple columns. (There is currently no mechanism for spanning multiple rows.) A line beginning with '||' specifies the table attributes for subsequent tables. A '!' as the first character in a cell provides emphasis that can be used to provide headings. This is interesting stuff.%0a%0a(:markup:)%0a%0a||border=1 width=50%25%0a||!Table||!Heading||!Example||%0a||!Left || Center || Right||%0a||A ||! a B || C||%0a|| || single || ||%0a|| || multi span ||||%0a(:markupend:)%0a%0aSee [[TableDirectives]] for advanced tables.%0a%0a!!!Can't find it here?%0aSee [[MarkupMasterIndex]]%0a -time=1238271351 +text=(:Summary: A list of some of the markup sequences available:) %0a>>rframe font-size:smaller%3c%3c%0a!! Table of contents%0a* [[#Paragraphs|Paragraphs]]%0a* [[#IndentedParagraphs|Indented Paragraphs ''(Quotes)'']]%0a* [[#BulletedLists|Bulleted and Numbered Lists]]%0a* [[#DefinitionLists|Definition Lists]]%0a* [[#WhitespaceRules|Whitespace Rules]] %0a* [[#HorizontalLine|Horizontal Line]]%0a* [[#Emphasis|Emphasis]]%0a* [[#References|References]]%0a* [[#Headings|Headings]]%0a* [[#EscapeSequence|Escape sequence]]%0a* [[Special Characters | Special characters]]%0a* [[#Tables | Tables]]%0a>>%3c%3c%0aThis page provides a more '''complete''' list of some of the markup sequences available in '''PmWiki'''. %0aNote that it's easy to create and edit pages without using any of the markups below, but ''if'' you ever need them, they're here. %0a%0aTo experiment with the rules, '''''please''''' try editing the [[Main/Wiki Sandbox]].%0a%0a----%0a%0a!! [[#Paragraphs]] Paragraphs%0a%0aTo create paragraphs, simply enter text. Use a blank line to start a new paragraph.%0a%0aWords on two lines in a row will '''wrap and fill''' as needed (the normal XHTML behavior). To turn off the automatic filling, use the [@(:linebreaks:)@] directive above the paragraph.%0a%0a* Use [@\@] (single backslash) at the end of a line to join the current line to the next one.%0a* Use [@\\@] (two backslashes) at the end of a line to force a line break.%0a* Use [@\\\@] (three backslashes) at the end of a line to force 2 line breaks.%0a* Use [@[[%3c%3c]]@] to force a line break that will clear floating elements.%0a%0a%0a!! [[#IndentedParagraphs]] Indented Paragraphs ''(Quotes)''%0a%0aArrows ([@->@]) at the beginning of a paragraph can be used to produce an indented paragraph. More hyphens at the beginning ([@--->@]) produce larger indents.%0a%0a(:markup:)%0a->Four score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal.%0a(:markupend:)%0a%0aInverted Arrows ([@-%3c@]) at the beginning of a paragraph can be used to produce a paragraph with a hanging indent. Adding hyphens at the beginning ([@---%3c@]) causes all the text to indent.%0a%0a(:markup:)%0a-%3cFour score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. %0a(:markupend:)%0a%0a(:markup:)%0a--%3cFour score and seven years ago our fathers placed upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. And that food would be good too.%0a(:markupend:)%0a%0aBlocks of text to which [@(:linebreaks:)@] has been applied can be indented by preceding the first line of the block with indention arrows ([@->@]) and aligning subsequent lines under the first. An unindented line stops the block indentation. See [[Cookbook:Markup Tricks]] for an example.%0a%0a%0a!! [[#BulletedLists]] Bulleted and Numbered Lists%0a%0aBullet lists are made by placing asterisks at the left margin. Numbered lists are made by placing number-signs (#) at the left margin. More asterisks/number-signs increases the level of bullet:%0a%0a(:markup:) %0a* First-level list item%0a** Second-level list item%0a### Order this%0a#### And this (optional)%0a### Then this%0a** Another second-level item%0a* A first-level item: cooking%0a## Prepare the experiment%0a### Unwrap the pop-tart%0a### Insert the pop-tart into the toaster%0a## Begin cooking the pop tart%0a## Stand back%0a(:markupend:)%0a%0a(:markup:)%0a# A list is terminated%0aby the first line that is not a list.%0a# Continue a list item by lining%0a up the text with leading whitespace.%0a# Use a forced linebreak \\%0a to force a newline in your list item.%0a(:markupend:)%0a%0aUse [[(PmWiki:)list styles]] to control numbering of ordered lists%0a(:markup:)%0a## Text between list items can cause numbering to restart%0a## %25item value=3%25 this can be dealt with%0a(:markupend:)%0a%0aAlso see: [[(PmWiki:)ListStyles]], [[Cookbook:WikiStylesPlus]]%0a%0a%0a!! [[#DefinitionLists]] Definition Lists%0a>>rframe%3c%3c%0a'''Powerful new%25red%25*%25%25 feature'''\\%0aWhen you define terms using this markup\\%0aPmWiki will recognize them as [[(PmWiki:)PageTextVariables]]\\%0athat you can use on any page or [[(PmWiki:)PageList(s)]].\\%0a[-%25red%25* Added%25%25 in PmWiki version %25red%252.2.0%25%25-]%0a>>%3c%3c%0aDefinition lists are made by placing colons at the left margin (and between each term and definition):%0a%0a(:markup:)%0a:term:definition of term%0a::second-level item: definition of 2nd-level item%0a(:markupend:)%0a%0a[[#WhitespaceRules]]%0a!! Whitespace Rules%0a%0aWhitespace indentation in lists. Any line that begins with whitespace ''and aligns'' with a previous list item (whether bulleted, numbers or definitional) is considered to be "within" that list item. Text folds and wraps as normal, and the [@(:linebreaks:)@] directive is honored. %0a%0a(:markup:) %0a# First-level item\\%0a Whitespace used to continue item on a new line%0a# Another first-level item%0a # Whitespace combined with a single # to create a new item one level deeper%0a(:markupend:)%0a%0aOtherwise, lines that begin with whitespace are treated as ''preformatted text'', using a monospace font and not generating linebreaks except where explicitly indicated in the markup. Note to administrators: Starting with version 2.2.0-beta41, this feature can be modified using $EnableWSPre. (Another way to create preformatted text blocks is by using the [=[@...@]=] markup.)%0a%0a!! [[#HorizontalLine]] Horizontal Line%0a%0aFour or more dashes ([=----=]) at the beginning of a line produce a horizontal line.%0a%0a[[#Emphasis]]%0a!! Emphasis and character formatting%0a%0a* Enclose text in doubled single-quotes ([=''text''=]), i.e., ''two apostrophes'', for emphasis (usually ''italics'')%0a* Enclose text in tripled single-quotes ([='''text'''=]), i.e. ''three apostrophes'', for strong (usually '''bold''')%0a* Enclose text in five single-quotes ([='''''text'''''=]), or triples within doubles (''five apostrophes''), for strong emphasis (usually '''''bold italics''''')%0a* Enclose text in doubled at-signs ([=@@text@@=]) for @@monospace@@ text%0a* Use [=[+large+]=] for [+large+] text, [=[++larger++]=] for [++larger++], [=[-small-]=] for [-small-] text, and [=[--smaller--]=] for [--smaller--].%0a* Emphasis can be used multiple times within a line, but cannot span across markup line boundaries (i.e., you can't put a paragraph break in the middle of bold text).%0a* [='~italic~'=] and [='*bold*'=] are available if enabled in config.php%0a%0aOther styling %0a(:markup:)%0a'+big+', '-small-', '^super^', '_sub_', %0a%0a{+insert or underscore+}, %0a%0a{-delete or strikethrough or strikeout-}%0a(:markupend:)%0a* [@`WikiWord@] `WikiWord neutralisation%0a%0aSee also [[Wiki Styles]] for advanced text formatting options.%0a%0a[[#References]]%0a!! References%0a%0a* Use words and phrases in double brackets (e.g., [=[[text formatting rules]]=]) to create links to other pages on this wiki.%0a* On some PmWiki installations, capitalized words joined together (e.g., [[WikiWord]]s) can also be used to make references to other pages without needing the double-brackets.%0a* Precede [=URLs=] with "@@http:@@", "@@ftp:@@", "@@gopher:@@", "@@mailto:@@", or "@@news:@@" to create links automatically, as in http://www.pmichaud.com/toast.%0a* [=URLs=] ending with @@.gif@@, @@.jpg@@, or @@.png@@ are displayed as images in the page%0a* Links with arbitrary text can be created as either [=[[=]''target'' | ''text'']] or [=[[=]''text'' -> ''target''[=]]=]. ''Text'' can be an image URL, in which case the image becomes the link to the remote ''url'' or ''[[WikiWord]]''.%0a* [[#Anchors]] Anchor targets within pages (#-links) can be created using @@[=[[#target]]=]@@.%0aSee [[Links]] for details.%0a%0a[[#Headings]]%0a!!Headings%0a%0aHeadings are made by placing an exclamation mark ('''!''') at the left margin. More exclamation marks increase the level of heading. For example,%0a%0a(:markup:)%0a! Level 1 Heading%0a!! Level 2 Heading%0a!!! Level 3 Heading%0a!!!! Level 4 Heading%0a!!!!! Level 5 Heading%0a(:markupend:)%0a%0aNote that level 1 heading is already used as page title (at least in the PmWiki skin), so you should start with level 2 headings to create well formed, search enging optimized web pages.%0a%0aSee [[Cookbook:Numbered Headers]] for numbered headings.%0a%0a[[#EscapeSequence]]%0a!!Escape sequence%0a%0aAnything placed between [=[= and =]=] is not interpreted by PmWiki, but paragraphs are reformatted. This makes it possible to turn off special formatting interpretations and neutralise [=WikiWords=] that are not links (even easier is to use a tick ` in front, like [=`WikiWord=]).%0a%0aFor preformatted text blocks, use the [=[@...@]=] markup. It does neither reformat paragraphs nor process wiki markup:%0a%0a(:markup:)%0a[@%0aCode goes here like [[PmWiki.PmWiki]]%0a'$CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]'; #just some code%0a@]%0a(:markupend:)%0a%0aIt is also useful to use [=[= =]=] within other wiki structures, as this enables the inclusion of new lines in text values. The example below shows how to include a multi-line value in a hidden form field.%0a%0a->[@(:input hidden message "[=Line1%0aLine2=]":)@]%0a%0a[[#SpecialCharacters]]%0a!! Special Characters%0a(:include SpecialCharacters:)%0a%0a[[#Tables]]%0a!! Tables%0a%0a[[Tables]] are defined by enclosing cells with '||'. %0aA cell with leading and trailing spaces is centered; a cell with leading spaces is right-aligned; all other cells are left-aligned. An empty cell will cause the previous cell to span multiple columns. (There is currently no mechanism for spanning multiple rows.) A line beginning with '||' specifies the table attributes for subsequent tables. A '!' as the first character in a cell provides emphasis that can be used to provide headings. This is interesting stuff.%0a%0a(:markup:)%0a%0a||border=1 width=50%25%0a||!Table||!Heading||!Example||%0a||!Left || Center || Right||%0a||A ||! a B || C||%0a|| || single || ||%0a|| || multi span ||||%0a(:markupend:)%0a%0aSee [[Table Directives]] for advanced tables.%0a%0a!!!Can't find it here?%0aSee [[Markup Master Index]]%0a +time=1247412956 Index: wikilib.d/SiteAdmin.SiteAdmin =================================================================== --- wikilib.d/SiteAdmin.SiteAdmin (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/SiteAdmin.SiteAdmin (.../pmwiki-2.2.3) (revision 2380) @@ -1,13 +1,13 @@ -version=pmwiki-2.2.0-beta62 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 -author=simon +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 charset=ISO-8859-1 -csum=future proof +csum=include Site.Site ctime=1182106004 -host=203.97.214.12 +host=81.65.14.164 name=SiteAdmin.SiteAdmin -rev=4 -targets=Site.Site -text=(:title Website administration:)(:Summary: Website administration:)%0aHere you find some links to Site administration pages.%0aThe [[Site]] group contains configuration pages.%0a%0a(:pagelist group={$Group} list=all:) -time=1185269934 -title=Website administration +rev=6 +targets= +text=(:include Site.Site:)%0a(:title Site Administration:)(:Summary: Site Administration:)%0a +time=1247701015 +title=Site Administration Index: wikilib.d/PmWiki.PageLists =================================================================== --- wikilib.d/PmWiki.PageLists (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.PageLists (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.31 Safari/530.5 -author=simon +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 charset=ISO-8859-1 -csum=quotes in example +csum=fix broken link for a release ctime=1138643894 -host=203.97.214.12 +host=81.65.14.164 name=PmWiki.PageLists -rev=189 -targets=PmWiki.PageListTemplates,PmWiki.DocumentationIndex,PmWiki.PageTextVariables,PmWiki.WikiTrails,Site.PageListTemplates,PmWiki.Categories,PmWiki.ConditionalMarkup,PmWiki.CustomPagelistSortOrder,PmWiki.PageDirectives,PmWiki.PagelistVariables -text=(:Audience: authors, admins (intermediate) :)%0a(:Summary:Listing pages by multiple criteria with templated output:)%0aPmWiki comes with two directives for generating lists of pages -- [@(:pagelist:)@] and @@[=(:=]searchresults:)@@. Both directives are basically the same and each accepts the parameters documented below. The primary difference between the two is that searchresults generates the "Results of search for ..." and "### pages found out of ### searched" messages around the results.%0a%0aThe [@(:searchbox:)@] directive generates a search form (input text box) to submit search queries. The markup generally accepts the same parameters as [@(:pagelist:)@], which makes it possible to restrict, order and format searchresults in the same ways that are described below for a [@(:pagelist:)@]. For more information about the [@(:searchbox:)@] directive, and the ways in which it differs from a [@(:pagelist:)@], skip to the section [[#searchbox|below]].%0a%0a!! Basic syntax%0a%0a* [@(:pagelist:)@] %0a->without any arguments shows a bulleted list of all pages, as links, ordered alphabetically and in groups.%0a* @@[=(:=]pagelist [[#pagelistgroup|group]]=''abc'' \%0a [[#pagelistname|name]]=''def'' \%0a [[#pagelistfmt|fmt]]=''[[page list templates|template]]'' \%0a [[#pagelistlist|list]]=''ghi'' \%0a [[#pagelistorder|order]]=''jkl'' \%0a [[#pagelistcount|count]]=''123'' \%0a [[#pagelistlink|link]]=''mno'' \%0a [[#pagelisttrail|trail]]=''pqr'' \%0a [[#pagelistwrap|wrap]]=''stu'' \%0a [[#pagelistpasswd|passwd]]=''vwx'' \%0a [[#pagelistif|if]]=''yz'' \%0a [[#pagetextvariables|$:''ptv'']]=''yz'' \%0a [[#pagevariables|$''pv'']]=''za'' \%0a [[#pagelistcache|cache]]=0 \%0a ''[[#pagelistarg|argument]]1'' -''[[#pagelistarg|argument]]2'' ''etc'' \%0a [[#includevariable|variable]]=''value'' \%0a [[#pagelistclass|class]]=''class'' \%0a :)@@ %0a->shows a pagelist according to the parameters supplied. Parameters are optional.%0a* @@[=(:=][[#searchbox|searchbox]] value=''abc'' size=''99'' target=''def'':)@@%0a* @@[=(:=][[#searchresults|searchresults]] [[#pagelistreq|''request=1 req=1'']] :)@@%0a%0a!! Parameters%0a[[#pagelistarg]]%0aAny argument supplied within [@(:pagelist:)@] that isn't in the form @@'key=value'@@ is treated as text that either must (or must not) exist in the page text.%0a%0aThe minus sign (-) or exclamation mark (!) can be used to indicate the logical ''not''. Thus%0a->[@(:pagelist trail=PmWiki.DocumentationIndex list=normal apple !pie:)@]%0alists all "normal" pages listed in the [[Documentation Index ]] trail that contain the word "apple" but not "pie".%0a%0a!!![[#pagetextvariables]]With page text variables%0aYou can also use [[page text variables]] as a ''key'' to list pages according to the existence of a page text variable. Eg : %0a->[@(:pagelist $:pagetextvar=avalue:)@]%0alists pages having ''$:pagetextvar'' set to ''avalue''.%0a[[%3c%3c]]%0aMinus sign (-), wildcards (?*) and a comma separated list of values also works when specifying a selection based on pagetextvariables. Eg :%0a->[@(:pagelist $:apagetextvar=t*,-test:)@]%0alists pages having $:apagetextvar like 't*' but not 'test'.%0a[[%3c%3c]]%0aExamples:%0a||width=* class="tabtable" rules=rows%0a||PTV is set (is not empty): ||[@(:pagelist $:MyPageTextVariable=- :)@]||%0a||PTV is empty or not set:[[%3c%3c]] (ie, is not set to one char followed by 0 or more chars) ||[@(:pagelist $:MyPageTextVariable=-?* :)@]||%0a||PTV is not VALUE: ||[@(:pagelist $:MyPageTextVariable=-VALUE :)@]||%0a||PTV is set and not YES: ||[@(:pagelist $:MyPageTextVariable=?*,-YES :)@]||%0aBe aware that if using [@(:pagelist $:MyPTV=$:YourPTV :)@] PTVs include PmWiki formatting, so you may not get the matches you expect. Currently the only way around this is to use wild cards, so if the formatting is embedded you may be out of luck.%0a%0a!!![[#pagevariables]]With page variables (PV)%0a%0aPage variables can be used within pagelists in the same way as page text variables. See [[#pagetextvariables|Page Text Variables]] above for more details. Simply use $var instead of $:var.%0a%0a!!![[#pagelistgroup]] group= and [[#pagelistname]]name= %0a%0aThe "[@group=@]" and "[@name=@]" parameters limit results to pages in a specific group or with a specific name:%0a(:table class='tabtable' rules=rows:)%0a(:cellnr:)All pages in the Pmwiki group:%0a(:cell:)[@(:pagelist group=PmWiki :)@]%0a(:cellnr:)All pages except those in the PmWiki or Site groups:%0a(:cell:)[@(:pagelist group=-PmWiki,-Site :)@]%0a(:cellnr:)All RecentChanges pages%0a(:cell:)[@(:pagelist name=RecentChanges :)@]%0a(:cellnr:)All pages except RecentChanges%0a(:cell:)[@(:pagelist name=-RecentChanges :)@]%0a(:tableend:)%0a%0a!!! Wildcards%0aName and group parameters can contain ''wildcard'' characters that display only pages matching a given pattern:%0a* An asterisk (*) represents zero or more characters%0a* A question mark (?) represents exactly one character%0a%0aExamples:%0a(:table class='tabtable' rules=rows:)%0a(:cell:)All pages in any group beginning with "PmWiki"%0a(:cell:)[@(:pagelist group=PmWiki* :)@]%0a(:cellnr:)All pages in any group beginning with "PmWiki", except for Chinese%0a(:cell:)[@(:pagelist group=PmWiki*,-PmWikiZh :)@]%0a(:cellnr:)All pages in the PmCal group with names starting with "2005":%0a(:cell:)[@(:pagelist name=PmCal.2005* :)@]%0a(:cellnr:)All Cookbooks with names beginning with a A and a B letter%0a->note the different separators used for the same result%0a(:cell:)[@%0a(:pagelist group=Cookbook name=A*,B* :)%0a(:pagelist group=Cookbook name="A* B*" :)%0a(:pagelist group=Cookbook name=[AB]* :)%0a(:pagelist group=Cookbook, name=[AB]* :)@]%0a(:tableend:)%0a%0aIf you want to use multiples conditions in name you need to use quotes or commas to delimit the string. %0a%0a!!![[#pagelisttrail]] trail= %0aThe "[@trail=@]" option obtains the list of pages to be displayed from a [[WikiTrail(s)]]:%0a* Display pages in the documentation by modification time%0a->[@(:pagelist trail=PmWiki.DocumentationIndex order=-time:)@]%0a* Display five most recently changed pages%0a-%3c[@(:pagelist trail=RecentChanges count=5:)@]%0a%0a!!![[#pagelistlist]] list= %0a%0aThe "[@list=@]" option allows a search to include or exclude pages according to predefined patterns set by the administrator. %0a* "[@list=normal@]" is predefined, and which excludes things like AllRecentChanges, RecentChanges, GroupHeader, GroupFooter, GroupAttributes, and the like from being displayed in the list results. Note that list=normal also excludes the current page.%0a* "[@list=all@]" over-rides a "default" list that may be set by the wiki's administrator to exclude groups such as PmWiki or Site from regular search results.%0a* Wiki administrators can define custom lists via the $SearchPatterns array (see [[Cookbook:SearchResults]]).%0a%0a!!![[#pagelistfmt]] fmt= %0a%0aThe "[@fmt=@]" option determines how the resulting list should be displayed. %0aPmWiki [[Site/PageListTemplates|predefines]] several formats:%0a* @@fmt=#bygroup@@ - Display pages within groups (default format)%0a* @@fmt=#simple@@ - Display a simple ordered list of pages in the form Group.Name%0a* @@fmt=#title@@ - Display a list of pages by page title. Use "[@order=title@]" to have them sorted by title (default is to order by page name).%0a* @@fmt=#group@@ - Display a list of wikigroups (without listing the pages in the groups)%0a* @@fmt=#include@@ - Display the contents of each page in the list (note, this could take a very long time for long lists!)%0aThese formats are defined by [[page list templates]], which can be customized.%0a%0aThis format is not predefined by a page list template:%0a* @@fmt=count@@ - Display the number of pages in the list (note the absence of the "#").%0a* @@fmt=authtable@@ - Display a table of pages with ''read'', ''edit'', ''attr'', ''upload'', and ''publish'' settings (note the absence of the "#").%0a%0a%0a!!![[#pagelistlink]] link= %0a%0aThe "[@link=@]" option implements "backlinks" -- i.e., it returns a list of pages with a link to the target. It's especially useful for [[categor(ies)]]y pages and finding related pages.%0a%0a* all pages with a link to PmWiki.DocumentationIndex%0a->[@(:pagelist link=PmWiki.DocumentationIndex:)@]%0a* all pages with links to the current page%0a->[@(:pagelist link={$FullName}:)@]%0a* all pages in the "Skins" category%0a->[@(:pagelist link=Category.Skins:)@]%0a%0a!!![[#pagelistcount]] count= %0a%0aThe "[@count=@]" option provides the ability to%0a* limit the pagelist to a specific number of pages%0a* subsets of a list%0a* return items from the end of a list, subsets of a list%0a* display pages in reverse sequence%0a%0a(:table class=tabtable rules=rows:)%0a(:cellnr:)A simple bullet list of ten most recently modified pages%0a(:cell:)%0a[@(:pagelist trail=Site.AllRecentChanges count=10 fmt=#simple:)@]%0a(:cellnr:)Display the first ten pages of a list%0a(:cell:)%0a[@count=10 # display the first ten pages of list@]%0a(:cellnr:)Negative numbers specify pages to be displayed from the end of the list:%0a(:cell:)%0a[@count=-10 # display last ten pages of list@]%0a(:cellnr:)Ranges may be specified using '..', thus:%0a(:cell:)%0a[@count=1..10 # first ten pages of list%0acount=5..10 # 5th through 10th pages of list@]%0a(:cellnr:)Negative numbers in ranges count from the end of the list:%0a(:cell:)%0a[@count=-10..-5 # 10th from end, 9th from end, ..., 5th from end@]%0a(:cellnr:)Omitting the start or end of the range uses the start or end of the list:%0a(:cell:)%0a[@count=10.. # skip first ten pages%0acount=..10 # 1st through 10th page of list%0acount=-10.. # last ten pages of list%0acount=..-10 # all but the last nine pages@]%0a(:cellnr:)Ranges can be reversed, indicating that the order of pages in the output should likewise be reversed:%0a(:cell:)%0a[@count=5..10 # 5th through 10th pages of list%0acount=10..5 # same as 5..10 but in reverse sequence%0acount=-1..1 # all pages in reverse sequence@]%0a(:cellnr:)"Reverse sequence" here refers to the sequence ''after'' any sorting has taken place. Therefore the three directives to the right are equivalent:%0a(:cell:)%0a[@(:pagelist order=-name count=10:)%0a(:pagelist order=-name count=1..10:)%0a(:pagelist order=name count=-1..-10:) @]%0a(:tableend:)%0a%0a!!![[#pagelistwrap]] wrap=%0aThe "[@wrap@]" option has the values, ''none'' and ''inline''.%0a%0aWith "wrap=inline" and "wrap=none", the output from pagelist (markup or HTML) is directly embedded in a page's markup without any surrounding %3cdiv> class=...%3c/div> tags.%0a%0aWith "wrap=inline", any surrounding %3cul> is continued. Without "wrap=inline", the HTML output starts a new %3cul>. This is important if you want to get a second level %3cul> produced by the page list since starting a new %3cul> with "**" doesn't yield a second level %3cul> but %3cdl>%3cdd>%3cul>...%0a%0a"wrap=inline" likely has other effects since it suppresses the call to $FPLTemplateMarkupFunction (being MarkupToHTML by default).%0a%0a!!![[#pagelistclass]] class=%0aBy default, a pagelist has the 'fpltemplate' class. The 'bygroup', 'simple', 'group' and 'title' page list formats have specific class names fplbygroup, fplsimple etc. You can set any class using the class= parameter or by setting the $FPLFormatOpt array.%0a%0a!!![[#pagelistpasswd]] passwd=%0aThe "[@passwd@]" option returns only those pages that have some sort of password attribute on them.%0a%0a!!![[#pagelistif]] if=%0aThe "[@if@]" option allows a condition to be specified as part of the pagelist processing, rather than from within the [[page list template(s)]]. Only those pages for which the condition is true are retrieved. Anything that could [[ConditionalMarkup | go within an [@(:if ...:)@]]] can be used as a condition. For example%0a%0a [@(:pagelist if="date {(ftime %25GW%25V {*$Name})} {=$Name}" :)@]%0a%0areturns all of the pages where the name is in the same week as that of the current page.%0a%0a!!![[#pagelistorder]] order=%0a%0aThe "[@order=@]" option allows the pages in the list to be sorted according to different criteria. Use a minus sign to indicate a reverse sort. Multiple sorting criteria can be specified using a comma, and you can create your own [[custom pagelist sort order]]:%0a* [@order=name@] - alphabetically by name (default order)%0a* [@order=title@] - alphabetically by title rather than names%0a* [@order=time@] - most recently changed pages '''last'''%0a* [@order=ctime@] - time of page creation (see note)%0a* [@order=size@] - page size (not file size), smallest pages first%0a* [@order=group,title@] - by multiple criteria, in this instance sort by title within groups%0a* [@order=random@] - shuffle the pages into random sequence%0a* [@order=$:pagetextvarname@] - alphabetically by [[PageTextVariables|page text variable]] value%0a%0aAlso, the [@order=@] option allows custom ordering functions to be written.%0a->Note: fmt=trail results in an unordered pagelist, i.e. the trail order is preserved in the pagelist. So PmWiki's alphabetical default order does not apply in this case.%0a->Note: ctime was added to pages only from pmwiki 2.1.beta15 onwards, pages created by earlier versions don't carry a ctime attribute and can't be sorted that way.%0a%0a[[#pagelistcache]]%0a!!! cache=0%0aPagelist has the capability to cache lists which greatly speeds up processing. Every once in a while this caching can result in undesired results. Specifying @@cache=0@@ disables caching.%0a%0a%0a[[#includevariable]]%0a!!!! Specifying variables as parameters%0aYou can also specify variable values inline with the pagelist statement, and refer to the variables in the template using the [@{$$variable1}@] format:%0a-> [@(:pagelist fmt=#pagelist 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, in the template:%0a%0a(:markup class=horiz:)%0a>>comment%3c%3c%0a[[#tvars]]%0a(:template default count=1:)%0aHi, {$$Name}, how are you today?%0a[[#tvarsend]]%0a>>%3c%3c%0a(:markupend:)%0a%0aThis gives:%0a%0a(:markup class=horiz:)%0a(:pagelist fmt=#tvars Name="Sam":)%0a%0a(:pagelist fmt=#tvars Name="Sally":)%0a(:markupend:)%0a%0a!! Examples%0a%0aInclude the contents of a random page from the Banners group:%0a->[@(:pagelist group=Banners order=random count=1 fmt=#include list=normal:)@]%0a%0aDisplay a simple list of the last ten recently changed pages:%0a->[@(:pagelist trail=Site.AllRecentChanges count=10 fmt=#simple:)@]%0a%0aDisplay the "top twenty" biggest cookbook pages:%0a->[@(:pagelist group=Cookbook order=-size count=20 :)@]%0a%0a!![[#searchbox]] The Searchbox Directive%0a%0aThe [@(:searchbox:)@] directive generally accepts the same parameters as [@(:pagelist:)@] and [@(:input text:)@] directives:%0a* Pagelist parameters can be added to the input text of a searchbox (or to the markup, or both)%0a* Input text box parameters can be added to the searchbox markup%0a** An initial search string can be specified in the searchbox markup, but it must be in the form @@value='search string'@@. That search string is displayed in the input text and can be modified by when the search is run.%0a** The size of the text input field can be specified with the size parameter, where "size=40" would specify the current default value.%0a*** Tip: If more than one searchbox appears on a page, adding a blank initial value like this @@value=''@@, to the markup for each searchbox will prevent a search string for one box from populating all of the other boxes.%0a* The target page for displaying searchbox results can be set with the parameter @@target=''GroupName.PageName''@@. The default is the current page. %0a* The entire searchbox form can be overridden by defining the $SearchBoxFmt variable in one's configuration file. If $SearchBoxFmt is defined, then the parameters to [@(:searchbox:)@] are ignored, and the content of the $SearchBoxFmt variable are used instead.%0a%0a[[#searchresults]]%0a!! The Searchresults directive%0aThe [@(:searchresults:)@] directive generally accepts the same parameters as [@(:pagelist:)@] and [@(:input text:)@] directives:%0a%0a!!![[#pagelistreq]] request=1 req=1%0a[=(:searchresults:)=] without the introductory line that says "Results of search for..."%0a%0a!! See Also%0a%0a* [[PageDirectives#attachlist]] - display a list of attachments%0a* [[Site.PageListTemplates]] - default pmwiki pagelist templates%0a* [[Cookbook:PagelistTemplateSamples]] - contributed pagelist template samples%0a* [[PmWiki/PageListTemplates]] - how to create custom pagelist templates for the fmt= option%0a* [[(PmWiki/)PagelistVariables]] - ''local/config.php'' customizations%0a* [[Cookbook:Forms]] - documentation for [@(:input text:)@] markup, which applies to [@(:searchbox:)@]%0a* [[(PmWiki:)CustomPagelistSortOrder]] - creating custom order sort functions%0a* [[Cookbook:CustomPagelistSortOrderFunctions]] - {Cookbook.CustomPagelistSortOrderFunctions$:Summary}%0a -time=1245107238 +rev=193 +targets=PmWiki.PageListTemplates,PmWiki.DocumentationIndex,PmWiki.PageTextVariables,PmWiki.WikiTrails,Site.PageListTemplates,PmWiki.Categories,PmWiki.ConditionalMarkup,PmWiki.PageDirectives,PmWiki.PagelistVariables +text=(:Audience: authors, admins (intermediate) :)%0a(:Summary:Listing pages by multiple criteria with templated output:)%0aPmWiki comes with two directives for generating lists of pages -- [@(:pagelist:)@] and @@[=(:=]searchresults:)@@. Both directives are basically the same and each accepts the parameters documented below. The primary difference between the two is that searchresults generates the "Results of search for ..." and "### pages found out of ### searched" messages around the results.%0a%0aThe [@(:searchbox:)@] directive generates a search form (input text box) to submit search queries. The markup generally accepts the same parameters as [@(:pagelist:)@], which makes it possible to restrict, order and format searchresults in the same ways that are described below for a [@(:pagelist:)@]. For more information about the [@(:searchbox:)@] directive, and the ways in which it differs from a [@(:pagelist:)@], skip to the section [[#searchbox|below]].%0a%0a!! Basic syntax%0a%0a* [@(:pagelist:)@] %0a->without any arguments shows a bulleted list of all pages, as links, ordered alphabetically and in groups.%0a* @@[=(:=]pagelist [[#pagelistgroup|group]]=''abc'' \%0a [[#pagelistname|name]]=''def'' \%0a [[#pagelistfmt|fmt]]=''[[page list templates|template]]'' \%0a [[#pagelistlist|list]]=''ghi'' \%0a [[#pagelistorder|order]]=''jkl'' \%0a [[#pagelistcount|count]]=''123'' \%0a [[#pagelistlink|link]]=''mno'' \%0a [[#pagelisttrail|trail]]=''pqr'' \%0a [[#pagelistwrap|wrap]]=''stu'' \%0a [[#pagelistpasswd|passwd]]=''vwx'' \%0a [[#pagelistif|if]]=''yz'' \%0a [[#pagetextvariables|$:''ptv'']]=''yz'' \%0a [[#pagevariables|$''pv'']]=''za'' \%0a [[#pagelistcache|cache]]=0 \%0a ''[[#pagelistarg|argument]]1'' -''[[#pagelistarg|argument]]2'' ''etc'' \%0a [[#includevariable|variable]]=''value'' \%0a [[#pagelistclass|class]]=''class'' \%0a :)@@ %0a->shows a pagelist according to the parameters supplied. Parameters are optional.%0a* @@[=(:=][[#searchbox|searchbox]] value=''abc'' size=''99'' target=''def'':)@@%0a* @@[=(:=][[#searchresults|searchresults]] [[#pagelistreq|''request=1 req=1'']] :)@@%0a%0a!! Parameters%0a[[#pagelistarg]]%0aAny argument supplied within [@(:pagelist:)@] that isn't in the form @@'key=value'@@ is treated as text that either must (or must not) exist in the page text.%0a%0aThe minus sign (-) or exclamation mark (!) can be used to indicate the logical ''not''. Thus%0a->[@(:pagelist trail=PmWiki.DocumentationIndex list=normal apple !pie:)@]%0alists all "normal" pages listed in the [[Documentation Index ]] trail that contain the word "apple" but not "pie".%0a%0a!!![[#pagetextvariables]]With page text variables%0aYou can also use [[page text variables]] as a ''key'' to list pages according to the existence of a page text variable. Eg : %0a->[@(:pagelist $:pagetextvar=avalue:)@]%0alists pages having ''$:pagetextvar'' set to ''avalue''.%0a[[%3c%3c]]%0aMinus sign (-), wildcards (?*) and a comma separated list of values also works when specifying a selection based on pagetextvariables. Eg :%0a->[@(:pagelist $:apagetextvar=t*,-test:)@]%0alists pages having $:apagetextvar like 't*' but not 'test'.%0a[[%3c%3c]]%0aExamples:%0a||width=* class="tabtable" rules=rows%0a||PTV is set (is not empty): ||[@(:pagelist $:MyPageTextVariable=- :)@]||%0a||PTV is empty or not set:[[%3c%3c]] (ie, is not set to one char followed by 0 or more chars) ||[@(:pagelist $:MyPageTextVariable=-?* :)@]||%0a||PTV is not VALUE: ||[@(:pagelist $:MyPageTextVariable=-VALUE :)@]||%0a||PTV is set and not YES: ||[@(:pagelist $:MyPageTextVariable=?*,-YES :)@]||%0aBe aware that if using [@(:pagelist $:MyPTV=$:YourPTV :)@] PTVs include PmWiki formatting, so you may not get the matches you expect. Currently the only way around this is to use wild cards, so if the formatting is embedded you may be out of luck.%0a%0a!!![[#pagevariables]]With page variables (PV)%0a%0aPage variables can be used within pagelists in the same way as page text variables. See [[#pagetextvariables|Page Text Variables]] above for more details. Simply use $var instead of $:var.%0a%0a!!![[#pagelistgroup]] group= and [[#pagelistname]]name= %0a%0aThe "[@group=@]" and "[@name=@]" parameters limit results to pages in a specific group or with a specific name:%0a(:table class='tabtable' rules=rows:)%0a(:cellnr:)All pages in the Pmwiki group:%0a(:cell:)[@(:pagelist group=PmWiki :)@]%0a(:cellnr:)All pages except those in the PmWiki or Site groups:%0a(:cell:)[@(:pagelist group=-PmWiki,-Site :)@]%0a(:cellnr:)All RecentChanges pages%0a(:cell:)[@(:pagelist name=RecentChanges :)@]%0a(:cellnr:)All pages except RecentChanges%0a(:cell:)[@(:pagelist name=-RecentChanges :)@]%0a(:tableend:)%0a%0a!!! Wildcards%0aName and group parameters can contain ''wildcard'' characters that display only pages matching a given pattern:%0a* An asterisk (*) represents zero or more characters%0a* A question mark (?) represents exactly one character%0a%0aExamples:%0a(:table class='tabtable' rules=rows:)%0a(:cell:)All pages in any group beginning with "PmWiki"%0a(:cell:)[@(:pagelist group=PmWiki* :)@]%0a(:cellnr:)All pages in any group beginning with "PmWiki", except for Chinese%0a(:cell:)[@(:pagelist group=PmWiki*,-PmWikiZh :)@]%0a(:cellnr:)All pages in the PmCal group with names starting with "2005":%0a(:cell:)[@(:pagelist name=PmCal.2005* :)@]%0a(:cellnr:)All Cookbooks with names beginning with a A and a B letter%0a->note the different separators used for the same result%0a(:cell:)[@%0a(:pagelist group=Cookbook name=A*,B* :)%0a(:pagelist group=Cookbook name="A* B*" :)%0a(:pagelist group=Cookbook name=[AB]* :)%0a(:pagelist group=Cookbook, name=[AB]* :)@]%0a(:tableend:)%0a%0aIf you want to use multiples conditions in name you need to use quotes or commas to delimit the string. %0a%0a!!![[#pagelisttrail]] trail= %0aThe "[@trail=@]" option obtains the list of pages to be displayed from a [[WikiTrail(s)]]:%0a* Display pages in the documentation by modification time%0a->[@(:pagelist trail=PmWiki.DocumentationIndex order=-time:)@]%0a* Display five most recently changed pages%0a-%3c[@(:pagelist trail=RecentChanges count=5:)@]%0a%0a!!![[#pagelistlist]] list= %0a%0aThe "[@list=@]" option allows a search to include or exclude pages according to predefined patterns set by the administrator. %0a* "[@list=normal@]" is predefined, and which excludes things like AllRecentChanges, RecentChanges, GroupHeader, GroupFooter, GroupAttributes, and the like from being displayed in the list results. Note that list=normal also excludes the current page.%0a* "[@list=all@]" over-rides a "default" list that may be set by the wiki's administrator to exclude groups such as PmWiki or Site from regular search results.%0a* Wiki administrators can define custom lists via the $SearchPatterns array (see [[Cookbook:SearchResults]]).%0a%0a!!![[#pagelistfmt]] fmt= %0a%0aThe "[@fmt=@]" option determines how the resulting list should be displayed. %0aPmWiki [[Site/PageListTemplates|predefines]] several formats:%0a* @@fmt=#bygroup@@ - Display pages within groups (default format)%0a* @@fmt=#simple@@ - Display a simple ordered list of pages in the form Group.Name%0a* @@fmt=#title@@ - Display a list of pages by page title. Use "[@order=title@]" to have them sorted by title (default is to order by page name).%0a* @@fmt=#group@@ - Display a list of wikigroups (without listing the pages in the groups)%0a* @@fmt=#include@@ - Display the contents of each page in the list (note, this could take a very long time for long lists!)%0aThese formats are defined by [[page list templates]], which can be customized.%0a%0aThis format is not predefined by a page list template:%0a* @@fmt=count@@ - Display the number of pages in the list (note the absence of the "#").%0a* @@fmt=authtable@@ - Display a table of pages with ''read'', ''edit'', ''attr'', ''upload'', and ''publish'' settings (note the absence of the "#").%0a%0a%0a!!![[#pagelistlink]] link= %0a%0aThe "[@link=@]" option implements "backlinks" -- i.e., it returns a list of pages with a link to the target. It's especially useful for [[categor(ies)]]y pages and finding related pages.%0a%0a* all pages with a link to PmWiki.DocumentationIndex%0a->[@(:pagelist link=PmWiki.DocumentationIndex:)@]%0a* all pages with links to the current page%0a->[@(:pagelist link={$FullName}:)@]%0a* all pages in the "Skins" category%0a->[@(:pagelist link=Category.Skins:)@]%0a%0a!!![[#pagelistcount]] count= %0a%0aThe "[@count=@]" option provides the ability to%0a* limit the pagelist to a specific number of pages%0a* subsets of a list%0a* return items from the end of a list, subsets of a list%0a* display pages in reverse sequence%0a%0a(:table class=tabtable rules=rows:)%0a(:cellnr:)A simple bullet list of ten most recently modified pages%0a(:cell:)%0a[@(:pagelist trail=Site.AllRecentChanges count=10 fmt=#simple:)@]%0a(:cellnr:)Display the first ten pages of a list%0a(:cell:)%0a[@count=10 # display the first ten pages of list@]%0a(:cellnr:)Negative numbers specify pages to be displayed from the end of the list:%0a(:cell:)%0a[@count=-10 # display last ten pages of list@]%0a(:cellnr:)Ranges may be specified using '..', thus:%0a(:cell:)%0a[@count=1..10 # first ten pages of list%0acount=5..10 # 5th through 10th pages of list@]%0a(:cellnr:)Negative numbers in ranges count from the end of the list:%0a(:cell:)%0a[@count=-10..-5 # 10th from end, 9th from end, ..., 5th from end@]%0a(:cellnr:)Omitting the start or end of the range uses the start or end of the list:%0a(:cell:)%0a[@count=10.. # skip first ten pages%0acount=..10 # 1st through 10th page of list%0acount=-10.. # last ten pages of list%0acount=..-10 # all but the last nine pages@]%0a(:cellnr:)Ranges can be reversed, indicating that the order of pages in the output should likewise be reversed:%0a(:cell:)%0a[@count=5..10 # 5th through 10th pages of list%0acount=10..5 # same as 5..10 but in reverse sequence%0acount=-1..1 # all pages in reverse sequence@]%0a(:cellnr:)"Reverse sequence" here refers to the sequence ''after'' any sorting has taken place. Therefore the three directives to the right are equivalent:%0a(:cell:)%0a[@(:pagelist order=-name count=10:)%0a(:pagelist order=-name count=1..10:)%0a(:pagelist order=name count=-1..-10:) @]%0a(:tableend:)%0a%0a!!![[#pagelistwrap]] wrap=%0aThe "[@wrap@]" option has the values, ''none'' and ''inline''.%0a%0aWith "wrap=inline" and "wrap=none", the output from pagelist (markup or HTML) is directly embedded in a page's markup without any surrounding %3cdiv> class=...%3c/div> tags.%0a%0aWith "wrap=inline", any surrounding %3cul> is continued. Without "wrap=inline", the HTML output starts a new %3cul>. This is important if you want to get a second level %3cul> produced by the page list since starting a new %3cul> with "**" doesn't yield a second level %3cul> but %3cdl>%3cdd>%3cul>...%0a%0a"wrap=inline" likely has other effects since it suppresses the call to $FPLTemplateMarkupFunction (being MarkupToHTML by default).%0a%0a!!![[#pagelistclass]] class=%0aBy default, a pagelist has the 'fpltemplate' class. The 'bygroup', 'simple', 'group' and 'title' page list formats have specific class names fplbygroup, fplsimple etc. You can set any class using the class= parameter or by setting the $FPLFormatOpt array.%0a%0a!!![[#pagelistpasswd]] passwd=%0aThe "[@passwd@]" option returns only those pages that have some sort of password attribute on them.%0a%0a!!![[#pagelistif]] if=%0aThe "[@if@]" option allows a condition to be specified as part of the pagelist processing, rather than from within the [[page list template(s)]]. Only those pages for which the condition is true are retrieved. Anything that could [[ConditionalMarkup | go within an [@(:if ...:)@]]] can be used as a condition. For example%0a%0a [@(:pagelist if="date {(ftime %25GW%25V {*$Name})} {=$Name}" :)@]%0a%0areturns all of the pages where the name is in the same week as that of the current page.%0a%0a!!![[#pagelistorder]] order=%0a%0aThe "[@order=@]" option allows the pages in the list to be sorted according to different criteria. Use a minus sign to indicate a reverse sort. Multiple sorting criteria can be specified using a comma, and you can create your own [[(PmWiki:)custom pagelist sort order]]:%0a* [@order=name@] - alphabetically by name (default order)%0a* [@order=title@] - alphabetically by title rather than names%0a* [@order=time@] - most recently changed pages '''last'''%0a* [@order=ctime@] - time of page creation (see note)%0a* [@order=size@] - page size (not file size), smallest pages first%0a* [@order=group,title@] - by multiple criteria, in this instance sort by title within groups%0a* [@order=random@] - shuffle the pages into random sequence%0a* [@order=$:pagetextvarname@] - alphabetically by [[PageTextVariables|page text variable]] value%0a%0aAlso, the [@order=@] option allows custom ordering functions to be written.%0a->Note: fmt=trail results in an unordered pagelist, i.e. the trail order is preserved in the pagelist. So PmWiki's alphabetical default order does not apply in this case.%0a->Note: ctime was added to pages only from pmwiki 2.1.beta15 onwards, pages created by earlier versions don't carry a ctime attribute and can't be sorted that way.%0a%0a[[#pagelistcache]]%0a!!! cache=0%0aPagelist has the capability to cache lists which greatly speeds up processing. Every once in a while this caching can result in undesired results. Specifying @@cache=0@@ disables caching.%0a%0a%0a[[#includevariable]]%0a!!!! Specifying variables as parameters%0aYou can also specify variable values inline with the pagelist statement, and refer to the variables in the template using the [@{$$variable1}@] format:%0a-> [@(:pagelist fmt=#pagelist 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, in the template:%0a%0a(:markup:)%0a>>comment%3c%3c%0a[[#tvars]]%0a(:template default count=1 ParamName=Simon:)%0aHi, {$$ParamName}, how are you today?%0a[[#tvarsend]]%0a>>%3c%3c%0a(:markupend:)%0a%0aThis gives:%0a%0a(:markup class=horiz:)%0a(:pagelist fmt=#tvars ParamName="Sam":)%0a%0a(:pagelist fmt=#tvars ParamName="Sally":)%0a%0a(:pagelist fmt=#tvars:)%0a(:markupend:)%0a%0a!! Examples%0a%0aInclude the contents of a random page from the Banners group:%0a->[@(:pagelist group=Banners order=random count=1 fmt=#include list=normal:)@]%0a%0aDisplay a simple list of the last ten recently changed pages:%0a->[@(:pagelist trail=Site.AllRecentChanges count=10 fmt=#simple:)@]%0a%0aDisplay the "top twenty" biggest cookbook pages:%0a->[@(:pagelist group=Cookbook order=-size count=20 :)@]%0a%0a!![[#searchbox]] The Searchbox Directive%0a%0aThe [@(:searchbox:)@] directive generally accepts the same parameters as [@(:pagelist:)@] and [@(:input text:)@] directives:%0a* Pagelist parameters can be added to the input text of a searchbox (or to the markup, or both)%0a* Input text box parameters can be added to the searchbox markup%0a** An initial search string can be specified in the searchbox markup, but it must be in the form @@value='search string'@@. That search string is displayed in the input text and can be modified by when the search is run.%0a** The size of the text input field can be specified with the size parameter, where "size=40" would specify the current default value.%0a*** Tip: If more than one searchbox appears on a page, adding a blank initial value like this @@value=''@@, to the markup for each searchbox will prevent a search string for one box from populating all of the other boxes.%0a* The target page for displaying searchbox results can be set with the parameter @@target=''GroupName.PageName''@@. The default is the current page. %0a* The entire searchbox form can be overridden by defining the $SearchBoxFmt variable in one's configuration file. If $SearchBoxFmt is defined, then the parameters to [@(:searchbox:)@] are ignored, and the content of the $SearchBoxFmt variable are used instead.%0a%0a[[#searchresults]]%0a!! The Searchresults directive%0aThe [@(:searchresults:)@] directive generally accepts the same parameters as [@(:pagelist:)@] and [@(:input text:)@] directives:%0a%0a!!![[#pagelistreq]] request=1 req=1%0a[=(:searchresults:)=] without the introductory line that says "Results of search for..."%0a%0a!! See Also%0a%0a* [[PageDirectives#attachlist]] - display a list of attachments%0a* [[Site.PageListTemplates]] - default pmwiki pagelist templates%0a* [[Cookbook:PagelistTemplateSamples]] - contributed pagelist template samples%0a* [[PmWiki/PageListTemplates]] - how to create custom pagelist templates for the fmt= option%0a* [[(PmWiki/)PagelistVariables]] - ''local/config.php'' customizations%0a* [[Cookbook:Forms]] - documentation for [@(:input text:)@] markup, which applies to [@(:searchbox:)@]%0a* [[(PmWiki:)CustomPagelistSortOrder]] - creating custom order sort functions%0a* [[Cookbook:CustomPagelistSortOrderFunctions]] - {Cookbook.CustomPagelistSortOrderFunctions$:Summary}%0a +time=1247528297 Index: wikilib.d/Site.Site =================================================================== --- wikilib.d/Site.Site (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/Site.Site (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=add your own in LocalTemplates] +csum= host=81.65.14.164 name=Site.Site -rev=21 -targets=PmWiki.PasswordsAdmin,Site.SideBar,Site.EditForm,Site.PageActions,Site.PageNotFound,Site.PageListTemplates,Site.LocalTemplates,Site.Preferences,Site.AuthForm,PmWiki.Passwords,Site.AuthUser,Site.InterMap,PmWiki.InterMap,Site.EditQuickReference,Site.UploadQuickReference -text=(:title Site Administration:)%0aHere you find some links to Site configuration pages. Add links to other pages you may need for your site's configuration here, as necessary. Some links may only apply to certain configurations or skins.%0a%0a'''Note to new administrators''': All pages in the 'Site' group (except Site.SideBar) are locked for editing as the default. Site.SideBar is locked with the site-wide edit password, if one is set. In order to edit any other page in this group you need to create in local/config.php a sitewide '''admin''' password (see [[PmWiki.PasswordsAdmin]]). Then you can edit pages and change the access protection of individual pages by changing the page attributes with [@?action=attr@].%0a %0a!!Configuration & Menu Pages%0a* [[SideBar]] - Default SideBar contents%0a* [[EditForm]] - Template to create your own edit page layout.%0a* [[PageActions]] - Contains the 'action' links (like Browse, Edit, History, etc.), to be placed at the top of the page%0a* [[PageNotFound]] - Template shown if a page is not found.%0a* [[PageListTemplates]] - Contains templates for [@(:pagelist:)@] output. Override those, or add your own in the page [[LocalTemplates]].%0a* [[Preferences]] - Template to set access key and other configurations%0a* [[AuthForm]] - form displayed when requesting a [[PmWiki/password(s)]] or username/password%0a* [[AuthUser]] - configuration of identity-based authorization%0a* [[InterMap]] - configure '[[PmWiki/InterMap]]' links to other wikis%0a%0a* [[EditQuickReference]] - quick reference for editing pages%0a* [[UploadQuickReference]] - quick reference for uploading pages%0a%0a -time=1237083744 -title=Site Administration +rev=31 +targets=PmWiki.Skins,Site.Site,SiteAdmin.SiteAdmin,Site.SideBar,PmWiki.PasswordsAdmin,Site.AllRecentChanges,PmWiki.GroupHeaders,PmWiki.Forms +text=(:title Site Configuration:)(:Summary: Site Configuration:)%0aHere you find some links to Site configuration and administration pages. Add links to other pages you may need for your site's configuration here, as necessary. %0aSome links may only apply to certain configurations or [[PmWiki/skins]].%0a%0aThe [[{$SiteGroup}/]] group contains configuration pages, and the [[SiteAdmin/]] group contains administrative pages.%0a%0a'''Note to new administrators''':%0a* All pages in the 'Site' group (except [[Site.Side Bar]]) are locked for editing as the default. [[{$SiteGroup}.SideBar]] is locked with the site-wide edit password, if one is set. %0a* All pages in the 'SiteAdmin' group are locked for reading and editing as the default.%0a* In order to edit any locked page you need to create in @@local/config.php@@ a site wide '''admin''' password (see [[PmWiki/Passwords Admin]]). Then you can edit pages and change the access protection of individual pages by changing the page attributes with [@?action=attr@].%0a(:table border=0 width=100%25:)%0a(:cellnr:)%0a!! Configuration and Menu Pages%0a(:pagelist group={$SiteGroup} name=AuthUserPageActions,InterMap,Search,Preferences,PageNotFound fmt=#titlesummary:)%0a%0a* [[{$SiteGroup}/All recent changes]] - changes made to all pages in all groups%0a%0a!! SideBar, header, and footer pages%0aSidebar, [[PmWiki/GroupHeaders | headers]] and footers are used to display common content across a group or entire website.%0a(:pagelist group={$SiteGroup} name=*bar*,*head*,*foot* fmt=#titlesummary:)%0a%0a!! Form pages%0a[[PmWiki/Forms]] are used for display and entry of information.%0a(:pagelist group={$SiteGroup} name=*form* fmt=#titlesummary:)%0a%0a!! Quick reference pages%0aQuick reference pages are included in other pages to assist in the use of those pages.%0a(:pagelist group={$SiteGroup} name=*quick* fmt=#titlesummary:)%0a%0a!! Template pages%0aTemplates are used by page and form directives to control the output displayed.%0a(:pagelist group={$SiteGroup} name=*template* fmt=#titlesummary:)%0a(:cell:)%0a!! Site Administration%0aHere is the list of the pages in the [[SiteAdmin/]] group. Some links may only apply to certain configurations.%0a(:pagelist group=SiteAdmin list=all fmt=#titlesummary:)%0a(:tableend:)%0a%0a%0a +time=1247701084 +title=Site Configuration Index: wikilib.d/PmWiki.WikiGroup =================================================================== --- wikilib.d/PmWiki.WikiGroup (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.WikiGroup (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=fix link +csum= host=81.65.14.164 keywords=trailing dot, trailing slash, default group name=PmWiki.WikiGroup -rev=97 -targets=Main.WikiSandbox,Main.HomePage,Profiles.Pm,PmWiki.MailingLists,PmWiki.Links,PmWiki.CreatingNewPages,PmWiki.PmWiki,Site.Site,SiteAdmin.SiteAdmin,PmWiki.Search,PmWiki.WikiGroup,PmWiki.RecentChanges,Site.AllRecentChanges,PmWiki.GroupHeaders,PmWiki.Passwords,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.PerGroupCustomizations -text=(:Audience: authors (basic) :)%0a(:Summary: Organising pages into related groups:)%0a(:keywords trailing dot, trailing slash, default group:)%0aPmWiki pages are organized into groups of related pages. This feature was added to PmWiki to allow authors to create their own ''wiki spaces'' of specialized content on their own, without having to become, or rely on, wiki administrators. See [[~Pm]]'s [[http://pmichaud.com/pipermail/pmwiki-users/2006-March/024838.html|post]] to the pmwiki-users [[mailing list(s)]].%0a%0aBy default, page [[links]] are between pages of the same group; to create a link to a page in another group, add the name of the other group and a dot or slash to the page name. For example, links to [=Main/WikiSandbox=] could be written as:%0a%0a(:markup class=horiz:)%0a* [[Main.WikiSandbox]]%0a* [[Main/WikiSandbox]]%0a* [[(Main.Wiki)Sandbox]]%0a* [[Main.WikiSandbox | link text]]%0a* [[Main.WikiSandbox | +]]%0a(:markupend:)%0a%0aTo link to the [[#groupdefaultpage | default home page]] of a group, the name of the page can be omitted, like this:%0a%0a(:markup class=horiz:)%0a* [[Main.]]%0a* [[Main/]]%0a(:markupend:)%0a%0a!! Creating groups%0aCreating a new group is as easy as [[creating new pages]]; simply edit an existing page to include a [[link(s)]] to the new group's default home page (or any page in the new group) then click on the '?' to edit the page. As a rule, group names must start with a letter (but this can be changed by the wiki administrator by adding %0a-> @@[@$GroupPattern = '[[:upper:]\\d][\\w]*(?:-\\w+)*';@]@@%0ain config.php).%0a%0aFor example, to make a default page in the group Foo, create a link to [=[[Foo/]]=] (or [=[[Foo.]]=]). %0aTo make a page called Bar in the group Foo, create a link to [=[[Foo/Bar]]=] and follow the link to edit that page.%0a%0a!! Groups in a standard PmWiki distribution%0a* [[Main]]: The default group. On many wikis, it contains most of the author-contributed content. Main.HomePage and Main.WikiSandbox come pre-installed.%0a* [[PmWiki]]: An edit-protected group that contains PmWiki documentation and help pages.%0a* [[Site]]: Holds a variety of utility and configuration pages used by PmWiki, including [[%3c%3c]][=SideBar=], Search, Preferences, Templates, and [=AllRecentChanges=].%0a* [[SiteAdmin/]]: Holds a number of password protected administration and configuration pages used by PmWiki, including [[%3c%3c]] [=ApprovedUrls=], and Blocklist%0a%0a* To list all the groups in a site, try [[PmWiki/Search | searching]] for "[[{$FullName}?action=search&q=fmt%253Dgroup|fmt=group]]".%0a* To list all the pages in a group, try [[PmWiki/Search | searching]] for "[[{$FullName}?action=search&q={$Group}%252F|GroupName/]]".%0a%0a[[#specialpages]]%0a!! [[(PmWiki:)Special Pages]] in a Group%0aBy default, the ''[[Recent Changes]]'' page of each group shows only the pages that have changed within that group; the ''[[Site.All Recent Changes]]'' page shows all pages that have changed in all groups.%0a%0aEach group can also have ''[[Group Header(s)]]'' or ''Group Footer'' pages that contain text to be automatically prepended or appended to every page in the group. A group can also have a ''Group Attributes ''page that defines attributes (read and edit passwords) shared by all pages within the group. %0a%0aEach page can also have its own individual read/edit password that overrides the group passwords (see [[Passwords]]).%0a%0aFinally, [[wiki administrator]]s can set [[local customizations]] on a per-group basis--see [[Per Group Customizations]].%0a%0a[[#groupdefaultpage]]%0a!! Group's default page%0a%0aThe default "start page" for a group is a page whose name is: %0a# the same as the group (Foo/Foo)%0a# HomePage (Foo/HomePage)%0a# a name that the administrator has assigned to the [={$DefaultName}=] variable in the configuration.php file. %0a%0aNote, on this site, the value of [={$DefaultName}=] is ''{$DefaultName}'' and, thus, the default home page would be Foo/{$DefaultName}. %0a%0aYou can usefully change the default ''search'' order for an entered page name by setting the variable @@$PagePathFmt @@ in @@config.php@@, eg%0a-> [@ $PagePathFmt = array('$Group.$1','$1.$DefaultName','$1.$1','$DefaultGroup.$1','Profiles.$1'); @]%0awhere "$1" is the name of the page entered. %0a%0aAs noted above, when linking to the default home page, authors can omit the page name and simply identify the group followed by a forward slash ([=[[Foo/]]=]).%0a%0aNote the forward slash is required to ensure that the link unambiguously points to the identified group. %0aIf the slash is omitted, the link can end up being interpreted as pointing to an existing (or new) page in the current group (if the group, or its default home page, do not exist). %0a%0a!! Subgroups? Subpages?%0aNo, PmWiki does not have subpages. Pm's reasons for not having subgroups are described at [[PmWiki:Hierarchical Groups]], but it comes down to not having a good page linking syntax. If you create a link or pagename like [@[[A.B.C]]@] PmWiki doesn't think of "B.C" as being in group "A", it instead thinks of "C" as being in group "AB", which is a separate group from "A". Wiki administrators can look at [[Cookbook:Subgroup Markup]] and [[Cookbook:Include With Edit]] for recipes that may be of some help with developing subgroups or subpages.%0a%0a!! Restricting the creation of new groups%0aYou can set PmWiki's $GroupPattern variable to only accept the group names you want to define. For example, to limit pages to the "PmWiki", "Main", "Profiles", and "Example" groups, add the following to local/config.php:%0a%0a-> $GroupPattern = '(?:Site|SiteAdmin|PmWiki|Main|Profiles|Example)';%0a%0aWith this setting, only the listed groups will be considered valid WikiGroups. You can add more groups to the list by placing additional group names separated by pipes (|).%0a%0aSee other solutions to this at [[Cookbook:Limit Wiki Groups]] and [[Cookbook:New Group Warning]].%0a%0a>>faq%3c%3c [[#faq]]%0aQ: How can I get rid of the 'Main' group in urls for pages pointing to Main?%0a%0aA: See [[Cookbook:Get Rid Of Main]].%0a%0aQ: How can I limit the creation of new groups?%0a%0aA: See [[Cookbook:Limit Wiki Groups]].%0a%0aQ: Why doesn't [=[[St. Giles and St. James]]=] work as a link? (It doesn't display anything.)%0a%0aA: Because it contains periods, and destroys PmWiki's file structure, which saves pages as [=Group.PageName=]. Adding those periods disrupts this format. Links may only contain words. If you need a link precisely as shown, the page must be named eg StGilesAndStJames then you can use the [=(:title:)=] directive to have the page's title appear with periods [=(:title St. Giles and St. James:)=]. (Although modern US and UK grammar now tend to drop the period to simplify style).%0a%0aQ: How can I delete a wiki group?%0a%0aA: Normally you can't, as this requires an admin with server-side access to delete the file that makes up the group's RecentChanges page. But there is an option method of making it possible to delete RecentChanges pages from within the wiki if the admin enables the code found on [[Cookbook:RecentChanges Deletion]].%0a%0aQ: How can I delete a wiki group's Group.RecentChanges page?%0a%0aA: Normally you can't, as this requires an admin with server-side access to delete a file. But there is an optional method of making it possible to delete RecentChanges pages from within the wiki if the admin enables the code found on [[Cookbook:RecentChanges Deletion]].%0a -time=1238272888 +rev=99 +targets=Main.WikiSandbox,Main.HomePage,PmWiki.MailingLists,PmWiki.Links,PmWiki.CreatingNewPages,PmWiki.PmWiki,Site.Site,SiteAdmin.SiteAdmin,PmWiki.Search,PmWiki.WikiGroup,PmWiki.RecentChanges,Site.AllRecentChanges,PmWiki.GroupHeaders,PmWiki.Passwords,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.PerGroupCustomizations +text=(:Audience: authors (basic) :)%0a(:Summary: Organising pages into related groups:)%0a(:keywords trailing dot, trailing slash, default group:)%0aPmWiki pages are organized into groups of related pages. This feature was added to PmWiki to allow authors to create their own ''wiki spaces'' of specialized content on their own, without having to become, or rely on, wiki administrators. See [[http://pmichaud.com/|Pm]]'s [[http://pmichaud.com/pipermail/pmwiki-users/2006-March/024838.html|post]] to the pmwiki-users [[mailing list(s)]].%0a%0aBy default, page [[links]] are between pages of the same group; to create a link to a page in another group, add the name of the other group and a dot or slash to the page name. For example, links to [=Main/WikiSandbox=] could be written as:%0a%0a(:markup class=horiz:)%0a* [[Main.WikiSandbox]]%0a* [[Main/WikiSandbox]]%0a* [[(Main.Wiki)Sandbox]]%0a* [[Main.WikiSandbox | link text]]%0a* [[Main.WikiSandbox | +]]%0a(:markupend:)%0a%0aTo link to the [[#groupdefaultpage | default home page]] of a group, the name of the page can be omitted, like this:%0a%0a(:markup class=horiz:)%0a* [[Main.]]%0a* [[Main/]]%0a(:markupend:)%0a%0a!! Creating groups%0aCreating a new group is as easy as [[creating new pages]]; simply edit an existing page to include a [[link(s)]] to the new group's default home page (or any page in the new group) then click on the '?' to edit the page. As a rule, group names must start with a letter (but this can be changed by the wiki administrator by adding %0a-> @@[@$GroupPattern = '[[:upper:]\\d][\\w]*(?:-\\w+)*';@]@@%0ain config.php).%0a%0aFor example, to make a default page in the group Foo, create a link to [=[[Foo/]]=] (or [=[[Foo.]]=]). %0aTo make a page called Bar in the group Foo, create a link to [=[[Foo/Bar]]=] and follow the link to edit that page.%0a%0a!! Groups in a standard PmWiki distribution%0a* [[Main]]: The default group. On many wikis, it contains most of the author-contributed content. Main.HomePage and Main.WikiSandbox come pre-installed.%0a* [[PmWiki]]: An edit-protected group that contains PmWiki documentation and help pages.%0a* [[Site]]: Holds a variety of utility and configuration pages used by PmWiki, including [[%3c%3c]][=SideBar=], Search, Preferences, Templates, and [=AllRecentChanges=].%0a* [[SiteAdmin/]]: Holds a number of password protected administration and configuration pages used by PmWiki, including [[%3c%3c]] [=ApprovedUrls=], and Blocklist%0a%0a* To list all the groups in a site, try [[PmWiki/Search | searching]] for "[[{$FullName}?action=search&q=fmt%253Dgroup|fmt=group]]".%0a* To list all the pages in a group, try [[PmWiki/Search | searching]] for "[[{$FullName}?action=search&q={$Group}%252F|GroupName/]]".%0a%0a[[#specialpages]]%0a!! [[(PmWiki:)Special Pages]] in a Group%0aBy default, the ''[[Recent Changes]]'' page of each group shows only the pages that have changed within that group; the ''[[Site.All Recent Changes]]'' page shows all pages that have changed in all groups.%0a%0aEach group can also have ''[[Group Header(s)]]'' or ''Group Footer'' pages that contain text to be automatically prepended or appended to every page in the group. A group can also have a ''Group Attributes ''page that defines attributes (read and edit passwords) shared by all pages within the group. %0a%0aEach page can also have its own individual read/edit password that overrides the group passwords (see [[Passwords]]).%0a%0aFinally, [[wiki administrator]]s can set [[local customizations]] on a per-group basis--see [[Per Group Customizations]].%0a%0a[[#groupdefaultpage]]%0a!! Group's default page%0a%0aThe default "start page" for a group is a page whose name is: %0a# the same as the group (Foo/Foo)%0a# HomePage (Foo/HomePage)%0a# a name that the administrator has assigned to the [={$DefaultName}=] variable in the configuration.php file. %0a%0aNote, on this site, the value of [={$DefaultName}=] is ''{$DefaultName}'' and, thus, the default home page would be Foo/{$DefaultName}. %0a%0aYou can usefully change the default ''search'' order for an entered page name by setting the variable @@$PagePathFmt @@ in @@config.php@@, eg%0a-> @@ $PagePathFmt = array('$Group.$1', '$1.$DefaultName', '$1.$1', '$DefaultGroup.$1', 'Profiles.$1'); @@%0awhere "$1" is the name of the page entered. %0a%0aAs noted above, when linking to the default home page, authors can omit the page name and simply identify the group followed by a forward slash ([=[[Foo/]]=]).%0a%0aNote the forward slash is required to ensure that the link unambiguously points to the identified group. %0aIf the slash is omitted, the link can end up being interpreted as pointing to an existing (or new) page in the current group (if the group, or its default home page, do not exist). %0a%0a!! Subgroups? Subpages?%0aNo, PmWiki does not have subpages. Pm's reasons for not having subgroups are described at [[PmWiki:Hierarchical Groups]], but it comes down to not having a good page linking syntax. If you create a link or pagename like [@[[A.B.C]]@] PmWiki doesn't think of "B.C" as being in group "A", it instead thinks of "C" as being in group "AB", which is a separate group from "A". Wiki administrators can look at [[Cookbook:Subgroup Markup]] and [[Cookbook:Include With Edit]] for recipes that may be of some help with developing subgroups or subpages.%0a%0a!! Restricting the creation of new groups%0aYou can set PmWiki's $GroupPattern variable to only accept the group names you want to define. For example, to limit pages to the "PmWiki", "Main", "Profiles", and "Example" groups, add the following to local/config.php:%0a%0a-> $GroupPattern = '(?:Site|SiteAdmin|PmWiki|Main|Profiles|Example)';%0a%0aWith this setting, only the listed groups will be considered valid WikiGroups. You can add more groups to the list by placing additional group names separated by pipes (|).%0a%0aSee other solutions to this at [[Cookbook:Limit Wiki Groups]] and [[Cookbook:New Group Warning]].%0a%0a>>faq%3c%3c [[#faq]]%0aQ: How can I get rid of the 'Main' group in urls for pages pointing to Main?%0a%0aA: See [[Cookbook:Get Rid Of Main]].%0a%0aQ: How can I limit the creation of new groups?%0a%0aA: See [[Cookbook:Limit Wiki Groups]].%0a%0aQ: Why doesn't [=[[St. Giles and St. James]]=] work as a link? (It doesn't display anything.)%0a%0aA: Because it contains periods, and destroys PmWiki's file structure, which saves pages as [=Group.PageName=]. Adding those periods disrupts this format. Links may only contain words. If you need a link precisely as shown, the page must be named eg StGilesAndStJames then you can use the [=(:title:)=] directive to have the page's title appear with periods [=(:title St. Giles and St. James:)=]. (Although modern US and UK grammar now tend to drop the period to simplify style).%0a%0aQ: How can I delete a wiki group?%0a%0aA: Normally you can't, as this requires an admin with server-side access to delete the file that makes up the group's RecentChanges page. But there is an option method of making it possible to delete RecentChanges pages from within the wiki if the admin enables the code found on [[Cookbook:RecentChanges Deletion]].%0a%0aQ: How can I delete a wiki group's Group.RecentChanges page?%0a%0aA: Normally you can't, as this requires an admin with server-side access to delete a file. But there is an optional method of making it possible to delete RecentChanges pages from within the wiki if the admin enables the code found on [[Cookbook:RecentChanges Deletion]].%0a +time=1247527563 Index: wikilib.d/PmWiki.SkinTemplates =================================================================== --- wikilib.d/PmWiki.SkinTemplates (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.SkinTemplates (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=refactored, mv questions to talk page, added question to an existing answer :-) -host=81.65.14.164 +csum=reply +host=77.195.128.89 name=PmWiki.SkinTemplates -rev=48 +rev=50 targets=PmWiki.Skins,PmWiki.LayoutVariables,PmWiki.PageVariables,PmWiki.PageDirectives,PmWiki.Internationalizations -text=(:Summary:[[PmWiki/Skin(s)]] templates (.tmpl files):)%0a%25define=box block bgcolor=#f9f9fc border='1px solid #666666' margin=10px padding=5px%25%0aThis page describes the skin template files (.tmpl) that are used to create PmWiki ''skins'', and how PmWiki uses them. As described in the [[skins]] page, a skin is a collection of files that specifies the layout for PmWiki pages. Each skin must include a template file that provides the skeleton for displaying a PmWiki page.%0a%0a!! [[#findingprocessing]]Finding and Processing Templates%0a%0aWhen you set the value of the $Skin variable in a configuration file like @@local/config.php@@, like this%0a-> [@%0a## Use the Foo Skin.%0a$Skin = 'foo';%0a@]%0a%0ait tells PmWiki to search for a skin of that name, and use it. The usual result of the search is for PmWiki to load a template file from the appropriate skin directory. In this example, that would probably be the file @@pub/skins/foo/foo.tmpl@@.%0a%0aThe actual processing that PmWiki goes through to find a template file is important for those who are making complex skins, so its worth mentioning what those steps are:%0a%0a>>rframe width=25pct margin-left:2em font-size:smaller%3c%3c%0a!! [[#security]]Security Note%0aThe default value for @@[=$=]SkinLibDirs@@ has server-side and client-side files stored in the same publicly-accessible directory. That is, @@$SkinDir@@ and @@$SkinDirUrl@@ point to the same place. This is done for convenience (both for the skin user, and the skin writer), but it is not necessary.%0a%0aIt has the side effect that its possible to construct a URL ([[http://www.pmwiki.org/pmwiki/pub/skins/pmwiki/pmwiki.tmpl|like this one]]) that will let you look at the contents of the the @@.tmpl@@ or @@.php@@ files that a skin uses. This is usually not an issue as skin files should not contain any sensitive information.%0a%0aStill, a purist might want to move their @@.tmpl@@ and @@.php@@ files out of the directories that are accessible as URLs, and modify their @@[=$=]SkinLibDirs@@ array to reflect this.%0a>>%3c%3c%0a%0a#When @@$PageTemplateFmt@@ is blank (as it should be), PmWiki gathers the names of all candidate skins. It starts with any action-specific skin that is specified in @@[[LayoutVariables#ActionSkin|$ActionSkin]][$action]@@. Thus, if the current action is 'login', and @@$ActionSkin['login']@@ is @@'Bar'@@, then PmWiki will look for a skin named 'Bar'. %0a%0a#If no skin has been found yet, it looks for the skin(s) named in the @@$Skin@@ variable (which is allowed to be an array) and uses the first skin it can find. If it gets to the end of the list without finding a skin, it issues an error.%0a%0a#To attempt to find a skin, PmWiki first consults the @@[[LayoutVariables#SkinLibDirs|[=$=]SkinLibDirs]]@@ variable to know where to look. Skins consist of server-side files that are loaded by PmWiki (such as .php and .tmpl files) and client-side files (such as .css files and images) that will be requested by the user's browser when they look at a skinned PmWiki page. @@$SkinLibDirs@@ is an array of key/value pairs. The key is a directory to look in for the server-side files, while the corresponding value is a URL that points to the public client-side resources used by the skin. The default value of @@[=$=]SkinLibDirs@@ is:%0a -> [@%0a$SkinLibDirs = array(%0a "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a So, using the above definitions, PmWiki would try to find the skin 'foo' by looking for a directory called @@./pub/skins/foo@@ and then for @@$FarmD/pub/skins/foo@@ (with the value of @@$FarmD@@ replaced by the root server directory for Farm files). The first such directory that was found would be assumed to contain the skin it was looking for. It would then set @@$SkinDir@@ to the name of this directory and @@$SkinDirUrl@@ to the corresponding URL.%0a%0a#Once a valid skin directory has been found, PmWiki starts processing the files in that directory, looking for a @@.php@@ skin file to run. It first looks for one with the same name as the skin. So, if the skin is 'foo', it looks for @@foo.php@@. If no such file is found, it then checks for a file named @@skin.php@@. If one of these @@.php@@ files is found, PmWiki loads and runs it. This allows a skin to define custom markup, or custom configuration parameters. It also allows a skin to choose between which of several different @@.tmpl@@ files to load.%0a%0a To specify which @@.tmpl@@ file to load, simply call @@LoadPageTemplate()@@ inside the skin @@.php@@ file, with the name of the @@.tmpl@@ file to be loaded:%0a%0a -> @@LoadPageTemplate($pagename, "$SkinDir/xyz.tmpl");@@%0a%0a For example, a skin might specify a special template to be used if the action is 'print':%0a%0a -> [@%0aif ($GLOBALS['action'] == 'print')%0a LoadPageTemplate($pagename, "$SkinDir/print.tmpl");%0a@]%0a%0a When the action is something else, PmWiki will fall back to loading the default @@.tmpl@@ file instead.%0a%0a#If no appropriate @@.php@@ file is found, or if that file doesn't load a template, then PmWiki falls back to looking for a template with the same name as the skin, or, failing that, any @@.tmpl@@ file at all, so long as its the only one in the directory. If it finds one, it will load and process it. If not, it will issue an error.%0a%0a!![[#fileformat]]Template file format%0a%0aA template file is basically an HTML file that also contains variable substitutions (indicated by '$') and special directives embedded in HTML comments. The following special directives are ''required'' in the template file. %0a# The directive [@%3c!--PageText-->@] belongs to the %3cbody> section of the HTML document, and tells PmWiki where the main content of each wiki page should be placed. %0a# The directive [@%3c!--HTMLHeader-->@], which goes somewhere in the %3chead> section of the HTML document.%0a# The directive [@%3c!--HTMLFooter-->@] directive, which typically goes before the final %3c/body> tag and is used by some recipes to insert things at the end of the HTML document. [- %25green%25''Prior to PmWiki 2.2.0 the [@%3c!--HTMLFooter-->@] directive was optional.'' -]%0a%0aWhen PmWiki displays a page, it replaces the directives and variable substitutions with the values appropriate to the current page. For example, the [@%3c!--PageText-->@] directive is replaced with the page's contents, while any instances of $PageUrl are replaced with the url (address) of the current page.%0a%0aThere is a long list of variables available for substitution in pages; some of the%0amost useful include:%0a-> [@%0a$PageUrl the url of the current page%0a$ScriptUrl the base url to the pmwiki.php script%0a$Title the page's title (e.g., "`SkinTemplates")%0a$Titlespaced the page's title with spaces (e.g., "Skin Templates")%0a$Group the name of the current group (e.g., "`PmWiki")%0a$FullName the page's full name (e.g., "`PmWiki.SkinTemplates")%0a$LastModified the page's last modification time%0a$PageLogoUrl the url of a site logo%0a$WikiTitle the site's title%0a$SkinDirUrl the url of the skin's folder%0a@]%0a%0aThis last variable, $SkinDirUrl, is particularly useful in templates as it allows the skin designer to refer to other files (such as images or style sheets) in the skin folder without having to know the exact url.%0a%0aThe template is not limited to using the variables listed here; nearly any PHP global variable that begins with a capital letter can be used in a skin template. [[Page variables]] can also be used in templates.%0a%0a!![[#directives]] Skin directives%0a%0aBesides the required [@%3c!--PageText-->@] and [@%3c!--HTMLHeader-->@] directives, PmWiki provides other built-in directives for generating page output. It's not necessary to use any of these directives, but they can often add capabilities to a skin %0a%0a:[@%3c!--wiki:Main.SomePage-->@]:%0a:[@%3c!--page:Main.SomePage-->@]:%0a: :The [@%3c!--wiki:Main.SomePage-->@] directive outputs the contents of `Main.SomePage. $-substitutions are allowed in directives, thus a directive like [@%3c!--wiki:$Group.SomePage-->@] will include "`SomePage" of the current group. %0a%0a: :If multiple pages are listed in the directive, then only the first available page is used. Thus [@%3c!--wiki:$Group.SomePage Site.SomePage-->@] will display the contents of `SomePage in the current group if it exists, and `Site.SomePage if it doesn't. To always display `Site.SomePage, even if $`Group.SomePage exists, use two consecutive [@%3c!--wiki:...-->@] directives.%0a%0a: :The [@%3c!--wiki:...-->@] directive only displays pages for which the browser has read permissions. The [@%3c!--page:...-->@] directive displays pages even if the browser doesn't have read permission.%0a%0a%0a:[@%3c!--file:somefile.txt-->@]:%0a: :The directive [@%3c!--file:somefile.txt-->@] outputs the contents of another file (on the local filesystem) at the point of the directive. If the file to be included is a .php script, then the PHP script is executed and its output is sent to the browser. Like the [@%3c!--wiki:...-->@] directive above, $-substitutions are available to be able to output files based on the current page name or group.%0a%0a:[@%3c!--markup:...-->@]:%0a: :The markup directive processes any text that follows the colon as wiki markup and displays that in the output. %0a%0a:[@%3c!--function:SomeFunction args-->@]:%0a: :This directive calls a PHP function named "`SomeFunction", passing the current page's name and the text following the function name as arguments. PHP functions called in this manner are typically defined in a local customization file. Args allows only one argument, which has to be splitted then. [@%3c!--function:SomeFunction arg1 arg2 arg3-->@] generates one parameter "arg1 arg2 arg3". However variables can be used (like $LastModifiedBy).%0a%0a!![[#sections]] Page sections%0a%0aA template file can designate "sections" that are included or excluded from the output based on [[page directives]] or other criteria. A section always begins with [@%3c!--Page...Fmt-->@] and continues to the next section, the end of the template file, or [@%3c!--/Page...Fmt-->@]. For example, a template can specify a [@%3c!--PageLeftFmt-->@] section that is excluded from the output whenever the [@(:noleft:)@] directive is encountered in the page's contents. PmWiki's predefined sections (and their corresponding page directives) are:%0a-> [@%0a%3c!--PageHeaderFmt--> (:noheader:)%0a%3c!--PageFooterFmt--> (:nofooter:)%0a%3c!--PageTitleFmt--> (:notitle:)%0a%3c!--PageLeftFmt--> (:noleft:)%0a%3c!--PageRightFmt--> (:noright:)%0a%3c!--PageActionFmt--> (:noaction:)%0a@]%0a%0aSkin designers can define custom sections and markups, but currently all section names in the template must begin with "Page" and end with "Fmt". As mentioned you also have to define the corresponding markup (for example in your config.php) like this: %0a%0a->[@Markup('noxyz', 'directives', '/\\(:noxyz:\\)/ei',%0a "SetTmplDisplay('PageXYZFmt',0)");@] %0a%0a!![[#i18n]] Internationalization (i18n)[[#Internationalization]]%0a%0aSkins can also be [[internationaliz(ations)]]ed by using [@$[...]@] substitutions. Any string placed inside of [@$[...]@] is treated as a "translatable phrase", and the phrase is looked up in the current translation tables for a corresponding output phrase. If a translation is available, then the translated phrase is substituted at that point, otherwise the original phrase is left intact.%0a%0aFor example, the substitution [@$[Edit]@] will display the current translation of "Edit" if it is known, otherwise it displays "Edit". Thus, the same template can be used for multiple languages, displaying "Editer" when French translations are loaded, "Bearbeiten" when German translations are loaded, and "Edit" when no translation is available.%0a%0a!! Understanding old config files%0a-%3c %25red%25This information is deprecated%25%25, but we're still including it in the docs so you can better understand any really old @@local/config.php@@ files you look at. %0aThe original method of telling PmWiki where to find a skin used to be to set @@$PageTempateFmt@@ to the path of a @@.tmpl@@ file on the server. This is still respected by PmWiki, so if, for example, you were to set @@$PageTemplateFmt@@ to @@./pub/skins/foo/foo.tmpl@@ then PmWiki would simply load and use that file, but without setting the special @@$SkinDir@@ and @@$SkinDirUrl@@ variables that are required by all modern skins.%0a-> %25red%25DO NOT USE @@$PageTemplateFmt@@%25%25%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I customize the CSS styling of my PmWiki layout?[[#customcss]]%0a%0aA: See [[Skins]] for how to change the default PmWiki skin. See also [[Cookbook:Skins]], where you will find pre-made templates you can use to customize the appearance of your site. You can also create a file called ''local.css'' in the ''pub/css/'' directory and add CSS selectors there (this file gets automatically loaded if it exists). Or, styles can be added directly into a local customization file by using something like:%0a%0a-> [@$HTMLStylesFmt[] = '.foo { color:blue; }';@]%0a%0a%0aQ: Where can the mentioned "translation table" be found for adding translated phrases?%0aA: See [[Internationalizations]].%0a%0aQ: Is it possible to have the edit form in full page width, with no sidebar?%0aA: If the sidebar is marked with [@%3c!--PageLeftFmt-->@], adding [@(:noleft:)@] to Site.EditForm will hide it when a page is edited. -time=1234654364 +text=(:Summary:[[PmWiki/Skin(s)]] templates (.tmpl files):)%0a%25define=box block bgcolor=#f9f9fc border='1px solid #666666' margin=10px padding=5px%25%0aThis page describes the skin template files (.tmpl) that are used to create PmWiki ''skins'', and how PmWiki uses them. As described in the [[skins]] page, a skin is a collection of files that specifies the layout for PmWiki pages. Each skin must include a template file that provides the skeleton for displaying a PmWiki page.%0a%0a!! [[#findingprocessing]]Finding and Processing Templates%0a%0aWhen you set the value of the $Skin variable in a configuration file like @@local/config.php@@, like this%0a-> [@%0a## Use the Foo Skin.%0a$Skin = 'foo';%0a@]%0a%0ait tells PmWiki to search for a skin of that name, and use it. The usual result of the search is for PmWiki to load a template file from the appropriate skin directory. In this example, that would probably be the file @@pub/skins/foo/foo.tmpl@@.%0a%0aThe actual processing that PmWiki goes through to find a template file is important for those who are making complex skins, so its worth mentioning what those steps are:%0a%0a>>rframe width=25pct margin-left:2em font-size:smaller%3c%3c%0a!! [[#security]]Security Note%0aThe default value for @@[=$=]SkinLibDirs@@ has server-side and client-side files stored in the same publicly-accessible directory. That is, @@$SkinDir@@ and @@$SkinDirUrl@@ point to the same place. This is done for convenience (both for the skin user, and the skin writer), but it is not necessary.%0a%0aIt has the side effect that its possible to construct a URL ([[http://www.pmwiki.org/pmwiki/pub/skins/pmwiki/pmwiki.tmpl|like this one]]) that will let you look at the contents of the the @@.tmpl@@ or @@.php@@ files that a skin uses. This is usually not an issue as skin files should not contain any sensitive information.%0a%0aStill, a purist might want to move their @@.tmpl@@ and @@.php@@ files out of the directories that are accessible as URLs, and modify their @@[=$=]SkinLibDirs@@ array to reflect this.%0a>>%3c%3c%0a%0a#When @@$PageTemplateFmt@@ is blank (as it should be), PmWiki gathers the names of all candidate skins. It starts with any action-specific skin that is specified in @@[[LayoutVariables#ActionSkin|$ActionSkin]][$action]@@. Thus, if the current action is 'login', and @@$ActionSkin['login']@@ is @@'Bar'@@, then PmWiki will look for a skin named 'Bar'. %0a%0a#If no skin has been found yet, it looks for the skin(s) named in the @@$Skin@@ variable (which is allowed to be an array) and uses the first skin it can find. If it gets to the end of the list without finding a skin, it issues an error.%0a%0a#To attempt to find a skin, PmWiki first consults the @@[[LayoutVariables#SkinLibDirs|[=$=]SkinLibDirs]]@@ variable to know where to look. Skins consist of server-side files that are loaded by PmWiki (such as .php and .tmpl files) and client-side files (such as .css files and images) that will be requested by the user's browser when they look at a skinned PmWiki page. @@$SkinLibDirs@@ is an array of key/value pairs. The key is a directory to look in for the server-side files, while the corresponding value is a URL that points to the public client-side resources used by the skin. The default value of @@[=$=]SkinLibDirs@@ is:%0a -> [@%0a$SkinLibDirs = array(%0a "./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",%0a "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");%0a@]%0a%0a So, using the above definitions, PmWiki would try to find the skin 'foo' by looking for a directory called @@./pub/skins/foo@@ and then for @@$FarmD/pub/skins/foo@@ (with the value of @@$FarmD@@ replaced by the root server directory for Farm files). The first such directory that was found would be assumed to contain the skin it was looking for. It would then set @@$SkinDir@@ to the name of this directory and @@$SkinDirUrl@@ to the corresponding URL.%0a%0a#Once a valid skin directory has been found, PmWiki starts processing the files in that directory, looking for a @@.php@@ skin file to run. It first looks for one with the same name as the skin. So, if the skin is 'foo', it looks for @@foo.php@@. If no such file is found, it then checks for a file named @@skin.php@@. If one of these @@.php@@ files is found, PmWiki loads and runs it. This allows a skin to define custom markup, or custom configuration parameters. It also allows a skin to choose between which of several different @@.tmpl@@ files to load.%0a%0a To specify which @@.tmpl@@ file to load, simply call @@LoadPageTemplate()@@ inside the skin @@.php@@ file, with the name of the @@.tmpl@@ file to be loaded:%0a%0a -> @@LoadPageTemplate($pagename, "$SkinDir/xyz.tmpl");@@%0a%0a For example, a skin might specify a special template to be used if the action is 'print':%0a%0a -> [@%0aif ($GLOBALS['action'] == 'print')%0a LoadPageTemplate($pagename, "$SkinDir/print.tmpl");%0a@]%0a%0a When the action is something else, PmWiki will fall back to loading the default @@.tmpl@@ file instead.%0a%0a#If no appropriate @@.php@@ file is found, or if that file doesn't load a template, then PmWiki falls back to looking for a template with the same name as the skin, or, failing that, any @@.tmpl@@ file at all, so long as its the only one in the directory. If it finds one, it will load and process it. If not, it will issue an error.%0a%0a!![[#fileformat]]Template file format%0a%0aA template file is basically an HTML file that also contains variable substitutions (indicated by '$') and special directives embedded in HTML comments. The following special directives are ''required'' in the template file. %0a# The directive [@%3c!--PageText-->@] belongs to the %3cbody> section of the HTML document, and tells PmWiki where the main content of each wiki page should be placed. %0a# The directive [@%3c!--HTMLHeader-->@], which goes somewhere in the %3chead> section of the HTML document.%0a# The directive [@%3c!--HTMLFooter-->@] directive, which typically goes before the final %3c/body> tag and is used by some recipes to insert things at the end of the HTML document. [- %25green%25''Prior to PmWiki 2.2.0 the [@%3c!--HTMLFooter-->@] directive was optional.'' -]%0a%0aWhen PmWiki displays a page, it replaces the directives and variable substitutions with the values appropriate to the current page. For example, the [@%3c!--PageText-->@] directive is replaced with the page's contents, while any instances of $PageUrl are replaced with the url (address) of the current page.%0a%0aThere is a long list of variables available for substitution in pages; some of the%0amost useful include:%0a-> [@%0a$PageUrl the url of the current page%0a$ScriptUrl the base url to the pmwiki.php script%0a$Title the page's title (e.g., "`SkinTemplates")%0a$Titlespaced the page's title with spaces (e.g., "Skin Templates")%0a$Group the name of the current group (e.g., "`PmWiki")%0a$FullName the page's full name (e.g., "`PmWiki.SkinTemplates")%0a$LastModified the page's last modification time%0a$PageLogoUrl the url of a site logo%0a$WikiTitle the site's title%0a$SkinDirUrl the url of the skin's folder%0a@]%0a%0aThis last variable, $SkinDirUrl, is particularly useful in templates as it allows the skin designer to refer to other files (such as images or style sheets) in the skin folder without having to know the exact url.%0a%0aThe template is not limited to using the variables listed here; nearly any PHP global variable that begins with a capital letter can be used in a skin template. [[Page variables]] can also be used in templates.%0a%0a!![[#directives]] Skin directives%0a%0aBesides the required [@%3c!--PageText-->@] and [@%3c!--HTMLHeader-->@] directives, PmWiki provides other built-in directives for generating page output. It's not necessary to use any of these directives, but they can often add capabilities to a skin %0a%0a:[@%3c!--wiki:Main.SomePage-->@]:%0a:[@%3c!--page:Main.SomePage-->@]:%0a: :The [@%3c!--wiki:Main.SomePage-->@] directive outputs the contents of `Main.SomePage. $-substitutions are allowed in directives, thus a directive like [@%3c!--wiki:$Group.SomePage-->@] will include "`SomePage" of the current group. %0a%0a: :If multiple pages are listed in the directive, then only the first available page is used. Thus [@%3c!--wiki:$Group.SomePage Site.SomePage-->@] will display the contents of `SomePage in the current group if it exists, and `Site.SomePage if it doesn't. To always display `Site.SomePage, even if $`Group.SomePage exists, use two consecutive [@%3c!--wiki:...-->@] directives.%0a%0a: :The [@%3c!--wiki:...-->@] directive only displays pages for which the browser has read permissions. The [@%3c!--page:...-->@] directive displays pages even if the browser doesn't have read permission.%0a%0a%0a:[@%3c!--file:somefile.txt-->@]:%0a: :The directive [@%3c!--file:somefile.txt-->@] outputs the contents of another file (on the local filesystem) at the point of the directive. If the file to be included is a .php script, then the PHP script is executed and its output is sent to the browser. Like the [@%3c!--wiki:...-->@] directive above, $-substitutions are available to be able to output files based on the current page name or group.%0a%0a:[@%3c!--markup:...-->@]:%0a: :The markup directive processes any text that follows the colon as wiki markup and displays that in the output. %0a%0a:[@%3c!--function:SomeFunction args-->@]:%0a: :This directive calls a PHP function named "`SomeFunction", passing the current page's name and the text following the function name as arguments. PHP functions called in this manner are typically defined in a local customization file. Args allows only one argument, which has to be splitted then. [@%3c!--function:SomeFunction arg1 arg2 arg3-->@] generates one parameter "arg1 arg2 arg3". However variables can be used (like $LastModifiedBy).%0a%0a!![[#sections]] Page sections%0a%0aA template file can designate "sections" that are included or excluded from the output based on [[page directives]] or other criteria. A section always begins with [@%3c!--Page...Fmt-->@] and continues to the next section, the end of the template file, or [@%3c!--/Page...Fmt-->@]. For example, a template can specify a [@%3c!--PageLeftFmt-->@] section that is excluded from the output whenever the [@(:noleft:)@] directive is encountered in the page's contents. PmWiki's predefined sections (and their corresponding page directives) are:%0a-> [@%0a%3c!--PageHeaderFmt--> (:noheader:)%0a%3c!--PageFooterFmt--> (:nofooter:)%0a%3c!--PageTitleFmt--> (:notitle:)%0a%3c!--PageLeftFmt--> (:noleft:)%0a%3c!--PageRightFmt--> (:noright:)%0a%3c!--PageActionFmt--> (:noaction:)%0a@]%0a%0aSkin designers can define custom sections and markups, but currently all section names in the template must begin with "Page" and end with "Fmt". As mentioned you also have to define the corresponding markup (for example in your config.php) like this: %0a%0a->[@Markup('noxyz', 'directives', '/\\(:noxyz:\\)/ei',%0a "SetTmplDisplay('PageXYZFmt',0)");@] %0a%0a!![[#i18n]] Internationalization (i18n)[[#Internationalization]]%0a%0aSkins can also be [[internationaliz(ations)]]ed by using [@$[...]@] substitutions. Any string placed inside of [@$[...]@] is treated as a "translatable phrase", and the phrase is looked up in the current translation tables for a corresponding output phrase. If a translation is available, then the translated phrase is substituted at that point, otherwise the original phrase is left intact.%0a%0aFor example, the substitution [@$[Edit]@] will display the current translation of "Edit" if it is known, otherwise it displays "Edit". Thus, the same template can be used for multiple languages, displaying "Editer" when French translations are loaded, "Bearbeiten" when German translations are loaded, and "Edit" when no translation is available.%0a%0a!! Understanding old config files%0a-%3c %25red%25This information is deprecated%25%25, but we're still including it in the docs so you can better understand any really old @@local/config.php@@ files you look at. %0aThe original method of telling PmWiki where to find a skin used to be to set @@$PageTempateFmt@@ to the path of a @@.tmpl@@ file on the server. This is still respected by PmWiki, so if, for example, you were to set @@$PageTemplateFmt@@ to @@./pub/skins/foo/foo.tmpl@@ then PmWiki would simply load and use that file, but without setting the special @@$SkinDir@@ and @@$SkinDirUrl@@ variables that are required by all modern skins.%0a-> %25red%25DO NOT USE @@$PageTemplateFmt@@%25%25%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I customize the CSS styling of my PmWiki layout?[[#customcss]]%0a%0aA: See [[Skins]] for how to change the default PmWiki skin. See also [[Cookbook:Skins]], where you will find pre-made templates you can use to customize the appearance of your site. You can also create a file called ''local.css'' in the ''pub/css/'' directory and add CSS selectors there (this file gets automatically loaded if it exists). Or, styles can be added directly into a local customization file by using something like:%0a%0a-> [@$HTMLStylesFmt[] = '.foo { color:blue; }';@]%0a%0a%0aQ: Where can the mentioned "translation table" be found for adding translated phrases?%0aA: See [[Internationalizations]].%0a%0aQ: Is it possible to have the edit form in full page width, with no sidebar?%0aA: If the sidebar is marked with [@%3c!--PageLeftFmt-->@], adding [@(:noleft:)@] to Site.EditForm will hide it when a page is edited.%0a%0aQ: Can I easily hide the Home Page title from the homepage?%0aA: Yes, you can use in the wiki page either @@[=(:title Some other title:)=]@@ to change it or @@[=(:notitle:)=]@@ to hide it. +time=1246547602 Index: wikilib.d/PmWiki.BasicEditing =================================================================== --- wikilib.d/PmWiki.BasicEditing (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.BasicEditing (.../pmwiki-2.2.3) (revision 2380) @@ -1,13 +1,13 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 GTB5 +author=Ed W charset=ISO-8859-1 -csum=fix link +csum= description=PmWiki's basic edit syntax -host=81.65.14.164 +host=94.194.201.187 name=PmWiki.BasicEditing -rev=420 +rev=421 targets=PmWiki.WikiSandbox,Main.WikiSandbox,PmWiki.WikiWikiWeb,PmWiki.Passwords,PmWiki.TextFormattingRules,PmWiki.MarkupMasterIndex,PmWiki.WikiStyles,PmWiki.WikiGroup,PmWiki.InterMap,PmWiki.NonexistentPages,PmWiki.Links,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.Images,PmWiki.PageLists,PmWiki.BasicEditing,PmWiki.WikiTrails,PmWiki.DocumentationIndex,PmWiki.SpecialCharacters,PmWiki.PmWikiPhilosophy -text=(:Summary: PmWiki's basic edit syntax:)%0a(:Audience: authors (basic) :)%0a%0aThe pages on this site are [[Wiki Wiki Web]] pages, which means that pages can be created and edited by multiple authors. To edit a page, click the '''Edit''' link that exists '''somewhere''' on the page, usually in the header or footer. Some pages may be [[password(s)]]-protected, depending on the system's security policies, but many systems allow open editing of pages.%0a%0aPmWiki is not [[(Wikipedia:)WYSIWYG]] - When editing a page, you see the ''markup text'' that describes the content of the page. The basic rules for page markup are simple:%0a# Use a blank line to start a new paragraph [-[[#Paragraphs|more]]-].%0a# To make a list, start each line with # for numbered (ordered) lists or * for bulleted (unordered) lists [-[[#lists|more]]-].%0a# To make a heading, start a line with two or more ! marks; !! is a subheading, and !!! is a sub-subheading [-[[#headings|more]]-].%0a# To emphasize text, enclose it in 2 or 3 ''single quotes''; [@''text''@] for italics or [@'''text'''@] for bold [-[[#emphasis|more]]-].%0a# To make a link to another page, enclose the page's name in double brackets; for example [@[[basic editing]]@] links to this page [-[[#links|more]]-].%0a# To make a link to another site, type its address, such as http://example.com/ [- [[#links|more]]-].%0a%0a'''If you want to experiment with editing a page, try it on the [[Main/Wiki Sandbox]].''' You can [[Main/WikiSandbox?action=edit | edit the Wiki Sandbox]] without affecting anything important on this site. If you do edit other pages, it's courteous to '''sign''' your contribution; using [=~~=]~ effectively 'signs' the name that you provide in the Author field on the Page Edit form.%0a%0a!! Examples of common markups%0a%0aThe table below demonstrates many of the common markups used to format pages. The right column shows the effect of the markup, the left column shows what to write to achieve the effect. More details are available from the [[text formatting rules]] and other documentation pages. An exhaustive list of default markup is available as the [[markup master index]].%0a%0a!!! [[#Paragraphs]]Paragraphs and line breaks%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0aConsecutive lines%0awill be merged together%0aas part of the same paragraph.%0a%0aOne or more empty lines will start a new paragraph.%0a(:markupend:)%0a%0a(:markup class=horiz:)%0aTwo backslashes at the end of a line \\%0aforce a line break.%0a%0aOr use this markup: [[%3c%3c]] to force a break.%0a(:markupend:)%0aFurther reading:%0a* [[text formatting rules]] for more information on linebreaks, indented or hanging paragraphs.%0a* [[wiki styles]] for centered or right justified paragraphs and "floating" text (boxes), borders and much more.%0a%0a!!![[#lists]]Lists%0aStart each line with # for numbered (ordered) lists or * for bulleted (unordered) lists:%0a(:markup class=horiz:)%0a* Bullet list%0a* Another item%0a** More asterisks produce sub-items%0a** etc.%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a# Numbered lists%0a# Another item%0a## more hashes produce sub-items%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a# List types%0a# can be mixed%0a** numbered list with unordered sub-list%0a(:markupend:)%0a%0a(:if false:)%0aif someone thinks definition lists are "basic":%0a(:markup class=horiz:)%0a: Definition list : list of definitions%0a: item : the item's definition%0a: another item : that item's definition%0a:: indentation : more leading colons produce deeper lists%0a(:markupend:)%0a(:ifend:)%0a%0aLearn more about [[TextFormattingRules#BulletedLists|lists]] (including [[TextFormattingRules#DefinitionLists|definition lists]]) and [[(PmWiki:)list styles]].%0a%0a!!![[#headings]] Headings%0aHeadings are useful for creating a "well-structured" page. They're not just for making big text.%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0a!! Major Subheading%0a!!! Minor Subheading%0a!!!! And More%0a!!!!! Subheadings%0a(:markupend:)%0a%0a!!![[#emphasis]] Text Emphasis%0aTo emphasize, enclose text in apostrophes (single-quote marks), not double-quotes.%0a%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0a''Emphasize'' (italics),%0a'''strong''' (bold), %0a'''''very strong''''' (bold italics).%0a(:markupend:)%0a%0a!!![[#links]] Links%0aTo make a link to another page, enclose the page's name in double square brackets.%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0aPractice editing in the [[wiki sandbox]]%0a(:markupend:)%0aNote that words are automatically ''capitalized'' in page titles. The link above links to the page WikiSandbox.%0a%0aText after a pipe (|) is used as the link text:%0a(:markup class=horiz:)%0aPractice editing in the%0a[[WikiSandbox | practice area]].%0a(:markupend:)%0a%0a(:comment is this still "basic" or should it be removed? :)%0aEndings become part of the link text, parentheses hide parts of the link name:%0a(:markup class=horiz:)%0a[[wiki sandbox]]es.%0a%0a[[(wiki) sandbox]].%0a(:markupend:)%0a%0aWhen linking to a page in a different [[WikiGroup]], provide the group name, followed by a separator, and then the page name:%0a(:markup class=horiz:)%0a[[Main.WikiSandbox]] shows group + name%0a%0a[[Main/WikiSandbox]] shows only name%0a(:markupend:)%0a%0aLinks to external sites%0a(:markup class=horiz:)%0abare url: http://google.com%0a%0alink text: [[http://google.com | Google]]%0a(:markupend:)%0a%0aColons make [[InterMap]] (also called InterWiki) links to other wikis:%0a(:markup class=horiz:)%0aWhat's an [[Wikipedia:aardvark]], anyway?%0a(:markupend:)%0a%0aLinks to [[nonexistent pages]] are displayed specially, to invite others to create the page.%0a%0aPmWiki supports more link types and a lot of display options, see [[Links]] to learn more.%0a%0a%0a!!!Preformatted text%0aPreformatted text is displayed using a monospace font and not generating linebreaks except where explicitly indicated in the markup.%0a%0aNote that very long lines of preformatted text can cause the whole page to be wide.%0a%0aFor preformatted text with markup (e.g. emphasis) being processed, start each line with a space:%0a(:markup class=horiz:)%0a Lines that begin with a spece%0a are formatted exactly as typed%0a in a '''fixed-width''' font.%0a(:markupend:)%0a%0aIf you don't want Wiki markup to be processed, use [=[@ @]=]. Can also be used inline.%0a(:markup class=horiz:)%0a[@%0aText escaped this way has%0athe HTML ''code'' style%0a@]%0a(:markupend:)%0a%0a!!! Escape sequence%0aIf you don't want Wiki markup to be processed, but lines reformatted use [@[= =]@]. Can also be used inline.%0a(:markup class=horiz:)%0a[=%0amarkup is ''not'' processed%0abut lines are reformatted%0a=]%0a(:markupend:)%0a%0a%0a!!! Horizontal line%0a(:markup class=horiz:)%0aFour or more dashes at%0athe beginning of a line%0a----%0aproduce a "horizontal rule"%0a(:markupend:)%0a%0a!!! Tables%0aSimple tables use double pipe characters to separate cells:%0a(:markup class=horiz:)%0a|| border=1%0a||! head 1 ||! head 2 ||! head 3 ||%0a|| cell 1 || cell 2 || cell 3 ||%0a(:markupend:)%0aSee [[Tables|simple tables]] and [[TableDirectives|advanced tables]] to learn more about the rich feature set of PmWiki tables.%0a%0a!!! Images%0aSee [[Images]]%0a%0a(:if false:)%0aIMO this is not "basic" and should be removed from this page --OliverBetz%0a!!!Indented and "hanging" paragraphs%0a(:markup class=horiz:)%0a-> An arrow (->) indents content.%0a%0a Line up text to continue the indent.%0a%0a-->Longer arrows (-->) indent further.%0a%0a-%3cA reverse arrow (-%3c) creates a hanging indent, the first line is outdented and remaining lines are indented.%0a(:markupend:)%0a(:ifend:)%0a%0a!!! Character formatting%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0a* @@Monospaced text@@%0a* Text with '^superscripts^'%0a* Text with '_subscripts_'%0a* deleted {-strikethrough-} text%0a* inserted {+underline+} text%0a* [+big+], [++bigger++] text%0a* [-small-], [--smaller--] text%0a(:markupend:)%0a%0aUse [[WikiStyles]] to change %25red%25 the %25blue%25 text %25green%25 %25color=#ff7f00%25 color %25%25.%0a%0a[[#pagetitles]]%0a!!! Page titles%0a%0a* The [@(:title:)@] directive sets the page's title to something other than its page name.%0a(:markup class=horiz:)%0a(:Title Basic PmWiki editing rules:)%0aThe title of this page is {$Title}, spaced as {$Titlespaced}.%0a(:markupend:)%0a%0a[[#pagesummary]]%0a!!! Page Description%0a%0a* The [@(:Description Page summary here:)@] directive sets the page description. The description is used by search engines, and can displayed in search results and in [[page lists]].%0a(:markup class=horiz:)%0a(:Description PmWiki's basic edit syntax:)%0aThe summary description of this page is {$Description}.%0a(:markupend:)%0a%0a%0a%0a>>faq%3c%3c [[#faq]]%0a[[#beginning]]%0aQ: I'm new to PmWiki, where can I find some basic help for getting started?%0aA: The [[Basic Editing]] page is a good start. From there, you can just follow the navigational links at the bottom of the page (they are called [[Wiki Trails]]) to the next pages, or to the [[Documentation Index]] page, which provides an outline style index of essential documentation pages, organized from basic to advanced.%0a%0aQ: How do I include special characters such as Copyright (©) and Trademark (® or ™) on my wiki pages?%0aA: See [[special characters]] on how to insert special characters that don't appear on your keyboard.%0a%0aQ: Why are separate lines of text in the markup combined into a single line on output?%0aA: PmWiki normally treats consecutive lines of text as being a paragraph, and merges and wraps lines together on output. This is consistent with most other wiki packages. An author can use the [@(:linebreaks:)@] directive to cause separate lines of markup text to be kept as separate lines in the output. A wiki administrator can set in config.php @@$HTMLPNewline = '%3cbr/>';@@ to force literal new lines.%0a%0aQ: Can I just enter HTML directly?%0aA: By default (and by design), PmWiki does not support the use of HTML elements in the editable markup for wiki pages. There are a number of reasons for this described in the [[PmWiki Philosophy]] and [[PmWiki:Audiences]]. Enabling HTML markup within wiki pages in a collaborative environment may exclude some potential authors from being able to edit pages, and pose a number of display and security issues. However, a site administrator can use the [[Cookbook:EnableHTML]] recipe to enable the use of HTML markup directly in pages.%0a%0aQ: Where can I find more documentation?%0aA: See the [[DocumentationIndex | documentation index]] and the [[markup master index]] pages.%0a -time=1238270204 +text=(:Summary: PmWiki's basic edit syntax:)%0a(:Audience: authors (basic) :)%0a%0aThe pages on this site are [[Wiki Wiki Web]] pages, which means that pages can be created and edited by multiple authors. To edit a page, click the '''Edit''' link that exists '''somewhere''' on the page, usually in the header or footer. Some pages may be [[password(s)]]-protected, depending on the system's security policies, but many systems allow open editing of pages.%0a%0aPmWiki is not [[(Wikipedia:)WYSIWYG]] - When editing a page, you see the ''markup text'' that describes the content of the page. The basic rules for page markup are simple:%0a# Use a blank line to start a new paragraph [-[[#Paragraphs|more]]-].%0a# To make a list, start each line with # for numbered (ordered) lists or * for bulleted (unordered) lists [-[[#lists|more]]-].%0a# To make a heading, start a line with two or more ! marks; !! is a subheading, and !!! is a sub-subheading [-[[#headings|more]]-].%0a# To emphasize text, enclose it in 2 or 3 ''single quotes''; [@''text''@] for italics or [@'''text'''@] for bold [-[[#emphasis|more]]-].%0a# To make a link to another page, enclose the page's name in double brackets; for example [@[[basic editing]]@] links to this page [-[[#links|more]]-].%0a# To make a link to another site, type its address, such as http://example.com/ [- [[#links|more]]-].%0a%0a'''If you want to experiment with editing a page, try it on the [[Main/Wiki Sandbox]].''' You can [[Main/WikiSandbox?action=edit | edit the Wiki Sandbox]] without affecting anything important on this site. If you do edit other pages, it's courteous to '''sign''' your contribution; using [=~~=]~ effectively 'signs' the name that you provide in the Author field on the Page Edit form.%0a%0a!! Examples of common markups%0a%0aThe table below demonstrates many of the common markups used to format pages. The right column shows the effect of the markup, the left column shows what to write to achieve the effect. More details are available from the [[text formatting rules]] and other documentation pages. An exhaustive list of default markup is available as the [[markup master index]].%0a%0a!!! [[#Paragraphs]]Paragraphs and line breaks%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0aConsecutive lines%0awill be merged together%0aas part of the same paragraph.%0a%0aOne or more empty lines will start a new paragraph.%0a(:markupend:)%0a%0a(:markup class=horiz:)%0aTwo backslashes at the end of a line \\%0aforce a line break.%0a%0aOr use this markup: [[%3c%3c]] to force a break.%0a(:markupend:)%0aFurther reading:%0a* [[text formatting rules]] for more information on linebreaks, indented or hanging paragraphs.%0a* [[wiki styles]] for centered or right justified paragraphs and "floating" text (boxes), borders and much more.%0a%0a!!![[#lists]]Lists%0aStart each line with # for numbered (ordered) lists or * for bulleted (unordered) lists:%0a(:markup class=horiz:)%0a* Bullet list%0a* Another item%0a** More asterisks produce sub-items%0a** etc.%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a# Numbered lists%0a# Another item%0a## more hashes produce sub-items%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a# List types%0a# can be mixed%0a** numbered list with unordered sub-list%0a(:markupend:)%0a%0a(:if false:)%0aif someone thinks definition lists are "basic":%0a(:markup class=horiz:)%0a: Definition list : list of definitions%0a: item : the item's definition%0a: another item : that item's definition%0a:: indentation : more leading colons produce deeper lists%0a(:markupend:)%0a(:ifend:)%0a%0aLearn more about [[Text Formatting Rules#BulletedLists|lists]] (including [[Text Formatting Rules#DefinitionLists|definition lists]]) and [[(PmWiki:)list styles]].%0a%0a!!![[#headings]] Headings%0aHeadings are useful for creating a "well-structured" page. They're not just for making big text.%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0a!! Major Subheading%0a!!! Minor Subheading%0a!!!! And More%0a!!!!! Subheadings%0a(:markupend:)%0a%0a!!![[#emphasis]] Text Emphasis%0aTo emphasize, enclose text in apostrophes (single-quote marks), not double-quotes.%0a%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0a''Emphasize'' (italics),%0a'''strong''' (bold), %0a'''''very strong''''' (bold italics).%0a(:markupend:)%0a%0a!!![[#links]] Links%0aTo make a link to another page, enclose the page's name in double square brackets.%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0aPractice editing in the [[wiki sandbox]]%0a(:markupend:)%0aNote that words are automatically ''capitalized'' in page titles. The link above links to the page WikiSandbox.%0a%0aText after a pipe (|) is used as the link text:%0a(:markup class=horiz:)%0aPractice editing in the%0a[[WikiSandbox | practice area]].%0a(:markupend:)%0a%0a(:comment is this still "basic" or should it be removed? :)%0aEndings become part of the link text, parentheses hide parts of the link name:%0a(:markup class=horiz:)%0a[[wiki sandbox]]es.%0a%0a[[(wiki) sandbox]].%0a(:markupend:)%0a%0aWhen linking to a page in a different [[WikiGroup]], provide the group name, followed by a separator, and then the page name:%0a(:markup class=horiz:)%0a[[Main.Wiki Sandbox]] shows group + name%0a%0a[[Main/Wiki Sandbox]] shows only name%0a(:markupend:)%0a%0aLinks to external sites%0a(:markup class=horiz:)%0abare url: http://google.com%0a%0alink text: [[http://google.com | Google]]%0a(:markupend:)%0a%0aColons make [[InterMap]] (also called InterWiki) links to other wikis:%0a(:markup class=horiz:)%0aWhat's an [[Wikipedia:aardvark]], anyway?%0a(:markupend:)%0a%0aLinks to [[nonexistent pages]] are displayed specially, to invite others to create the page.%0a%0aPmWiki supports more link types and a lot of display options, see [[Links]] to learn more.%0a%0a%0a!!!Preformatted text%0aPreformatted text is displayed using a monospace font and not generating linebreaks except where explicitly indicated in the markup.%0a%0aNote that very long lines of preformatted text can cause the whole page to be wide.%0a%0aFor preformatted text with markup (e.g. emphasis) being processed, start each line with a space:%0a(:markup class=horiz:)%0a Lines that begin with a spece%0a are formatted exactly as typed%0a in a '''fixed-width''' font.%0a(:markupend:)%0a%0aIf you don't want Wiki markup to be processed, use [=[@ @]=]. Can also be used inline.%0a(:markup class=horiz:)%0a[@%0aText escaped this way has%0athe HTML ''code'' style%0a@]%0a(:markupend:)%0a%0a!!! Escape sequence%0aIf you don't want Wiki markup to be processed, but lines reformatted use [@[= =]@]. Can also be used inline.%0a(:markup class=horiz:)%0a[=%0amarkup is ''not'' processed%0abut lines are reformatted%0a=]%0a(:markupend:)%0a%0a%0a!!! Horizontal line%0a(:markup class=horiz:)%0aFour or more dashes at%0athe beginning of a line%0a----%0aproduce a "horizontal rule"%0a(:markupend:)%0a%0a!!! Tables%0aSimple tables use double pipe characters to separate cells:%0a(:markup class=horiz:)%0a|| border=1%0a||! head 1 ||! head 2 ||! head 3 ||%0a|| cell 1 || cell 2 || cell 3 ||%0a(:markupend:)%0aSee [[Tables|simple tables]] and [[Table Directives|advanced tables]] to learn more about the rich feature set of PmWiki tables.%0a%0a!!! Images%0aSee [[Images]]%0a%0a(:if false:)%0aIMO this is not "basic" and should be removed from this page --OliverBetz%0a!!!Indented and "hanging" paragraphs%0a(:markup class=horiz:)%0a-> An arrow (->) indents content.%0a%0a Line up text to continue the indent.%0a%0a-->Longer arrows (-->) indent further.%0a%0a-%3cA reverse arrow (-%3c) creates a hanging indent, the first line is outdented and remaining lines are indented.%0a(:markupend:)%0a(:ifend:)%0a%0a!!! Character formatting%0a%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a%0a(:markup class=horiz:)%0a* @@Monospaced text@@%0a* Text with '^superscripts^'%0a* Text with '_subscripts_'%0a* deleted {-strikethrough-} text%0a* inserted {+underline+} text%0a* [+big+], [++bigger++] text%0a* [-small-], [--smaller--] text%0a(:markupend:)%0a%0aUse [[WikiStyles]] to change %25red%25 the %25blue%25 text %25green%25 %25color=#ff7f00%25 color %25%25.%0a%0a[[#pagetitles]]%0a!!! Page titles%0a%0a* The [@(:title:)@] directive sets the page's title to something other than its page name.%0a(:markup class=horiz:)%0a(:Title Basic PmWiki editing rules:)%0aThe title of this page is {$Title}, spaced as {$Titlespaced}.%0a(:markupend:)%0a%0a[[#pagesummary]]%0a!!! Page Description%0a%0a* The [@(:Description Page summary here:)@] directive sets the page description. The description is used by search engines, and can displayed in search results and in [[page lists]].%0a(:markup class=horiz:)%0a(:Description PmWiki's basic edit syntax:)%0aThe summary description of this page is {$Description}.%0a(:markupend:)%0a%0a%0a%0a>>faq%3c%3c [[#faq]]%0a[[#beginning]]%0aQ: I'm new to PmWiki, where can I find some basic help for getting started?%0aA: The [[Basic Editing]] page is a good start. From there, you can just follow the navigational links at the bottom of the page (they are called [[Wiki Trails]]) to the next pages, or to the [[Documentation Index]] page, which provides an outline style index of essential documentation pages, organized from basic to advanced.%0a%0aQ: How do I include special characters such as Copyright (©) and Trademark (® or ™) on my wiki pages?%0aA: See [[special characters]] on how to insert special characters that don't appear on your keyboard.%0a%0aQ: Why are separate lines of text in the markup combined into a single line on output?%0aA: PmWiki normally treats consecutive lines of text as being a paragraph, and merges and wraps lines together on output. This is consistent with most other wiki packages. An author can use the [@(:linebreaks:)@] directive to cause separate lines of markup text to be kept as separate lines in the output. A wiki administrator can set in config.php @@$HTMLPNewline = '%3cbr/>';@@ to force literal new lines.%0a%0aQ: Can I just enter HTML directly?%0aA: By default (and by design), PmWiki does not support the use of HTML elements in the editable markup for wiki pages. There are a number of reasons for this described in the [[PmWiki Philosophy]] and [[PmWiki:Audiences]]. Enabling HTML markup within wiki pages in a collaborative environment may exclude some potential authors from being able to edit pages, and pose a number of display and security issues. However, a site administrator can use the [[Cookbook:Enable HTML]] recipe to enable the use of HTML markup directly in pages.%0a%0aQ: Where can I find more documentation?%0aA: See the [[Documentation Index | documentation index]] and the [[markup master index]] pages.%0a +time=1247412848 title=Basic PmWiki editing rules Index: wikilib.d/PmWiki.Version =================================================================== --- wikilib.d/PmWiki.Version (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Version (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=mv question to talk +csum=links to pages not in the distribution should be absolute ctime=1176363304 host=81.65.14.164 name=PmWiki.Version -rev=8 -targets=PmWiki.PageVariables,SiteAdmin.Status,PmWiki.BasicVariables,PmWiki.SiteAnalyzer,PmWiki.AnalyzeResults -text=(:Summary: Determining and displaying the current version of PmWiki ({$Version}):)%0a!! Obtaining the PmWiki version%0aUse the [@{$Version}@] [[page variable(s)]] to display the current version of PmWiki.%0a%0aSee the [[SiteAdmin.Status]] page for the current version and version number.%0a%0aFor example%0a(:markup:)%0aThis wiki installation is running PmWiki {$Version}, version number {$VersionNum}.%0a-%3cThe default group is {$DefaultGroup}.%0a-%3cThe default name is {$DefaultName}.%0a-%3cThe site group is {$SiteGroup}%0a(:markupend:)%0a%0aSee also [[basic variables]].%0a%0aThe script @@version.php@@ contains the declaration of the version number.%0a%0a!! Obtaining recipe versions%0aThe [[Site Analyzer]] can be used to display the current version of %0a[[Cookbook(:/)]] recipes,%0asee [[Analyze Results]] for instructions.%0a%0aSee also [[Cookbook:RecipeCheck]]%0a%0a%0a -time=1238274323 +rev=9 +targets=PmWiki.PageVariables,SiteAdmin.Status,PmWiki.BasicVariables +text=(:Summary: Determining and displaying the current version of PmWiki ({$Version}):)%0a!! Obtaining the PmWiki version%0aUse the [@{$Version}@] [[page variable(s)]] to display the current version of PmWiki.%0a%0aSee the [[SiteAdmin.Status]] page for the current version and version number.%0a%0aFor example%0a(:markup:)%0aThis wiki installation is running PmWiki {$Version}, version number {$VersionNum}.%0a-%3cThe default group is {$DefaultGroup}.%0a-%3cThe default name is {$DefaultName}.%0a-%3cThe site group is {$SiteGroup}%0a(:markupend:)%0a%0aSee also [[basic variables]].%0a%0aThe script @@version.php@@ contains the declaration of the version number.%0a%0a!! Obtaining recipe versions%0aThe [[(PmWiki:)Site Analyzer]] can be used to display the current version of %0a[[Cookbook(:/)]] recipes.%0a%0aSee also [[Cookbook:RecipeCheck]]%0a%0a%0a +time=1247526506 Index: wikilib.d/PmWiki.MailingLists =================================================================== --- wikilib.d/PmWiki.MailingLists (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.MailingLists (.../pmwiki-2.2.3) (revision 2380) @@ -1,13 +1,11 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=-link to non-existing archive @ GG +csum= host=81.65.14.164 name=PmWiki.MailingLists -passwdattr=$1$U1xwX7vD$kwyMPRPkTvry2bu.UJZNG0 -passwdedit=$1$5dj3L.Yo$HxeF7chOyLexpl1YLbyGN/ -rev=102 +rev=105 targets=PmWiki.PmWiki -text=(:Summary:The email discussion lists available and their archives:)%0aThere are several mailing lists available for [[PmWiki]].%0a %0a:[ [[(http://pmichaud.com/lists/)pmwiki-users]] ]: This is a great resource where a very helpful group of people will answer questions and discuss PmWiki development. Traffic is around 20-40 messages a day (on slow days). %0a->''If you ask a question on the list and it doesn't get answered, don't feel let down. Just'' '''''ask it again'''''. It probably slipped by unnoticed.%0a%0a->Archives are available from:%0a-->http://pmichaud.com/pipermail/pmwiki-users/%0a-->http://news.gmane.org/gmane.comp.web.wiki.pmwiki.user ([[http://search.gmane.org/search.php?group=gmane.comp.web.wiki.pmwiki.user|searchable]])%0a-->http://groups.google.com/group/pmwiki-users (searchable)%0a-->http://www.mail-archive.com/pmwiki-users@pmichaud.com/info.html (searchable)%0a%0a%0a-->(:input form action='http://search.gmane.org/' method='get':)(:input text query:)(:input hidden group gmane.comp.web.wiki.pmwiki.user:) (:input submit value='Search pmwiki-users archives at gmane':)(:input end:)%0a%0a:[ [[(http://pmichaud.com/lists/)pmwiki-users-de]] ]: A mailing list for german-speaking users of PmWiki. Archived at%0a-->http://pmichaud.com/pipermail/pmwiki-users-de%0a%0a:[ [[(http://pmichaud.com/mailman/listinfo/)pmwiki-users-es]] ]: Lista de usuarios PmWiki en Español.%0a%0a:[ [[(http://pmichaud.com/mailman/listinfo/)pmwiki-users-fr]] ]: A mailing list for french-speaking users of PmWiki.%0a%0a:[ [[(http://pmichaud.com/mailman/listinfo/)pmwiki-devel]] ]: This list was created to lower the traffic on pmwiki-users, it focuses on discussions surrounding code development for PmWiki (both core and recipe development).%0a%0a->Archives are available from:%0a-->http://pmichaud.com/pipermail/pmwiki-devel/%0a-->http://news.gmane.org/gmane.comp.web.wiki.pmwiki.devel ([[http://search.gmane.org/search.php?group=gmane.comp.web.wiki.pmwiki.devel|searchable]])%0a-->http://groups.google.com/group/pmwiki-devel (searchable)%0a-->http://www.mail-archive.com/pmwiki-devel@pmichaud.com/info.html (searchable)%0a%0a:[ [[(http://pmichaud.com/lists/)pmwiki-announce]] ]: Announcements of new version releases and urgent information. If you use PmWiki in a production environment, this low-volume list is highly recommended. The archive is at:%0a-->http://pmichaud.com/pipermail/pmwiki-announce%0a%0a%0aSuggestions:%0a* If you reply to a digest message, please remove the messages irrelevant to your reply before sending it back to the list. %0a** It's also helpful (but less important) to change "Re: pmwiki-users Digest, Vol [...]" to "Re: [the original subject]" because some mail programs determine threads based on the subject.%0a* If you address a reply to a single list member, please take the [pmwiki-users] off the subject line, or it's possible for your message to get lost in the mailing list traffic. Many people filter list traffic to a separate mailbox.%0a%0a!! Changing mail list settings%0a%0aHere are some tips regarding changing the mailing list settings:%0a%0a* Logging in...%0a** First go to [[http://pmichaud.com/mailman/listinfo/pmwiki-users]]%0a and enter your e-mail address in the field at the bottom of the page,%0a to the left of the button ''Unsubscribe or edit options''.%0a** Next you need to enter your password. As you've probably forgotten this,%0a use the button ''Remind'' at the bottom of the page to get a new password.%0a** Finally enter the password you should get momentarily via e-mail.%0a%0a* You can directly go to the options web page through a URI such as the%0a following:%0a-> [@http://host.pmichaud.com/mailman/options/pmwiki-users/%3cuser>%2540%3cdomain>@]%0a-> where [@%3cuser>@] is everything before the [@@@] in an e-mail address,%0a and [@%3cdomain>@] is everything after (%0a For those who wonder, the [@%2540@] in the URI just stands for '[@@@]'.%0a%0a* You can also obtain various help by sending an email to%0a mailto:pmwiki-users-request@pmichaud.com with the text [@help@] in either%0a the subject or the body.%0a%0a!! Newsgroups (NNTP)%0aYou may be interested, that the lists are also accessible as newsgroups.%0a%0aThe NNTP server is:%0a* news.gmane.org '^[[http://news.gmane.org/search.php?match=pmwiki|#]]^'%0a%0aThe groups are:%0a* gmane.comp.web.wiki.pmwiki.user%0a* gmane.comp.web.wiki.pmwiki.announce%0a* gmane.comp.web.wiki.pmwiki.user.de%0a%0asee also http://gmane.org%0a%0a -time=1234647345 +text=(:Summary:The email discussion lists available and their archives:)%0aThere are several mailing lists available for [[PmWiki]].%0a %0a:[ [[(http://pmichaud.com/lists/)pmwiki-users]] ]: This is a great resource where a very helpful group of people will answer questions and discuss PmWiki development. Traffic is around 20-40 messages a day (on slow days). %0a->''If you ask a question on the list and it doesn't get answered, don't feel let down. Just'' '''''ask it again'''''. It probably slipped by unnoticed.%0a%0a->Archives are available from:%0a-->http://pmichaud.com/pipermail/pmwiki-users/%0a-->http://news.gmane.org/gmane.comp.web.wiki.pmwiki.user ([[http://search.gmane.org/search.php?group=gmane.comp.web.wiki.pmwiki.user|searchable]])%0a-->http://groups.google.com/group/pmwiki-users (searchable)%0a-->http://www.mail-archive.com/pmwiki-users@pmichaud.com/info.html (searchable)%0a%0a%0a-->(:input form action='http://search.gmane.org/' method='get':)(:input text query:)(:input hidden group gmane.comp.web.wiki.pmwiki.user:) (:input submit value='Search pmwiki-users archives at gmane':)(:input end:)%0a%0a:[ [[(http://pmichaud.com/lists/)pmwiki-users-de]] ]: A mailing list for german-speaking users of PmWiki. Archived at%0a-->http://pmichaud.com/pipermail/pmwiki-users-de%0a%0a:[ [[(http://pmichaud.com/mailman/listinfo/)pmwiki-users-es]] ]: Lista de usuarios PmWiki en Español.%0a%0a:[ [[(http://pmichaud.com/mailman/listinfo/)pmwiki-users-fr]] ]: A mailing list for french-speaking users of PmWiki.%0a%0a:[ [[(http://pmichaud.com/mailman/listinfo/)pmwiki-devel]] ]: This list was created to lower the traffic on pmwiki-users, it focuses on discussions surrounding code development for PmWiki (both core and recipe development).%0a%0a->Archives are available from:%0a-->http://pmichaud.com/pipermail/pmwiki-devel/%0a-->http://news.gmane.org/gmane.comp.web.wiki.pmwiki.devel ([[http://search.gmane.org/search.php?group=gmane.comp.web.wiki.pmwiki.devel|searchable]])%0a-->http://groups.google.com/group/pmwiki-devel (searchable)%0a-->http://www.mail-archive.com/pmwiki-devel@pmichaud.com/info.html (searchable)%0a%0a:[ [[(http://pmichaud.com/lists/)pmwiki-announce]] ]: Announcements of new version releases and urgent information. If you use PmWiki in a production environment, this low-volume list is highly recommended. The archive is at:%0a-->http://pmichaud.com/pipermail/pmwiki-announce%0a%0aSuggestions:%0a* If you reply to a digest message, please remove the messages irrelevant to your reply before sending it back to the list. %0a** It's also helpful (but less important) to change "Re: pmwiki-users Digest, Vol [...]" to "Re: [the original subject]" because some mail programs determine threads based on the subject.%0a* If you address a reply to a single list member, please take the [pmwiki-users] off the subject line, or it's possible for your message to get lost in the mailing list traffic. Many people filter list traffic to a separate mailbox.%0a%0a!! Changing mail list settings%0a%0aHere are some tips regarding changing the mailing list settings:%0a%0a* Logging in...%0a** First go to [[http://pmichaud.com/mailman/listinfo/pmwiki-users]]%0a and enter your e-mail address in the field at the bottom of the page,%0a to the left of the button ''Unsubscribe or edit options''.%0a** Next you need to enter your password. As you've probably forgotten this,%0a use the button ''Remind'' at the bottom of the page to get a new password.%0a** Finally enter the password you should get momentarily via e-mail.%0a%0a* You can directly go to the options web page through a URI such as the%0a following:%0a-> [@http://host.pmichaud.com/mailman/options/pmwiki-users/%3cuser>%2540%3cdomain>@]%0a-> where [@%3cuser>@] is everything before the [@@@] in an e-mail address,%0a and [@%3cdomain>@] is everything after (%0a For those who wonder, the [@%2540@] in the URI just stands for '[@@@]'.%0a%0a* You can also obtain various help by sending an email to%0a mailto:pmwiki-users-request@pmichaud.com with the text [@help@] in either%0a the subject or the body.%0a%0a!! Newsgroups (NNTP)%0aYou may be interested, that the lists are also accessible as newsgroups.%0a%0aThe NNTP server is:%0a* news.gmane.org '^[[http://news.gmane.org/search.php?match=pmwiki|#]]^'%0a%0aThe groups are:%0a* gmane.comp.web.wiki.pmwiki.user%0a* gmane.comp.web.wiki.pmwiki.announce%0a* gmane.comp.web.wiki.pmwiki.user.de%0a +time=1246997130 Index: wikilib.d/PmWiki.IncludeOtherPages =================================================================== --- wikilib.d/PmWiki.IncludeOtherPages (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.IncludeOtherPages (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 -author=simon +version=pmwiki-2.2.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 +author=HansB charset=ISO-8859-1 -csum=adjust example -host=202.37.32.2 +csum=added section about using conditionals +host=80.41.216.53 name=PmWiki.IncludeOtherPages -rev=100 +rev=103 targets=PmWiki.Links,PmWiki.WikiGroup,PmWiki.PageTextVariables,PmWiki.ConditionalMarkup,PmWiki.PageVariables,Site.PageListTemplates,PmWiki.WikiStyles,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-%3c%25green%25Note%25font-size:small%25: [[Conditional Markup]] does not work with Include Other Pages or [[Page Text Variables]]. Pagetextvars don't honor [@(:if:)@]. This is the same way that doing [@(:include OtherPage#section:)@] doesn't look to see if [@[[#section]]@] is inside of an [@(:if:)...(:ifend:)@] construct of some sort.%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!! 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 PageName GroupName.Pagename:)@]%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[[#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%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=1241584858 +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%0a!! 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!! 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 PageName GroupName.Pagename:)@]%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[[#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%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=1247252067 Index: wikilib.d/PmWiki.Images =================================================================== --- wikilib.d/PmWiki.Images (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Images (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5 +author=simon charset=ISO-8859-1 -csum= -host=81.65.14.164 +csum=examples more specific +host=202.37.32.2 keywords=graphics, pictures, photos name=PmWiki.Images -rev=167 +rev=169 targets=PmWiki.DocumentationIndex,PmWiki.Links,PmWiki.Uploads,PmWiki.InterMap,PmWiki.WikiStyles -text=(:Summary:Placing images in pages:)%0aTo place an image into a page, enter the address (url) of the image into the markup text. %0aAny ''alternate text'' (used for tooltips and for browsers that do not display images) is placed in double quotes immediately following the image url.%0aA caption can follow separated by a vertical bar (|), and may include simple formatting%0a%0a(:markup:)%0ahttp://pmichaud.com/img/misc/pc.jpg"Paper clips" | [- %25newwin%25 [[ (Wikipedia:Paper_clips | Paper clips ]] are ''fun'' to work with. -]%0a(:markupend:)%0a%0aImages can also be specified as [[upload(s)]]ed files (i.e., [@Attach:image.jpeg@]) and using [[InterMap]] links. %0aBy default PmWiki supports the following image types:%0a(:include PmWiki/Uploads#imagetypes#imagetypesend:)%0a%25note%25 (See also [[PmWiki/Uploads]] and [[#notes|Notes]] below for image files that lack extensions.)%0a%0aTo create a [[link(s)]] to an image (like [[http://pmichaud.com/img/misc/pc.jpg]] as opposed to displaying the image itself), use double brackets to mark the link, as in [@[[http://pmichaud.com/img/misc/pc.jpg]]@] or [@[[Attach:image.jpeg]]@].%0a%0aTo have an image link to another location, use the image as the link text as in %0a(:markup:)%0a[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]|Visit '''PmWiki'''%0a(:markupend:)%0aor [@[[http://example.com|Attach:Groupname/image.jpeg]]@].%0a%0a[[#captions]]%0a!! Captions and floating images%0aA caption can be added to an image using a vertical brace and the caption text.%0a%0a(:markup class=horiz:)%0ahttp://pmichaud.com/img/misc/pc.jpg"Paper clips" | '''Figure 1'''%0a(:markupend:)%0a%0aNormally, images are displayed "in line" with the surrounding text. Use [@%25center%25@] to center an image. Use [@%25right%25@] to right-align an image.%0a%0a(:markup:)%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %25center%25http://pmichaud.com/img/misc/pc.jpg"Paper clips"%25%25%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. %25right%25 http://pmichaud.com/img/misc/gem.jpg%25%25%0a(:markupend:) %0a%0aTo left or right-align an image with text wrapping around it, use the [@%25lfloat%25@] or [@%25rfloat%25@] [[WikiStyles]]. %0a%0a(:markup:) [=%0a%25lfloat text-align=center margin-top=5px margin-right=25px margin-bottom=5px margin-left=25px%25 http://pmichaud.com/img/misc/gem.jpg | '''Rock on!'''%0a'''The image is left-aligned, with margins set; the caption is centered; the text wraps on the right side of the image.'''%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim%0aveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea%0acommodo consequat. %0a=]%0a%0aThe [@[[%3c%3c]]@] markup breaks floating text, and the text continues at the bottom of the image.%0a%0a(:markup:) [=%0a%25lfloat%25 http://pmichaud.com/img/misc/gem.jpg%0a'''The image is left-aligned, and the text wraps on the right side of the image. The text after the ''[@[[%3c%3c]]@]'' markup continues below the image.'''%0a[[%3c%3c]]%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %0a=]%0a%0aUse the [@%25lframe%25@] or [@%25rframe%25@] styles to float an image and place a frame around the image and its caption. The frame can be formatted via wikistyles:%0a%0a(:markup:) [=%0a%25rframe%25 http://pmichaud.com/img/misc/gem.jpg | '''Rock on!'''%0a'''The image is right-aligned, and the text wraps on the left side of the image.'''%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%0a%0a%25cframe width=100px bgcolor=lightblue border='3px solid red' padding=20px%25 http://pmichaud.com/img/misc/gem.jpg%0a%0aExample to show failure to fully apply width setting:-%0a%25cframe width=50px bgcolor=lightblue border='3px solid red' padding=20px%25 http://pmichaud.com/img/misc/gem.jpg%0a=]%0a%0aUse [@%25block rframe%25@] to set off multiple images and caption text to be stacked vertically in a right-floating frame.%0a%0a(:markup:) [=%0a%25block rframe width=300px%25http://pmichaud.com/img/misc/gem.jpg\\%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\\%0ahttp://pmichaud.com/img/misc/bubble.jpg\\%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%25%25%0a%0aText subsequent to the defined block wraps to the left of the frame. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%0a%0a=]%0a%0a!!Resizing images [[#resizing]]%0a%0aTo resize an image via wikistyles, use [@%25width=50px%25@] or [@%25height=50px%25@] in front of an image. The [@%25thumb%25@] wikistyle is a helpful shortcut for [@%25width=100px%25@].%0a%0a(:markup:) [=%0a%25width=50px%25 http://pmichaud.com/img/misc/bubble.jpg \%0a%25height=50px%25 http://pmichaud.com/img/misc/bubble.jpg \%0a%25thumb%25 http://pmichaud.com/img/misc/bubble.jpg%0a=]%0a%0aNote: Resizing an image via wikistyles only affects how it is displayed in a browser; it does not reduce the transfer size of the image itself - hence resizing via wikistyles is not an acceptable method of generating a page-full of images, or 'gallery'.%0a%0aIf you want a resized image within a link, you have to specify the size before the link as well as close it off with a [=%25%25=].%0a%0a(:markup:)%0a%25width=134 height=100%25[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]%25%25%0a(:markupend:)%0a%0aTo open the link in new window, you place [=%25newwin%25=] before the size specification.%0a%0a(:markup:)%0a%25newwin%25%25width=134 height=100%25[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]%25%25%0a(:markupend:)%0a%0aResized images using [@%25thumb%25@] can also be floated with frames, as well as made into links.%0a%0a(:markup:) %0a%25lframe thumb%25 [[http://pmichaud.com/img/misc/bubble.jpg | http://pmichaud.com/img/misc/bubble.jpg"Burst the bubble"]] | [-Bubble-]%0a%25lframe thumb%25 http://pmichaud.com/img/misc/pc.jpg"Clip the ticket" | [-Paper Clips-]%0a%25lframe thumb%25 [[DocumentationIndex | http://pmichaud.com/img/misc/gem.jpg"Visit the Documentation Index"]] | [[DocumentationIndex | [-Rock On-]]]%0a(:markupend:)%0a%0a[[#links]]%0a!!! Images as [[PmWiki/links]]%0aTo use an image as a link specify an image instead of text in the [[PmWiki/link(s)]] markup.%0a(:markup:)%0a[[PmWiki/Links | http://pmichaud.com/img/2003/atc-1.gif"Information about wiki links"]]%0a(:markupend:)%0a%0a[[#notes]]%0a!!!Notes%0a* '''An image file that lacks a correct extension''' can be displayed by addition of a "false" extension to the URL. For example, if the url is [@http://example.com/script/tux@], add a fake query string on the end with the desired extension (e.g., [@http://example.com/script/tux?format=.png@]). If query strings are unsuitable, a fragment identifier should work, e.g. [@http://example.com/script/tux#file.png@].%0a%0a* Relative width is possible by using percentages.%0a(:markup:)%0a%25width=10pct%25 http://pmichaud.com/img/misc/bubble.jpg \%0a%25height=30pct%25 http://pmichaud.com/img/misc/bubble.jpg %0a(:markupend:)%0a%0a* '''Flowing text is possible, like captions, within a frame'''%0a(:markup:)%0a>>lframe width=130px%3c%3c%0a%25thumb width=130%25 [[http://pmichaud.com/img/misc/bubble.jpg | http://pmichaud.com/img/misc/bubble.jpg"Burst the bubble"]] | [--Long caption for an image like [[http://pmichaud.com/img/misc/bubble.jpg | the bubble]]. This is just to show some text flowing within the frame.--]%0a>>%3c%3c%0a(:markupend:)%0a%0a%0a'''Unable to upload images?''' If you get messages telling you that the upload was not able to complete for some reason, here's something to check. If your web host has your web site%0a-> [=http://www.website.com=]%0awith username%0a-> ''username''%0athe system path (not http) to your website could be at%0a-> /home/users/~username/public_html%0aIf you have your wiki installed at what you think is the system's root directory%0a-> /pmwiki%0ayour system's path to the wiki uploads directory might actually be%0a-> /home/users/~username/public_html/pmwiki/uploads%0ainstead of the simpler%0a-> /pmwiki/uploads%0aThat's how I was able to get [[mine -> mailto:ispinn aatt gmail ddoott com]] working.%0a%0a!!!See also%0a* [[Cookbook:Images]] - adding image galleries, automatic thumbnails, background images and more. %0a%0a!!!Credits%0aThe images on this page were obtained from http://flickr.com and are redistributed under a Creative Commons License.%0a%0a(:keywords graphics, pictures, photos:)%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: Is it possible to link an image on PmWiki without using a fully qualified URL?%0aA: Yes. For images that are attachments, the general format is [@Attach:Groupname/image.gif@]. To link to an image that is on the same server, use [@Path:/path/to/image.gif@].%0a%0aQ: Can I attach a client image file on PmWiki?%0aA: Yes, see [[PmWiki/Uploads]] .%0a%0aQ: How can I include a page from another group that contains an attached image?%0aA: Include the page in the normal way, ie [@(:include GroupName.Pagename:)@]. In the page to be included (that contains the image) change [@Attach:filename.ext@] to [@Attach:{$Group}./filename.ext@]. %0a%0aQ: Why, if I put an image with rframe or rfloat and immediatly after that I open a new page section with ! the section title row is below the image instead of on the left side?%0aA: Because the CSS for '''headings''' such as ! contains an element '''clear:both''' which forces this behaviour. Redefine the CSS locally if you want to stop this happening, but I think the bottom border (that underlines the heading) would need further re-definition. I just use bolding for the title, and 4 dashes below [=-=]--- to separate a new section, and it saves the effort of fiddling with the core definitions.%0a%0aUnlike the '''lframe''' and '''rframe''' directives, '''cframe''' does not fully honour the width setting. While the frame itself resizes to match the request, the enclosed image does not, and retains its original width. Effect is the same in IE and Fx. I've added an example beneath the standard example above.%0a%0aQ: Is it possible to disallow all images? I already disabled uploads but I also want to disallow external images from being shown on my wiki pages.%0a%0aA: Yes, add to config.php [@DisableMarkup('img');%0a$ImgExtPattern = "$^";@]%0a%0aQ: How can I make it so that when I place an image in a page, the block of text it is in is a %3cp> (paragraph) rather than a %3cdiv> (division)?%0a%0aA: If you just want it to happen for a single image (instead of all), then%0atry putting [@[==]@] at the beginning of the line, as in:%0a%0a->[@[==] http://www.pmwiki.org/pub/pmwiki/pmwiki-32.gif@]%0a%0aHaving [@[==]@] at the beginning of a line forces whatever follows to%0abe part of a paragraph.%0a%0aQ: Is there any way to use relative paths for images?%0aA: See Cookbook:RelativeLinks and $EnableLinkPageRelative.%0a%0aQ: Is there a way to attach a BMP and have it display rather than link?%0aA: PmWiki supports @@.bmp@@ images out of the box. If you insist on using an uppercase extension see Cookbook:AddImageType.%0a%0aQ: Is there a way to have a table to the left or right of an image?%0aA: Yes, see [[(http://www.pmwiki.org/wiki/Test/)TableAndImage]].%0a -time=1242008793 +text=(:Summary:Placing images in pages:)%0aTo place an image into a page, enter the address (url) of the image into the markup text. %0aAny ''alternate text'' (used for tooltips and for browsers that do not display images) is placed in double quotes immediately following the image url.%0aA caption can follow separated by a vertical bar (|), and may include simple formatting%0a%0a(:markup:)%0ahttp://pmichaud.com/img/misc/pc.jpg"Paper clips" | [- %25newwin%25 [[ (Wikipedia:Paper_clips | Paper clips ]] are ''fun'' to work with. -]%0a(:markupend:)%0a%0aImages can also be specified as [[upload(s)]]ed files (i.e., [@Attach:image.jpeg@]) and using [[InterMap]] links. %0aBy default PmWiki supports the following image types:%0a(:include PmWiki/Uploads#imagetypes#imagetypesend:)%0a%25note%25 (See also [[PmWiki/Uploads]] and [[#notes|Notes]] below for image files that lack extensions.)%0a%0aTo create a [[link(s)]] to an image (like [[http://pmichaud.com/img/misc/pc.jpg]] as opposed to displaying the image itself), use double brackets to mark the link, as in [@[[http://pmichaud.com/img/misc/pc.jpg]]@] or [@[[Attach:image.jpeg]]@].%0a%0aTo have an image link to another location, use the image as the link text as in %0a(:markup:)%0a[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]|Visit '''PmWiki'''%0a(:markupend:)%0aor [@[[http://example.com|Attach:Groupname/image.jpeg]]@].%0a%0a[[#captions]]%0a!! Captions%0aA caption can be added to an image using a vertical brace and the caption text.%0a%0a(:markup class=horiz:)%0ahttp://pmichaud.com/img/misc/pc.jpg"Paper clips" | '''Figure 1'''%0a(:markupend:)%0a%0aA caption can be added to an image using a vertical brace and the caption text.%0aNormally, images are displayed "in line" with the surrounding text. Use [@%25center%25@] to center an image. Use [@%25right%25@] to right-align an image.%0a%0a(:markup:)%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %25center%25http://pmichaud.com/img/misc/pc.jpg"Paper clips"%25%25%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. %25right%25 http://pmichaud.com/img/misc/gem.jpg%25%25%0a(:markupend:) %0a%0a[[#floating]]%0a!! Floating images%0aTo left or right-align an image with text wrapping around it, use the [@%25lfloat%25@] or [@%25rfloat%25@] [[wiki styles]]. %0a%0a(:markup:)%0a%25lfloat text-align=center margin-top=5px margin-right=25px margin-bottom=5px margin-left=25px%25 http://pmichaud.com/img/misc/gem.jpg | '''Rock on!'''%0a'''The image is left-aligned, with margins set; the caption is centered; the text wraps on the right side of the image.'''%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim%0aveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea%0acommodo consequat. %0a(:markupend:)%0a%0aThe [@[[%3c%3c]]@] markup breaks floating text, and the text continues at the bottom of the image.%0a%0a(:markup:) %0a%25lfloat%25 http://pmichaud.com/img/misc/gem.jpg%0a'''The image is left-aligned, and the text wraps on the right side of the image. The text after the ''[@[[%3c%3c]]@]'' markup continues below the image.'''%0a[[%3c%3c]]%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %0a(:markupend:)%0a%0aUse the [@%25lframe%25@] or [@%25rframe%25@] styles to float an image and place a frame around the image and its caption. The frame can be formatted via wikistyles:%0a%0a(:markup:) %0a%25rframe%25 http://pmichaud.com/img/misc/gem.jpg | '''Rock on!'''%0a'''The image is right-aligned, and the text wraps on the left side of the image.'''%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%0a%0a%25cframe width=100px bgcolor=lightblue border='3px solid red' padding=20px%25 http://pmichaud.com/img/misc/gem.jpg%0a%0aExample to show failure to fully apply width setting:-%0a%25cframe width=50px bgcolor=lightblue border='3px solid red' padding=20px%25 http://pmichaud.com/img/misc/gem.jpg%0a(:markupend:)%0a%0aUse [@%25block rframe%25@] to set off multiple images and caption text to be stacked vertically in a right-floating frame.%0a%0a(:markup:) %0a%25block rframe width=300px%25http://pmichaud.com/img/misc/gem.jpg\\%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\\%0ahttp://pmichaud.com/img/misc/bubble.jpg\\%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%25%25%0a%0aText subsequent to the defined block wraps to the left of the frame. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%0a(:markupend:)%0a%0a!!Resizing images [[#resizing]]%0a%0aTo resize an image via wikistyles, use [@%25width=50px%25@] or [@%25height=50px%25@] in front of an image. The [@%25thumb%25@] wikistyle is a helpful shortcut for [@%25width=100px%25@].%0a%0a(:markup:)%0a%25width=50px%25 http://pmichaud.com/img/misc/bubble.jpg \%0a%25height=50px%25 http://pmichaud.com/img/misc/bubble.jpg \%0a%25thumb%25 http://pmichaud.com/img/misc/bubble.jpg%0a(:markupend:)%0a%0aNote: Resizing an image via wikistyles only affects how it is displayed in a browser; it does not reduce the transfer size of the image itself - hence resizing via wikistyles is not an acceptable method of generating a page-full of images, or 'gallery'.%0a%0aIf you want a resized image within a link, you have to specify the size before the link as well as close it off with a [=%25%25=].%0a%0a(:markup:)%0a%25width=60%25[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]%25%25 \%0a%25height=60%25[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]%25%25 \%0a(:markupend:)%0a%0aTo open the link in new window, you place [=%25newwin%25=] before the size specification.%0a%0a(:markup:)%0a%25newwin%25[[http://pmwiki.org/ | http://pmichaud.com/img/misc/pc.jpg"PmWiki"]]%25%25%0a(:markupend:)%0a%0aResized images using [@%25thumb%25@] can also be floated with frames, as well as made into links.%0a%0a(:markup:) %0a%25lframe thumb%25 [[http://pmichaud.com/img/misc/bubble.jpg | http://pmichaud.com/img/misc/bubble.jpg"Burst the bubble"]] | [-Bubble-]%0a%25lframe thumb%25 http://pmichaud.com/img/misc/pc.jpg"Clip the ticket" | [-Paper Clips-]%0a%25lframe thumb%25 [[DocumentationIndex | http://pmichaud.com/img/misc/gem.jpg"Visit the Documentation Index"]] | [[DocumentationIndex | [-Rock On-]]]%0a(:markupend:)%0a%0a[[#links]]%0a!!! Images as [[PmWiki/links]]%0aTo use an image as a link specify an image instead of text in the [[PmWiki/link(s)]] markup.%0a(:markup:)%0a[[PmWiki/Links | http://pmichaud.com/img/2003/atc-1.gif"Information about wiki links"]]%0a(:markupend:)%0a%0a[[#notes]]%0a!!!Notes%0a* '''An image file that lacks a correct extension''' can be displayed by addition of a "false" extension to the URL. For example, if the url is [@http://example.com/script/tux@], add a fake query string on the end with the desired extension (e.g., [@http://example.com/script/tux?format=.png@]). If query strings are unsuitable, a fragment identifier should work, e.g. [@http://example.com/script/tux#file.png@].%0a%0a* Relative width is possible by using percentages.%0a(:markup:)%0a%25width=10pct%25 http://pmichaud.com/img/misc/bubble.jpg \%0a%25height=30pct%25 http://pmichaud.com/img/misc/bubble.jpg %0a(:markupend:)%0a%0a* '''Flowing text is possible, like captions, within a frame'''%0a(:markup:)%0a>>lframe width=130px%3c%3c%0a%25thumb width=130%25 [[http://pmichaud.com/img/misc/bubble.jpg | http://pmichaud.com/img/misc/bubble.jpg"Burst the bubble"]] | [--Long caption for an image like [[http://pmichaud.com/img/misc/bubble.jpg | the bubble]]. This is just to show some text flowing within the frame.--]%0a>>%3c%3c%0a(:markupend:)%0a%0a%0a'''Unable to upload images?''' If you get messages telling you that the upload was not able to complete for some reason, here's something to check. If your web host has your web site%0a-> [=http://www.website.com=]%0awith username%0a-> ''username''%0athe system path (not http) to your website could be at%0a-> /home/users/~username/public_html%0aIf you have your wiki installed at what you think is the system's root directory%0a-> /pmwiki%0ayour system's path to the wiki uploads directory might actually be%0a-> /home/users/~username/public_html/pmwiki/uploads%0ainstead of the simpler%0a-> /pmwiki/uploads%0aThat's how I was able to get [[mine -> mailto:ispinn aatt gmail ddoott com]] working.%0a%0a!!!See also%0a* [[Cookbook:Images]] - adding image galleries, automatic thumbnails, background images and more. %0a%0a!!!Credits%0aThe images on this page were obtained from http://flickr.com and are redistributed under a Creative Commons License.%0a%0a(:keywords graphics, pictures, photos:)%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: Is it possible to link an image on PmWiki without using a fully qualified URL?%0aA: Yes. For images that are attachments, the general format is [@Attach:Groupname/image.gif@]. To link to an image that is on the same server, use [@Path:/path/to/image.gif@].%0a%0aQ: Can I attach a client image file on PmWiki?%0aA: Yes, see [[PmWiki/Uploads]] .%0a%0aQ: How can I include a page from another group that contains an attached image?%0aA: Include the page in the normal way, ie [@(:include GroupName.Pagename:)@]. In the page to be included (that contains the image) change [@Attach:filename.ext@] to [@Attach:{$Group}./filename.ext@]. %0a%0aQ: Why, if I put an image with rframe or rfloat and immediatly after that I open a new page section with ! the section title row is below the image instead of on the left side?%0aA: Because the CSS for '''headings''' such as ! contains an element '''clear:both''' which forces this behaviour. Redefine the CSS locally if you want to stop this happening, but I think the bottom border (that underlines the heading) would need further re-definition. I just use bolding for the title, and 4 dashes below [=-=]--- to separate a new section, and it saves the effort of fiddling with the core definitions.%0a%0aUnlike the '''lframe''' and '''rframe''' directives, '''cframe''' does not fully honour the width setting. While the frame itself resizes to match the request, the enclosed image does not, and retains its original width. Effect is the same in IE and Fx. I've added an example beneath the standard example above.%0a%0aQ: Is it possible to disallow all images? I already disabled uploads but I also want to disallow external images from being shown on my wiki pages.%0a%0aA: Yes, add to config.php [@DisableMarkup('img');%0a$ImgExtPattern = "$^";@]%0a%0aQ: How can I make it so that when I place an image in a page, the block of text it is in is a %3cp> (paragraph) rather than a %3cdiv> (division)?%0a%0aA: If you just want it to happen for a single image (instead of all), then%0atry putting [@[==]@] at the beginning of the line, as in:%0a%0a->[@[==] http://www.pmwiki.org/pub/pmwiki/pmwiki-32.gif@]%0a%0aHaving [@[==]@] at the beginning of a line forces whatever follows to%0abe part of a paragraph.%0a%0aQ: Is there any way to use relative paths for images?%0aA: See Cookbook:RelativeLinks and $EnableLinkPageRelative.%0a%0aQ: Is there a way to attach a BMP and have it display rather than link?%0aA: PmWiki supports @@.bmp@@ images out of the box. If you insist on using an uppercase extension see Cookbook:AddImageType.%0a%0aQ: Is there a way to have a table to the left or right of an image?%0aA: Yes, see [[(http://www.pmwiki.org/wiki/Test/)TableAndImage]].%0a +time=1247435876 Index: wikilib.d/PmWiki.LocalCustomizations =================================================================== --- wikilib.d/PmWiki.LocalCustomizations (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.LocalCustomizations (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.12 +author=Scott Connard charset=ISO-8859-1 -csum=refactored +each part is not required -host=81.65.14.164 +csum=grammar +host=66.173.252.56 name=PmWiki.LocalCustomizations -rev=47 +rev=50 targets=PmWiki.PerGroupCustomizations,PmWiki.WikiAdministrator,PmWiki.PmWikiPhilosophy,PmWiki.Variables,PmWiki.DocumentationIndex,PmWiki.Skins,PmWiki.Internationalizations,PmWiki.CustomMarkup,PmWiki.CustomInterMap,PmWiki.InterMap,PmWiki.MailingLists,PmWiki.Upgrades,Site.PageNotFound -text=(:Summary:Customize your PmWiki installation through @@config.php@@ and @@local.css@@:)%0aA [[Wiki Administrator]] can make a lot of customizations simply by setting variables in the ''/local/config.php'' and defining cascading style sheets in ''/pub/css/local.css'' files. Any group or page can also have [[PerGroupCustomizations|its own configuration file and configuration css file]].%0a%0aFrom its inception, PmWiki has been designed so that [[Wiki Administrator]]s can greatly customize the way PmWiki displays pages and the markup sequences used to generate pages. (This is even mentioned explicitly in [[PmWiki Philosophy]] #4.) As a result, the core ''pmwiki.php'' script makes extensive use of [[PmWiki.Variables]] to determine how markup sequences will be processed and what each individual page will output.%0a%0aThe bulk of this page describes how customizations work in general, see [[PmWiki.Documentation Index]] for specific customizations that are commonly performed at many PmWiki installations, including:%0a%0a* [[Skins]] - {Skins$:Summary}%0a* [[Internationalizations]] - {Internationalizations$:Summary}%0a* [[Custom Markup]] - {CustomMarkup$:Summary}%0a* [[Custom InterMap]]s - {CustomInterMap$:Summary}%0a%0aThe simplest type of customization is merely setting a variable to 1 (or TRUE). Here's an example that enables ?action=diag and ?action=phpinfo actions:%0a%0a->[@$EnableDiag = 1;@]%0a%0aYou can begin a line with a "#" (an octothorpe, a.k.a. a hash symbol or pound sign) to add a comment. Additionally, some built-in PmWiki variables take values other than 1 or 0 (true or false). Here's another example that customizes the wiki's behavior with respect to search engine web robots (see [[Cookbook:ControllingWebRobots]]):%0a%0a->[@%0a# Remove the default "rel='nofollow'" attribute for external links.%0a$UrlLinkFmt = "%3ca class='urllink' href='\$LinkUrl'>\$LinkText%3c/a>";%0a@]%0a%0aThe ''scripts/'' subdirectory (below the directory holding the ''pmwiki.php'' script) has many customizations.%0aThe PmWiki [[(Cookbook:)Cookbook]] contains many example customizations (recipes) that you can download into the ''cookbook/'' subdirectory,%0aThe first few lines of each of these scripts generally contain instructions about how to enable (and use) the feature provided by the script.%0a%0aThese customizations are included in your ''config.php'' site configuration. For most scripts this is done by simply adding lines like:%0a->[@include_once("cookbook/recipefile.php");@]%0aand%0a->[@include_once("scripts/scriptfile.php");@]%0aat the end of the ''config.php'' file to enable them. %0a%0aSome of the scripts are automatically enabled for you via the ''scripts/stdconfig.php'' script unless you disable it by setting @@$EnableStdConfig=0;@@ in ''local/config.php''.%0a%0aNote that you should strongly resist the temptation to directly modify the ''pmwiki.php'' script or the files in the ''scripts/'' subdirectory. Any modifications you make to these files will probably be overwritten whenever you perform a [[PmWiki.Upgrade(s)]]. Instead, look at some of the sample scripts for examples of customizations that can be performed from ''config.php''. You can even create your own script to do a customization and use @@include_once(...)@@ to include it from ''config.php''. If you do make your own customization script, you can safely put it in the ''cookbook/'' subdirectory--it won't get overwritten by an upgrade there. You might also want to submit your customization to the [[MailingLists|pmwiki-users mailing list]] or the [[(Cookbook:)Cookbook]] so that others can benefit from your effort and so that it can perhaps be included in future releases of PmWiki.%0a%0a>>faq%3c%3c [[#faq]]%0aQ: There's no "config.php"; it's not even clear what a "local customisation file" is!%0aA: The "sample-config.php" file in the "docs" folder, is given as an example. Copy it to the "local" folder and rename it to "config.php". You can then remove the "#" symbols or add other commands shown in the documentation. See also [[PerGroup Customizations]].%0a%0aQ: Can I change the default page something other than Main.HomePage ($DefaultPage)?%0aA: Yes, just set the $DefaultPage variable to the name of the page you want to be the default. You might also look at the $DefaultGroup and $DefaultName configuration variables.%0a%0a->[@$DefaultPage = 'ABC.StartPage';@]%0a%0aQ: How do I get the group / page name in a local configuration file (e.g. ''local/config.php'')?%0aA: Use the following markup in pmwiki-2.1.beta21 or newer:%0a%0a->[@%0a## Get the group and page name%0a$pagename = ResolvePageName($pagename);%0a$page = PageVar($pagename, '$FullName');%0a$group = PageVar($pagename, '$Group');%0a$name = PageVar($pagename, '$Name');%0a@]%0a%0a%0aQ: Can I remove items from the wikilib.d folder on my site?%0aA: Yes, the files in ''wikilib.d/'' can be safely removed. They'll reappear again when you upgrade, however.%0a%0a%0aQ: How do I customize my own 404 error page for non-existent pages?%0aA: To change the text of the message, try editing the [[Site.PageNotFound]] page.%0a%0aQ: Is the order of customizations in config.php important? Are their certain things that should come before or after others in that file?%0aA: Yes, the following has been recommended on the mailing list:%0a%0a* first define any custom PageStore class, like SQLite, CompressedPageStore or PerGroupSubDirectories,%0a* next include_once scripts/xlpage-utf-8.php,%0a* next call XLPage() which needs the definitive (rw) $WikiDir already set in order to find the wiki page containing the translations,%0a* next include any other scripts and recipes.%0a%0a''Note, each part is '''not''' required, but if your wiki needs it, this is the recommended order in config.php.'' -time=1240660813 +text=(:Summary:Customize your PmWiki installation through @@config.php@@ and @@local.css@@:)%0aA [[Wiki Administrator]] can make a lot of customizations simply by setting variables in the ''/local/config.php'' and defining cascading style sheets in ''/pub/css/local.css'' files. Any group or page can also have [[PerGroupCustomizations|its own configuration file and configuration css file]].%0a%0aFrom its inception, PmWiki has been designed so that [[Wiki Administrator]]s can greatly customize the way PmWiki displays pages and the markup sequences used to generate pages. (This is even mentioned explicitly in [[PmWiki Philosophy]] #4.) As a result, the core ''pmwiki.php'' script makes extensive use of [[PmWiki.Variables]] to determine how markup sequences will be processed and what each individual page will output.%0a%0aThe bulk of this page describes how customizations work in general, see [[PmWiki.Documentation Index]] for specific customizations that are commonly performed at many PmWiki installations, including:%0a%0a* [[Skins]] - {Skins$:Summary}%0a* [[Internationalizations]] - {Internationalizations$:Summary}%0a* [[Custom Markup]] - {CustomMarkup$:Summary}%0a* [[Custom InterMap]]s - {CustomInterMap$:Summary}%0a%0aThe simplest type of customization is merely setting a variable to 1 (or TRUE). Here's an example that enables ?action=diag and ?action=phpinfo actions:%0a%0a->[@$EnableDiag = 1;@]%0a%0aYou can begin a line with a "#" (an octothorpe, a.k.a. a hash symbol or pound sign) to add a comment. Additionally, some built-in PmWiki variables take values other than 1 or 0 (true or false). Here's another example that customizes the wiki's behavior with respect to search engine web robots (see [[Cookbook:ControllingWebRobots]]):%0a%0a->[@%0a# Remove the default "rel='nofollow'" attribute for external links.%0a$UrlLinkFmt = "%3ca class='urllink' href='\$LinkUrl'>\$LinkText%3c/a>";%0a@]%0a%0aThe ''scripts/'' subdirectory (below the directory holding the ''pmwiki.php'' script) has many customizations.%0aThe PmWiki [[(Cookbook:)Cookbook]] contains many example customizations (recipes) that you can download into the ''cookbook/'' subdirectory,%0aThe first few lines of each of these scripts generally contain instructions about how to enable (and use) the feature provided by the script.%0a%0aThese customizations are included in your ''config.php'' site configuration. For most scripts this is done by simply adding lines like:%0a->[@include_once("cookbook/recipefile.php");@]%0aand%0a->[@include_once("scripts/scriptfile.php");@]%0aat the end of the ''config.php'' file to enable them. %0a%0aSome of the scripts are automatically enabled for you via the ''scripts/stdconfig.php'' script unless you disable it by setting @@$EnableStdConfig=0;@@ in ''local/config.php''.%0a%0aNote that you should strongly resist the temptation to directly modify the ''pmwiki.php'' script or the files in the ''scripts/'' subdirectory. Any modifications you make to these files will probably be overwritten whenever you perform a [[PmWiki.Upgrade(s)]]. Instead, look at some of the sample scripts for examples of customizations that can be performed from ''config.php''. You can even create your own script to do a customization and use @@include_once(...)@@ to include it from ''config.php''. If you do make your own customization script, you can safely put it in the ''cookbook/'' subdirectory--it won't get overwritten by an upgrade there. You might also want to submit your customization to the [[MailingLists|pmwiki-users mailing list]] or the [[(Cookbook:)Cookbook]] so that others can benefit from your effort and so that it can perhaps be included in future releases of PmWiki.%0a%0a>>faq%3c%3c [[#faq]]%0aQ: There's no "config.php"; it's not even clear what a "local customisation file" is!%0aA: The "sample-config.php" file in the "docs" folder, is given as an example. Copy it to the "local" folder and rename it to "config.php". You can then remove the "#" symbols or add other commands shown in the documentation. See also [[PerGroup Customizations]].%0a%0aQ: Can I change the default page something other than Main.HomePage ($DefaultPage)?%0aA: Yes, just set the $DefaultPage variable to the name of the page you want to be the default. You might also look at the $DefaultGroup and $DefaultName configuration variables.%0a%0a->[@$DefaultPage = 'ABC.StartPage';@]%0a%0aQ: How do I get the group / page name in a local configuration file (e.g. ''local/config.php'')?%0aA: Use the following markup in pmwiki-2.1.beta21 or newer:%0a%0a->[@%0a## Get the group and page name%0a$pagename = ResolvePageName($pagename);%0a$page = PageVar($pagename, '$FullName');%0a$group = PageVar($pagename, '$Group');%0a$name = PageVar($pagename, '$Name');%0a@]%0a%0a%0aQ: Can I remove items from the wikilib.d folder on my site?%0aA: Yes, the files in ''wikilib.d/'' can be safely removed. They'll reappear again when you upgrade, however.%0a%0a%0aQ: How do I customize my own 404 error page for non-existent pages?%0aA: To change the text of the message, try editing the [[Site.PageNotFound]] page.%0a%0aQ: [[#configphp-order]] Is the order of customizations in config.php important? Are there certain things that should come before or after others in that file?%0aA: Yes, the following has been recommended on the mailing list:%0a%0a* first define any custom PageStore class, like SQLite, CompressedPageStore or PerGroupSubDirectories,%0a* next include_once scripts/xlpage-utf-8.php,%0a* next call XLPage() which needs the definitive (rw) $WikiDir already set in order to find the wiki page containing the translations,%0a* next include authuser.php (if needed), because PmWiki caches some group and page authorization levels when a page is accessed,%0a* next include any other scripts and recipes,%0a* any direct function call in config.php, like ResolvePageName(), PageTextVar(), PageVar(), RetrieveAuthPage(), or others, if possible, should be done near the end of config.php.%0a%0a''Note, each part is '''not''' required, but if your wiki needs it, this is the recommended order in config.php.'' +time=1247061104 Index: wikilib.d/PmWiki.WikiStyles =================================================================== --- wikilib.d/PmWiki.WikiStyles (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.WikiStyles (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20080703 Mandriva/2.0.0.19-1.1mdv2008.1 (2008.1) Firefox/2.0.0.19 -author=nikos papadopoulos +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 charset=ISO-8859-1 -csum=removed the "commands within commands" from the example, as to make it less confusing to new users -host=94.67.227.2 +csum=fix link +host=81.65.14.164 name=PmWiki.WikiStyles post= Save -rev=179 -targets=PmWiki.WikiStyles,PmWiki.WikiWord,PmWiki.WikiStyleColors,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.GroupHeaders,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.CustomWikiStyles,PmWiki.WikiStyleExamples,PmWiki.TextFormattingRules -text=(:Summary: Modifying the style of page contents:)%0a(:div class='rfloat frame' style='clear:right; font-size:small;':)%0a'''Contents'''%0a*[[#Basics|Basics]]%0a*[[#Scopes|Scopes]]%0a*[[#Attributes|Attributes]]%0a*[[#Styles|Enabling Styles]]%0a*[[#Shortcuts|Custom style shortcuts]]%0a*[[#predefined|Predefined Style Shortcuts]]%0a*[[#Examples|Examples]]%0a*[[#KnownIssues|Known Issues]]%0a*[[#SeeAlso|See Also]]%0a(:divend:)%0a(:Audience: authors (basic) :)%0a%0a[[#Basics]]%0a!! Wiki style basics%0a%0a[[Wiki styles]] allow authors to modify the color and other styling attributes of a page's contents. %0aA wikistyle is written using percent-signs, as in %25red%25[@%25red%25@]%25%25 or %25bgcolor=lightblue%25[@%25bgcolor=lightblue%25@]%25%25.%0a%0a!!! Text color and font%0aThe most basic use of wiki styles is to change text attributes such as color, background color, and font. %0aPmWiki defines several wikistyles for changing the text color to [=%25black%25, %25white%25, %25red%25, %25yellow%25, %25blue%25, %25gray%25, %25silver%25, %25maroon%25, %25green%25, %25navy%25, and %25purple%25=].%0a%0a(:markup class=horiz:)%0aThe basket contains %25red%25 apples, %25blue%25 blueberries, %25purple%25 eggplant, %25green%25 limes, %25%25 and more.%0a(:markupend:)%0a%0aFor colors other than the predefined colors, use the [@%25color=...%25@] wikistyle. (Note: RGB colors (#rrggbb) should always be specified with lowercase letters to avoid [[WikiWord]] conflicts.)%0a%0a(:markup class=horiz:)%0aI'd like to have some %25color=#ff7f00%25 tangerines%25%25, too!%0a(:markupend:)%0a%0aTo change the background color, use [@%25bgcolor=...%25@] as a wikistyle:%0a%0a%0a(:markup class=horiz:)%0aThis sentence contains %25bgcolor=green yellow%25 yellow text on a green background.%0a(:markupend:)%0a%0aSee [[PmWiki/Wiki Style Colors]] for more color help.%0a%0a!!!Text justification%0aStyles are used to control the text justification%0a%0a(:markup class=horiz:)%0a%25center%25 This text is centered. %0a%0a%25right%25 Right justified.%0a(:markupend:)%0a%0aand to create floating text:%0a%0a(:markup class=horiz:)%0a%25rfloat%25 This text floats to the right%0a%0a%25rframe%25 floats to the right with a frame%0a%0aLorem ipsum dolor sit amet, consectetuer sadipscing elitr%0a(:markupend:)%0a%0a%0a[[#Scopes]]%0a!! Scopes%0a%0aWikistyles can also specify a ''scope''; with no scope, the style is applied to any text that follows up to the next wikistyle specification or the end of the paragraph, whichever comes first. The '''apply=''' attribute and its shortcuts allow to change the scope as follows:%0a%0a||border=1 cellpadding=3 cellspacing=0%0a||apply attribute ||shortcut ||style applies to... ||%0a||[@%25apply=img ...%25@] ||- ||any image that ''follows''||%0a||[@%25apply=p ...%25@] ||[@%25p ...%25@] ||the current paragraph||%0a||[@%25apply=pre ...%25@] ||- ||the current preformatted text||%0a||[@%25apply=list ...%25@] ||[@%25list ...%25@] ||the current list||%0a||[@%25apply=item ...%25@] ||[@%25item ...%25@] ||the current list item||%0a||[@%25apply=div ...%25@] ||- ||the current div||%0a||[@%25apply=block ...%25@] ||[@%25block ...%25@] ||to the current block, whether it's a paragraph, list, list item, heading, or division.||%0a%0athus '''[@%25p color=blue%25@]''' is the same as '''[@%25apply=p color=blue%25@]''', and '''[@%25list ROMAN%25@]''' is the same as '''[@%25apply=list list-style=upper-roman%25@]'''.%0a%0aSome [[#predefined|predefined style shortcuts]] also make use of apply, thus '''[@%25right%25@]''' is a shortcut for '''[@%25text-align=right apply=block%25@]'''.%0a%0aExample: Apply a style to a paragraph:%0a(:markup:)%0a%25p bgcolor=#ffeeee%25 The wikistyle specification at the beginning of this line applies to the entire paragraph, even if there are %25blue%25 other wikistyle specifications %25%25 in the middle of the paragraph.%0a(:markupend:)%0a%0aWiki styles can also be applied to [[PmWiki/tables]] and [[PmWiki/table directives]]:%0a(:markup class=horiz:)%0a||class="green" style="font-style:italic; border:1px solid blue; background-color:#ffffcc"%0a||Everything after the above line is styled with green italic text, ||%0a|| ||%0a||This includes ||%0a|| preformatted text ||%0a||* lists ||%0a||-> indented items ||%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a(:table class="green" style="font-style:italic; border:1px solid blue; background-color:#ffffcc":)%0a(:cellnr:)%0aEverything after the above line is styled with green italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a(:tableend:)%0a(:markupend:)%0a%0a%0aThe '''[@>>style%3c%3c@]''' block can be used to apply a wikistyle to a large block of items. %0aThe style is applied until the next [@>>%3c%3c@] is encountered.%0a%0a(:markup class=horiz:)%0a>>blue font-style:italic bgcolor=#ffffcc%3c%3c%0aEverything after the above line is styled with blue italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a>>%3c%3c%0a(:markupend:)%0a%0aThe '''[@(:div style:)@]''' works in ''almost'' the same way as [@>>style%3c%3c@],%0abut the style information is encapsulated in a @@style=""@@ attribute and nested div blocks are possible.%0a(:markup class=horiz:)%0a(:div class="green" style="font-style:italic; border:1px solid blue; background-color:#ffffcc":)%0aEverything after the above line is styled with green italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a(:divend:)%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a(:div1 style="font-style:italic; background-color:#ffffcc":)%0aouter style%0a(:div2 style="color:red; background-color:lightblue":)%0anested style%0a(:div2end:)%0aagain outer style%0a(:div1end:)%0a(:markupend:)%0a%0a%0a'''Caveat''': An applied wikistyle will only take effect if it's on the%0aline that starts the thing it's supposed to modify. In other%0awords, a wikistyle in the third markup line of a paragraph%0acan't change the attributes of the paragraph:%0a%0a(:markup class=horiz:) %0aafter the first line of the paragraph,%0awe try to %25apply=p color=blue%25 change color.%0aThis does't work because the style comes%0a(:markupend:)%0a%0a(:markup class=horiz:)%0aHowever, this %25p color=red%25 paragraph%0a''will'' be in red because its block style does%0aoccur in the first line of its text.%0a(:markupend:)%0a%0a(:markup class=horiz:) %0a* Here's a list item%0a* %25list red%25 Oops, too late to affect the list!%0a(:markupend:)%0a%0a%0a[[#Attributes]]%0a!! Wikistyle attributes%0a%0aThe style attributes recognized within a wikistyle specification are:%0a%0a ------------ CSS ------------- --HTML--%0a color bgcolor class %0a background-color margin id%0a text-align padding hspace%0a text-decoration border vspace%0a font-size float target%0a font-family list-style rel%0a font-weight width* accesskey%0a font-style height* value%0a display%0a%0a Special: define, apply%0a%0aThe attributes in the first two columns correspond to the ''[[cascading style sheet -> http://blooberry.com/indexdot/css/propindex/all.htm]]'' (CSS) properties of the same name. The attributes in the last column apply only to specific items:%0a%0a* '''[@class=@]''' and '''[@id=@]''' assign a CSS class or identifier to an HTML element%0a* '''[@target=name@]''' opens links that follow in a browser window called "name"%0a* '''[@rel=name@]''' in a link identifies the relationship of a target page%0a* '''[@accesskey=x@]''' uses 'x' as a shortcut key for the link that follows%0a* '''[@value=9@]''' sets the number of the current ordered list item%0a%0a[=*=] The width and height attributes have asterisks because they are handled specially for %3cimg .../> tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the wikistyle), then they set the 'width=' and 'height=' attributes of any %3cimg ... /> tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled.%0a%0a[[#Styles]]%0a!! Enabling Styles%0aStyles not listed above can be enabled by a PmWiki Administrator by modifying the local/config.php file. %0aFor instance to enable the "line-height" style attribute add the line %0a%0a->$WikiStyleCSS[] = 'line-height';%0a%0ato the local/config.php file.%0a%0a[[#Shortcuts]]%0a!! Custom style shortcuts%0a%0aThe '''[@define=@]''' attribute can be used to assign a shorthand name to any wikistyle specification.\\ %0aThis shorthand name can then be reused in later wikistyle specifications.%0a%0a(:markup class=horiz:)%0a%25define=box block bgcolor=#ddddff border="2px dotted blue"%25%0a%0a%25box%25 [@some sort of text@]%0a%0a%25box font-weight=bold color=green%25 [@some sort of text@]%0a(:markupend:)%0a%0a-%3c '''Tip:''' It's often a good idea to put common style definitions into [[Group Header(s)]] pages so that they can be shared among multiple pages in a group. Or, the [[wiki administrator]] can predefine styles site-wide as a [[local customization(s)]] (see [[Custom Wiki Styles]]).%0a%0a-%3c '''Tip:''' Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set [@%25define=warn green%25@] and then use [@%25warn%25@] instead of [@%25green%25@] in the document. Then, if you later decide that warnings should be styled differently, it's much easier to change the (one) definition than many occurrences of [@%25green%25@] in the text.%0a%0a-%3c '''Tip:''' Any undefined WikiStyle is automatically treated as a request for a class, thus [@%25pre%25@] is the same as saying [@%25class=pre%25@].%0a%0a!![[#predefined]] Predefined style shortcuts%0a%0aPmWiki defines a number of style shortcuts.%0a%0a* Text colors: %25black%25black%25%25, %25white bgcolor=black%25white%25%25, %25red%25red%25%25, %25yellow%25yellow%25%25, %25blue%25blue%25%25, %25gray%25gray%25%25, %25silver%25silver%25%25, %25maroon%25maroon%25%25, %25green%25green%25%25, %25navy%25navy%25%25, %25purple%25purple%25%25 (shortcut for [@%25color=...%25@])%0a* Justification: [@%25center%25@] and [@%25right%25@]%0a* Images and boxes%0a** Floating left or right: [@%25rfloat%25@] and [@%25lfloat%25@]%0a** Framed items: [@%25frame%25@], [@%25rframe%25@], and [@%25lframe%25@]%0a** Thumbnail sizing: [@%25thumb%25@]%0a* Open link in new window: [@%25newwin%25@] (shortcut for [@%25target=_blank%25@])%0a* Comments: [@%25comment%25@] (shortcut for [@%25display=none%25@])%0a* Ordered lists: [@%25decimal%25@], [@%25roman%25@], [@%25ROMAN%25@], [@%25alpha%25@], [@%25ALPHA%25@] (see also Cookbook:OutlineLists)%0a%0a[[#Examples]]%0a!! Examples%0a%0a[[Wiki Style Examples]] contains a number of examples of ways to use wikistyles in pages.%0a%0a[[#KnownIssues]]%0a!! Known Issues%0a* Percents in style definitions (like: [@%25block width=50%25 %25@]) require the use of "pct" instead of "%25".%0a* If you specify multiple values for an attribute, like @@border="2px solid blue"@@ make sure you place the values in quotes.%0a* Be sure to use lowercase letters for red-green-blue hex colors, [@%25color=#aa3333%25@] will work, [@%25color=#AA3333%25@] may not.%0a%0a[[#SeeAlso]]%0a!!See Also%0a* [[PmWiki/Custom Wiki Styles]] {PmWiki/CustomWikiStyles$:Summary}%0a* [[PmWiki:List Styles]] {PmWiki/ListStyles$:Summary}%0a%0a>>faq%3c%3c [[#faq]]%0aQ: %0aA:%0a -time=1238929241 +rev=180 +targets=PmWiki.WikiStyles,PmWiki.WikiWord,PmWiki.Tables,PmWiki.TableDirectives,PmWiki.GroupHeaders,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.CustomWikiStyles,PmWiki.WikiStyleExamples,PmWiki.TextFormattingRules +text=(:Summary: Modifying the style of page contents:)%0a(:div class='rfloat frame' style='clear:right; font-size:small;':)%0a'''Contents'''%0a*[[#Basics|Basics]]%0a*[[#Scopes|Scopes]]%0a*[[#Attributes|Attributes]]%0a*[[#Styles|Enabling Styles]]%0a*[[#Shortcuts|Custom style shortcuts]]%0a*[[#predefined|Predefined Style Shortcuts]]%0a*[[#Examples|Examples]]%0a*[[#KnownIssues|Known Issues]]%0a*[[#SeeAlso|See Also]]%0a(:divend:)%0a(:Audience: authors (basic) :)%0a%0a[[#Basics]]%0a!! Wiki style basics%0a%0a[[Wiki styles]] allow authors to modify the color and other styling attributes of a page's contents. %0aA wikistyle is written using percent-signs, as in %25red%25[@%25red%25@]%25%25 or %25bgcolor=lightblue%25[@%25bgcolor=lightblue%25@]%25%25.%0a%0a!!! Text color and font%0aThe most basic use of wiki styles is to change text attributes such as color, background color, and font. %0aPmWiki defines several wikistyles for changing the text color to [=%25black%25, %25white%25, %25red%25, %25yellow%25, %25blue%25, %25gray%25, %25silver%25, %25maroon%25, %25green%25, %25navy%25, and %25purple%25=].%0a%0a(:markup class=horiz:)%0aThe basket contains %25red%25 apples, %25blue%25 blueberries, %25purple%25 eggplant, %25green%25 limes, %25%25 and more.%0a(:markupend:)%0a%0aFor colors other than the predefined colors, use the [@%25color=...%25@] wikistyle. (Note: RGB colors (#rrggbb) should always be specified with lowercase letters to avoid [[WikiWord]] conflicts.)%0a%0a(:markup class=horiz:)%0aI'd like to have some %25color=#ff7f00%25 tangerines%25%25, too!%0a(:markupend:)%0a%0aTo change the background color, use [@%25bgcolor=...%25@] as a wikistyle:%0a%0a%0a(:markup class=horiz:)%0aThis sentence contains %25bgcolor=green yellow%25 yellow text on a green background.%0a(:markupend:)%0a%0aSee [[(PmWiki:)Wiki Style Colors]] for more color help.%0a%0a!!!Text justification%0aStyles are used to control the text justification%0a%0a(:markup class=horiz:)%0a%25center%25 This text is centered. %0a%0a%25right%25 Right justified.%0a(:markupend:)%0a%0aand to create floating text:%0a%0a(:markup class=horiz:)%0a%25rfloat%25 This text floats to the right%0a%0a%25rframe%25 floats to the right with a frame%0a%0aLorem ipsum dolor sit amet, consectetuer sadipscing elitr%0a(:markupend:)%0a%0a%0a[[#Scopes]]%0a!! Scopes%0a%0aWikistyles can also specify a ''scope''; with no scope, the style is applied to any text that follows up to the next wikistyle specification or the end of the paragraph, whichever comes first. The '''apply=''' attribute and its shortcuts allow to change the scope as follows:%0a%0a||border=1 cellpadding=3 cellspacing=0%0a||apply attribute ||shortcut ||style applies to... ||%0a||[@%25apply=img ...%25@] ||- ||any image that ''follows''||%0a||[@%25apply=p ...%25@] ||[@%25p ...%25@] ||the current paragraph||%0a||[@%25apply=pre ...%25@] ||- ||the current preformatted text||%0a||[@%25apply=list ...%25@] ||[@%25list ...%25@] ||the current list||%0a||[@%25apply=item ...%25@] ||[@%25item ...%25@] ||the current list item||%0a||[@%25apply=div ...%25@] ||- ||the current div||%0a||[@%25apply=block ...%25@] ||[@%25block ...%25@] ||to the current block, whether it's a paragraph, list, list item, heading, or division.||%0a%0athus '''[@%25p color=blue%25@]''' is the same as '''[@%25apply=p color=blue%25@]''', and '''[@%25list ROMAN%25@]''' is the same as '''[@%25apply=list list-style=upper-roman%25@]'''.%0a%0aSome [[#predefined|predefined style shortcuts]] also make use of apply, thus '''[@%25right%25@]''' is a shortcut for '''[@%25text-align=right apply=block%25@]'''.%0a%0aExample: Apply a style to a paragraph:%0a(:markup:)%0a%25p bgcolor=#ffeeee%25 The wikistyle specification at the beginning of this line applies to the entire paragraph, even if there are %25blue%25 other wikistyle specifications %25%25 in the middle of the paragraph.%0a(:markupend:)%0a%0aWiki styles can also be applied to [[PmWiki/tables]] and [[PmWiki/table directives]]:%0a(:markup class=horiz:)%0a||class="green" style="font-style:italic; border:1px solid blue; background-color:#ffffcc"%0a||Everything after the above line is styled with green italic text, ||%0a|| ||%0a||This includes ||%0a|| preformatted text ||%0a||* lists ||%0a||-> indented items ||%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a(:table class="green" style="font-style:italic; border:1px solid blue; background-color:#ffffcc":)%0a(:cellnr:)%0aEverything after the above line is styled with green italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a(:tableend:)%0a(:markupend:)%0a%0a%0aThe '''[@>>style%3c%3c@]''' block can be used to apply a wikistyle to a large block of items. %0aThe style is applied until the next [@>>%3c%3c@] is encountered.%0a%0a(:markup class=horiz:)%0a>>blue font-style:italic bgcolor=#ffffcc%3c%3c%0aEverything after the above line is styled with blue italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a>>%3c%3c%0a(:markupend:)%0a%0aThe '''[@(:div style:)@]''' works in ''almost'' the same way as [@>>style%3c%3c@],%0abut the style information is encapsulated in a @@style=""@@ attribute and nested div blocks are possible.%0a(:markup class=horiz:)%0a(:div class="green" style="font-style:italic; border:1px solid blue; background-color:#ffffcc":)%0aEverything after the above line is styled with green italic text,%0a%0aThis includes%0a preformatted text%0a* lists%0a-> indented items%0a(:divend:)%0a(:markupend:)%0a%0a(:markup class=horiz:)%0a(:div1 style="font-style:italic; background-color:#ffffcc":)%0aouter style%0a(:div2 style="color:red; background-color:lightblue":)%0anested style%0a(:div2end:)%0aagain outer style%0a(:div1end:)%0a(:markupend:)%0a%0a%0a'''Caveat''': An applied wikistyle will only take effect if it's on the%0aline that starts the thing it's supposed to modify. In other%0awords, a wikistyle in the third markup line of a paragraph%0acan't change the attributes of the paragraph:%0a%0a(:markup class=horiz:) %0aafter the first line of the paragraph,%0awe try to %25apply=p color=blue%25 change color.%0aThis does't work because the style comes%0a(:markupend:)%0a%0a(:markup class=horiz:)%0aHowever, this %25p color=red%25 paragraph%0a''will'' be in red because its block style does%0aoccur in the first line of its text.%0a(:markupend:)%0a%0a(:markup class=horiz:) %0a* Here's a list item%0a* %25list red%25 Oops, too late to affect the list!%0a(:markupend:)%0a%0a%0a[[#Attributes]]%0a!! Wikistyle attributes%0a%0aThe style attributes recognized within a wikistyle specification are:%0a%0a ------------ CSS ------------- --HTML--%0a color bgcolor class %0a background-color margin id%0a text-align padding hspace%0a text-decoration border vspace%0a font-size float target%0a font-family list-style rel%0a font-weight width* accesskey%0a font-style height* value%0a display%0a%0a Special: define, apply%0a%0aThe attributes in the first two columns correspond to the ''[[cascading style sheet -> http://blooberry.com/indexdot/css/propindex/all.htm]]'' (CSS) properties of the same name. The attributes in the last column apply only to specific items:%0a%0a* '''[@class=@]''' and '''[@id=@]''' assign a CSS class or identifier to an HTML element%0a* '''[@target=name@]''' opens links that follow in a browser window called "name"%0a* '''[@rel=name@]''' in a link identifies the relationship of a target page%0a* '''[@accesskey=x@]''' uses 'x' as a shortcut key for the link that follows%0a* '''[@value=9@]''' sets the number of the current ordered list item%0a%0a[=*=] The width and height attributes have asterisks because they are handled specially for %3cimg .../> tags. If used by themselves (i.e., without anything providing an "apply=" parameter to the wikistyle), then they set the 'width=' and 'height=' attributes of any %3cimg ... /> tags that follow. Otherwise, they set the 'width:' and 'height:' properties of the element being styled.%0a%0a[[#Styles]]%0a!! Enabling Styles%0aStyles not listed above can be enabled by a PmWiki Administrator by modifying the local/config.php file. %0aFor instance to enable the "line-height" style attribute add the line %0a%0a->$WikiStyleCSS[] = 'line-height';%0a%0ato the local/config.php file.%0a%0a[[#Shortcuts]]%0a!! Custom style shortcuts%0a%0aThe '''[@define=@]''' attribute can be used to assign a shorthand name to any wikistyle specification.\\ %0aThis shorthand name can then be reused in later wikistyle specifications.%0a%0a(:markup class=horiz:)%0a%25define=box block bgcolor=#ddddff border="2px dotted blue"%25%0a%0a%25box%25 [@some sort of text@]%0a%0a%25box font-weight=bold color=green%25 [@some sort of text@]%0a(:markupend:)%0a%0a-%3c '''Tip:''' It's often a good idea to put common style definitions into [[Group Header(s)]] pages so that they can be shared among multiple pages in a group. Or, the [[wiki administrator]] can predefine styles site-wide as a [[local customization(s)]] (see [[Custom Wiki Styles]]).%0a%0a-%3c '''Tip:''' Use custom style definitions to associate meanings with text instead of just colors. For example, if warnings are to be displayed as green text, set [@%25define=warn green%25@] and then use [@%25warn%25@] instead of [@%25green%25@] in the document. Then, if you later decide that warnings should be styled differently, it's much easier to change the (one) definition than many occurrences of [@%25green%25@] in the text.%0a%0a-%3c '''Tip:''' Any undefined WikiStyle is automatically treated as a request for a class, thus [@%25pre%25@] is the same as saying [@%25class=pre%25@].%0a%0a!![[#predefined]] Predefined style shortcuts%0a%0aPmWiki defines a number of style shortcuts.%0a%0a* Text colors: %25black%25black%25%25, %25white bgcolor=black%25white%25%25, %25red%25red%25%25, %25yellow%25yellow%25%25, %25blue%25blue%25%25, %25gray%25gray%25%25, %25silver%25silver%25%25, %25maroon%25maroon%25%25, %25green%25green%25%25, %25navy%25navy%25%25, %25purple%25purple%25%25 (shortcut for [@%25color=...%25@])%0a* Justification: [@%25center%25@] and [@%25right%25@]%0a* Images and boxes%0a** Floating left or right: [@%25rfloat%25@] and [@%25lfloat%25@]%0a** Framed items: [@%25frame%25@], [@%25rframe%25@], and [@%25lframe%25@]%0a** Thumbnail sizing: [@%25thumb%25@]%0a* Open link in new window: [@%25newwin%25@] (shortcut for [@%25target=_blank%25@])%0a* Comments: [@%25comment%25@] (shortcut for [@%25display=none%25@])%0a* Ordered lists: [@%25decimal%25@], [@%25roman%25@], [@%25ROMAN%25@], [@%25alpha%25@], [@%25ALPHA%25@] (see also Cookbook:OutlineLists)%0a%0a[[#Examples]]%0a!! Examples%0a%0a[[Wiki Style Examples]] contains a number of examples of ways to use wikistyles in pages.%0a%0a[[#KnownIssues]]%0a!! Known Issues%0a* Percents in style definitions (like: [@%25block width=50%25 %25@]) require the use of "pct" instead of "%25".%0a* If you specify multiple values for an attribute, like @@border="2px solid blue"@@ make sure you place the values in quotes.%0a* Be sure to use lowercase letters for red-green-blue hex colors, [@%25color=#aa3333%25@] will work, [@%25color=#AA3333%25@] may not.%0a%0a[[#SeeAlso]]%0a!!See Also%0a* [[PmWiki/Custom Wiki Styles]] {PmWiki/CustomWikiStyles$:Summary}%0a* [[PmWiki:List Styles]] {PmWiki/ListStyles$:Summary}%0a%0a>>faq%3c%3c [[#faq]]%0aQ: %0aA:%0a +time=1247528073 Index: wikilib.d/PmWiki.Notify =================================================================== --- wikilib.d/PmWiki.Notify (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Notify (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3 author=Petko charset=ISO-8859-1 -csum= +csum=Notification only for major edits ctime=1149115706 -host=77.195.128.91 +host=81.65.14.164 name=PmWiki.Notify -rev=64 +rev=65 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%0aIf you have safe_mode enabled in your PHP configuration, notify.php will fail silently. See the [[PITS:00976]] for a little hack that fixes the issue.%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.Notify 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 minor 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. %0a -time=1242924137 +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%0aIf you have safe_mode enabled in your PHP configuration, notify.php will fail silently. See the [[PITS:00976]] for a little hack that fixes the issue.%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.Notify 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. %0a +time=1245661968 Index: wikilib.d/PmWiki.ChangeLog =================================================================== --- wikilib.d/PmWiki.ChangeLog (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.ChangeLog (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 csum= -host=86.69.109.11 +host=81.65.14.164 name=PmWiki.ChangeLog -rev=891 -targets=PmWiki.MailingLists,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,Site.AuthList,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]] pre-release of PmWiki.:)%0a!!! 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!!! 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!! 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 %3ctextarea> 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=1245617388 +rev=909 +targets=PmWiki.MailingLists,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!!! 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!!! 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!!! 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!! 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 %3ctextarea> 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=1247697823 Index: wikilib.d/PmWiki.Skins =================================================================== --- wikilib.d/PmWiki.Skins (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Skins (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=fix link +csum=the link to the talk page is in the bottom (GroupFooter) host=81.65.14.164 name=PmWiki.Skins -rev=95 +rev=99 targets=PmWiki.Skins,PmWiki.SkinTemplates,PmWiki.Installation,Site.EditQuickReference -text=(:Summary: Change the look and feel of part or all of PmWiki:)(:Audience: administrators (basic) :)%0a(:div class='rfloat frame' style="font-size:smaller; clear:right;" :)%0a!!Contents%0a* [[#what | What is a skin?]]%0a* [[#where | Where do I get skins?]]%0a* [[#use | How do I use a skin?]]%0a* [[#modify | How can I modify an existing skin?]]%0a* [[#make | How can I make a skin?]]%0a(:divend:)%0a!!What's a skin? [[#what]]%0a%0aA skin changes the look and feel of a PmWiki page, Group of pages, or the entire wiki.%0aTo see this try some skins out using the links below.%0a%0a* [[PmWiki:Skins?skin=beeblebrox-gila2 | BeeblebroxNetGila ]]%0a* [[PmWiki:Skins?skin=jhskin | JHSkin ]]%0a* [[PmWiki:Skins?skin=gemini | GeminiSkin ]]%0a* [[PmWiki:Skins?skin=light | LightSkin ]]%0a* [[PmWiki:Skins?skin=monobook | Monobook Skin ]]%0a* [[PmWiki:Skins?skin=simple | Simple Skin ]]%0a* [[PmWiki:Skins?skin= | PmWiki (default) Skin ]]%0a%0aAs you see, all skins show the same page contents, but the other elements such as the sidebar, header, and footer, have changed. %0aFor example, different skins may display the sidebar on the left, on the right, or even not at all. %0aSome skins have action links and features that others do not, especially if they were designed to take advantage of particular [[cookbook recipes -> Cookbook:Cookbook]].%0a%0aSo, a skin is just the set of files that determine how pages are displayed in PmWiki. Skins are stored as subfolders of ''pub/skins/''. For example you might create the ''example'' skin in ''pub/skins/example/''. Each skin typically has one or more of the following kinds of files:%0a* A template file, such as ''skin.tmpl'' or ''gemini.tmpl''. The template is written in HTML or XHTML, and is the skeleton for the skin. It contains special markers that tell PmWiki where to insert the page's contents.%0a* CSS stylesheet files, which can control the skin's appearance.%0a* Image files, for decorating a page with images.%0a* PHP files, such as ''skin.php''. These let skins provide extra customization setting or capabilities that HTML and CSS alone cannot.%0a* Documentation files for the administrator, usually with names like ''readme.txt'', ''install.txt'' or ''skinname.txt''. These usually give you information about any special installation steps or nifty features the skin has.%0a%0a!! Where do I get skins? [[#where]]%0a%0aSkins are available in the [[Cookbook:Skins]] collection. %0aThe skins in the collection have been contributed by other PmWiki administrators for others to use, and typically have their own set of customization possibilities. %0aWhen you find a skin you like, follow the link to download the skin package.%0aYou can also [[{$FullName}#make|make your own]] skin.%0a%0a!!How do I use or install a skin? [[#use]]%0a%0aMost skin packages are .zip, .tgz, or .tar.gz files. You should be able to unpack these with most archiving software.%0a%0a# Unpack the skin to ''pub/skins/'' inside your pmwiki folder. Most well-designed skin packages will create a subfolder in ''pub/skins/'' named after the skin.%0a** If the skin did not make a folder of its own, create one and move the skin files to it.%0a%0a# Open up your ''local/config.php'' file, and add a line like\\%0a\\%0a[@$Skin = 'my-favourite-skin';@]\\%0a\\%0awhere 'my-favourite-skin' is the name of the skin's folder.%0a%0aReload a page from your wiki in the browser, and you should be able to see the difference.%0a%0aIf you'd like to let your site's visitors choose one skin from a selection of skins you've installed, look at the [[Cookbook:SkinChange]] recipe. (That's what we used for the demo above.)%0a%0a!! How can I modify an existing skin? [[#modify]] [[#further]]%0a%0aThere are a number of ways to further customize the appearance of a skin, including %0a* adding statements to /local/config.php that are compatible with your chosen skin; %0a* adding css files to /pub/css/, such as local.css (for your entire wiki) and MyGroup.css (for MyGroup); and %0a* directly editing the skin's files. %0aIf the skin is updated regularly, you probably will want to avoid editing the files in the skin's folder. %0aCheck the skin's page in the Cookbook for specific suggestions.%0a%0aIf you want to modify the default pmwiki or print skins included with the PmWiki distribution, you should copy the pub/skins/pmwiki/ and pub/skins/print/ directories to another name and then use those skins instead of the default ones. While the name of the skin.tmpl and skin.css files don't usually matter, the optional skin.php file MUST match the name of the skin.%0a%0a!!How can I make a skin? [[#make]]%0a%0aThe best way to make your first skin is to modify a copy of PmWiki's default skin. %0a%0a# Make a copy of the folder ''pub/skins/pmwiki'' and name it whatever your new skin should be named.%0a# In your ''local/config.php'' file, set $Skin to be the name of your new skin.%0a# Modify the template and CSS files to suit you.%0a# Test your new skin.%0a# Repeat steps 3 and 4 until you're happy with the results.%0a%0aThe reason we recommend starting with the default PmWiki skin is that it's quite a simple skin, much more so than many of the skins you'll find in [[Cookbook:Skins]]. The starting point is the template (.tmpl) file, which provides the overall layout of the page. Inside of the template file are a number of special substitutions and directives that provide places for PmWiki to insert the data relevant to the current page being displayed. [[SkinTemplates]] describes the format and directives in more detail. There are also [[Cookbook:SkinGuidelines|skin guidelines]] available on pmwiki.org.%0a%0aIt's beyond the scope of this page to explain how to write HTML (hypertext markup language), XHTML (extensible HTML, which is a bit newer) or CSS (cascading style sheets), but there are many good tutorials on the web for all three of them. One caution: if you run into an HTML tutorial that explains about how to use %3cfont> or %3cblink> tags, or spacer gifs, it's at least five years out of date, so skip it and find another one. %0a%0aYou should test your skin on a variety of browsers -- ideally as many as you can, on as many different platforms as you can -- but at minimum you should be testing on Internet Explorer 7 and Firefox 2 or Mozilla, since those are the most common, and have different bugs. Don't forget to do things like resize windows and change text size during your testing.%0a%0a!! Print Skins%0aBy default your new skin will use the standard /pub/skins/print/ skin. %0a%0aTo over-ride this add the following to local/config.php:%0a%0a->[@$ActionSkin['print'] = 'yourprintskin';@]%0a%0aThis says to use 'yourprintskin' for ?action=print instead of the default.%0a%0a!!!Tools that you'll need%0a%0aThere are good examples of all these programs available for free. %0a%0a'''HTML and CSS editor(s).''' There are two types of editors: graphical (WYSIWYG, or "what you see is what you get"), and hand-coding or programmer's editors. Graphical editors are less intimidating to novices, but you won't learn as much, or know your code as intimately as you will by using a hand-coding editor. Whichever you choose, get one that has syntax highlighting for the code, because it will help you spot mistakes. Also, live preview features are not that helpful when writing a PmWiki skin, because PmWiki does stuff that the live preview won't, such as substitute values for variables and insert sidebar content.%0a%0a'''Test wiki'''. You don't want to be wreaking havoc on your skin while visitors can see your site. It's a better idea to set up a test wiki, either on your real webserver or on your own machine. Linux or [=MacOS=] computer owners may have webservers and PHP already running on their machines, but Windows users often don't. If that describes you, then you might want to take a look at the Cookbook:Standalone recipe, which runs PmWiki without needing a complex webserver. Or, you can find many local server packages which install a webserver, PHP, and other stuff (e.g. `MySQL), all configured to work together. Try to get a package that has the same software and versions as used on your live setup, since then there will be less to go wrong when the site goes live.%0a%0a'''FTP client''' to transfer files to your webserver. You probably had one of these already.%0a%0a'''Color picker'''. Your editor might include one, or you could pick up a standalone application. Extremely helpful for creating and saving color palettes.%0a%0a!!See also%0a%0a* [[PmWiki/Skin Templates]]%0a* [[Cookbook:Skins]]%0a* [[Cookbook:Skin Guidelines]]%0a* [[Cookbook:Standalone]]%0a* [[PmWiki/Installation]]%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I change the Wiki's default name in the upper left corner of the Main Page?%0a%0aA: Put the following config.php%0a%0a->[@$WikiTitle = 'My Wiki Site';@]%0a%0aThe ''docs/sample-config.php'' file has an example of changing the title.%0a%0a%0aQ: How can I embed PmWiki pages inside a web page?%0a%0aA: Source them through a PHP page, or place them in a frame.%0a%0a%0aQ: How do I change the font or background color of the hints block on the Edit Page?%0a%0aA: Add a CSS style to pub/css/local.css: [@.quickref {background:...; color:... }@]. The hints are provided by the [[Site.EditQuickReference]] page, which is in the PmWiki or Site wikigroup. Edit that page, and change the "bgcolor" or specify the font "color" to get the contrast you need.%0a -time=1238275100 +text=(:Summary: Change the look and feel of part or all of PmWiki:)(:Audience: administrators (basic) :)%0a(:div class='rfloat frame' style="font-size:smaller; clear:right;" :)%0a!!Contents%0a* [[#what | What is a skin?]]%0a* [[#where | Where do I get skins?]]%0a* [[#use | How do I use a skin?]]%0a* [[#modify | How can I modify an existing skin?]]%0a* [[#make | How can I make a skin?]]%0a(:divend:)%0a!!What's a skin? [[#what]]%0a%0aA skin changes the look and feel of a PmWiki page, Group of pages, or the entire wiki.%0aTo see this try some skins out using the links below.%0a%0a* [[PmWiki:Skins?skin=beeblebrox-gila2 | BeeblebroxNetGila ]]%0a* [[PmWiki:Skins?skin=jhskin | JHSkin ]]%0a* [[PmWiki:Skins?skin=gemini | GeminiSkin ]]%0a* [[PmWiki:Skins?skin=light | LightSkin ]]%0a* [[PmWiki:Skins?skin=monobook | Monobook Skin ]]%0a* [[PmWiki:Skins?skin=simple | Simple Skin ]]%0a* [[PmWiki:Skins?skin= | PmWiki (default) Skin ]]%0a%0aAs you see, all skins show the same page contents, but the other elements such as the sidebar, header, and footer, have changed. %0aFor example, different skins may display the sidebar on the left, on the right, or even not at all. %0aSome skins have action links and features that others do not, especially if they were designed to take advantage of particular [[cookbook recipes -> Cookbook:Cookbook]].%0a%0aSo, a skin is just the set of files that determine how pages are displayed in PmWiki. Skins are stored as subfolders of ''pub/skins/''. For example you might create the ''example'' skin in ''pub/skins/example/''. Each skin typically has one or more of the following kinds of files:%0a* A template file, such as ''skin.tmpl'' or ''gemini.tmpl''. The template is written in HTML or XHTML, and is the skeleton for the skin. It contains special markers that tell PmWiki where to insert the page's contents.%0a* CSS stylesheet files, which can control the skin's appearance.%0a* Image files, for decorating a page with images.%0a* PHP files, such as ''skin.php''. These let skins provide extra customization setting or capabilities that HTML and CSS alone cannot.%0a* Documentation files for the administrator, usually with names like ''readme.txt'', ''install.txt'' or ''skinname.txt''. These usually give you information about any special installation steps or nifty features the skin has.%0a%0a!! Where do I get skins? [[#where]]%0a%0aSkins are available in the [[Cookbook:Skins]] collection. %0aThe skins in the collection have been contributed by other PmWiki administrators for others to use, and typically have their own set of customization possibilities. %0aWhen you find a skin you like, follow the link to download the skin package.%0aYou can also [[{$FullName}#make|make your own]] skin.%0a%0a!!How do I use or install a skin? [[#use]]%0a%0aMost skin packages are .zip, .tgz, or .tar.gz files. You should be able to unpack these with most archiving software.%0a%0a# Unpack the skin to ''pub/skins/'' inside your pmwiki folder. Most well-designed skin packages will create a subfolder in ''pub/skins/'' named after the skin.%0a** If the skin did not make a folder of its own, create one and move the skin files to it.%0a%0a# Open up your ''local/config.php'' file, and add a line like\\%0a\\%0a[@$Skin = 'my-favourite-skin';@]\\%0a\\%0awhere 'my-favourite-skin' is the name of the skin's folder.%0a%0aReload a page from your wiki in the browser, and you should be able to see the difference.%0a%0aIf you'd like to let your site's visitors choose one skin from a selection of skins you've installed, look at the [[Cookbook:SkinChange]] recipe. (That's what we used for the demo above.)%0a%0a!! How can I modify an existing skin? [[#modify]] [[#further]]%0a%0aThere are a number of ways to further customize the appearance of a skin, including %0a* adding statements to /local/config.php that are compatible with your chosen skin; %0a* adding css files to /pub/css/, such as local.css (for your entire wiki) and MyGroup.css (for MyGroup); and %0a* directly editing the skin's files. %0aIf the skin is updated regularly, you probably will want to avoid editing the files in the skin's folder. %0aCheck the skin's page in the Cookbook for specific suggestions.%0a%0aIf you want to modify the default pmwiki or print skins included with the PmWiki distribution, you should copy the pub/skins/pmwiki/ and pub/skins/print/ directories to another name and then use those skins instead of the default ones. While the name of the skin.tmpl and skin.css files don't usually matter, the optional skin.php file MUST match the name of the skin.%0a%0a!!How can I make a skin? [[#make]]%0a%0aThe best way to make your first skin is to modify a copy of PmWiki's default skin. %0a%0a# Make a copy of the folder ''pub/skins/pmwiki'' and name it whatever your new skin should be named.%0a# In your ''local/config.php'' file, set $Skin to be the name of your new skin.%0a# Modify the template and CSS files to suit you.%0a# Test your new skin.%0a# Repeat steps 3 and 4 until you're happy with the results.%0a%0aThe reason we recommend starting with the default PmWiki skin is that it's quite a simple skin, much more so than many of the skins you'll find in [[Cookbook:Skins]]. The starting point is the template (.tmpl) file, which provides the overall layout of the page. Inside of the template file are a number of special substitutions and directives that provide places for PmWiki to insert the data relevant to the current page being displayed. [[SkinTemplates]] describes the format and directives in more detail. There are also [[Cookbook:SkinGuidelines|skin guidelines]] available on pmwiki.org.%0a%0aIt's beyond the scope of this page to explain how to write HTML (hypertext markup language), XHTML (extensible HTML, which is a bit newer) or CSS (cascading style sheets), but there are many good tutorials on the web for all three of them. One caution: if you run into an HTML tutorial that explains about how to use %3cfont> or %3cblink> tags, or spacer gifs, it's at least five years out of date, so skip it and find another one. %0a%0aYou should test your skin on a variety of browsers -- ideally as many as you can, on as many different platforms as you can -- but at minimum you should be testing on Internet Explorer 7 and Firefox 2 or Mozilla, since those are the most common, and have different bugs. Don't forget to do things like resize windows and change text size during your testing.%0a%0a!! Print Skins%0aBy default your new skin will use the standard /pub/skins/print/ skin. %0a%0aTo over-ride this add the following to local/config.php:%0a%0a->[@$ActionSkin['print'] = 'yourprintskin';@]%0a%0aThis says to use 'yourprintskin' for ?action=print instead of the default.%0a%0a!!!Tools that you'll need%0a%0aThere are good examples of all these programs available for free. %0a%0a'''HTML and CSS editor(s).''' There are two types of editors: graphical (WYSIWYG, or "what you see is what you get"), and hand-coding or programmer's editors. Graphical editors are less intimidating to novices, but you won't learn as much, or know your code as intimately as you will by using a hand-coding editor. Whichever you choose, get one that has syntax highlighting for the code, because it will help you spot mistakes. Also, live preview features are not that helpful when writing a PmWiki skin, because PmWiki does stuff that the live preview won't, such as substitute values for variables and insert sidebar content.%0a%0a'''Test wiki'''. You don't want to be wreaking havoc on your skin while visitors can see your site. It's a better idea to set up a test wiki, either on your real webserver or on your own machine. Linux or [=MacOS=] computer owners may have webservers and PHP already running on their machines, but Windows users often don't. If that describes you, then you might want to take a look at the Cookbook:Standalone recipe, which runs PmWiki without needing a complex webserver. Or, you can find many local server packages which install a webserver, PHP, and other stuff (e.g. `MySQL), all configured to work together. Try to get a package that has the same software and versions as used on your live setup, since then there will be less to go wrong when the site goes live.%0a%0a'''FTP client''' to transfer files to your webserver. You probably had one of these already.%0a%0a'''Color picker'''. Your editor might include one, or you could pick up a standalone application. Extremely helpful for creating and saving color palettes.%0a%0a!!See also%0a%0a* [[PmWiki/Skin Templates]]%0a* [[Cookbook:Skins]]%0a* [[Cookbook:Skin Guidelines]]%0a* [[Cookbook:Standalone]]%0a* [[PmWiki/Installation]]%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I change the Wiki's default name in the upper left corner of the Main Page?%0a%0aA: Put the following config.php%0a%0a->[@$WikiTitle = 'My Wiki Site';@]%0a%0aThe ''docs/sample-config.php'' file has an example of changing the title.%0a%0a%0aQ: How can I embed PmWiki pages inside a web page?%0a%0aA: Source them through a PHP page, or place them in a frame.%0a%0a%0aQ: How do I change the font or background color of the hints block on the Edit Page?%0a%0aA: Add a CSS style to pub/css/local.css: [@.quickref {background:...; color:... }@]. The hints are provided by the [[Site.EditQuickReference]] page, which is in the PmWiki or Site wikigroup. Edit that page, and change the "bgcolor" or specify the font "color" to get the contrast you need.%0a%0a +time=1247444629 Index: wikilib.d/Site.PageListTemplates =================================================================== --- wikilib.d/Site.PageListTemplates (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/Site.PageListTemplates (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 -author=simon +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 charset=ISO-8859-1 -csum=remove link +csum=fmt=#titlesummary ctime=1135725585 -host=202.37.32.2 +host=81.65.14.164 name=Site.PageListTemplates -rev=71 +rev=72 targets=Group.Group,Group.Name,Site.FullName,Group.Namespaced,Site.LocalTemplates,PmWiki.PageLists,PmWiki.PageListTemplates,PmWiki.PageVariables,PmWiki.PageTextVariables,PmWiki.ConditionalMarkup -text=(:Summary:[[(PmWiki/PageList)Templates]] for PmWiki's [[PmWiki/Page lists]] directive:)%0aThis page contains "templates" for PmWiki's [@(:pagelist:)@] directive. The [[Site.LocalTemplates]] page can be created and used to store pagelist templates that are local to a site.%0a%0a%0a!!Page list template documentation%0a* [[PmWiki.Page Lists]] - {PmWiki/PageLists$:Summary}%0a* [[PmWiki.Page List Templates]] - {PmWiki/PageListTemplates$:Summary}%0a* [[PmWiki.Page Variables]] - {PmWiki/PageVariables$:Summary}%0a* [[PmWiki.PageTextVariables|Page Text Variables]] - {PmWiki/PageTextVariables$:Summary}%0a* [[PmWiki.Conditional Markup]] - {PmWiki/PageLists$:Summary}%0a* [[Cookbook:Pagelist Template Samples]] - {Cookbook/PagelistTemplateSamples$:Summary}%0a%0a%0a!!fmt=#default%0a%0aThe default template for pagelists when [@fmt=@] isn't specified (and note that on the PmWiki.org wiki, this template is over-ridden by the one on the [[Site.LocalTemplates]] page).%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#default]]%0a(:template first {=$Group}:)%0a%0a:[[{=$Group}/]] /:%0a(:template each:)%0a: :[[{=$Group}/{=$Name}]]%0a[[#defaultend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#default count=6:)%0a(:markupend:)%0a%0a%0a!!fmt=#bygroup%0a%0aDisplay pages by group/name.%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#bygroup]]%0a(:template first {=$Group}:)%0a%0a:[[{=$Group}/]] /:%0a(:template each:)%0a: :[[{=$Group}/{=$Name}]]%0a[[#bygroupend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#bygroup count=6:)%0a(:markupend:)%0a%0a%0a!!fmt=#simple%0a%0aA simple bullet list of page names.%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#simple]]%0a* [[{=$FullName}]]%0a[[#simpleend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#simple count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#title%0a%0aA simple bullet list of page titles. %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#title]]%0a(:template defaults order=title:)%0a* [[{=$FullName}|+]]%0a[[#titleend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#title count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#titlespaced%0a%0aOutputs wiki page titles with spaces between the words in the title.%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#titlespaced]]%0a(:template defaults order=title:)%0a* [[{=$FullName}|{=$Titlespaced}]]%0a[[#titlespacedend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#titlespaced count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#group%0a%0aA bullet list of groups.%0a%0a[@%0a[[#group]]%0a(:template first {=$Group}:)%0a* [[{=$Group}/]]%0a[[#groupend]]%0a@]%0a%0a%0a!!fmt=#include%0a%0aConcatenate the text of pages in the list. (Note, this can be an expensive operation!)%0a%0a[@%0a[[#include]]%0a(:include {=$FullName} self=0:)%0a[[#includeend]]%0a@]%0a%0a%0a!!fmt=#includefaq%0a%0aInclude just the #faq sections from pages in the list. (This can also be expensive,%0aespecially if the list includes pages that don't have the [@[[#faq]]@] anchor!)%0a%0a[@%0a[[#includefaq]]%0a!![[{=$FullName}|+]]%0a>>faq%3c%3c%0a(:include {=$FullName}#faq#faqend self=0:)%0a>>%3c%3c%0a[[#includefaqend]]%0a@]%0a%0a%0a!!fmt=#description%0a%0aList pages and append the page's description if it exists. Creates dash by all names, but adding a nested loop to get rid of it causes markup problems (nested loops are not allowed).%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#description]]%0a* [[{=$FullName}|+]]%0a - {=$Description}%0a[[#descriptionend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#description count=7:)%0a(:markupend:)%0a%0a%0a!!fmt=#simplename%0a%0aSimple bullet list of page names, without the Group name. %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#simplename]]%0a* [[({=$Group}/){=$Name}]]%0a[[#simplenameend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#simplename count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#simplenamespaced%0a%0aSimple bullet list of spaced page names, without the Group name. %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#simplenamespaced]]%0a* [[({=$Group}/){=$Namespaced}]]%0a[[#simplenamespacedend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#simplenamespaced count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#count%0a%0aNumber of pages in pagelist %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#count]]%0a(:template defaults wrap=inline list=normal :)%0a(:template last:)%0a{$$PageCount}%0a[[#countend]]%0a(:ifend:)%0a%0aNumber of pages in the {$Group} group: (:pagelist group={$Group} fmt=#count :).%0a%0aNumber of pages in the {$Group} group: (:pagelist group={$Group} fmt=count :).%0a%0aThere are (:pagelist group=PmWiki fmt=#count wrap=html :) pages in the PmWiki group.%0a(:markupend:)%0a -time=1238621816 +text=(:Summary:[[(PmWiki/PageList)Templates]] for PmWiki's [[PmWiki/Page lists]] directive:)%0aThis page contains "templates" for PmWiki's [@(:pagelist:)@] directive. The [[Site.LocalTemplates]] page can be created and used to store pagelist templates that are local to a site.%0a%0a%0a!!Page list template documentation%0a* [[PmWiki.Page Lists]] - {PmWiki/PageLists$:Summary}%0a* [[PmWiki.Page List Templates]] - {PmWiki/PageListTemplates$:Summary}%0a* [[PmWiki.Page Variables]] - {PmWiki/PageVariables$:Summary}%0a* [[PmWiki.PageTextVariables|Page Text Variables]] - {PmWiki/PageTextVariables$:Summary}%0a* [[PmWiki.Conditional Markup]] - {PmWiki/PageLists$:Summary}%0a* [[Cookbook:Pagelist Template Samples]] - {Cookbook/PagelistTemplateSamples$:Summary}%0a%0a%0a!!fmt=#default%0a%0aThe default template for pagelists when [@fmt=@] isn't specified (and note that on the PmWiki.org wiki, this template is over-ridden by the one on the [[Site.LocalTemplates]] page).%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#default]]%0a(:template first {=$Group}:)%0a%0a:[[{=$Group}/]] /:%0a(:template each:)%0a: :[[{=$Group}/{=$Name}]]%0a[[#defaultend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#default count=6:)%0a(:markupend:)%0a%0a%0a!!fmt=#bygroup%0a%0aDisplay pages by group/name.%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#bygroup]]%0a(:template first {=$Group}:)%0a%0a:[[{=$Group}/]] /:%0a(:template each:)%0a: :[[{=$Group}/{=$Name}]]%0a[[#bygroupend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#bygroup count=6:)%0a(:markupend:)%0a%0a%0a!!fmt=#simple%0a%0aA simple bullet list of page names.%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#simple]]%0a* [[{=$FullName}]]%0a[[#simpleend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#simple count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#title%0a%0aA simple bullet list of page titles. %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#title]]%0a(:template defaults order=title:)%0a* [[{=$FullName}|+]]%0a[[#titleend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#title count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#titlespaced%0a%0aOutputs wiki page titles with spaces between the words in the title.%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#titlespaced]]%0a(:template defaults order=title:)%0a* [[{=$FullName}|{=$Titlespaced}]]%0a[[#titlespacedend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#titlespaced count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#group%0a%0aA bullet list of groups.%0a%0a[@%0a[[#group]]%0a(:template first {=$Group}:)%0a* [[{=$Group}/]]%0a[[#groupend]]%0a@]%0a%0a%0a!!fmt=#include%0a%0aConcatenate the text of pages in the list. (Note, this can be an expensive operation!)%0a%0a[@%0a[[#include]]%0a(:include {=$FullName} self=0:)%0a[[#includeend]]%0a@]%0a%0a%0a!!fmt=#includefaq%0a%0aInclude just the #faq sections from pages in the list. (This can also be expensive,%0aespecially if the list includes pages that don't have the [@[[#faq]]@] anchor!)%0a%0a[@%0a[[#includefaq]]%0a!![[{=$FullName}|+]]%0a>>faq%3c%3c%0a(:include {=$FullName}#faq#faqend self=0:)%0a>>%3c%3c%0a[[#includefaqend]]%0a@]%0a%0a%0a!!fmt=#description%0a%0aList pages and append the page's description if it exists. Creates dash by all names, but adding a nested loop to get rid of it causes markup problems (nested loops are not allowed).%0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#description]]%0a* [[{=$FullName}|+]]%0a - {=$Description}%0a[[#descriptionend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#description count=7:)%0a(:markupend:)%0a%0a%0a!!fmt=#simplename%0a%0aSimple bullet list of page names, without the Group name. %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#simplename]]%0a* [[({=$Group}/){=$Name}]]%0a[[#simplenameend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#simplename count=5:)%0a(:markupend:)%0a%0a%0a!!fmt=#simplenamespaced%0a%0aSimple bullet list of spaced page names, without the Group name. %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#simplenamespaced]]%0a* [[({=$Group}/){=$Namespaced}]]%0a[[#simplenamespacedend]]%0a(:ifend:)%0a%0a(:pagelist group={$Group} fmt=#simplenamespaced count=5:)%0a(:markupend:)%0a%0a%0a!! fmt=#titlesummary%0a%0aA simple bullet list of page title and summary. %0a%0a(:markup class=horiz:)%0a>>comment%3c%3c%0a[[#titlesummary]]%0a* [[{=$FullName} | {=$Titlespaced}]] [-{=$:Summary}-]%0a[[#titlesummaryend]]%0a>>font-size:smaller%3c%3c%0a%0a(:pagelist group=Site fmt=#titlesummary list=normal count=8:)%0a(:markupend:)%0a%0a!!fmt=#count%0a%0aNumber of pages in pagelist %0a%0a(:markup class="horiz":)%0a(:if false:)%0a[[#count]]%0a(:template defaults wrap=inline list=normal :)%0a(:template last:)%0a{$$PageCount}%0a[[#countend]]%0a(:ifend:)%0a%0aNumber of pages in the {$Group} group: (:pagelist group={$Group} fmt=#count :).%0a%0aNumber of pages in the {$Group} group: (:pagelist group={$Group} fmt=count :).%0a%0aThere are (:pagelist group=PmWiki fmt=#count wrap=html :) pages in the PmWiki group.%0a(:markupend:)%0a +time=1247701294 Index: wikilib.d/PmWiki.AccessKeys =================================================================== --- wikilib.d/PmWiki.AccessKeys (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.AccessKeys (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3 -author=Martin A +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 charset=ISO-8859-1 -csum=Added Firefox to the list of Mac browsers for which Ctrl + access key works. +csum=reply. ctime=1137027716 -host=68.33.60.202 +host=81.65.14.164 name=PmWiki.AccessKeys -rev=94 +rev=97 targets=PmWiki.Internationalizations,PmWiki.SitePreferences,Site.Preferences,Site.PageActions -text=(:Summary:Access keys are keyboard shortcuts for tasks that would otherwise require a mouse:)%0a(:Audience: visitors (intermediate) :)%0a%0aAccess keys (See also [[Wikipedia:access keys]]) are keyboard shortcuts for tasks that would otherwise require a mouse. %0aThey are part of markup that may exist on any webpage.%0aOn PmWiki steps have been taken to make it easier to use access keys throughout a site, and to make it possible to adjust key assignments to accommodate different languages and preferences.%0a%0a!! Using access keys in different operating systems and browsers%0aAccess keys require you to hold down two or more keys.%0a* on Windows with Internet Explorer, press ALT + the access key%0a* with Firefox, press SHIFT + ALT + the access key%0a* on a Macintosh, press Ctrl + the access key (applies to Firefox, Safari, Omniweb, Internet Explorer)%0a* with [[http://opera.com/support/tutorials/nomouse/#access | Opera]] press Shift+Esc to enter (or exit) access-key mode.%0a%0aExceptions exist for specific browsers, and specific versions. For example, %0a* Internet Explorer requires that the Enter key be pressed at the end of the sequence for versions 5 and up under Windows, but not under Macintosh (where access keys were not supported until after version 4.5). %0a* Firefox versions 1.5 and earlier simply use Alt, while Firefox version 2.0 uses Shift+Alt. %0a%0aNote, in cases of conflicts between the keyboard shortcuts assigned by browsers and access keys assigned by links and other markup on webpages, many browsers, including Mozilla, Netscape and Internet Explorer, allow access keys to override the browser defaults and require a different sequence to continue using overridden browser assignments (typically, by pressing and releasing the Alt key, instead of holding it down). %0a%0a!! Access key assignments in this PmWiki installation%0aThe following is a list of the currently defined access keys for built-in actions. Remember that the letters identified below must be used together with the combination listed above (depending on your operating system and browser). Note that some actions do not have a corresponding access key by default.%0a%0a||width=%0a||! Key ||!Function ||%0a|| $[ak_edit] ||edit||%0a|| $[ak_history] ||history||%0a|| $[ak_recentchanges] ||recent changes||%0a|| $[ak_save] ||save page||%0a|| $[ak_saveedit] ||save and keep editing||%0a|| $[ak_savedraft] ||save draft||%0a|| $[ak_preview] ||preview page||%0a|| $[ak_print] ||print||%0a|| $[ak_view] ||view||%0a|| $[ak_em] ||''emphasized'' text||%0a|| $[ak_strong] ||'''strong''' text||%0a|| $[ak_textedit] ||jump to edit textarea (when in edit modes)|| %0a%0a%0a%25audience%25 admins (intermediate)%0a!! [[#customkeys]] Customizing access keys%0aPmWiki uses the same "phrase translation" methods for access key mappings as it does for [[internationalization(s)]]. This makes it possible for administrators, skins, language translators, and visitors to all influence the way that specific keys are mapped to actions.%0a%0aSee [[SitePreferences]] and [[Site.Preferences]] for more information and a template.%0a%0aNote that some skins (e.g., [[Cookbook:LeanSkin | Lean]]) don't use the translation mechanism. In this case one must edit the template file itself in order to change the access keys.%0a%0aBy convention, the translation phrases for all of the access key actions start with the characters "ak_", so that the page variable "[@$[ak_edit]@]" is replaced by the access key for editing as defined by the current preferences, language, skin default, or site default.%0a%0a!! Implementation of access keys%0aAccess keys are implemented in html as optional parameters that can be added to links and many other types of markup.%0a%0a'''Example:''' [@%3ca href="http://example.com" accesskey="x">Example%3c/a>@] would create a link to example.com that could be triggered by clicking on the linked word "example" or using the access key Akey+x. That same action key link could be created in PmWiki markup by typing [@%25item accesskey="x"%25[[http://example.com|Example]]@], like this: %25item accesskey="x"%25[[http://example.com|Example]]. Try it and see if it works. Note that this AKey+x access key only works this way on this page, because it is simply a shortcut for accessing the link that exists only on this page.%0a%0aThe list of access key assignments in default PmWiki installations generally work throughout a site because links have been created in PmWiki skins and editing screens that incorporate access key parameters using the access key translation phrases. One location where those links can be viewed is [[Site.PageActions]]. That page contains the links that the default PmWiki skin, and many other skins, use to generate links such as "View" "Edit" and "History" that appear on most pages (other than editing screens). Each of the links in that page also has an [@%25accesskey=$[ak_xxx]%25@] declaration in front of it, which enables a specific access key for that link.%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How can I change the keyboard shortcuts for editing and saving a page?%0a%0aA: See [[#customkeys | Customizing access keys]].%0a -time=1241830585 +text=(:Summary:Access keys are keyboard shortcuts for tasks that would otherwise require a mouse:)%0a(:Audience: visitors (intermediate) :)%0a%0aAccess keys (See also [[Wikipedia:access keys]]) are keyboard shortcuts for tasks that would otherwise require a mouse. %0aThey are part of markup that may exist on any webpage.%0aOn PmWiki steps have been taken to make it easier to use access keys throughout a site, and to make it possible to adjust key assignments to accommodate different languages and preferences.%0a%0a!! Using access keys in different operating systems and browsers%0aAccess keys require you to hold down two or more keys.%0a* on Windows with Internet Explorer, press ALT + the access key%0a* with Firefox, press SHIFT + ALT + the access key%0a* on a Macintosh, press Ctrl + the access key (applies to Firefox, Safari, Omniweb, Internet Explorer)%0a* with [[http://opera.com/support/tutorials/nomouse/#access | Opera]] press Shift+Esc to enter (or exit) access-key mode.%0a%0aExceptions exist for specific browsers, and specific versions. For example, %0a* Internet Explorer requires that the Enter key be pressed at the end of the sequence for versions 5 and up under Windows, but not under Macintosh (where access keys were not supported until after version 4.5). %0a* Firefox versions 1.5 and earlier simply use Alt, while Firefox version 2.0 uses Shift+Alt. %0a%0aNote, in cases of conflicts between the keyboard shortcuts assigned by browsers and access keys assigned by links and other markup on webpages, many browsers, including Mozilla, Netscape and Internet Explorer, allow access keys to override the browser defaults and require a different sequence to continue using overridden browser assignments (typically, by pressing and releasing the Alt key, instead of holding it down). %0a%0a!! Access key assignments in this PmWiki installation%0aThe following is a list of the currently defined access keys for built-in actions. Remember that the letters identified below must be used together with the combination listed above (depending on your operating system and browser). Note that some actions do not have a corresponding access key by default.%0a%0a||width=%0a||! Key ||!Function ||%0a|| $[ak_edit] ||edit||%0a|| $[ak_history] ||history||%0a|| $[ak_recentchanges] ||recent changes||%0a|| $[ak_save] ||save page||%0a|| $[ak_saveedit] ||save and keep editing||%0a|| $[ak_savedraft] ||save draft||%0a|| $[ak_preview] ||preview page||%0a|| $[ak_print] ||print||%0a|| $[ak_view] ||view||%0a|| $[ak_em] ||''emphasized'' text||%0a|| $[ak_strong] ||'''strong''' text||%0a|| $[ak_textedit] ||jump to edit textarea (when in edit modes)|| %0a%0a%0a%25audience%25 admins (intermediate)%0a!! [[#customkeys]] Customizing access keys%0aPmWiki uses the same "phrase translation" methods for access key mappings as it does for [[internationalization(s)]]. This makes it possible for administrators, skins, language translators, and visitors to all influence the way that specific keys are mapped to actions.%0a%0aSee [[SitePreferences]] and [[Site.Preferences]] for more information and a template.%0a%0aNote that some skins (e.g., [[Cookbook:LeanSkin | Lean]]) don't use the translation mechanism. In this case one must edit the template file itself in order to change the access keys.%0a%0aBy convention, the translation phrases for all of the access key actions start with the characters "ak_", so that the page variable "[@$[ak_edit]@]" is replaced by the access key for editing as defined by the current preferences, language, skin default, or site default.%0a%0a!! Implementation of access keys%0aAccess keys are implemented in html as optional parameters that can be added to links and many other types of markup.%0a%0a'''Example:''' [@%3ca href="http://example.com" accesskey="x">Example%3c/a>@] would create a link to example.com that could be triggered by clicking on the linked word "example" or using the access key Akey+x. That same action key link could be created in PmWiki markup by typing [@%25item accesskey="x"%25[[http://example.com|Example]]@], like this: %25item accesskey="x"%25[[http://example.com|Example]]. Try it and see if it works. Note that this AKey+x access key only works this way on this page, because it is simply a shortcut for accessing the link that exists only on this page.%0a%0aThe list of access key assignments in default PmWiki installations generally work throughout a site because links have been created in PmWiki skins and editing screens that incorporate access key parameters using the access key translation phrases. One location where those links can be viewed is [[Site.PageActions]]. That page contains the links that the default PmWiki skin, and many other skins, use to generate links such as "View" "Edit" and "History" that appear on most pages (other than editing screens). Each of the links in that page also has an [@%25accesskey=$[ak_xxx]%25@] declaration in front of it, which enables a specific access key for that link.%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How can I change the keyboard shortcuts for editing and saving a page?%0a%0aA: See [[#customkeys | Customizing access keys]].%0a%0aQ: I have a Wikisite Site.Sidebar which is embedded in the skin template. The use of @@[=%25item accesskey="x"%25[[Groupname/Sitename]]=]@@ doesn't work here. Has anyone an idea why, and what I could do?%0a%0aA: Use just @@[=%25accesskey="x"%25[[PmWiki.PmWiki]]%25%25=]@@ (no "item", closed with [=%25%25=]).%0a +time=1246996110 Index: wikilib.d/PmWiki.AuthUser =================================================================== --- wikilib.d/PmWiki.AuthUser (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.AuthUser (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=refactor -host=86.69.109.11 +csum= +host=81.65.14.164 name=PmWiki.AuthUser -passwdattr=$1$A8GLth2X$RUkkw5/Yh6PDX6SvLLelB0 -rev=165 +rev=168 targets=PmWiki.Passwords,PmWiki.PasswordsAdmin,SiteAdmin.AuthUser,PmWiki.AuthUser -text=(:Summary:Authorization system that uses usernames and passwords:)%0a(:Audience: administrators (intermediate) :)%0a%0aAuthUser is PmWiki's identity-based authorization system that allows access to pages to be controlled through the use of usernames and passwords. AuthUser can be used in addition to the [[Passwords | password-based]] scheme that is PmWiki's default configuration.%0a%0aAuthUser is a very flexible system for managing access control on pages, but flexibility can also bring complexity and increased maintenance overhead to the wiki administrator. This is why PmWiki defaults to the simpler password-based system. For some thoughts about the relative merits of the two approaches, see [[PmWiki:ThoughtsOnAccessControl]].%0a%0aSee also: [[Cookbook:Quick Start for AuthUser]]%0a%0a!! Activating AuthUser%0aTo activate PmWiki's identity-based system, add the following line%0ato ''local/config.php'':%0a%0a include_once("$FarmD/scripts/authuser.php");%0a%0aEnsure that you have [[PasswordsAdmin | set a site wide admin password]], otherwise you will not be able to edit [[SiteAdmin.AuthUser]].%0a%0a->%25note%25 Note: Older versions of PmWiki (before 2.2.0-beta58) use ''Site.AuthUser''.%0a%0aPmWiki caches some group and page authorization levels when a page is accessed. For this reason, it is better to include @@authuser.php@@ quite early in config.php, notably%0a* after any recipe which inserts some custom writable PageStore class (MySQL, SQLite, Compressed PageStore or other)%0a* and after any internationalization (UTF-8 and XLPage).%0a%0a(If you don't use a custom PageStore class and i18n, include @@authuser.php@@ first thing in @@config.php@@.)%0a%0aAll other recipes should be included after these.%0a%0a!! Creating user accounts%0aMost of AuthUser's configuration is performed via the [[SiteAdmin.AuthUser]] page. To change the AuthUser configuration, simply edit this page like any other wiki page (you'll typically need to use the site's admin password for this).%0a%0aTo create a login account, simply add lines to SiteAdmin.AuthUser that look like:%0a%0a username: [=(:=]encrypt ''password'':)%0a%0aFor example, to create a login account for "alice" with a password of "wonderland", enter:%0a%0a alice: [=(:=]encrypt wonderland:)%0a%0aWhen the page is saved, the "@@[=(:=]encrypt wonderland:)@@" part of the text will be replaced by an encrypted form of the password "wonderland". This encryption is done so that someone looking at the SiteAdmin.AuthUser page cannot easily determine the passwords stored in the page. %0a%0aTo change or reset an account's password, simply replace the encrypted string with another @@[=(:=]encrypt:)@@ directive.%0a%0a%0a!! Controlling access to pages by login%0a%0aPages and groups can be protected based on login account by using "passwords" of the form [@id:username@] in the password fields of [@?action=attr@] (see [[PmWiki.Passwords]]). For example, to restrict a page to being edited by Alice, one would set the password to "[@id:alice@]".%0a%0aIt's possible to use multiple "id:" declarations and passwords in the [@?action=attr@] form, thus the following setting would allow access to Alice, Carol, and anyone who knows the password "quick":%0a%0a quick id:alice,carol%0a%0aTo allow access to anyone who has successfully logged in, use "[@id:*@]".%0a%0aOne can also perform site-wide restrictions based on identity in the $DefaultPasswords array: e.g.%0a%0a # require valid login before viewing pages%0a $DefaultPasswords['read'] = 'id:*';%0a # Alice and carol may edit%0a $DefaultPasswords['edit'] = 'id:alice,carol';%0a # All admins and Fred may edit%0a $DefaultPasswords['edit'] = array('@admins', 'id:Fred');%0a%0aYou can change the $DefaultPasswords array in local customization files such as:%0a* local/config.php (for entire wiki)%0a* farmconfig.php (for entire wikifarm)%0a%0a%0a!! [[#auth_groups]] Organizing accounts into groups%0a%0aAuthUser also makes it possible to group login accounts together into authorization groups, indicated by a leading "@" sign. As with login accounts, group memberships are maintained by editing the SiteAdmin.AuthUser page. Group memberships can be specified by either listing the groups for a login account (person belongs to groups) or the login accounts for a group (group includes people). You can repeat or mix-and-match the two kinds as desired:%0a%0a @writers: alice, bob%0a carol: @writers, @editors%0a @admins: alice, dave%0a %0aThen, to restrict page access to a particular group, simply use "[@@group@]" as the "password" in [@?action=attr@] or the $DefaultPasswords array, similar to the way that "[@id:username@]" is used to restrict access to specific login accounts.%0a%0a!!! Excluding individuals from password groups%0a%0aGroup password memberships are maintained by editing the SiteAdmin.AuthUser page. To specify a password group that allows access to anyone who is authenticated, you can specify:%0a%0a @wholeoffice: *%0a%0aIf you need to keep "Fred" out of this password group :%0a%0a @wholeoffice: *,-Fred%0a%0aTo allow all users except Fred to change page attributes, for example, you can add to config.php :%0a $DefaultPasswords['attr'] = array('id:*,-Fred');%0a%0a(:if authid:)%0a>>clip%3c%3c%0a!!!!!Wiki Debug%0a* %25newwin%25 [[Diagnostics -> {$Name}?action=diag]]%0a* %25newwin%25 [[PHPInfo -> {$Name}?action=phpinfo]]%0a(:ifend:)%0a%0a%0a%0a!! Getting account names and passwords from external sources%0a%0aThe AuthUser script has the capability of obtaining username/password pairs from places other than the SiteAdmin.AuthUser page, such as passwd-formatted files (usually called '.htpasswd' on Apache servers), [[#LDAP|LDAP]] servers, or even the ''local/config.php'' file.%0a%0a%0a!!! Passwd-formatted files (.htpasswd/.htgroup)%0a%0aPasswd-formatted files, commonly called ''.htpasswd'' files in Apache, are text files where each line contains a username and an encrypted password separated by a colon. A typical ''.htpasswd'' file might look like:%0a%0a alice:vK99sgDV1an6I%0a carol:Q1kSeNcTfwqjs%0a%0aTo get AuthUser to obtain usernames and passwords from a ''.htaccess'' file, add the following line to SiteAdmin.AuthUser, replacing "/path/to/.htpasswd" with the filesystem path of the ''.htpasswd'' file:%0a%0a htpasswd: /path/to/.htpasswd%0a%0aCreation and maintenance of the ''.htpasswd'' file can be performed using a text editor, or any number of other third-party tools available for maintaining ''.htpasswd'' files. The Apache web server typically includes an ''htpasswd'' command for creating accounts in .htpasswd:%0a%0a $ htpasswd /path/to/.htpasswd alice%0a New password:%0a Re-type new password:%0a Adding password for user alice%0a $%0a%0aSimilarly, one can use ''.htgroup'' formatted files to specify group memberships. Each line has the name of a group (without the "@"), followed by a colon, followed by a space separated list of usernames in the group.%0a%0a writers: carol%0a editors: alice carol bob%0a admins: alice dave%0a%0aNote that the groups are still "@writers", "@editors", and "@admins" in PmWiki even though the file doesn't specify the @ signs. To get AuthUser to load these groups, use a line in SiteAdmin.AuthUser like:%0a%0a htgroup: /path/to/.htgroup%0a%0a %0a!!! Configuration via ''local/config.php''%0a%0aAuthUser configuration settings can also be made from the ''local/config.php'' file in addition to the SiteAdmin.AuthUser page. Such settings are placed in the $AuthUser array, and ''must be set prior to including the ''authuser.php'' script''. Some examples:%0a%0a # set a password for alice%0a $AuthUser['alice'] = crypt('wonderland');%0a # set a password for carol%0a $AuthUser['carol'] = '$1$CknC8zAs$dC8z2vu3UvnIXMfOcGDON0';%0a # define the @editors group%0a $AuthUser['@editors'] = array('alice', 'carol', 'bob');%0a # Use local/.htpasswd for usernames/passwords%0a $AuthUser['htpasswd'] = 'local/.htpasswd';%0a # Use local/.htgroup for group memberships%0a $AuthUser['htgroup'] = 'local/.htgroup';%0a%0a[[#LDAP]]%0a!!! Configuration via LDAP%0a%0aAuthentication can be performed via an external LDAP server -- simply set an entry for "ldap" in either SiteAdmin.AuthUser or the ''local/config.php'' file.%0a%0a # use ldap.airius.com for authentication%0a $AuthUser['ldap'] = 'ldap://ldap.airius.com/ou=People,o=Airius?cn?sub';%0a%0aMake sure to include AuthUser below the entry for the ldap server:%0a%0a # Want to use AuthUser so we can use ldap for passwords%0a include_once("$FarmD/scripts/authuser.php");%0a%0aAnd remember to assign the Security Variables for edit and history (or whatever):%0a%0a #Security Variables set login for edit & history page%0a # to let anyone edit that has an ldap entry:%0a $HandleAuth['diff'] = 'edit';%0a $DefaultPasswords['edit'] = 'id:*';%0a $Author = $AuthId;%0a%0aLDAP authentication in AuthUser closely follows the model used by Apache 2.0's [[http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html|mod_auth_ldap]] module; see especially the documentation for [[http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html#authldapurl|AuthLDAPUrl]] for a description of the url format.%0a%0aFor servers that don't allow anonymous binds, AuthUser provides $AuthLDAPBindDN and $AuthLDAPBindPassword variables to specify the binding to be used for searching.%0a%0aSee also [[Cookbook:AuthUser via Microsoft LDAP]]%0a%0a!! Setting the Author Name%0aBy default, PmWiki will use a login name in the Author field of the edit form, but allows the author to change this value prior to saving. To force the login name to always be used as the author name, use the following sequence in config.php to activate AuthUser:%0a%0a include_once("$FarmD/scripts/authuser.php");%0a $Author = $AuthId; # after include_once()%0a%0aTo allow more flexibility, but still enable changes to be linked to the authorized user, one can give the author name a prefix of the $AuthId instead:%0a[@%0a include_once("$FarmD/scripts/author.php");%0a include_once("$FarmD/scripts/authuser.php");%0a if ($Author) {%0a if (strstr($Author, '-') != false) {%0a $Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);%0a } else if ($Author != $AuthId) {%0a $Author = $AuthId . '-' . $Author;%0a } else {%0a $Author = $AuthId;%0a }%0a } else {%0a $Author = $AuthId;%0a }%0a $AuthorLink = "[[~$Author]]";%0a@]%0aThe above will allow the user to put in the author name of their choice, but that will always be replaced by that name prefixed with "$AuthId-".%0aThe reason why $AuthorLink needs to be set is that, if it isn't, the RecentChanges page will have the wrong link in it.%0a%0a!!! Removing the "Author" edit field%0aTo force users to edit with their AuthID instead of having a field they can place any name in. This enables administration to keep track of who is doing what better. This line also links the Author name to their Profile.\\%0aGo to Site.EditForm, remove the line\\%0a[@$[Author]: (:input e_author:)@]\\%0aor replace it with\\%0a[@$[Author]: [[Profiles/{$Author}]]@]\\%0a%0a!! Authorization, Sessions, and WikiFarms [[#sessions]]%0a%0aPmWiki uses PHP sessions to keep track of any user authorization information. By default PHP is configured so that all interactions with the same server (as identified by the server's domain name) are treated as part of the same session.%0a%0aWhat this means for PmWiki is that if there are multiple wikis running within the same domain name, PHP will treat a login to one wiki as being valid for all wikis in the same domain. The easiest fix is to tell each wiki to have use a different "session cookie". Near the top of a wiki's ''local/config.php'' file, before calling authuser or other recipes, add a line like:%0a%0a-->[@session_name('XYZSESSID');@]%0a%0aThe XYZSESSID can be any unique name (letters only is safest).%0a%0a!! See Also%0a%0a* [[PmWiki.Passwords]]%0a* [[PmWiki.PasswordsAdmin]]%0a* [[Cookbook:AuthUser]] for tips and tricks%0a* [[SiteAdmin.AuthUser]]%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: I get http error 500 "Internal Server Error" when I try to log in. What's wrong?%0a%0aA: This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki.%0aThe crypt function changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1.%0aThis situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version.%0aThe same error occurs when you add encrypted passwords to local/config.php.%0a%0aSolution: Create the passwords on the system with the oldest PHP version and use them on all other systems.%0a%0aQ: Can I specify authorization group memberships from with ''local/config.php''?%0a%0aA: Yes -- put the group definition into the $AuthUser array (in config.php):%0a%0a $AuthUser['@editors'] = array('alice', 'carol', 'bob');%0a%0aQ: I'm running multiple wikis under the same domain name, and logins from one wiki are appearing on other wikis. Shouldn't they be independent?%0a%0aA: This is caused by the way that PHP treats sessions. See [[PmWiki.AuthUser#sessions]] for more details.%0a%0a%0aQ: Is there any way to record the time of the last login for each user when using AuthUser? I need a way to look for stale accounts.%0a%0aA: See [[Cookbook:UserLastAction]].%0a%0aQ: Though every settings seem correct, authentication against LDAP is not working, and there is nothing in ldap log. What's wrong ?%0a%0aA: Be sure ldap php module is installed ( on debian apt-get install php(4|5)-ldap ; apache(2)ctl graceful )%0a%0a%0aQ: The login form asks for username and password, but only password matters. %0a-> Username can be left blank and it still signs in under the account. Is this intentional and if so, can I change it so that the username and password must both be entered? - X 1/18/07 Never mind I think this has something to do with using the admin password. I created a test account and it's working ok.%0a%0aA: Make sure you are not entering the admin password when testing the account because, if the password is equal to the admin password, it will authenticate directly through the config.php file and skip any other system.%0a%0aA: Do note that even with AuthUser activated you can still log in with a blank username and only entering the password. In that case any password you enter will be "accepted" but only passwords which authenticate in the given context will actually give you any authorization rights. Using this capability AuthUser comfortably coexists with the default password-based system.%0a%0aIf you want to require both username and password, then you need to set an admin id '''before''' including authuser.php:%0a%0a[@%0a## Define usernames and passwords.%0a$AuthUser['carol'] = '$1$CknC8zAs$dC8z2vu3UvnIXMfOcGDON0';%0a%0a## Enable authentication based on username.%0ainclude_once('scripts/authuser.php');%0a%0a# $DefaultPasswords['admin'] = crypt('secret');%0a$DefaultPasswords['admin'] = 'id:carol';%0a@]%0a%0aA username and password will then be required before login is successful.%0a%0aQ: Is there any way to hide IP addresses once someone has logged in so that registered users can keep their IP addresses invisible to everyone except administrators? - X 1/18/07%0a%0aA: Not yet.%0a%0a%0aQ: Is there a way that people could self-register through AuthUser? %0a%0aA: You can see [[Cookbook:AuthUserSignup]] for a recipe about this problem. %0a%0aQ: I would like it that after I have AuthUser turned and a user is authenticated to get on my site, that if I have a password put on a particular page or group that they don't get the AuthUser form to show up (username and password), but only the typical field for password?%0a%0aA: See [[this thread of the mailing list -> http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/52420]].%0a -time=1245616861 +text=(:Summary:Authorization system that uses usernames and passwords:)%0a(:Audience: administrators (intermediate) :)%0aAuthUser is PmWiki's identity-based authorization system that allows access to pages to be controlled through the use of usernames and passwords. AuthUser can be used in addition to the [[Passwords | password-based]] scheme that is PmWiki's default configuration.%0a%0aAuthUser is a very flexible system for managing access control on pages, but flexibility can also bring complexity and increased maintenance overhead to the wiki administrator. This is why PmWiki defaults to the simpler password-based system. For some thoughts about the relative merits of the two approaches, see [[PmWiki:ThoughtsOnAccessControl]].%0a%0aSee also: [[Cookbook:Quick Start for AuthUser]].%0a%0a!! Activating AuthUser%0aTo activate PmWiki's identity-based system, add the following line%0ato ''local/config.php'':%0a%0a include_once("$FarmD/scripts/authuser.php");%0a%0aEnsure that you have [[PasswordsAdmin | set a site wide admin password]], otherwise you will not be able to edit [[SiteAdmin.AuthUser]].%0a%0a->%25note%25 Note: Older versions of PmWiki (before 2.2.0-beta58) use ''Site.AuthUser''.%0a%0aPmWiki caches some group and page authorization levels when a page is accessed. For this reason, it is better to include @@authuser.php@@ quite early in config.php, notably%0a* after any recipe which inserts some custom writable PageStore class (MySQL, SQLite, Compressed PageStore or other)%0a* and after any internationalization (UTF-8 and XLPage).%0a%0a(If you don't use a custom PageStore class and i18n, include @@authuser.php@@ first thing in @@config.php@@.)%0a%0aAll other recipes should be included after these.%0a%0a!! Creating user accounts%0aMost of AuthUser's configuration is performed via the [[SiteAdmin.AuthUser]] page. To change the AuthUser configuration, simply edit this page like any other wiki page (you'll typically need to use the site's admin password for this).%0a%0aTo create a login account, simply add lines to SiteAdmin.AuthUser that look like:%0a%0a username: [=(:=]encrypt ''password'':)%0a%0aFor example, to create a login account for "alice" with a password of "wonderland", enter:%0a%0a alice: [=(:=]encrypt wonderland:)%0a%0aWhen the page is saved, the "@@[=(:=]encrypt wonderland:)@@" part of the text will be replaced by an encrypted form of the password "wonderland". This encryption is done so that someone looking at the SiteAdmin.AuthUser page cannot easily determine the passwords stored in the page. %0a%0aTo change or reset an account's password, simply replace the encrypted string with another @@[=(:=]encrypt:)@@ directive.%0a%0a!! Controlling access to pages by login%0a%0aPages and groups can be protected based on login account by using "passwords" of the form [@id:username@] in the password fields of [@?action=attr@] (see [[PmWiki.Passwords]]). For example, to restrict a page to being edited by Alice, one would set the password to "[@id:alice@]".%0a%0aIt's possible to use multiple "id:" declarations and passwords in the [@?action=attr@] form, thus the following setting would allow access to Alice, Carol, and anyone who knows the password "quick":%0a%0a quick id:alice,carol%0a%0aTo allow access to anyone who has successfully logged in, use "[@id:*@]".%0a%0aOne can also perform site-wide restrictions based on identity in the $DefaultPasswords array: e.g.%0a%0a # require valid login before viewing pages%0a $DefaultPasswords['read'] = 'id:*';%0a # Alice and carol may edit%0a $DefaultPasswords['edit'] = 'id:alice,carol';%0a # All admins and Fred may edit%0a $DefaultPasswords['edit'] = array('@admins', 'id:Fred');%0a%0aYou can change the $DefaultPasswords array in local customization files such as:%0a* local/config.php (for entire wiki)%0a* farmconfig.php (for entire wikifarm)%0a%0a!! [[#auth_groups]] Organizing accounts into groups%0a%0aAuthUser also makes it possible to group login accounts together into authorization groups, indicated by a leading "@" sign. As with login accounts, group memberships are maintained by editing the SiteAdmin.AuthUser page. Group memberships can be specified by either listing the groups for a login account (person belongs to groups) or the login accounts for a group (group includes people). You can repeat or mix-and-match the two kinds as desired:%0a%0a @writers: alice, bob%0a carol: @writers, @editors%0a @admins: alice, dave%0a %0aThen, to restrict page access to a particular group, simply use "[@@group@]" as the "password" in [@?action=attr@] or the $DefaultPasswords array, similar to the way that "[@id:username@]" is used to restrict access to specific login accounts.%0a%0a!!! Excluding individuals from password groups%0a%0aGroup password memberships are maintained by editing the SiteAdmin.AuthUser page. To specify a password group that allows access to anyone who is authenticated, you can specify:%0a%0a @wholeoffice: *%0a%0aIf you need to keep "Fred" out of this password group :%0a%0a @wholeoffice: *,-Fred%0a%0aTo allow all users except Fred to change page attributes, for example, you can add to config.php :%0a $DefaultPasswords['attr'] = array('id:*,-Fred');%0a%0a(:if authid:)%0a>>clip%3c%3c%0a!!!!!Wiki Debug%0a* %25newwin%25 [[Diagnostics -> {$Name}?action=diag]]%0a* %25newwin%25 [[PHPInfo -> {$Name}?action=phpinfo]]%0a(:ifend:)%0a%0a!! Getting account names and passwords from external sources%0a%0aThe AuthUser script has the capability of obtaining username/password pairs from places other than the SiteAdmin.AuthUser page, such as passwd-formatted files (usually called '.htpasswd' on Apache servers), [[#LDAP|LDAP]] servers, or even the ''local/config.php'' file.%0a%0a!!! Passwd-formatted files (.htpasswd/.htgroup)%0a%0aPasswd-formatted files, commonly called ''.htpasswd'' files in Apache, are text files where each line contains a username and an encrypted password separated by a colon. A typical ''.htpasswd'' file might look like:%0a%0a alice:vK99sgDV1an6I%0a carol:Q1kSeNcTfwqjs%0a%0aTo get AuthUser to obtain usernames and passwords from a ''.htaccess'' file, add the following line to SiteAdmin.AuthUser, replacing "/path/to/.htpasswd" with the filesystem path of the ''.htpasswd'' file:%0a%0a htpasswd: /path/to/.htpasswd%0a%0aCreation and maintenance of the ''.htpasswd'' file can be performed using a text editor, or any number of other third-party tools available for maintaining ''.htpasswd'' files. The Apache web server typically includes an ''htpasswd'' command for creating accounts in .htpasswd:%0a%0a $ htpasswd /path/to/.htpasswd alice%0a New password:%0a Re-type new password:%0a Adding password for user alice%0a $%0a%0aSimilarly, one can use ''.htgroup'' formatted files to specify group memberships. Each line has the name of a group (without the "@"), followed by a colon, followed by a space separated list of usernames in the group.%0a%0a writers: carol%0a editors: alice carol bob%0a admins: alice dave%0a%0aNote that the groups are still "@writers", "@editors", and "@admins" in PmWiki even though the file doesn't specify the @ signs. To get AuthUser to load these groups, use a line in SiteAdmin.AuthUser like:%0a%0a htgroup: /path/to/.htgroup%0a%0a!!! Configuration via ''local/config.php''%0a%0aAuthUser configuration settings can also be made from the ''local/config.php'' file in addition to the SiteAdmin.AuthUser page. Such settings are placed in the $AuthUser array, and ''must be set prior to including the ''authuser.php'' script''. Some examples:%0a%0a # set a password for alice%0a $AuthUser['alice'] = crypt('wonderland');%0a # set a password for carol%0a $AuthUser['carol'] = '$1$CknC8zAs$dC8z2vu3UvnIXMfOcGDON0';%0a # define the @editors group%0a $AuthUser['@editors'] = array('alice', 'carol', 'bob');%0a # Use local/.htpasswd for usernames/passwords%0a $AuthUser['htpasswd'] = 'local/.htpasswd';%0a # Use local/.htgroup for group memberships%0a $AuthUser['htgroup'] = 'local/.htgroup';%0a%0a[[#LDAP]]%0a!!! Configuration via LDAP%0a%0aAuthentication can be performed via an external LDAP server -- simply set an entry for "ldap" in either SiteAdmin.AuthUser or the ''local/config.php'' file.%0a%0a # use ldap.airius.com for authentication%0a $AuthUser['ldap'] = 'ldap://ldap.airius.com/ou=People,o=Airius?cn?sub';%0a%0aMake sure to include AuthUser below the entry for the ldap server:%0a%0a # Want to use AuthUser so we can use ldap for passwords%0a include_once("$FarmD/scripts/authuser.php");%0a%0aAnd remember to assign the Security Variables for edit and history (or whatever):%0a%0a #Security Variables set login for edit & history page%0a # to let anyone edit that has an ldap entry:%0a $HandleAuth['diff'] = 'edit';%0a $DefaultPasswords['edit'] = 'id:*';%0a $Author = $AuthId;%0a%0aLDAP authentication in AuthUser closely follows the model used by Apache 2.0's [[http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html|mod_auth_ldap]] module; see especially the documentation for [[http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html#authldapurl|AuthLDAPUrl]] for a description of the url format.%0a%0aFor servers that don't allow anonymous binds, AuthUser provides $AuthLDAPBindDN and $AuthLDAPBindPassword variables to specify the binding to be used for searching.%0a%0aSee also [[Cookbook:AuthUser via Microsoft LDAP]]%0a%0a!! Setting the Author Name%0aBy default, PmWiki will use a login name in the Author field of the edit form, but allows the author to change this value prior to saving. To force the login name to always be used as the author name, use the following sequence in config.php to activate AuthUser:%0a%0a include_once("$FarmD/scripts/authuser.php");%0a $Author = $AuthId; # after include_once()%0a%0aTo allow more flexibility, but still enable changes to be linked to the authorized user, one can give the author name a prefix of the $AuthId instead:%0a[@%0a include_once("$FarmD/scripts/author.php");%0a include_once("$FarmD/scripts/authuser.php");%0a if ($Author) {%0a if (strstr($Author, '-') != false) {%0a $Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);%0a } else if ($Author != $AuthId) {%0a $Author = $AuthId . '-' . $Author;%0a } else {%0a $Author = $AuthId;%0a }%0a } else {%0a $Author = $AuthId;%0a }%0a $AuthorLink = "[[~$Author]]";%0a@]%0aThe above will allow the user to put in the author name of their choice, but that will always be replaced by that name prefixed with "$AuthId-".%0aThe reason why $AuthorLink needs to be set is that, if it isn't, the RecentChanges page will have the wrong link in it.%0a%0a!!! Removing the "Author" edit field%0aTo force users to edit with their AuthID instead of having a field they can place any name in. This enables administration to keep track of who is doing what better. This line also links the Author name to their Profile.\\%0aGo to Site.EditForm, remove the line\\%0a[@$[Author]: (:input e_author:)@]\\%0aor replace it with\\%0a[@$[Author]: [[Profiles/{$Author}]]@]\\%0a%0a!! Authorization, Sessions, and WikiFarms [[#sessions]]%0a%0aPmWiki uses PHP sessions to keep track of any user authorization information. By default PHP is configured so that all interactions with the same server (as identified by the server's domain name) are treated as part of the same session.%0a%0aWhat this means for PmWiki is that if there are multiple wikis running within the same domain name, PHP will treat a login to one wiki as being valid for all wikis in the same domain. The easiest fix is to tell each wiki to have use a different "session cookie". Near the top of a wiki's ''local/config.php'' file, before calling authuser or other recipes, add a line like:%0a%0a-->[@session_name('XYZSESSID');@]%0a%0aThe XYZSESSID can be any unique name (letters only is safest).%0a%0a!! See Also%0a%0a* [[PmWiki.Passwords]]%0a* [[PmWiki.PasswordsAdmin]]%0a* [[Cookbook:AuthUser]] for tips and tricks%0a* [[SiteAdmin.AuthUser]]%0a%0a%0a>>faq%3c%3c [[#faq]]%0aQ: I get http error 500 "Internal Server Error" when I try to log in. What's wrong?%0a%0aA: This can happen if the encrypted passwords are not created on the web server that hosts the PmWiki.%0aThe crypt function changed during the PHP development, e.g. a password encrypted with PHP 5.2 can not be decrypted in PHP 5.1, but PHP 5.2 can decrypt passwords created by PHP 5.1.%0aThis situation normally happens if you prepare everything on your local machine with the latest PHP version and you upload the passwords to a webserver which is running an older version.%0aThe same error occurs when you add encrypted passwords to local/config.php.%0a%0aSolution: Create the passwords on the system with the oldest PHP version and use them on all other systems.%0a%0aQ: Can I specify authorization group memberships from with ''local/config.php''?%0a%0aA: Yes -- put the group definition into the $AuthUser array (in config.php):%0a%0a $AuthUser['@editors'] = array('alice', 'carol', 'bob');%0a%0aQ: I'm running multiple wikis under the same domain name, and logins from one wiki are appearing on other wikis. Shouldn't they be independent?%0a%0aA: This is caused by the way that PHP treats sessions. See [[PmWiki.AuthUser#sessions]] for more details.%0a%0a%0aQ: Is there any way to record the time of the last login for each user when using AuthUser? I need a way to look for stale accounts.%0a%0aA: See [[Cookbook:UserLastAction]].%0a%0aQ: Though every settings seem correct, authentication against LDAP is not working, and there is nothing in ldap log. What's wrong ?%0a%0aA: Be sure ldap php module is installed ( on debian apt-get install php(4|5)-ldap ; apache(2)ctl graceful )%0a%0a%0aQ: The login form asks for username and password, but only password matters. %0a-> Username can be left blank and it still signs in under the account. Is this intentional and if so, can I change it so that the username and password must both be entered? - X 1/18/07 Never mind I think this has something to do with using the admin password. I created a test account and it's working ok.%0a%0aA: Make sure you are not entering the admin password when testing the account because, if the password is equal to the admin password, it will authenticate directly through the config.php file and skip any other system.%0a%0aA: Do note that even with AuthUser activated you can still log in with a blank username and only entering the password. In that case any password you enter will be "accepted" but only passwords which authenticate in the given context will actually give you any authorization rights. Using this capability AuthUser comfortably coexists with the default password-based system.%0a%0aIf you want to require both username and password, then you need to set an admin id '''before''' including authuser.php:%0a%0a[@%0a## Define usernames and passwords.%0a$AuthUser['carol'] = '$1$CknC8zAs$dC8z2vu3UvnIXMfOcGDON0';%0a%0a## Enable authentication based on username.%0ainclude_once('scripts/authuser.php');%0a%0a# $DefaultPasswords['admin'] = crypt('secret');%0a$DefaultPasswords['admin'] = 'id:carol';%0a@]%0a%0aA username and password will then be required before login is successful.%0a%0aQ: Is there any way to hide IP addresses once someone has logged in so that registered users can keep their IP addresses invisible to everyone except administrators? - X 1/18/07%0a%0aA: Not yet.%0a%0a%0aQ: Is there a way that people could self-register through AuthUser? %0a%0aA: You can see [[Cookbook:AuthUserSignup]] for a recipe about this problem. %0a%0aQ: I would like it that after I have AuthUser turned and a user is authenticated to get on my site, that if I have a password put on a particular page or group that they don't get the AuthUser form to show up (username and password), but only the typical field for password?%0a%0aA: See [[this thread of the mailing list -> http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/52420]].%0a +time=1246997357 Index: wikilib.d/Site.EditQuickReference =================================================================== --- wikilib.d/Site.EditQuickReference (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/Site.EditQuickReference (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.0-beta65 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 -author=simon +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 charset=ISO-8859-1 -csum=add anchor example, fix typo -host=202.37.32.2 +csum=fix link for a release +host=81.65.14.164 name=Site.EditQuickReference -rev=40 +rev=41 targets=PmWiki.BasicEditing,PmWiki.TextFormattingRules,PmWiki.DocumentationIndex,PmWiki.Tables,PmWiki.TableDirectives -text=(:Summary:quick reference for [[PmWiki/EditGettingStarted|editing]] pages:)%0a%25define=em font-weight=bold%25%0a(:table width='100%25' cellspacing='0' cellpadding='0' style='font-size:80%25; font-family:Arial; padding:2px; border:1px solid #cccccc;' class='quickref' :) (:comment Use 'quickref' class to override formatting :)%0a(:cellnr:)%0a%25target=_blank%25 [[PmWiki/Basic editing]] - [[PmWiki/Text formatting rules]] - [[PmWiki/Documentation index]]%0a(:cell align=right:)%0a%25em%25Tables%25%25: %25target=_blank%25[[PmWiki/Tables | simple ]] - [[PmWiki/TableDirectives | advanced ]]%0a(:cellnr:)%0a%25em%25Paragraphs%25%25: for a new paragraph, use a blank line;%0a(:cell align=right:)%0a%25em%25Line break%25%25: %0a%25em%25[=\\=]%25%25, %0a%25em%25[=[[%3c%3c]]=]%25%25, or %0a%25em%25[=(:nl:)=]%25%25%0a(:cellnr:)%0a%25em%25[=->=]%25%25 to indent text, %0a%25em%25[=-%3c=]%25%25 hanging text %0a(:cell align=right:)%0a%25em%25Join line%25%25: %25em%25\%25%25%0a(:cellnr colspan='2':)%0a%25em%25Lists%25%25: %0a%25em%25*%25%25 for bulleted, %0a%25em%25#%25%25 for numbered, %0a%25em%25:%25%25term%25em%25:%25%25definition for definition lists%0a(:cellnr colspan='2':)%0a%25em%25Emphasis%25%25: %0a%25em%25[=''=]%25%25''italics''%25em%25[=''=]%25%25 %0a%25em%25[='''=]%25%25'''bold'''%25em%25[='''=]%25%25 %0a%25em%25[='''''=]%25%25'''''bold italics'''''%25em%25[='''''=]%25%25 %0a%25em%25[=@@=]%25%25@@monospaced@@%25em%25[=@@=]%25%25%0a(:cellnr colspan='2':)%0a%25em%25References%25%25: %0a%25em%25[=[[=]%25%25another page%25em%25[=]]=]%25%25, %0a%25em%25[=[[=]%25%25[=http://example.com/=]%25em%25[=]]=]%25%25, %0a%25em%25[=[[=]%25%25another page %25em%25[=|=]%25%25 link text%25em%25[=]]=]%25%25, %0a%25em%25[=[[#=]%25%25anchor%25em%25[=]]=]%25%25,%0a%25em%25[=[[#=]%25%25anchor %25em%25[=|=]%25%25 link text%25em%25[=]]=]%25%25%0a(:cellnr colspan='2':)%0a%25em%25Groups%25%25: %0a%25em%25[=[[=]%25%25Group%25em%25[=/=]%25%25Page%25em%25[=]]=]%25%25 [-displays Page,-] %0a%25em%25[=[[=]%25%25Group%25em%25[=.=]%25%25Page%25em%25[=]]=]%25%25 [-displays [=Group.Page=],-] %0a%25em%25[=[[=]%25%25Group%25em%25[=(.=]%25%25Page%25em%25[=)]]=]%25%25 [-displays Group,-]%0a%25em%25[=[[=]%25%25Group%25em%25[=/]]=]%25%25 [-links Group homepage-]%0a(:cellnr:)%0a%25em%25Separators%25%25: %0a%25em%25!!%25%25, %0a%25em%25!!!%25%25 for headings, %0a%25em%25[=----=]%25%25 for horizontal line%0a(:cell align=right:)%0a%25em%25Prevent formatting%25%25: %0a%25em%25[=[==]%25%25...%25em%25[==]=]%25%25%0a(:cellnr:)%0a%25em%25Other%25%25: %0a%25em%25[=[+=]%25%25[+big+]%25em%25[=+]=]%25%25 %0a%25em%25[=[++=]%25%25[++bigger++]%25em%25[=++]=]%25%25 %0a%25em%25[=[-=]%25%25[-small-]%25em%25[=-]=]%25%25 %0a%25em%25[=[--=]%25%25[--smaller--]%25em%25[=--]=]%25%25 %0a%25em%25[='^=]%25%25'^superscript^'%25em%25[=^'=]%25%25 %0a%25em%25[='_=]%25%25'_subscript_'%25em%25[=_'=]%25%25 %0a%25em%25[={+=]%25%25{+inserted+}%25em%25[=+}=]%25%25 %0a%25em%25[={-=]%25%25{-deleted-}%25em%25[=-}=]%25%25%0a(:cell align=right:)%0a%25em%25Preformatted%25%25: %0a%25em%25[=[@=]%25%25...%25em%25[=@]=]%25%25 or %0a%25em%25[=>>=]pre%3c%3c%25%25...%25em%25[=>>=]%3c%3c%25%25%0a(:tableend:) -time=1199389378 +text=(:Summary:quick reference for [[PmWiki/BasicEditing|editing]] pages:)%0a%25define=em font-weight=bold%25%0a(:table width='100%25' cellspacing='0' cellpadding='0' style='font-size:80%25; font-family:Arial; padding:2px; border:1px solid #cccccc;' class='quickref' :) (:comment Use 'quickref' class to override formatting :)%0a(:cellnr:)%0a%25target=_blank%25 [[PmWiki/Basic editing]] - [[PmWiki/Text formatting rules]] - [[PmWiki/Documentation index]]%0a(:cell align=right:)%0a%25em%25Tables%25%25: %25target=_blank%25[[PmWiki/Tables | simple ]] - [[PmWiki/TableDirectives | advanced ]]%0a(:cellnr:)%0a%25em%25Paragraphs%25%25: for a new paragraph, use a blank line;%0a(:cell align=right:)%0a%25em%25Line break%25%25: %0a%25em%25[=\\=]%25%25, %0a%25em%25[=[[%3c%3c]]=]%25%25, or %0a%25em%25[=(:nl:)=]%25%25%0a(:cellnr:)%0a%25em%25[=->=]%25%25 to indent text, %0a%25em%25[=-%3c=]%25%25 hanging text %0a(:cell align=right:)%0a%25em%25Join line%25%25: %25em%25\%25%25%0a(:cellnr colspan='2':)%0a%25em%25Lists%25%25: %0a%25em%25*%25%25 for bulleted, %0a%25em%25#%25%25 for numbered, %0a%25em%25:%25%25term%25em%25:%25%25definition for definition lists%0a(:cellnr colspan='2':)%0a%25em%25Emphasis%25%25: %0a%25em%25[=''=]%25%25''italics''%25em%25[=''=]%25%25 %0a%25em%25[='''=]%25%25'''bold'''%25em%25[='''=]%25%25 %0a%25em%25[='''''=]%25%25'''''bold italics'''''%25em%25[='''''=]%25%25 %0a%25em%25[=@@=]%25%25@@monospaced@@%25em%25[=@@=]%25%25%0a(:cellnr colspan='2':)%0a%25em%25References%25%25: %0a%25em%25[=[[=]%25%25another page%25em%25[=]]=]%25%25, %0a%25em%25[=[[=]%25%25[=http://example.com/=]%25em%25[=]]=]%25%25, %0a%25em%25[=[[=]%25%25another page %25em%25[=|=]%25%25 link text%25em%25[=]]=]%25%25, %0a%25em%25[=[[#=]%25%25anchor%25em%25[=]]=]%25%25,%0a%25em%25[=[[#=]%25%25anchor %25em%25[=|=]%25%25 link text%25em%25[=]]=]%25%25%0a(:cellnr colspan='2':)%0a%25em%25Groups%25%25: %0a%25em%25[=[[=]%25%25Group%25em%25[=/=]%25%25Page%25em%25[=]]=]%25%25 [-displays Page,-] %0a%25em%25[=[[=]%25%25Group%25em%25[=.=]%25%25Page%25em%25[=]]=]%25%25 [-displays [=Group.Page=],-] %0a%25em%25[=[[=]%25%25Group%25em%25[=(.=]%25%25Page%25em%25[=)]]=]%25%25 [-displays Group,-]%0a%25em%25[=[[=]%25%25Group%25em%25[=/]]=]%25%25 [-links Group homepage-]%0a(:cellnr:)%0a%25em%25Separators%25%25: %0a%25em%25!!%25%25, %0a%25em%25!!!%25%25 for headings, %0a%25em%25[=----=]%25%25 for horizontal line%0a(:cell align=right:)%0a%25em%25Prevent formatting%25%25: %0a%25em%25[=[==]%25%25...%25em%25[==]=]%25%25%0a(:cellnr:)%0a%25em%25Other%25%25: %0a%25em%25[=[+=]%25%25[+big+]%25em%25[=+]=]%25%25 %0a%25em%25[=[++=]%25%25[++bigger++]%25em%25[=++]=]%25%25 %0a%25em%25[=[-=]%25%25[-small-]%25em%25[=-]=]%25%25 %0a%25em%25[=[--=]%25%25[--smaller--]%25em%25[=--]=]%25%25 %0a%25em%25[='^=]%25%25'^superscript^'%25em%25[=^'=]%25%25 %0a%25em%25[='_=]%25%25'_subscript_'%25em%25[=_'=]%25%25 %0a%25em%25[={+=]%25%25{+inserted+}%25em%25[=+}=]%25%25 %0a%25em%25[={-=]%25%25{-deleted-}%25em%25[=-}=]%25%25%0a(:cell align=right:)%0a%25em%25Preformatted%25%25: %0a%25em%25[=[@=]%25%25...%25em%25[=@]=]%25%25 or %0a%25em%25[=>>=]pre%3c%3c%25%25...%25em%25[=>>=]%3c%3c%25%25%0a(:tableend:) +time=1247701402 Index: wikilib.d/PmWiki.Security =================================================================== --- wikilib.d/PmWiki.Security (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Security (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=mv question to talk +csum=fix typo host=81.65.14.164 name=PmWiki.Security -rev=76 -targets=PmWiki.Passwords,PmWiki.PasswordsAdmin,PmWiki.UrlApprovals,PmWiki.AnalyzeResults,PmWiki.Blocklist,PmWiki.Notify,PmWiki.SecurityVariables,Profiles.Pm,PmWiki.DeletingPages,PmWiki.AvailableActions,Site.AuthForm,Profiles.HomePage,PmWiki.Drafts -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: Security]]%0a* [[Cookbook:Web server security]] Making the server more secure with .htaccess%0a* [[Cookbook:Farm security]] Making Farm installations secure%0a* [[Cookbook:EProtect]] 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: [[Profiles/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[@%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 -time=1241730553 +rev=79 +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:EProtect]] 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=1247528968 Index: wikilib.d/PmWiki.Uploads =================================================================== --- wikilib.d/PmWiki.Uploads (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.Uploads (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 ordered=1 urlencoded=1 -agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729) -author=szwip +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 charset=ISO-8859-1 -csum= -host=82.246.33.229 +csum=-local link +host=81.65.14.164 name=PmWiki.Uploads -rev=117 -targets=PmWiki.PmWiki,PmWiki.Images,PmWiki.UploadsAdmin,PmWiki.WikiGroup,PmWiki.PageDirectives,PmWiki.WikiAdministrator,PmWiki.Passwords,PmWiki.PasswordsAdmin,Site.PageActions,PmWiki.AvailableActions,Test.Test -text=(:Summary:Allow authors to upload files, also known as page attachments:)%0a(:Audience: authors (intermediate) :)%0a[[PmWiki]] can be configured to allow authors to upload and store files and [[images]] (known as attaching them).%0aThese attachments may then be referenced from any page. %0a%0a-> ''Note'': ''[[PmWiki]] is distributed with uploads disabled by default. See [[Uploads Admin]] for information about how to enable and configure the upload feature.''%0a%0a-> ''Note2'': ''Uploads can be configured site-wide, by-group, or by-page; see [[Uploads Admin]] for details. This determines whether all uploads go in one directory for the site, an individual directory for each group, or an individual directory for each page. The default is to organize uploads by [[WikiGroup | group]].''%0a%0a!! [@Attach:@] Syntax%0aTo add or link to an attachment, an author edits a page to include the markup "@@Attach:@@" followed by a name of an attachment (e.g., "@@[=Attach:resume.pdf=]@@"). When the page is displayed, the @@Attach:@@ markup becomes one of the following:%0a%0a* A link to the named attachment (if uploaded, ie already in the upload directory)%0a* A link to a form whereby the author can specify a file to be uploaded and used as the new attachment (if not yet uploaded, ie not in the upload directory)%0a* If the attachment is an [[image(s)]] file with an extension such as .gif, .jpeg, or .png, it is displayed as an [[image(s)]].%0a%0aThe behaviour of links can be modified to%0a* prevent an image attachment from displaying as an image, place it in double brackets (e.g., [@[[Attach:image.jpg]]@]).%0a* have a link to an attachment appear without the "[@Attach:@]" at the beginning of the link, use [@[[(Attach:)file.ext]]@].%0a%0a!! Attachments on other pages and groups%0aTo link to an uploaded attachment (image or file) from another group, you simply refer the group itself (make sure "Groupname" has the dot in it).%0a->[@Attach:Groupname./file_name.ext@]%0aIf PmWiki is configured with an individual directory per page use%0a->[@Attach:Groupname.Pagename/file_name.ext@]%0a%0a!! Names with spaces%0aTo link to a filename with spaces in it use the bracket link notation, eg%0a->[@[[Attach:a filename with spaces.txt]]@]%0aTo attach an [[PmWiki/image(s)]] file with spaces in the name so that is shows as an image use one of these {+workarounds+}%0a->[@[[#blank | Attach:image space.jpeg]]@]%0a->[@[[#1 | Attach:image space.jpeg]]@]%0a%0a!! Listing Uploaded Files On A Page%0aTo list files that have been uploaded, use the markup:%0a[[PmWiki/PageDirectives#attachlist | [@(:attachlist:)@] ]]%0a%0aThis will list attachments to the current group or page, depending whether attachments are organised per group or per page; each instance includes a link to the attachment for viewing or downloading. A list of attachments is also shown as part of the uploads page form.%0a%0a!!!Upload Form / Upload Replacement%0aOne can go directly to the upload form by appending "?action=upload" to the URI for any page that has file uploads enabled by the [[Wiki Administrator]]. Replace a file by simply uploading a new version of the file with the same name. %0a* Be sure to clear your browser cache after replacing an upload. Otherwise, it may appear that the original upload is still on the server. %0aIf you put @@$EnableUploadVersions=1;@@ in your @@local/config.php@@, the old versions of the same files are renamed and not removed.%0a%0a%0a!!!Type and Size Restrictions%0aFor security reasons, the upload feature is disabled when PmWiki is first installed.%0aWhen enabled uploads are restricted as to the types and sizes of files that may be uploaded to the server (see [[UploadsAdmin]]). PmWiki's default configuration limits file sizes to 50 kilobytes and file extensions to common types such as ".gif", ".jpeg", ".doc", ".txt", and ".pdf". %0a%0aIn addition, the administrator can configure the system to require an @@upload@@ password--see [[Passwords]] and [[PasswordsAdmin]].%0a%0aBy default the upload allows the following extensions:%0a%0a[[#imagetypes]] %0a->[@'gif','jpg','jpeg','png','bmp','ico','wbmp', # images%0a@]%0a[[#imagetypesend]]%0a->[@'mp3', 'au','wav', # audio%0a'mpg','mpeg','wmf','mov','qt','avi', # video%0a'zip', 'gz','tgz','tar','rpm','hqx', # archives%0a'odt','ods','odp', # OpenOffice.org%0a'doc','ppt','xls','exe','mdb', # MSOffice%0a'pdf','psd', 'ps','ai','eps', # Adobe%0a'htm','html','fla','swf', # web stuff%0a'txt','rtf','exe','tex','dvi','' # misc@]%0a%0a!!!Removal%0aAt present uploaded files can only be deleted from the server by the [[wiki administrator]]. Any uploads-authorized user may over-write an existing file by uploading another of the same name and extension to the same location.%0a%0aThe administrator may remove an uploaded file by accessing the server via ftp (or via a control panel, if the host offers such a feature). The recipe Cookbook:Attachtable allows the deletion of the files from the wiki.%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: When I upload a file, how do I make the link look like "file.doc" instead of "Attach:file.doc"?%0aA: Use parentheses, as in [@[[(Attach:)file.doc]]@]. There is also a configuration change that can eliminate the [@Attach:@] -- see [[Cookbook:AttachLinks]].%0a%0aQ: Why can't I upload files of size more than 50kB to my newly installed PmWiki?%0aA: Out of the box PmWiki limits the size of files to be uploaded to 50kB. Add%0a->@@$UploadMaxSize = 1000000; # limit upload file size to 1 megabyte@@%0a->to your ''config.php'' to increase limit to 1MB (for example). See [[UploadsAdmin]] for how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.%0a%0aQ: Why does my upload exit unexpectedly with "Incomplete file received"?%0aA: You may be running out of space in a 'scratch' area, used either by PmWiki or by PHP. On *nix, check that you have sufficient free space in /tmp and /var/tmp.%0a%0aQ: How do I make it so that the upload link still allows one to make another upload (if someone wants to replace the old version of a file with a newer version, for example). Currently you only get the upload link when there is no file in the upload directory.%0aA: Use the Attach [[Site/page action(s)]], and click on the delta symbol %25blue%25(Δ)%25%25 shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not not authorised to upload, or the attach action has been commented out or is missing. See also [[PmWiki/available actions]], and look at [[Test/Test?action=upload]].%0a%0aQ: How do I hide the "[=Attach:=]" for all attachments%0aA: See Cookbook:AttachLinks, note that this does not currently work for [@ [[Attach:my file.ext]] @].%0a%0aQ: How to avoid problems with non-ASCII characters in attachment names (i.e. "Zażółć geślą jaźń.doc")?%0aA: See $UploadNameChars[@ = "-\w. !=+#";@]%25%25 # allow exclamations, equals, plus, and hash%0a%0aQ: How can I link a file that have a 4-letter file extension such like 'abc.pptx'?%0aA: See [[Cookbook:Upload Types]]%0a%0aQ: How can I prevent others from using the url's of my images on their site%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0a -time=1244116676 +rev=118 +targets=PmWiki.PmWiki,PmWiki.Images,PmWiki.UploadsAdmin,PmWiki.WikiGroup,PmWiki.PageDirectives,PmWiki.WikiAdministrator,PmWiki.Passwords,PmWiki.PasswordsAdmin,Site.PageActions,PmWiki.AvailableActions +text=(:Summary:Allow authors to upload files, also known as page attachments:)%0a(:Audience: authors (intermediate) :)%0a[[PmWiki]] can be configured to allow authors to upload and store files and [[images]] (known as attaching them).%0aThese attachments may then be referenced from any page. %0a%0a-> ''Note'': ''[[PmWiki]] is distributed with uploads disabled by default. See [[Uploads Admin]] for information about how to enable and configure the upload feature.''%0a%0a-> ''Note2'': ''Uploads can be configured site-wide, by-group, or by-page; see [[Uploads Admin]] for details. This determines whether all uploads go in one directory for the site, an individual directory for each group, or an individual directory for each page. The default is to organize uploads by [[WikiGroup | group]].''%0a%0a!! [@Attach:@] Syntax%0aTo add or link to an attachment, an author edits a page to include the markup "@@Attach:@@" followed by a name of an attachment (e.g., "@@[=Attach:resume.pdf=]@@"). When the page is displayed, the @@Attach:@@ markup becomes one of the following:%0a%0a* A link to the named attachment (if uploaded, ie already in the upload directory)%0a* A link to a form whereby the author can specify a file to be uploaded and used as the new attachment (if not yet uploaded, ie not in the upload directory)%0a* If the attachment is an [[image(s)]] file with an extension such as .gif, .jpeg, or .png, it is displayed as an [[image(s)]].%0a%0aThe behaviour of links can be modified to%0a* prevent an image attachment from displaying as an image, place it in double brackets (e.g., [@[[Attach:image.jpg]]@]).%0a* have a link to an attachment appear without the "[@Attach:@]" at the beginning of the link, use [@[[(Attach:)file.ext]]@].%0a%0a!! Attachments on other pages and groups%0aTo link to an uploaded attachment (image or file) from another group, you simply refer the group itself (make sure "Groupname" has the dot in it).%0a->[@Attach:Groupname./file_name.ext@]%0aIf PmWiki is configured with an individual directory per page use%0a->[@Attach:Groupname.Pagename/file_name.ext@]%0a%0a!! Names with spaces%0aTo link to a filename with spaces in it use the bracket link notation, eg%0a->[@[[Attach:a filename with spaces.txt]]@]%0aTo attach an [[PmWiki/image(s)]] file with spaces in the name so that is shows as an image use one of these {+workarounds+}%0a->[@[[#blank | Attach:image space.jpeg]]@]%0a->[@[[#1 | Attach:image space.jpeg]]@]%0a%0a!! Listing Uploaded Files On A Page%0aTo list files that have been uploaded, use the markup:%0a[[PmWiki/PageDirectives#attachlist | [@(:attachlist:)@] ]]%0a%0aThis will list attachments to the current group or page, depending whether attachments are organised per group or per page; each instance includes a link to the attachment for viewing or downloading. A list of attachments is also shown as part of the uploads page form.%0a%0a!!!Upload Form / Upload Replacement%0aOne can go directly to the upload form by appending "?action=upload" to the URI for any page that has file uploads enabled by the [[Wiki Administrator]]. Replace a file by simply uploading a new version of the file with the same name. %0a* Be sure to clear your browser cache after replacing an upload. Otherwise, it may appear that the original upload is still on the server. %0aIf you put @@$EnableUploadVersions=1;@@ in your @@local/config.php@@, the old versions of the same files are renamed and not removed.%0a%0a%0a!!!Type and Size Restrictions%0aFor security reasons, the upload feature is disabled when PmWiki is first installed.%0aWhen enabled uploads are restricted as to the types and sizes of files that may be uploaded to the server (see [[UploadsAdmin]]). PmWiki's default configuration limits file sizes to 50 kilobytes and file extensions to common types such as ".gif", ".jpeg", ".doc", ".txt", and ".pdf". %0a%0aIn addition, the administrator can configure the system to require an @@upload@@ password--see [[Passwords]] and [[PasswordsAdmin]].%0a%0aBy default the upload allows the following extensions:%0a%0a[[#imagetypes]] %0a->[@'gif','jpg','jpeg','png','bmp','ico','wbmp', # images%0a@]%0a[[#imagetypesend]]%0a->[@'mp3', 'au','wav', # audio%0a'mpg','mpeg','wmf','mov','qt','avi', # video%0a'zip', 'gz','tgz','tar','rpm','hqx', # archives%0a'odt','ods','odp', # OpenOffice.org%0a'doc','ppt','xls','exe','mdb', # MSOffice%0a'pdf','psd', 'ps','ai','eps', # Adobe%0a'htm','html','fla','swf', # web stuff%0a'txt','rtf','exe','tex','dvi','' # misc@]%0a%0a!!!Removal%0aAt present uploaded files can only be deleted from the server by the [[wiki administrator]]. Any uploads-authorized user may over-write an existing file by uploading another of the same name and extension to the same location.%0a%0aThe administrator may remove an uploaded file by accessing the server via ftp (or via a control panel, if the host offers such a feature). The recipe Cookbook:Attachtable allows the deletion of the files from the wiki.%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: When I upload a file, how do I make the link look like "file.doc" instead of "Attach:file.doc"?%0aA: Use parentheses, as in [@[[(Attach:)file.doc]]@]. There is also a configuration change that can eliminate the [@Attach:@] -- see [[Cookbook:AttachLinks]].%0a%0aQ: Why can't I upload files of size more than 50kB to my newly installed PmWiki?%0aA: Out of the box PmWiki limits the size of files to be uploaded to 50kB. Add%0a->@@$UploadMaxSize = 1000000; # limit upload file size to 1 megabyte@@%0a->to your ''config.php'' to increase limit to 1MB (for example). See [[UploadsAdmin]] for how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.%0a%0aQ: Why does my upload exit unexpectedly with "Incomplete file received"?%0aA: You may be running out of space in a 'scratch' area, used either by PmWiki or by PHP. On *nix, check that you have sufficient free space in /tmp and /var/tmp.%0a%0aQ: How do I make it so that the upload link still allows one to make another upload (if someone wants to replace the old version of a file with a newer version, for example). Currently you only get the upload link when there is no file in the upload directory.%0aA: Use the Attach [[Site/page action(s)]], and click on the delta symbol %25blue%25(Δ)%25%25 shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not not authorized to upload, or the attach action has been commented out or is missing. See also [[PmWiki/available actions]].%0a%0aQ: How do I hide the "[=Attach:=]" for all attachments%0aA: See Cookbook:AttachLinks, note that this does not currently work for [@ [[Attach:my file.ext]] @].%0a%0aQ: How to avoid problems with non-ASCII characters in attachment names (i.e. "Zażółć geślą jaźń.doc")?%0aA: See $UploadNameChars[@ = "-\w. !=+#";@]%25%25 # allow exclamations, equals, plus, and hash%0a%0aQ: How can I link a file that have a 4-letter file extension such like 'abc.pptx'?%0aA: See [[Cookbook:Upload Types]]%0a%0aQ: How can I prevent others from using the url's of my images on their site%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0a +time=1247527835 Index: wikilib.d/PmWiki.PageTextVariables =================================================================== --- wikilib.d/PmWiki.PageTextVariables (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.PageTextVariables (.../pmwiki-2.2.3) (revision 2380) @@ -1,12 +1,12 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 +author=HansB charset=ISO-8859-1 -csum=rm link to Test +csum=added sectrion about use in conditionals ctime=1159470179 -host=81.65.14.164 +host=80.41.216.53 name=PmWiki.PageTextVariables -rev=116 -targets=PmWiki.TextFormattingRules,PmWiki.PageDirectives,PmWiki.ConditionalMarkup,PmWiki.IncludeOtherPages,PmWiki.PageLists,Site.PageListTemplates,PmWiki.PageListTemplates,PmWiki.PageVariables,Site.LocalTemplates -text=(:Summary:Page variables automatically made available through natural or explicit page markup:)%0a%0a>>rframe font-size:smaller noprint clear=right%3c%3c%0a!!!! Table of contents%0a* [[#defining | Defining page text variables]]%0a* [[#usage | Usage]]%0a** [[#usagesamepage | On the same page]]%0a** [[#usageotherpage | From other pages]]%0a** [[#usageincludedpage | On included pages]]%0a** [[#nested | Nested]]%0a** [[#pagelists | With pagelists]]%0a** [[#templates | In templates]]%0a** [[#usageother | Other usage]]%0a** [[#withincode | Within code]]%0a** [[#usagenotes | Usage notes]]%0a>>%3c%3c%0a%0aPage Text Variables were introduced in 2.2.0 beta 2. %0aThese are string variables automatically made available through [[PmWiki/TextFormattingRules | natural page]] markup or explicitly with [[PmWiki/PageDirectives | page directive]] markup within the wiki text of the page.%0a%0a:%25green%25Notes%25%25: [[ConditionalMarkup]] works fine with page text variables. Page text variables don't recognize [[ConditionalMarkup]]. This is also true for [[include other pages]]. %0a->[-Page text variables don't honor [@(:if:)@]. This is the same way that doing [@(:include OtherPage#section:)@] doesn't look to see if [@[[#section]]@] is inside of an [@(:if:)...(:ifend:)@] construct of some sort. -]%0a%0a[[#defining]]%0a!! Defining Page Text Variables%0a%0aThere are three ways to define automated Page Text Variables:%0a%0a* use a [[TextFormattingRules#DefinitionLists | definition list]] - the normal pmwiki markup for a definition list will create a page text variable%0a(:markup caption='Example:' class="horiz":)%0a:Name: Crisses%0a"{$:Name}"%0a(:markupend:)%0a->This creates a new variable that can be accessed by [@{$:Name}@] (becomes: "{$:Name}") in the page.%0a%0a* use a simple colon delimiter in normal text%0a(:markup caption='Example:' class="horiz":)%0aAddress: 1313 Mockingbird Lane%0a%0a"{$:Address}"%0a(:markupend:)%0a->This creates the [@{$:Address}@] variable (variable markup becomes: "{$:Address}") in the page.%0a%0a* hidden [[PmWiki/PageDirectives | directive]] form - PmWiki markup that doesn't render on the page, but defines the variable%0a(:markup caption='Example:' class="horiz":)%0a(:Country: Transylvania :)%0a"{$:Country}"%0a(:markupend:)%0a->This creates the [@{$:Country}@] variable (variable markup becomes: "{$:Country}") in the page.%0a%0a[[#usage]]%0a!! Usage%0a[[#usagesamepage]]%0a!!! Usage on the same page%0a%0aOn the same page you can resolve page text variables through the [@{$:Var}@] format (shown above).%0a%0a!!! Usage in headers and footers%0a%0aIf you want a GroupHeader, GroupFooter, SideBar, etc to call on page text variable in the main page, you need to include reference information. %0aTo explicitly reference the page text variable from the page being displayed add an asterisk to the page text variable's markup: [@{*$:Address}@] on the GroupFooter or GroupHeader page. %0a(:markup caption='Example' class=horiz:)%0a{*$:City}%0a(:markupend:)%0aTo include a page text variable ''from'' a header or footer see [[#usageotherpage |usage from other pages]] below.%0a%0a%0a[[#usageotherpage]]%0a!!! Usage from other pages%0a%0aIf you want to pull the data from another page, use the [@{Group/PageName$:Var}@] format.%0a(:markup caption='Example:' class="horiz":)%0aSuburb: Khandallah%0a(:Lake:Taupo:)%0a:Mountain:Mt Ruapehu%0a%0a->"{PmWiki/PageTextVariables$:Suburb}"%0a->"{{$FullName}$:Lake}"%0a->"{PmWiki/PageTextVariables$:Mountain}"%0a(:markupend:)%0a%0a[[#usageincludedpage]]%0a!!! Usage from included pages%0a%0aPage text variables are never [[IncludeOtherPages|included]] from their source page.%0aSee [[#usageotherpage|Usage from other pages]] above to refer to a page text variable on another page.%0a%0a[[#nested]]%0a!!! Nested page text variables%0a%0aPage text variables can be nested%0a(:markup caption='Example:' class="horiz":)%0a: MailingAddress : {$:Address}, {$:City}, {$:Country}%0a"{$:MailingAddress}"%0a(:markupend:)%0a%0aAnother way you may nest PTVs is to make (part of) the variable name a variable in itself:%0a(:markup caption='Example:' class="horiz":)%0ax:Test/Ptvb%0aContents of y on page {$:x}:%0a{{$:x}$:y}%0a(:markupend:)%0a%0a[[#pagelists]]%0a!!! Usage with pagelists%0a%0a[[Page lists]] can also access the page text variables:%0a(:markup caption='Example:' class="horiz":)%0a(:pagelist group=PmWiki order=$:Summary count=8 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a%0aAnd to create pagelist formats (such as those documented at [[Site.Page List Templates]], [[PmWiki/Page Lists]], [[PmWiki/Page List Templates]], [[PmWiki/Page Variables]]. Store custom pagelists at [[Site.Local Templates]]).%0a%0a[[Page lists]] can also use page text variables to select pages :%0a(:markup caption='Example:' class="horiz":)%0a(:pagelist group=PITS $:Category=Feature count=8 fmt=Cookbook/PagelistTemplateSamples#oneline order=-name:)%0a(:markupend:)%0a->lists pages having '$:Category' set to 'Feature'.%0a%0a(:markup caption='Example: multiple selections' class="horiz":)%0a(:pagelist group=Cookbook $:Version=1,2 order=-$:Version count=8 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a->lists pages having a '$:Version' of '1' or '2'.%0a%0a(:markup caption='Example: multiple selections with spaces' class="horiz":)%0a(:pagelist group=PmWiki $:City="Addis Ababa,Paris" order=-$:Version count=8 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a->'quotes' must surround ''all'' the selections.%0a%0a%0a(:markup caption='Example: Pages with City variable set' class="horiz":)%0aCity: Addis Ababa%0a(:pagelist group=PmWiki $:City=- count=10 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a->City variable is set.%0a%0a* When using page text variables for selection or ordering, don't put the curly braces around the variable name. The curly forms do a replacement before the pagelist command is evaluated. %0a%0a[[#set]]%0a!!! Testing if set or not set%0a(:table:)%0a(:cellnr:)'''=-''' %0a(:cell:)PTV is set (is not empty), eg [@(:pagelist $:MyPageTextVariable=- :)@]%0a(:cellnr:)'''=-?*''' %0a(:cell:)PTV is not set (is empty), ie is not set to one char followed by 0 or more chars, eg [@(:pagelist $:MyPageTextVariable=-?* :) @]%0a(:cellnr:)'''=*''' %0a(:cell:)display ''all'' pages, the page text variable is irrelevant%0a(:cellnr:)'''=-*''' %0a(:cell:)display ''no'' pages, the page text variable is irrelevant%0a(:tableend:)%0a%0a(:markup caption='Example: Pages without a summary' class="horiz":)%0a(:pagelist group=PmWiki $:Summary=-?* count=10 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a%0a[[#templates]]%0a!!! Use page text variable in a template%0aDisplay pages by Country page text variable.%0a(:markup caption='Example:' class="horiz":)%0a[@%0a[[#bycountry]]%0a(:if ! equal {{=$FullName}$:Country} {{%3c$FullName}$:Country} :)%0a-%3c'''[[{{=$FullName}$:Country}]]''': %0a(:ifend:)%0a[[{=$FullName}]]%0a[[#bycountryend]]%0a@]%0a(:pagelist group=PmWiki count=6 fmt={$FullName}#bycountry:)%0a(:markupend:)%0a->[-''some parts of this example are not working correctly, should not display all pages''-]%0a%0a[[#usageother]]%0a!!! Usage - other%0a%0aData relevant to a page (the "Base" page) may now also be found in other groups. If the Base page is Main/HomePage, the data page could be Data-Main/HomePage. A new variable called $BaseName, which automatically calculates the Base page name from the Data page name, and can be defined by including the following in config.php:%0a%0a->[@// The pattern for figuring out the basename of a page%0a$BaseNamePatterns['/^Data-/'] = '';@]%0a%0aYour pattern may vary.%0a%0a[[#withincode]]%0a!!! Usage - from within code (developers only)%0a%0aThe standard @@PageVar($pagename,$varname)@@ function can return page text variables, but remember to include the dollar and colon like this:%0a%0a->@@$var=PageVar($pagename,'$:City')@@%0a%0aActually, for text variables, @@PageVar@@ just calls @@PageTextVar($pagename,$varname)@@, so your code can be sped up slightly by calling it directly, but it takes just the raw variable name without any leading characters, like this: %0a%0a->@@$var=PageTextVar($pagename,'City')@@%0a%0aIt works by caching all page text-variables it finds in a page (in @@$PCache@@) and returns the one requested.%0a%0a@@PageTextVar@@ relies on the @@$PageTextVarPatterns@@ variable (which can be used to extend the recognized formats for page text variables in a page). In the older 2.2.0 Beta versions of PmWiki, this variable wasn't initialized until stdmarkup.php was run, ''after'' config.php was executed. Thus, if you needed to use page text variables inside config.php, you had to initialize it yourself. This is no longer necessary, but for those who are still running earlier versions of the beta series, here's the value to use:%0a%0a->[@ SDVA($PageTextVarPatterns, array(%0a 'var:' => '/^:*\\s*(\\w[-\\w]*)\\s*:[ \\t]?(.*)$/m',%0a '(:var:...:)' => '/\\(: *(\\w[-\\w]*) *:(?!\\))\\s?(.*?):\\)/s'));%0a @]%0a -time=1238272499 +rev=117 +targets=PmWiki.TextFormattingRules,PmWiki.PageDirectives,PmWiki.IncludeOtherPages,PmWiki.PageLists,Site.PageListTemplates,PmWiki.PageListTemplates,PmWiki.PageVariables,Site.LocalTemplates,PmWiki.ConditionalMarkup +text=(:Summary:Page variables automatically made available through natural or explicit page markup:)%0a%0a>>rframe font-size:smaller noprint clear=right%3c%3c%0a!!!! Table of contents%0a* [[#defining | Defining page text variables]]%0a* [[#usage | Usage]]%0a** [[#usagesamepage | On the same page]]%0a** [[#usageotherpage | From other pages]]%0a** [[#usageincludedpage | On included pages]]%0a** [[#nested | Nested]]%0a** [[#pagelists | With pagelists]]%0a** [[#templates | In templates]]%0a** [[#conditionals| With conditionals]]%0a** [[#usageother | Other usage]]%0a** [[#withincode | Within code]]%0a** [[#usagenotes | Usage notes]]%0a>>%3c%3c%0a%0aPage Text Variables were introduced in 2.2.0 beta 2. %0aThese are string variables automatically made available through [[PmWiki/TextFormattingRules | natural page]] markup or explicitly with [[PmWiki/PageDirectives | page directive]] markup within the wiki text of the page.%0a%0a[[#defining]]%0a!! Defining Page Text Variables%0a%0aThere are three ways to define automated Page Text Variables:%0a%0a* use a [[TextFormattingRules#DefinitionLists | definition list]] - the normal pmwiki markup for a definition list will create a page text variable%0a(:markup caption='Example:' class="horiz":)%0a:Name: Crisses%0a"{$:Name}"%0a(:markupend:)%0a->This creates a new variable that can be accessed by [@{$:Name}@] (becomes: "{$:Name}") in the page.%0a%0a* use a simple colon delimiter in normal text%0a(:markup caption='Example:' class="horiz":)%0aAddress: 1313 Mockingbird Lane%0a%0a"{$:Address}"%0a(:markupend:)%0a->This creates the [@{$:Address}@] variable (variable markup becomes: "{$:Address}") in the page.%0a%0a* hidden [[PmWiki/PageDirectives | directive]] form - PmWiki markup that doesn't render on the page, but defines the variable%0a(:markup caption='Example:' class="horiz":)%0a(:Country: Transylvania :)%0a"{$:Country}"%0a(:markupend:)%0a->This creates the [@{$:Country}@] variable (variable markup becomes: "{$:Country}") in the page.%0a%0a[[#usage]]%0a!! Usage%0a[[#usagesamepage]]%0a!!! Usage on the same page%0a%0aOn the same page you can resolve page text variables through the [@{$:Var}@] format (shown above).%0a%0a!!! Usage in headers and footers%0a%0aIf you want a GroupHeader, GroupFooter, SideBar, etc to call on page text variable in the main page, you need to include reference information. %0aTo explicitly reference the page text variable from the page being displayed add an asterisk to the page text variable's markup: [@{*$:Address}@] on the GroupFooter or GroupHeader page. %0a(:markup caption='Example' class=horiz:)%0a{*$:City}%0a(:markupend:)%0aTo include a page text variable ''from'' a header or footer see [[#usageotherpage |usage from other pages]] below.%0a%0a%0a[[#usageotherpage]]%0a!!! Usage from other pages%0a%0aIf you want to pull the data from another page, use the [@{Group/PageName$:Var}@] format.%0a(:markup caption='Example:' class="horiz":)%0aSuburb: Khandallah%0a(:Lake:Taupo:)%0a:Mountain:Mt Ruapehu%0a%0a->"{PmWiki/PageTextVariables$:Suburb}"%0a->"{{$FullName}$:Lake}"%0a->"{PmWiki/PageTextVariables$:Mountain}"%0a(:markupend:)%0a%0a[[#usageincludedpage]]%0a!!! Usage from included pages%0a%0aPage text variables are never [[IncludeOtherPages|included]] from their source page.%0aSee [[#usageotherpage|Usage from other pages]] above to refer to a page text variable on another page.%0a%0a[[#nested]]%0a!!! Nested page text variables%0a%0aPage text variables can be nested%0a(:markup caption='Example:' class="horiz":)%0a: MailingAddress : {$:Address}, {$:City}, {$:Country}%0a"{$:MailingAddress}"%0a(:markupend:)%0a%0aAnother way you may nest PTVs is to make (part of) the variable name a variable in itself:%0a(:markup caption='Example:' class="horiz":)%0ax:Test/Ptvb%0aContents of y on page {$:x}:%0a{{$:x}$:y}%0a(:markupend:)%0a%0a[[#pagelists]]%0a!!! Usage with pagelists%0a%0a[[Page lists]] can also access the page text variables:%0a(:markup caption='Example:' class="horiz":)%0a(:pagelist group=PmWiki order=$:Summary count=8 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a%0aAnd to create pagelist formats (such as those documented at [[Site.Page List Templates]], [[PmWiki/Page Lists]], [[PmWiki/Page List Templates]], [[PmWiki/Page Variables]]. Store custom pagelists at [[Site.Local Templates]]).%0a%0a[[Page lists]] can also use page text variables to select pages :%0a(:markup caption='Example:' class="horiz":)%0a(:pagelist group=PITS $:Category=Feature count=8 fmt=Cookbook/PagelistTemplateSamples#oneline order=-name:)%0a(:markupend:)%0a->lists pages having '$:Category' set to 'Feature'.%0a%0a(:markup caption='Example: multiple selections' class="horiz":)%0a(:pagelist group=Cookbook $:Version=1,2 order=-$:Version count=8 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a->lists pages having a '$:Version' of '1' or '2'.%0a%0a(:markup caption='Example: multiple selections with spaces' class="horiz":)%0a(:pagelist group=PmWiki $:City="Addis Ababa,Paris" order=-$:Version count=8 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a->'quotes' must surround ''all'' the selections.%0a%0a%0a(:markup caption='Example: Pages with City variable set' class="horiz":)%0aCity: Addis Ababa%0a(:pagelist group=PmWiki $:City=- count=10 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a->City variable is set.%0a%0a* When using page text variables for selection or ordering, don't put the curly braces around the variable name. The curly forms do a replacement before the pagelist command is evaluated. %0a%0a[[#set]]%0a!!! Testing if set or not set%0a(:table:)%0a(:cellnr:)'''=-''' %0a(:cell:)PTV is set (is not empty), eg [@(:pagelist $:MyPageTextVariable=- :)@]%0a(:cellnr:)'''=-?*''' %0a(:cell:)PTV is not set (is empty), ie is not set to one char followed by 0 or more chars, eg [@(:pagelist $:MyPageTextVariable=-?* :) @]%0a(:cellnr:)'''=*''' %0a(:cell:)display ''all'' pages, the page text variable is irrelevant%0a(:cellnr:)'''=-*''' %0a(:cell:)display ''no'' pages, the page text variable is irrelevant%0a(:tableend:)%0a%0a(:markup caption='Example: Pages without a summary' class="horiz":)%0a(:pagelist group=PmWiki $:Summary=-?* count=10 fmt=Cookbook/PagelistTemplateSamples#oneline:)%0a(:markupend:)%0a%0a[[#templates]]%0a!!! Use page text variable in a template%0aDisplay pages by Country page text variable.%0a(:markup caption='Example:' class="horiz":)%0a[@%0a[[#bycountry]]%0a(:if ! equal {{=$FullName}$:Country} {{%3c$FullName}$:Country} :)%0a-%3c'''[[{{=$FullName}$:Country}]]''': %0a(:ifend:)%0a[[{=$FullName}]]%0a[[#bycountryend]]%0a@]%0a(:pagelist group=PmWiki count=6 fmt={$FullName}#bycountry:)%0a(:markupend:)%0a->[-''some parts of this example are not working correctly, should not display all pages''-]%0a%0a[[#conditionals]]%0a!!! Use page text variables in [[PmWiki/conditional markup]]%0aPage text variables will be assigned/evaluated before any conditional markup is evaluated. That means you can use page text variables with conditional markup, but not conditional markup within page text variables. For instance a PTV will have a value even if it is set within a [@(:if false:)....(:if:)@] condition. %0a%0a%0a[[#usageother]]%0a!!! Usage - other%0a%0aData relevant to a page (the "Base" page) may now also be found in other groups. If the Base page is Main/HomePage, the data page could be Data-Main/HomePage. A new variable called $BaseName, which automatically calculates the Base page name from the Data page name, and can be defined by including the following in config.php:%0a%0a->[@// The pattern for figuring out the basename of a page%0a$BaseNamePatterns['/^Data-/'] = '';@]%0a%0aYour pattern may vary.%0a%0a[[#withincode]]%0a!!! Usage - from within code (developers only)%0a%0aThe standard @@PageVar($pagename,$varname)@@ function can return page text variables, but remember to include the dollar and colon like this:%0a%0a->@@$var=PageVar($pagename,'$:City')@@%0a%0aActually, for text variables, @@PageVar@@ just calls @@PageTextVar($pagename,$varname)@@, so your code can be sped up slightly by calling it directly, but it takes just the raw variable name without any leading characters, like this: %0a%0a->@@$var=PageTextVar($pagename,'City')@@%0a%0aIt works by caching all page text-variables it finds in a page (in @@$PCache@@) and returns the one requested.%0a%0a@@PageTextVar@@ relies on the @@$PageTextVarPatterns@@ variable (which can be used to extend the recognized formats for page text variables in a page). In the older 2.2.0 Beta versions of PmWiki, this variable wasn't initialized until stdmarkup.php was run, ''after'' config.php was executed. Thus, if you needed to use page text variables inside config.php, you had to initialize it yourself. This is no longer necessary, but for those who are still running earlier versions of the beta series, here's the value to use:%0a%0a->[@ SDVA($PageTextVarPatterns, array(%0a 'var:' => '/^:*\\s*(\\w[-\\w]*)\\s*:[ \\t]?(.*)$/m',%0a '(:var:...:)' => '/\\(: *(\\w[-\\w]*) *:(?!\\))\\s?(.*?):\\)/s'));%0a @]%0a +time=1247250626 Index: wikilib.d/PmWiki.OtherVariables =================================================================== --- wikilib.d/PmWiki.OtherVariables (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.OtherVariables (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum= +csum=$MaxPageTextVars host=81.65.14.164 name=PmWiki.OtherVariables -rev=68 -targets=PmWiki.FmtPageName,PmWiki.PageVariables -text=(:Summary:Variables not yet classified:)%0a[[#FmtV]]%0a:$FmtV: %0a: :This variable is an array that is used for string substitutions at the end of a call to @@[[FmtPageName]]()@@. For each element in the array, the "key" (interpreted as a string) will be replaced by the corresponding "value". The variable is intended to be a place to store substitution variables that have frequently changing values (thus avoiding a rebuild of the variable cache making @@[[FmtPageName]]()@@ faster). Also see $FmtP. %25green%25''Values of $FmtV are set by the internal functions FormatTableRow, LinkIMap, HandleBrowse, PreviewPage, HandleEdit, PmWikiAuth, and PasswdVar, apparently to set values for system generated string substitutions like PageText.''%25%25%0a%0a[[#FmtP]]%0a:$FmtP:%0a: :This variable is an array that is used for pattern substitutions near the beginning of a call to [@FmtPageName@]. For each element in the array, the "key" (interpreted as a pattern) will be replaced by the corresponding value evaluated for the name of the current page. This is for instance used to handle $-substitutions that depend on the pagename passed to [@FmtPageName()@]. Also see $FmtV. %25green%25From robots.php: ''If $EnableRobotCloakActions is set, then a pattern is added to $FmtP to hide any "?action=" url parameters in page urls generated by PmWiki for actions that robots aren't allowed to access. This can greatly reduce the load on the server by not providing the robot with links to pages that it will be forbidden to index anyway.''%0a%0a%0a[[#FmtPV]]%0a:$FmtPV:%0a: :This variable is an array that is used for defining [[Page Variables]]. New variables can be defined with [@$FmtPV['$VarName'] = 'variable definition';@] which can be used in markup with [@{$VarName}@]. Please note that the contents of [@$FmtPV['$VarName']@] are [@eval()@]ed to produce the final text for [@$VarName@], so the contents must be a PHP expression which is valid at the time of substitution. In particular, %25red%25this does not work:%25%25%0a%0a:: :%25red%25[@#This doesn't work@]%25%25%0a:: :[@$FmtPV['$MyText'] = "This is my text."; # WARNING: Doesn't work!@]%0a%0a: :The problem is that the text %25blue%25[@This is my text.@]%25%25 is not a valid PHP expression. To work it would need to be placed in quotes, so that what actually gets stored in [@$FmtPV['$MyText']@] is %25blue%25[@"This is my text."@]%25%25 which '''is''' a valid PHP expression for a text string. Thus the correct way to do this would be with an extra set of quotes:%0a%0a:: :[@#This will work@]%0a:: :[@$FmtPV['$MyText'] = '"This is my text."';@]%0a%0a: :This also has implications for how internal PHP or PmWiki variables are accessed. To have the page variable [@$MyVar@] produce the contents of the internal variable [@$myvar@], many folks try the following %25red%25which does not work:%25%25%0a%0a:: :%25red%25[@#This doesn't work either!@]%0a:: :[@$myvar = SomeComplexFunction();@]%0a:: :[@$FmtPV['$MyVar'] = $myvar; # WARNING: Doesn't work!@]%0a%0a: :There are several correct ways to do this, depending on whether you need the value of the [@$myvar@] variable as it was at the time the [@$FmtPV@] entry was created, or at the time that a particular instance of [@$MyVar@] is being rendered on a page. For most simple page variables that don't change during the processing of a page its more efficient to set the value when the entry is created:%0a%0a:: :[@$myvar = SomeComplexFunction();@]%0a:: :[@$FmtPV['$MyVar'] = "'" . $myvar . "'"; #capture contents of $myvar@]%0a%0a: :NOTE: If [@$myvar@] should contain single quotes, the above won't work as is, and you'll need to process the variable to escape any internal quotes.%0a%0a: :For more complex cases where an internal variable may have different values at different places in the page (possibly due to the effects of other markup), then you need to make the [@$FmtPV@] entry make an explicit reference to the global value of the variable (and the variable had better be global) like this:%0a%0a:: :[@global $myvar;@]%0a:: :[@$FmtPV['$MyVar'] = '$GLOBALS["myvar"]';@]%0a%0a: :Finally, there's nothing to stop you from simply having the evaluation of the [@$FmtPV@] entry execute a function to determine the replacement text:%0a%0a:: :[@# add page variable {$Today}, formats today's date as yyyy-mm-dd@]%0a:: :[@$FmtPV['$Today'] = 'strftime("%25Y-%25m-%25d", time() )';@]%0a%0a: :See [[Cookbook:MoreCustomPageVariables]] for more examples of how to use [@$FmtPV@].%0a -time=1234648265 +rev=69 +targets=PmWiki.FmtPageName,PmWiki.PageVariables,PmWiki.PageTextVariables +text=(:Summary:Variables not yet classified:)%0a[[#FmtV]]%0a:$FmtV: %0a: :This variable is an array that is used for string substitutions at the end of a call to @@[[FmtPageName]]()@@. For each element in the array, the "key" (interpreted as a string) will be replaced by the corresponding "value". The variable is intended to be a place to store substitution variables that have frequently changing values (thus avoiding a rebuild of the variable cache making @@[[FmtPageName]]()@@ faster). Also see $FmtP. %25green%25''Values of $FmtV are set by the internal functions FormatTableRow, LinkIMap, HandleBrowse, PreviewPage, HandleEdit, PmWikiAuth, and PasswdVar, apparently to set values for system generated string substitutions like PageText.''%25%25%0a%0a[[#FmtP]]%0a:$FmtP:%0a: :This variable is an array that is used for pattern substitutions near the beginning of a call to [@FmtPageName@]. For each element in the array, the "key" (interpreted as a pattern) will be replaced by the corresponding value evaluated for the name of the current page. This is for instance used to handle $-substitutions that depend on the pagename passed to [@FmtPageName()@]. Also see $FmtV. %25green%25From robots.php: ''If $EnableRobotCloakActions is set, then a pattern is added to $FmtP to hide any "?action=" url parameters in page urls generated by PmWiki for actions that robots aren't allowed to access. This can greatly reduce the load on the server by not providing the robot with links to pages that it will be forbidden to index anyway.''%0a%0a%0a[[#FmtPV]]%0a:$FmtPV:%0a: :This variable is an array that is used for defining [[Page Variables]]. New variables can be defined with [@$FmtPV['$VarName'] = 'variable definition';@] which can be used in markup with [@{$VarName}@]. Please note that the contents of [@$FmtPV['$VarName']@] are [@eval()@]ed to produce the final text for [@$VarName@], so the contents must be a PHP expression which is valid at the time of substitution. In particular, %25red%25this does not work:%25%25%0a%0a:: :%25red%25[@#This doesn't work@]%25%25%0a:: :[@$FmtPV['$MyText'] = "This is my text."; # WARNING: Doesn't work!@]%0a%0a: :The problem is that the text %25blue%25[@This is my text.@]%25%25 is not a valid PHP expression. To work it would need to be placed in quotes, so that what actually gets stored in [@$FmtPV['$MyText']@] is %25blue%25[@"This is my text."@]%25%25 which '''is''' a valid PHP expression for a text string. Thus the correct way to do this would be with an extra set of quotes:%0a%0a:: :[@#This will work@]%0a:: :[@$FmtPV['$MyText'] = '"This is my text."';@]%0a%0a: :This also has implications for how internal PHP or PmWiki variables are accessed. To have the page variable [@$MyVar@] produce the contents of the internal variable [@$myvar@], many folks try the following %25red%25which does not work:%25%25%0a%0a:: :%25red%25[@#This doesn't work either!@]%0a:: :[@$myvar = SomeComplexFunction();@]%0a:: :[@$FmtPV['$MyVar'] = $myvar; # WARNING: Doesn't work!@]%0a%0a: :There are several correct ways to do this, depending on whether you need the value of the [@$myvar@] variable as it was at the time the [@$FmtPV@] entry was created, or at the time that a particular instance of [@$MyVar@] is being rendered on a page. For most simple page variables that don't change during the processing of a page its more efficient to set the value when the entry is created:%0a%0a:: :[@$myvar = SomeComplexFunction();@]%0a:: :[@$FmtPV['$MyVar'] = "'" . $myvar . "'"; #capture contents of $myvar@]%0a%0a: :NOTE: If [@$myvar@] should contain single quotes, the above won't work as is, and you'll need to process the variable to escape any internal quotes.%0a%0a: :For more complex cases where an internal variable may have different values at different places in the page (possibly due to the effects of other markup), then you need to make the [@$FmtPV@] entry make an explicit reference to the global value of the variable (and the variable had better be global) like this:%0a%0a:: :[@global $myvar;@]%0a:: :[@$FmtPV['$MyVar'] = '$GLOBALS["myvar"]';@]%0a%0a: :Finally, there's nothing to stop you from simply having the evaluation of the [@$FmtPV@] entry execute a function to determine the replacement text:%0a%0a:: :[@# add page variable {$Today}, formats today's date as yyyy-mm-dd@]%0a:: :[@$FmtPV['$Today'] = 'strftime("%25Y-%25m-%25d", time() )';@]%0a%0a: :See [[Cookbook:MoreCustomPageVariables]] for more examples of how to use [@$FmtPV@].%0a%0a:$MaxPageTextVars: This variable prevents endless loops in accidental recursive [[PageTextVariables]] which could lock down a server. Default is 500 which means that each PageTextVariable from one page can be displayed up to 500 times in one wiki page.%0a +time=1246800413 Index: wikilib.d/PmWiki.UploadVariables =================================================================== --- wikilib.d/PmWiki.UploadVariables (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.UploadVariables (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.0 ordered=1 urlencoded=1 +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 charset=ISO-8859-1 -csum=refactor -host=81.65.14.164 +csum=$EnableUploadGroupAuth +host=77.195.128.89 name=PmWiki.UploadVariables -rev=52 +rev=53 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:$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:$UploadPrefixQuota:Overall size limit for groups, in the group configuration file (i.e., local/Group.php)%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:$UploadMaxSize:Maximum size for uploading files, 50000 octets (bytes) by default.%0a -time=1235242362 +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:$UploadPrefixQuota:Overall size limit for groups, in the group configuration file (i.e., local/Group.php)%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:$UploadMaxSize:Maximum size for uploading files, 50000 octets (bytes) by default.%0a +time=1246545614 Index: wikilib.d/PmWiki.InterMap =================================================================== --- wikilib.d/PmWiki.InterMap (.../pmwiki-2.2.2) (revision 2380) +++ wikilib.d/PmWiki.InterMap (.../pmwiki-2.2.3) (revision 2380) @@ -1,11 +1,11 @@ -version=pmwiki-2.2.1 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.2 ordered=1 urlencoded=1 +agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5 +author=Simon charset=ISO-8859-1 -csum=fix included site.intermap -host=81.65.14.164 +csum=anchor to path +host=202.37.32.2 name=PmWiki.InterMap -rev=43 +rev=44 targets=PmWiki.WikiWikiWeb,Site.InterMap,PmWiki.CustomInterMap -text=(:Summary: Interwiki links definition and use:)%0a(:Audience: author (intermediate) :)%0a%0aThe InterMap (also called InterWiki in some other wikis) is a system for defining links between [[WikiWikiWeb]] sites that was first developed by UseMod:UseModWiki and Meatball:MeatballWiki. The method is to use a word that stands for a path that is defined. InterMap links have the form [@MapPrefix:PagePath@], where the host prefix is converted to a partial URL based on entries in the site's ''intermap.txt'' and ''localmap.txt'' files.%0a%0a[[#custominclude]]%0aThe default ''intermap.txt'' distributed with PmWiki (in the ''scripts/'' directory) includes the following InterMap entries:%0a>>pre%3c%3c%0a PmWiki: http://pmwiki.org/wiki/PmWiki/ %0a Cookbook: http://pmwiki.org/wiki/Cookbook/ %0a Wiki: http://c2.com/cgi/wiki? %0a UseMod: http://usemod.com/cgi-bin/wiki.pl? %0a Meatball: http://usemod.com/cgi-bin/mb.pl? %0a Wikipedia: http://wikipedia.com/wiki/ %0a PITS: http://pmwiki.org/PITS/ %0a Path:%0a>>%3c%3c%0a%0a(:if exists {$SiteGroup}.InterMap:)%0a[[{$SiteGroup}.InterMap]] includes the following entries:%0a(:include {$SiteGroup}.InterMap#include#includeend:)%0a(:else:)%0aYou can map your own prefixes in your local page [[{$SiteGroup}.InterMap]].%0a(:ifend:)%0a[[#customincludeend]]%0a%0aThus, "PmWiki:Variables" becomes "http://pmwiki.org/wiki/PmWiki/" + "Variables," a link to the [[PmWiki.Variables->http://pmwiki.org/wiki/PmWiki/Variables]] page on the official PmWiki web site, Wiki:FrontPage is a link to the front page of the first WikiWikiWeb, and Wikipedia:Stonehenge takes you to the Wikipedia article about the famous megaliths in England. %0a%0aLike other links, you can use the double-bracket syntax to get different link text:%0a(:markup class=horiz:)%0a* [[Meatball:StartingPoints | starting points]] over at Meatball%0a* [[starting points -> Meatball:StartingPoints]] over at Meatball%0a(:markupend:)%0a%0aIf you want to link just to what the intermap says (e.g. http://wikipedia.com/wiki/ for Wikipedia), then do [@[[Wikipedia:. | Wikipedia's main page]]@], which produces [[Wikipedia:. | Wikipedia's main page]]. Note the . (period) after the Map: reference.%0a%0aThe special [@Path:@] InterMap entry can be used to create "[[Cookbook:RelativeUrls|relative urls]]" in [[Cookbook:RelativeLinks|links]].%0a%0aThe actual set of InterMap links at any site is defined by the site administrator via the [[Site.InterMap]] page and the ''local/localmap.txt'' file; for more details, see [[PmWiki.CustomInterMap]]s.%0a -time=1238272290 +text=(:Summary: Interwiki links definition and use:)%0a(:Audience: author (intermediate) :)%0a%0aThe InterMap (also called InterWiki in some other wikis) is a system for defining links between [[WikiWikiWeb]] sites that was first developed by UseMod:UseModWiki and Meatball:MeatballWiki. The method is to use a word that stands for a path that is defined. InterMap links have the form [@MapPrefix:PagePath@], where the host prefix is converted to a partial URL based on entries in the site's ''intermap.txt'' and ''localmap.txt'' files.%0a%0a[[#custominclude]]%0aThe default ''intermap.txt'' distributed with PmWiki (in the ''scripts/'' directory) includes the following InterMap entries:%0a>>pre%3c%3c%0a PmWiki: http://pmwiki.org/wiki/PmWiki/ %0a Cookbook: http://pmwiki.org/wiki/Cookbook/ %0a Wiki: http://c2.com/cgi/wiki? %0a UseMod: http://usemod.com/cgi-bin/wiki.pl? %0a Meatball: http://usemod.com/cgi-bin/mb.pl? %0a Wikipedia: http://wikipedia.com/wiki/ %0a PITS: http://pmwiki.org/PITS/ %0a Path:%0a>>%3c%3c%0a%0a(:if exists {$SiteGroup}.InterMap:)%0a[[{$SiteGroup}.InterMap]] includes the following entries:%0a(:include {$SiteGroup}.InterMap#include#includeend:)%0a(:else:)%0aYou can map your own prefixes in your local page [[{$SiteGroup}.InterMap]].%0a(:ifend:)%0a[[#customincludeend]]%0a%0aThus, "PmWiki:Variables" becomes "http://pmwiki.org/wiki/PmWiki/" + "Variables," a link to the [[PmWiki.Variables->http://pmwiki.org/wiki/PmWiki/Variables]] page on the official PmWiki web site, Wiki:FrontPage is a link to the front page of the first WikiWikiWeb, and Wikipedia:Stonehenge takes you to the Wikipedia article about the famous megaliths in England. %0a%0aLike other links, you can use the double-bracket syntax to get different link text:%0a(:markup class=horiz:)%0a* [[Meatball:StartingPoints | starting points]] over at Meatball%0a* [[starting points -> Meatball:StartingPoints]] over at Meatball%0a(:markupend:)%0a%0aIf you want to link just to what the intermap says (e.g. http://wikipedia.com/wiki/ for Wikipedia), then do [@[[Wikipedia:. | Wikipedia's main page]]@], which produces [[Wikipedia:. | Wikipedia's main page]]. Note the . (period) after the Map: reference.%0a%0a[[#path]]%0aThe special [@Path:@] InterMap entry can be used to create "[[Cookbook:RelativeUrls|relative urls]]" in [[Cookbook:RelativeLinks|links]].%0a%0aThe actual set of InterMap links at any site is defined by the site administrator via the [[Site.InterMap]] page and the ''local/localmap.txt'' file; for more details, see [[PmWiki.CustomInterMap]]s.%0a +time=1246566540