plugin:loginredirect
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:loginredirect [2013-11-02 02:15] – Klap-in | plugin:loginredirect [2023-10-31 00:02] (current) – Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== login redirector | + | ====== login redirector |
---- plugin ---- | ---- plugin ---- | ||
Line 6: | Line 6: | ||
email : chris@jalakai.co.uk | email : chris@jalakai.co.uk | ||
type : action | type : action | ||
- | lastupdate : 2013-02-14 | + | lastupdate : 2016-02-02 |
- | compatible : lemming, anteater, rincewind, angua, adora belle | + | compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle |
depends | depends | ||
conflicts | conflicts | ||
Line 18: | Line 18: | ||
---- | ---- | ||
- | This [[plugin]] redirects the DokuWiki login button to another URL. It is most useful when combined with an external authentication method and it can direct the user to the common login page used by that method. | + | This plugin redirects the DokuWiki login button to another URL. It is most useful when combined with an external authentication method and it can direct the user to the common login page used by that method. |
===== Notes ===== | ===== Notes ===== | ||
Line 36: | Line 36: | ||
===== Installation ===== | ===== Installation ===== | ||
- | To install the plugin | + | Search and install the plugin |
- | The folder will contain: | ||
- | action.php | ||
- | conf/ | ||
- | conf/ | ||
- | |||
- | The plugin is now installed. | ||
- | |||
- | ===== Details ===== | ||
- | |||
- | The plugin consists of one main files, the plugin script [[# | ||
- | |||
- | ==== action.php ==== | ||
- | |||
- | This is the code for the release version of DokuWiki. | ||
- | |||
- | <code php> | ||
- | <?php | ||
- | /** | ||
- | * Action Plugin: | ||
- | | ||
- | * @license | ||
- | * @author | ||
- | */ | ||
- | |||
- | // must be run within DokuWiki | ||
- | if(!defined(' | ||
- | |||
- | if(!defined(' | ||
- | require_once(DOKU_PLUGIN.' | ||
- | |||
- | /** | ||
- | * All DokuWiki action plugins need to inherit from this class | ||
- | */ | ||
- | class action_plugin_loginredirect extends DokuWiki_Action_Plugin { | ||
- | |||
- | /** | ||
- | * return some info | ||
- | */ | ||
- | function getInfo(){ | ||
- | return array( | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ); | ||
- | } | ||
- | | ||
- | /* | ||
- | * plugin should use this method to register its handlers with the DokuWiki' | ||
- | */ | ||
- | function register(Doku_Event_Handler $controller) { | ||
- | $controller-> | ||
- | } | ||
- | | ||
- | function handle_loginredirect(& | ||
- | if ($event-> | ||
- | $url = $this-> | ||
- | if (empty($url)) return; | ||
- | |||
- | header(" | ||
- | exit(); | ||
- | } | ||
- | } | ||
- | | ||
- | | ||
- | } | ||
- | |||
- | //Setup VIM: ex: et ts=4 enc=utf-8 : | ||
- | </ | ||
===== Revision History ===== | ===== Revision History ===== | ||
Line 120: | Line 49: | ||
===== Bugs ===== | ===== Bugs ===== | ||
+ | See the [[https:// | ||
Line 126: | Line 55: | ||
===== Discussion ===== | ===== Discussion ===== | ||
- | I've had no luck at getting this plug-in to work. I have installed the files within the plugin directory, specified the URL in default.php. I am missing something big here, and I can't figure out what. The login still goes to the default login page. I am running the released version of DokuWiki and am using your zipped version of the plug-in, which I installed manually. I wish that I could give you more information about its behavior, but it's not doing anything to describe. I think I'm not putting the appropriate data in the metadata.php file. Could you describe, in further detail, what is required for metadata.php or give me some other pointers? --Pete | ||
- | |||
- | > Do you have a link? When you say "the released version of DokuWiki" | ||
- | |||
- | My Doku installation wasn't as current as I thought. I have it working now. Thanks for you response! Could this concept also be applied to the registering process? It would be great if you could be redirected to a page to register and then brought back whence you came. --Pete | ||
---- | ---- |
plugin/loginredirect.1383354952.txt.gz · Last modified: 2013-11-02 02:15 by Klap-in