Adds "Purple Numbers" (granular IDs) and optionally comment links to every block level element.
Compatible with DokuWiki
This plugin adds Purple Numbers (granular IDs) to every block level element (<h1-5>, <p>, <li>, <pre> and <table>) for better addressability. Optionally links to comment pages are added per block element as well.
Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.
After the installation you need to set the renderer_xhtml config option to purplenumbers to switch from the core renderer to the purplenumbers renderer.
numbering type:uniqueness:internalID: create IDs that can be used as internal anchors (Attention: this means those IDs can potentially be created within the wiki and might not be unique, e.g. if your Purple Number is “ID75” and you have a heading “ID75” on the same page, this ID is ambiguous and will be the same for both)linkText:restrictionNS: restrict usage of plugin to these first level namespaces (comma separated)restrictionType:restrictionNS)restrictionNS)annotationPage: pattern for links to annotation pages (leave empty to disable), this can include certain placeholders (@PN@ for just the numeral part of the Purple Number, @PNID@ for the whole ID, @ID@ for the whole page ID including namespaces and @PAGE@ for just the pagename excluding namespaces), e.g. annotation:@PAGE@-@PNID@ on a page like “articlename” with a PNID of “ID5” would result in the page “annotation:articlename-id5” and @ID@:note-@PN@ on a page like “foo:bar:article” with a PN of “1.5:16” would result in “foo:bar:article:note-1_5-16”
Examples in brackets are produced when internalID is switched on.
| numbering = hierarchical | numbering = consecutive | |
|---|---|---|
| uniqueness = page-wide | ID1.5:16 (id1_5-16) | ID75 (id75) |
| uniqueness = site-wide | wiki:syntax.1.5:16 (wiki-syntax_1_5-16) | wiki:syntax.75 (wiki-syntax_75) |
This looks like a very useful tool, may well solve an information architecture puzzle I've been struggling with for some time with my larger projects requiring detailed internal cross-referencing.
It would be very useful if there were links to at least one demonstration wiki, ideally both examples where PN is used in “production”, as well as a sandbox/playground to check it out when deciding whether or not to implement.
Thanks for all of your FOSS contributions, they appear to valuable extensions to DW's functionality and created/maintained to a very high standard.
Question - when new content is added to the page/file, does everything get re-numbered and inbound links (to the source location and/or annotations-comments page) will now be broken??
It depends. The way it is done, you cannot guarantee links to each Purple Number will stay intact, but you can maximize the chance of it. When you're using a hierarchical numbering and your pages are of a very hierarchical nature, chances are most links will still work after you added something. But with a consecutive numbering or very flat pages, more links will get broken.
There are other solutions of Purple Numbers out there which have solved that specific problem, but they all need a database. In the end, this means that you should not use this plugin for typical wiki pages (when a lot of pages are bound to change all the time), but for text which is less likely to change.
One example installation which uses this plugin is Paralis.org (used within the “edition” namespace). That site doesn't use the latest version and the version it uses was also changed a bit, but the general functionality is the same. — Anika HenkeAnika Henke
ach
2011/11/24 00:21