[dokuwiki] Re: Linking to internal pages with actions

  • From: Myron Turner <turnermm02@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 09 Feb 2011 18:56:48 -0600

On 2/9/2011 5:28 PM, Andreas Haerter wrote:
Am 31.01.2011 16:03, schrieb Michael Hamann:
Excerpts from Chris Tapp's message of 2011-01-31 15:53:55 +0100:
Is it possible to create an internal link to a page and include an
action?

Since Anteater (2010-11-07) [[ns:page?do=my_action|Do stuff]] is
supported. See http://www.dokuwiki.org/tips:links-to-dokuwiki-commands
if you need it in older versions of DokuWiki.

I could need this for the citation feature at vector/monobook.

Which is the best way for detecting the running DokuWiki version to make
it possible to use this without loosing compatibility to older versions?

You could simply check for the existence of $conf['fnencode'], which was introduced with Anteater. Or more comprehensively, you can create a timestamp for Anteater based on its distribution date and test to see if function_exists('getVersionData') and if so, get the current distribution's date, then compare the timestamps to see if the current is >= anteater. The latter is just a fail-safe in case 'fnencode' is changed. Use php's mktime() to create the timestamps.


--
Myron Turner
http://mturner.org/
http://mturner.org/fckgLite
http://www.mturner.org/dwfck/doku.php
http://www.room535.org


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: