1
2
3
4
5
6
7
8
9
10
|
version=pmwiki-2.3.36 ordered=1 urlencoded=1
author=Petko
charset=UTF-8
csum=Clarify $EnablePageListProtect may or may not be faster, %25hlt php%25 (+348)
ctime=1136054369
name=PmWiki.PagelistVariables
rev=47
targets=PmWiki.PagelistVariables,PmWiki.CustomPagelistSortOrder,PmWiki.PageLists,Cookbook.SearchPatterns,PmWiki.PathVariables,Site.LocalTemplates,Site.PageListTemplates,PmWiki.IncludeOtherPages,PmWiki.PageListTemplates,Site.Search
text=(:Summary:Variables used with [[PmWiki/page lists]] and search results:)%0a:$EnablePageListProtect:When set to 1 (which is the default), causes %25pmhlt%25[@(:pagelist:)@] and [@(:searchresults:)@]%25%25 to exclude listing any pages for which the browser does not currently have read authorization. Setting this to zero means that read-protected pages can appear in a listing, even if the visitor cannot open them. In some cases this can speed up searches considerably (because page permissions do not need to be checked). OTOH in case of WikiGroups with different GroupAttributes permissions and many pages each, leaving the default enabled may be faster, as then the individual pages from unauthorized groups are not checked.%0a%0a:$PageListSortCmpFunction:The function used to compare values when ordering a page list, for historical reasons the default is '[[(http://php.net/)strcasecmp]]' and sorts alphabetically and case insensitively. If you regularly order numbers or strings with numbers, you can set this variable to '[[(http://php.net/)strnatcasecmp]]' and the list will be sorted according to a [[https://github.com/sourcefrog/natsort#readme|natural order]], case insensitively:\\%0a%25hlt php%25[@$PageListSortCmpFunction = 'strnatcasecmp';# "natural" sorting of pagelists@]%25%25\\%0aOr you can write here the name of a custom function you have defined. This is the general sorting function, for specific needs you can create specific functions, see [[(PmWiki:)CustomPagelistSortOrder]].%0a%0a:$PageListVarFoldFn: PageList and Search terms, including page variable search terms are always case insensitive for the Latin alphabet. For international characters the page variable terms were case sensitive until PmWiki 2.2.115, and became case insensitive from 2.2.116 (like for the Latin characters). If your pagelists relied on the previous behavior, you can set here a function name that does not change the case of the international characters, for example %25hlt php%25[@$PageListVarFoldFn = 'strval';@]%0a%0a:$SearchPatterns:An array of page name patterns to be required or excluded from search and [[PmWiki/PageLists|pagelist]] results. In order to be included in a search listing or page listing, a page's name must not match any pattern that is delimited by exclamation points (!) and must match all other patterns. See [[Cookbook:SearchPatterns]].%0a-> %25hlt php%25[@# Limit all searches to Main group%0a$SearchPatterns['default'][] = '/^Main\\./';%0a# Exclude the Main group from search results%0a$SearchPatterns['default'][] = '!^Main\\.!';%0a# Exclude RecentChanges pages from search results%0a$SearchPatterns['default'][] = '!\\.(All)?RecentChanges$!';%0a# Prevent a page from listing itself in (:pagelist:) or (:searchresults:)%0a$SearchPatterns['default'][] = FmtPageName('!^$FullName$!', $pagename);%0a@]%0a%0a:$SearchBoxOpt:%0a-> For example %25hlt php%25[@ $SearchBoxOpt['target'] = '$DefaultGroup.Search'; @]%0a%0a:$SearchBoxInputType:The HTML "type" attribute for the search field. Default is "text" which is valid HTML4. If your skin uses HTML5, you can change this to "search":%0a-> %25hlt php%25@@ $SearchBoxInputType = "search";@@%0a%0a%0a:$EnablePageIndex:When set to 0, disables default indexing. By default PmWiki maintains a "link and word index" in $PageIndexFile which significantly speeds up categories, backlinks, and searches.%0a%0a:$PageIndexFile:The location of the "page index" file for [@(:pagelist:)@], defaults to @@$WorkDir/.pageindex@@.%0a%0a:$PageListCacheDir:The name of a writable directory where PmWiki can cache results of [@(:pagelist:)@] directives to speed up subsequent displays of the same list. Default is empty, which disables the pagelist cache.%0a-> %25hlt php%25[@# Enable pagelist caching in work.d/.pagelistcache%0a$PageListCacheDir = 'work.d/.pagelistcache';%0a@]%0a%0a:$PageSearchForm:The page to be used to format search results for [@?action=search@] (unless the current page has a "searchresults" directive in it). This variable can be an array, in which case the first page found from the array is used.%0a-> %25hlt php%25[@# Simple use of page search form in the default group%0a$PageSearchForm = '$DefaultGroup.Search';%0a@]%0a-> %25hlt php%25[@# Use Search page in current group if it exists, otherwise use Site.Search%0a$PageSearchForm = array('$Group.Search', '[=$[$SiteGroup/Search]=]');%0a@]%0a%0a:$FPLTemplatePageFmt:The pages to be searched for a pagelist template specified by a [@fmt=#xyz@] parameter. Defaults to searching the current page, [[Site.LocalTemplates]] and [[Site.PageListTemplates]].%0a%0a-> %25hlt php%25[@# PMWiki default setup%0aglobal $FPLTemplatePageFmt;%0a$FPLTemplatePageFmt = array(%0a '{$FullName}', %0a '{$SiteGroup}.LocalTemplates', %0a '{$SiteGroup}.PageListTemplates');@]%0a%0a-> It can be customized to look in other pages.%0a%0a-> %25hlt php%25[@# Search a Group.Templates page as well as the Site templates%0aglobal $FPLTemplatePageFmt;%0a$FPLTemplatePageFmt = array(%0a '{$Group}.Templates',%0a '{$SiteGroup}.LocalTemplates',%0a '{$SiteGroup}.PageListTemplates');@]%0a%0a-> Or declare defaults for the template array:%0a-> %25hlt php%25[@# Search a Group.Templates page as well as the Site templates%0aglobal $FPLTemplatePageFmt;%0aSDV($FPLTemplatePageFmt, array('{$FullName}',%0a '{$Group}.Templates',%0a '{$SiteGroup}.LocalTemplates', '{$SiteGroup}.PageListTemplates')%0a);@]%0a%0a:$EnableUndefinedTemplateVars: This variable controls how undefined [={$$Variable}=] is processed in [[IncludeOtherPages|includes]] and [[PageList templates]]. If set to 0 (default), undefined [={$$Variable}=]s are removed from the included section or template. If set to 1, undefined [={$$Variable}=]s are displayed as is, with {$$...}. ''Note that PmWiki versions 2.2.13 and earlier '''kept''' unset include/template variables.''%0a: : %25hlt php%25@@$EnableUndefinedTemplateVars = 0;@@ # Delete unset raw template variables%0a: : %25hlt php%25@@$EnableUndefinedTemplateVars = 1;@@ # Keep and print unset raw template variables%0a%0a:$PageIndexFoldFunction: A custom function used to 'fold' (simplify, normalize) the page words before storing them in the wiki.d/.pageindex file, and the search terms typed by the users. By default, PmWiki converts these to lowercase, here you can define a function that does it differently (for example, stripping inline HTML tags).%0a%0a:$PageIndexTermsFunction: A function to split the page texts into normalized search terms. By default, the core function PageIndexTerms() is called, with this variable you can override it with a custom function. This may be useful if you need to remove some texts from the page index, for example inline HTML tags. The first and only argument of the function may be either a string, or an array of strings.%0a%0a:$EnableSearchAtLeastOneTerm:By default, searching for several terms like @@term1 term2@@ will list pages containing all the terms. Setting this variable to 1 will cause the search to list pages containing at least one of the typed terms. In this case, required terms can be preceded by "+" like @@+term1 +term2@@. If you change this variable, you may want to update the search instructions in your [[$[{$SiteGroup}/Search]]] page.%0a
time=1724058754
|