[dokuwiki] Page Loading for Redirect Plugins

  • From: Michael Stewart <statueofmike@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 21 May 2014 11:14:24 -0700

Hello.

How do you execute an inter-wiki link in a plugin syntax script?
I'm trying to add an immediate redirect function to a plugin. That is,
load a new page immediately instead of displaying the redirect page.
Other plugins add a redirect after loading the redirect page for a
brief time.

For example, while rendering the current page in a syntax plugin, a
script is inserted:
  https://www.dokuwiki.org/plugin:mediasyntax

Another accomplishes this in an action plugin:
  https://www.dokuwiki.org/plugin:pageredirect
  https://github.com/glensc/dokuwiki-plugin-pageredirect/blob/master/action.php

I think modifying the syntax plugin would be ideal because it could
support the option of "Wait X seconds before redirecting." When X is
greater than zero, I want to display a message like the mediasyntax
plugin does, saying "You will be redirected in X seconds...". When X
is zero, I plan to load the target page without displaying anything
before it.

I've tried using the header() PHP function used in the action plugin.
This doesn't seem to work in my syntax plugin script, probably because
body output has occurred elsewhere.
I also saw the documentation about environment variables like $ID and
thought there might be a way to load a new page through there, but
haven't found a way to use it.

Thank you,
Michael Stewart
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: