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 revisionPrevious revision
Next revision
Previous revision
plugin:goto [2019-04-05 22:34] turnermmplugin:goto [2023-10-30 23:58] (current) Klap-in
Line 3: Line 3:
 ---- 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, cziehr +author     : Allen Ormond, cziehr, turnermm, 
-email      : aormond@gmail.com, info@einsatzleiterwiki.de+email      : turnermm02[at]shaw[dot]ca
 type       : syntax type       : syntax
-lastupdate : 2019-03-12 +lastupdate : 2021-03-01 
-compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo+compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
Line 44: Line 44:
 By default, users can't set the pause length to be faster than two seconds, but this can be changed in the Configuration Manager by setting a new value for the ''minSeconds'' option. 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 in the Configuration Manager by setting a new value for the ''minSeconds'' option. 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 ===== 
  
-  * The viewer's web browser must have JavaScript enabled in order to automatically redirect. 
-  * Currently, the plugin only works correctly for internal links. 
  
  
-===== Revision History ===== 
- 
-  * 2006-06-30 --- Released. 
-  * 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 
  
 ===== Updated Version ===== ===== Updated Version =====
-There is an updated version of ''GOTO'' which has not yet been integrated into the main distributionIt has a feature which had been asked for on several occasions, the ability to redirect to external sites.  It also contains an entirely new featurewhich is the ability to automatically redirect to user pages on login.    +The ''goto'' plugin includes updates as described below\\ 
 + --- [[user>turnermm|Myron Turner]] //2019-04-05 22:48// 
 +==== Auto Login ==== 
 +Auto login enables registered userson logging into the wiki, to be automatically redirected to their own user page.The page will be created if it does not already exist. There are two ways to implement the auto login feature.  
 +==== 1. Embedded GOTO Syntax ==== 
 +The first applies only to the current user.  It uses the GOTO syntax with the ''user'' wildcard in place of the page id: 
 +    ~~GOTO>user~~  
 +This must be placed on the wiki's main pageso that when the user logs in, the page displayed in the browser is the page with this markup. No message is printed to the screen. and the user is  redirected to the user page in the root namespace. If the userid is "foo", the user page will be ":foo". This does not take a time setting: ''?tm'' The redirection occurs after a 3 second delay on login. 
  
-For documentation and downloadsee the ''GOTO'' [[plugin:goto:supplement]]+==== 2. Configured Background Process ==== 
 +Unlike **1** this method requires no additional plugin markup and does not require that the browser lands on any particular page. On login, the auto login feature redirects the user to the user's page or start page.  This page and its namespace are based on the settings in either the ''auto_options'' setting or the ''group_options'' setting.  For this to work, the ''auto_login'' option must be set to true.  The redirection occurs immediately, without a delay.
  
 +The redirects are governed by the ''auto_options'' and ''group_options'' settings. The ''auto_options'' redirect to pages and namespaces based on the userid.  The ''group_options'' redirect to pages located in namespaces based on group membership. 
 +==== Configuration ====
 +^Option^Description^Default^
 +|seconds|Time till redirection (seconds)| 3|
 +|minSeconds|Minimum time allowed till redirection (seconds) | 2|
 +|auto_login|On login, automatically go to predefined page, as set in ''auto_options'' or ''group_options''|false |
 +|auto_options|Target for the auto_login page based on ''userid'' (See [[#auto_options]])|:user_page |
 +|common_ns((i.e. ''common namespace'', so named because it is common to all users.))|Used with ''auto_options''. Arbitrarily defined namespace of any depth where the auto login pages will reside. This can include the wildcard ''user_ns'', in which case the user will have a namespace in the common namespace directory. | |
 +|group|Comma separated list of  group namespaces to which users can be redirected. Different users can be in different groups.  If a user belongs to two groups on this list,  the user will be redirected to the first.| |
 +|group_options|The user can be redirected either to the group start page or to the user's own page in the group namespace.  The options are ''start_page'' and ''user_page''|start_page|
 +|only_option|The options are ''group'' and ''user''. ''group'' restricts redirects only to group namespaces and their pages; ''user'' only to user namespaces and pages; and ''default'' to either, with group having precedence.|default|
 +
 +==== Auto_Options ====
 +There a four options available for defining the user page and namespace to which the auto login will be directed.  In each case ''user'' stands for the userid and ''ns'' for namespace. If the userid is "foo", then the first option would give you ":foo" in the root namespace, the second option ":foo:foo" The start page is one of DokuWiki's ''basic'' configurations and defaults to ''start''. The fourth option requires that the GOTO common namespace (''common_ns'') option be set.  These are the four possibilities for defining the auto login page, where "foo" is the userid:
 +  - :user_page \\ :foo  
 +  - :user_ns:user_page \\ :foo:foo
 +  - :user_ns:start_page \\ foo:start
 +  - :common_ns:user_page \\ <common_ns>:foo ((See [[#configuration]]))
 +
 +==== Group Options ====
 +Therre are two possibilities for defining the auto login page based on group membership.  In each case the group name is the name of the namespace so that both options locate the redirect page in a namespace which is the same as the group name: 
 +  - start_page \\ group-name:start
 +  - user_page  \\  group-name:userid
 +
 +
 +
 +
 +==== External Links ====
 +External links now supported. The following:
 +   ~~GOTO>https://mturner.org/devel/doku.php?id=wiki:welcome~~
 +will redirect to wiki:welcome at mturner.org.  The on-page notification will read: \\
 +**%%You will be redirected to https://mturner.org/devel/doku.php?id=wiki:welcome in approximately 3 seconds.%%** 
 +
 +
 +===== Revision History =====
 +{{rss>https://github.com/cziehr/goto/commits/master.atom date count=25}}
 ===== Old Discussion ===== ===== Old Discussion =====
 To review old issues and discussion: [[plugin:goto:old_discussion]] To review old issues and discussion: [[plugin:goto:old_discussion]]
  
plugin/goto.1554496469.txt.gz · Last modified: 2019-04-05 22:34 by turnermm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki