tstaerk / mediasyntax

Mediasyntax is a plugin for Dokuwiki that enables Mediawiki syntax.
http://www.staerk.de/thorsten/Mediasyntax
GNU General Public License v2.0
10 stars 6 forks source link

Request for function to configure redirect delay time in wiki Configuration Settings page. #13

Closed dactylroot closed 10 years ago

dactylroot commented 10 years ago

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.

dactylroot commented 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.

tstaerk commented 10 years ago

thank you

tstaerk commented 10 years ago

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

tstaerk commented 10 years ago

bumped version on https://www.dokuwiki.org/plugin:mediasyntax?&#compatibility

tstaerk commented 10 years ago

confirming behavior - redirect takes two seconds without your patch.

tstaerk commented 10 years ago

git clone git@github.com:tstaerk/mediasyntax.git chown -R wwwrun:www mediasyntax

gives me the correct directory structure

tstaerk commented 10 years ago

Thanks a lot, this was bugging me as well!!!

tstaerk commented 10 years ago

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.

dactylroot commented 10 years ago

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.