[dokuwiki] Re: Purple Numbers

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 12 May 2009 01:08:55 +0100


On 10 May 2009, at 15:30, Anika Henke wrote:

Hi list,

Today "Purple Numbers" (http://en.wikipedia.org/wiki/Purple_Numbers) have been added to DokuWiki.

Purple Numbers are (in this case) granular hierarchical IDs applied to each <p>, <li>, <pre> and <table>. As all <hx> already have their unique ID those were kept untouched. To have easy access to those IDs, a link is added to the end of each section. To make the link unobtrusive, CSS was added (to the default template) to only show them when the cursor hovers over the according section. Intentionally, no extra care was given to IE6 and under (as this is no essential functionality anyway).

I would have thought the variable nature of wiki pages would make a paragraph number linking system problematic. Someone edits a page and the link accuracy could well be destroyed - unless the link is also to a particular revision.


Things to do:
* Unfortunately I couldn't figure out how the <pre>s from GeSHi can be manipulated.

The GeSHi <pre> is stripped and replaced by a DokuWiki wrapper element, usually <pre> in p_xhtml_cached_geshi (inc/parserutils.php). You could extend that function to take an "id" as well as a wrapper tag and if present add the id to the wrapper element.

- Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: