====== NSRelation Plugin ====== ---- plugin ---- description: Shows links to the same page but in related namespaces author : Christophe Gragnic email : christophegragnic@yahoo.fr type : syntax lastupdate : 2007-11-22 compatible : 2007-06-26, !Igor depends : conflicts : similar : translation tags : navigation, menu, namespace downloadurl: http://fezzik.free.fr/dl/nsrelations-plugin-2007-11-22.zip ---- 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 [[http://fezzik.free.fr/brasil/doku.php?id=descriptions:groupea:page|here]]. ===== Download ===== * [[http://fezzik.free.fr/dl/nsrelation.zip|nsrelations-plugin-2007-11-22.zip]] * [[http://fezzik.free.fr/dl/nsrelation.zip|nsrelations-plugin-2007-11-19.zip]] ===== Change Log ===== **2007-11-22** * now uses pipe separators for configuration of namespaces and their display strings * better css code ===== Installation ===== - Download and install the plugin through the [[plugin:Extension]] Manager. - Configure it through the [[plugin:config|Config Manager]] - Add the following code in your template's ''main.php'' (or put it in a ''dokuwiki\lib\tpl\default\pageheader.html'' file for the default template) _showNSRelations(); ?> ===== Configuration ===== 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. === Manual configuration === If you don't use the [[plugin:config|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 ===== Usage ===== 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~~ ===== Credits ===== Thanks to Andi for the base code, I didn't have to work much.