Loading...
 

PluginWantedPages

What does everybody want but your wiki is still missing?
WantedPages wink

General Description

A WikiPlugin to display which wiki pages are still wanted in a site (WantedPages), but not yet created.

Key Functions

Wildcards for ignoring source pages (fromPages), filtering of not wanted output (toPages), acceptance of site's settings, a debug feature, a couple of nice display options.

What to be aware of

The plugin has a filter mechanism to allow for withholding pages which are in Tiki's link table but which should not be displayed as WantedPages.
The filter is set through the level parameter. It can be set to "strict", "full" or "complete" and then resembles the three possible settings for the page_regex variable.
Furthermore it can be set to "custom" and then allows for a Custom-Regex to be passed for filtering.
E.g. a wiki's page regex is set to complete, wiki pages then may contain comma (eg. for separating the language code from the main page name). In this case a custom regex (same as full page regex plus comma) would be helpful to display these pages but withhold rubbish names.

Parameters

key default comments
ignore empty string A wildcard pattern of originating pages to be ignored. (Unix-style shell format, or DOS-like * or ? are possible, refer to PHP function fnmatch() for details.)
splitby '+' The character, by which ignored patterns are separated. Possible values: characters
skipext 0 Whether to include external wikis in the list. Possible values: 0 / 1
collect "from" Collect either originating or wanted pages in a cell and display them in the second column. Possible values: from / to
debug 0 Switch-on debug output with details about every rejected item. Possible values: 0 / 1 / 2
table "sep" Multiple collected items are separated in distinct table rows, or by comma or line break in one cell. Possible values: sep / co / br
level empty string Filter the list of wanted pages according to page_regex or custom filter. The default value is the site's current page_regex. Possible values: strict / full / complete / custom
Custom-Level-Regex empty string A custom filter for wanted pages to be listed (only used when level=>custom). Possible values: a valid regex-expression (PCRE)

Usage examples

tw.o will probably use these two on the WantedPages page:

  • {WANTEDPAGES(level=>custom,table=>co,skipext=>1)}([A-Za-z0-9_]|[\x80-\xFF])([\.: A-Za-z0-9,_\-]|[\x80-\xFF])*([A-Za-z0-9_]|[\x80-\xFF]){WANTEDPAGES}
  • {WANTEDPAGES(level=>custom,table=>co,skipext=>1,collect=>to)}([A-Za-z0-9_]|[\x80-\xFF])([\.: A-Za-z0-9,_\-]|[\x80-\xFF])*([A-Za-z0-9_]|[\x80-\xFF]){WANTEDPAGES}

and probably this one on the NotWantedPages page:

  • {WANTEDPAGES(debug=>1,level=>custom,table=>br,skipext=>1,collect=>to)}([A-Za-z0-9_]|[\x80-\xFF])([\.: A-Za-z0-9,_\-]|[\x80-\xFF])*([A-Za-z0-9_]|[\x80-\xFF]){WANTEDPAGES}

List of latest changes

  • Ignored pages may contain wildcards (see PHP function fnmatch())
  • A windows (and PHP < 4.3.0) version of fnmatch() is included with the source
  • The splitby character can be selected freely
  • External wikis can be skipped from the list of wanted pages
  • Site settings for WikiWords and dashedWikiWords are respected
  • Multiple fromPages with the same toPage can be in one row, separated by either comma or <br />
  • Multiple toPages with the same fromPage can be in one row, separated by either comma or <br />
  • The indices in the table (first column) can be either fromPages or toPages (nice to get some information about which existing page really needs some fixing)
  • ToPages are not wiki parsed, so rubbish syntax etc. is not displayed anymore (if it is displayed, it is part of the link sad )
  • A "barebone" debug mode displays all recognized WantedPages, and what will happen with them, before the tiki page is displayed. This may help to find out what some of the links consist of (and uses esp. low memory!!)
  • A "nice" debug mode displays all NotWantedPages (instead of the WantedPages) and why they were rejected, within the table.
  • Parameter level to describe with which strictness non-WikiWords are tested against the wiki syntax. If your wiki syntax (page_regex) is set to 'complete', you can set WantedPages to eg. 'full' and suppress forcefully all possible links which are not within the rules for 'full'.
  • Setting the level parameter to 'custom', a user-defined level regex (PCRE) can be provided for displaying the result. The custom regex is provided as data for the plugin, therefore inserted between the plugin tags: {WANTEDPAGES(level=>custom)}Custom-Regex{WANTEDPAGES} There is a simple validation for the custom regex.
  • Nicer output of help function
  • Output can be translated


Page last modified on Wednesday 15 February 2006 05:15:18 GMT-0000

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.