Closed dactylroot closed 10 years ago
If the delay setting is set to zero, it would be helpful to somehow catch it and change the page url before rendering the redirect page. I don't know how to do this though.
thank you
ok to test your patch I have installed dokuwiki as I describe at http://www.linuxintro.org/wiki/DokuWiki#Installing
Then I installed mediasyntax as described here: http://www.staerk.de/thorsten/Software/Mediasyntax#Install_it
and I could confirm it works
bumped version on https://www.dokuwiki.org/plugin:mediasyntax?&#compatibility
confirming behavior - redirect takes two seconds without your patch.
git clone git@github.com:tstaerk/mediasyntax.git chown -R wwwrun:www mediasyntax
gives me the correct directory structure
Thanks a lot, this was bugging me as well!!!
See the only reason why I did not reduce the time to 0 was that you cannot change the redirecting page any longer. Because you will never be on it. Mediawiki solves this problem very elegant by a parameter (I believe) redirect=no that allows you to edit a page that is redirecting.
With your patch it is now possible to do 0-time redirects. In case you want to change a redirecting page you set the time to non-zero, change the redirecting site and set the delay to 0 again.
I asked the mailing list for help doing an immediate redirect without loading the intermediate page. It seems to be possible, I just haven't figured out how yet. I'll let you know what I find.
I hope to eventually emulate the Mediawiki behavior of transparent redirects, with a small alert at the top of the target page that provides a "redirect=no" link back to the redirecting page.
It would be great to support instant redirects as an option, but I don't know how to do that. I added a configuration option to change the number of seconds before a redirect is executed.