DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:goto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugin:goto [2012-07-20 15:09]
195.35.72.170 old revision restored (2012/07/18 20:56)
plugin:goto [2018-07-07 01:01] (current)
Webmust Add compatibility
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description:​ Easily have a page redirect to another page in the wiki +description:​ Easily have a page redirect to another page in the wiki 
-author ​    : Allen Ormond +author ​    : Allen Ormond, cziehr 
-email      : 2006-07-19+email      : aormond@gmail.com,​ info@einsatzleiterwiki.de
 type       : syntax type       : syntax
-lastupdate : 2006-07-19 +lastupdate : 2017-02-16 
-compatible : 2006-11-06Angua+compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick MannersGreebo
 depends ​   :  depends ​   : 
 conflicts ​ :  conflicts ​ : 
-similar ​   : 404manager, pageredirect, redirect+similar ​   : 404manager, pageredirect
 tags       : redirect tags       : redirect
  
-downloadurl: ​http://yeahway.com/stuff/plugingoto.zip+downloadurl: ​https://github.com/cziehr/goto/​zipball/​master 
 +bugtracker : https://​github.com/​cziehr/​goto/​issues 
 +sourcerepo : https://​github.com/​cziehr/​goto/​ 
 ---- ----
  
-This [[plugins|plugin]] requires the user to have JavaScript enabled in order to work to its fullest. However, a redirect link will still be displayed even without JavaScript.+This plugin requires the user to have JavaScript enabled in order to work to its fullest. However, a redirect link will still be displayed even without JavaScript.
  
 ===== Syntax ===== ===== Syntax =====
 +
 You can put the GOTO string anywhere in the document, but it probably makes the most sense to put it at the top. You can put the GOTO string anywhere in the document, but it probably makes the most sense to put it at the top.
 +
   ~~GOTO>​wiki:​syntax~~   ~~GOTO>​wiki:​syntax~~
-The above will force the document to redirect to the [[:syntax]] page after the default amount of seconds. You can change the default number of seconds by editing the plugin (by default, this is 10 seconds).+ 
 +The above will force the document to redirect to the [[:wiki:syntax]] page after the default amount of seconds. You can change the default number of seconds by editing the plugin (by default, this is 10 seconds). 
 + 
 +It is possible to link to a subheading of the page: 
 +  ~~GOTO>​wiki:​syntax#​subheading~~
  
 You can change the number of seconds on the fly like so: You can change the number of seconds on the fly like so:
   ~~GOTO>​wiki:​syntax?​15~~   ~~GOTO>​wiki:​syntax?​15~~
 +
 This will redirect the page after a 15 second pause. This will redirect the page after a 15 second pause.
  
-By default, users can't set the pause length to be faster than three seconds, but this can be changed by editing the plugin. The reason for the minimum pause length is that if it's too fast, it becomes difficult to hit the 'Edit Page' button before the redirect happens. If you can't edit the page, then it becomes tricky to remove the redirect.+By default, users can't set the pause length to be faster than two seconds, but this can be changed by editing the plugin. The reason for the minimum pause length is that if it's too fast, it becomes difficult to hit the 'Edit Page' button before the redirect happens. If you can't edit the page, then it becomes tricky to remove the redirect.
  
 ===== Issues ===== ===== Issues =====
-  *When editing a page with the ''​GOTO''​ tag, be careful of hitting the '​Preview'​ button. The preview **will** redirect just the same as the saved page. + 
-  *The viewer'​s web browser must have JavaScript enabled in order to automatically redirect. +  * The viewer'​s web browser must have JavaScript enabled in order to automatically redirect. 
-  *Currently, the plugin only works correctly for internal links.+  * Currently, the plugin only works correctly for internal links.
  
 ===== Installation ===== ===== Installation =====
  
-Download a zip [[http://​yeahway.com/​stuff/​plugingoto.zip|here]], unzip and put the ''​goto''​ folder in your ''​lib/​plugins''​ directory.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:​Plugins]] on how to install ​plugins ​manually.
  
-If you want to modify the default pause length and the minimum pause length, edit the following lines in ''​syntax.php'':​ +The default pause length and the minimum pause length ​can be edited in the configuration manager.
-  $seconds ​   = 10;     //​Default number of seconds to wait before redirect. +
-  $minSeconds = 3;      //Minimum number of seconds allowed before redirect.+
  
-You can change the redirect message that is displayed by editing the following line in syntax.php: +===== Revision History ===== 
-  ​$message = "<​strong>​You will be redirected to %d in approximately %s seconds.</​strong>";​ + 
-''​%d''​ will be replaced with a link to the destination.\\ +  ​* 2006-06-30 --- Released
-''​%s''​ will be replaced with the number ​of seconds before ​redirection.+  * 2006-07-19 --- Made it easier ​to customize ​the displayed redirect message
 +  * 2016-10-02 --- Moved to GitHub, added compability for PHP 7, added redirection to headlines, integration ​of language files, integration of configuration manager for settings, avoid redirection ​while editing
  
 ===== syntax.php ===== ===== syntax.php =====
 +
 +This section was required for installation till the code was moved to GitHub. Now it isn't necessary any more.
 +
 <code php syntax.php>​ <code php syntax.php>​
 <?php <?php
Line 115: Line 127:
  //Setup VIM: ex: et ts=4 enc=utf-8 :  //Setup VIM: ex: et ts=4 enc=utf-8 :
 </​code>​ </​code>​
- 
-===== Revision History ===== 
-  * 2006-06-30 --- Released.\\ 
-  * 2006-07-19 --- Made it easier to customize the displayed redirect message. 
- 
- 
- 
- 
- 
- 
- 
  
 ===== Discussion ===== ===== Discussion =====
 +
 Right now this plugin can only redirect to internal wiki pages. I'd like it to be able to redirect to external pages, but I'm a little hazy on how DokuWiki processes URLs. Any help is appreciated. ​ --- //​[[aormond@gmail.com|Allen Ormond]] 2006-06-30 22:35// Right now this plugin can only redirect to internal wiki pages. I'd like it to be able to redirect to external pages, but I'm a little hazy on how DokuWiki processes URLs. Any help is appreciated. ​ --- //​[[aormond@gmail.com|Allen Ormond]] 2006-06-30 22:35//
  
Line 158: Line 160:
 ---- ----
  
 +Note that the download links (to yeahway.com) are **broken** as of 2013-07-11. I'm not touching them as I don't know what policy is.
 +----
 + 
 ==== Why not allow to redirect to external sites? ==== ==== Why not allow to redirect to external sites? ====
  
plugin/goto.1342789746.txt.gz · Last modified: 2012-07-20 15:09 by 195.35.72.170