Compatible with DokuWiki
Similar to translation
This plugin shows a list of pages, available or not, in related namespaces. It is fully based on localization but has nothing to do with languages.
It is useful when you have several people working on the same project. Their description of things will be different but related if they are about the same thing. So it's handy to have buttons that link to others descriptions.
Each people (or group of people) will be associated a namespace, under which a thing will be a page.
If it's still unclear, you can see a demo here.
2007-11-22
main.php
(or put it in a dokuwiki\lib\tpl\default\pageheader.html
file for the default template)<?php $nsrelation = &plugin_load('syntax','nsrelation'); echo $nsrelation->_showNSRelations(); ?>
There are several config options, all accessible through the config manager.
You need to setup the namespaces you want your pages be linked to. Separate each one with a comma or space. There is no default namespace.
You can optionally choose to display prettier stings instead of the raw namespaces names. Separate each one with a comma. If this plugin doesn't find enough values, it will default to the raw namespaces.
You can define a namespace in which the display of the buttons should be done, and in which your related namespaces will reside. This is optional, leaving it empty will enable the plugin for the root namespace.
You might want to explain how the related namespaces work on your wiki to your users. To make this description easily accessible from the namespace selector, enter the pagename of your description in the configuration.
If you don't use the Config Manager and prefer configuring your wiki editing the config file, the useful lines which have to be added to your local.php
configuration file are:
$conf['plugin']['nsrelation']['nsrelations'] = 'desc_short desc_full desc_geek'; // available related namespaces $conf['plugin']['nsrelation']['nsrelationsdisplay'] = 'short desc., full desc., geek desc.'; // strings to display in selector $conf['plugin']['nsrelation']['nsrelationrootns'] = "descriptions"; // namespace where to activate $conf['plugin']['nsrelation']['about'] = "descriptions:start"; // page describing the relation process to users
The plugin does its work automatically by being called from the template (see installation), but you can disable it for a certain page by adding the following code to the top of the page:
~~NO_NSREL~~
Thanks to Andi for the base code, I didn't have to work much.