DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:404manager

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:404manager [2014-02-19 08:57] 14.201.111.244plugin:404manager [2024-02-01 11:20] (current) Aleksandr
Line 1: Line 1:
-====== 404manager plugin ======+====== 404Manager Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: handle the soft 404 (file not found) for user and writer of DokuWiki by redirecting according to a configuration. +description: Handle the soft 404 (file not found) for user and writer of DokuWiki by redirecting according to a configuration 
-author     : Nicolas GERARD+author     : Nicolas GERARD (aka gerardnico)
 email      : gerardnico@gmail.com email      : gerardnico@gmail.com
 type       : action, admin type       : action, admin
-lastupdate : 2009-03-16 +lastupdate : 2018-08-21 
-compatible : 2009-03-16 (maybe earlier), lemmings, anteater, rincewind, angua +compatible : 2018-04-22 "Greebo" 
-depends    : note, pagemove+depends    : 
 conflicts  conflicts 
 similar    : autosearch, autostart, pageredirect, redirect similar    : autosearch, autostart, pageredirect, redirect
 tags       : redirect, namespace, search tags       : redirect, namespace, search
  
-downloadurl: http://gerardnico.com/wiki/_media/communication_system/dokuwiki/404manager.zip?id=communication_system%3Adokuwiki%3A404managerplugin&cache=cache +downloadurl: https://github.com/gerardnico/dokuwiki-plugin-404manager/zipball/master 
-----+bugtracker : https://github.com/gerardnico/dokuwiki-plugin-404manager/issues 
 +sourcerepo : https://github.com/gerardnico/dokuwiki-plugin-404manager
  
-===== Download and Installation =====+screenshot_img : https://raw.githubusercontent.com/gerardnico/dokuwiki-plugin-404manager/master/images/404manager_check_page_name_message.png
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL. Refer to [[:Plugins]] on how to install plugins manually. +updatemessage: This plugin has moved in the Combo Plugin.
- +
-  * [[http://gerardnico.com/wiki/_media/communication_system/dokuwiki/404manager.zip?id=communication_system%3Adokuwiki%3A404managerplugin&cache=cache|404 Manager Plugin]] +
- +
-**Note :** +
-  * I just release it and I test it on my [[http://gerardnico.com/|website]]. So, you can have some minor bugs but as it doesn't modify any data, it's safe. +
-  * Work with php4 and php5. +
-  * This plugin is not dependent of the plugin [[plugin:pagemove]] but is a consequence of it as I use it very often. The most important problem is that thus external links become obsolete (search engine for instance). With this plugin, I offer a way to manage the soft 404 (DokuWiki return a standard web page with a "200 OK" response code). +
- +
-===== What can this plugin do ? ===== +
- +
-**For writer :** +
-  * Automatic redirection in edit mode +
-  * Verification that the page name is unique +
- +
-**For reader :** +
-  * Redirection by configuration of a target page for a source page with the admin page +
-  * Redirection by best namepage +
-  * Redirection by best namespace +
-  * Redirection to the internal search engine +
- +
-To know more about this plugin, please refer to this page : [[http://gerardnico.com/wiki/communication_system/dokuwiki/404managerplugin|404 Manager Plugin]]+
 ---- ----
  
-==== Error with admin errors ==== +This plugin has been renamed to the [[plugin:combo|Combo]] Plugin.
- +
-I accidentally tried to redirect to a page that did not exist in the admin page, but the php died with +
-an error: \\ +
-\\ +
- +
-Fatal error: Call to undefined method admin_plugin_404manager::lang() in /www/wiki/lib/plugins/404manager/admin.php on line 93 +
- +
-Similar errors for other things. +
- +
-Investigating I found that there appears to be a little bug in the script: +
- +
-<code php> +
-    /** +
-     * handle user request +
-     */ +
-    function handle() { +
-        if($_POST['Add']){ +
- +
-                $this->Vc_SourcePage = $_POST['SourcePage']; +
-                $this->Vc_TargetPage = $_POST['TargetPage']; +
- +
-                if ( $this->Vc_SourcePage == $this->Vc_TargetPage ) { +
-                        msg($this->lang('SameSourceAndTargetAndPage').': '.$this->Vc_SourcePage.'',-1); +
-                        return; +
-                } +
- +
-                if ( !page_exists($this->Vc_TargetPage) ) { +
-                        if ($this->IsValidURL($this->Vc_TargetPage)) { +
-                                $this->Vc_TargetPageType = 'Url'; +
-                        } else { +
-                                msg($this->lang('NotInternalOrUrlPage').': '.$this->Vc_TargetPage.'',-1); +
-                                return; +
-                        } +
-                } else { +
-                        $this->Vc_TargetPageType = 'Internal Page'; +
-                } +
- +
-                if ( page_exists($this->Vc_SourcePage) ) { +
-                        $title = false; +
-                        if ($conf['useheading']) { +
-                                $title = p_get_first_heading($this->Vc_SourcePage); +
-                        } +
-                        if(!$title) $title = $this->Vc_SourcePage; +
-                        msg($this->lang('SourcePageExist').' : <a href="'.wl($this->Vc_SourcePage).'">'.hsc($title).'</a>',-1); +
-                        return; +
-                } +
- +
-                $this->SetRedirection($this->Vc_SourcePage,$this->Vc_TargetPage); +
-                msg($this->lang['Saved'],1); +
- +
-        } +
-</code> +
- +
-The following lines should have square brackets and not round brackets: +
- +
-<code php> +
-85:      msg($this->lang('SameSourceAndTargetAndPage').': '.$this->Vc_SourcePage.'',-1); +
-93:      msg($this->lang('NotInternalOrUrlPage').': '.$this->Vc_TargetPage.'',-1); +
-106:     msg($this->lang('SourcePageExist').' : <a href="'.wl($this->Vc_SourcePage).'">'.hsc($title).'</a>',-1); +
-</code> +
- +
-Diff: +
- +
-<code php> +
-85c85 +
-<                       msg($this->lang('SameSourceAndTargetAndPage').': '.$this->Vc_SourcePage.'',-1); +
---- +
->                       msg($this->lang['SameSourceAndTargetAndPage'].': '.$this->Vc_SourcePage.'',-1); +
-93c93 +
-<                               msg($this->lang('NotInternalOrUrlPage').': '.$this->Vc_TargetPage.'',-1); +
---- +
->                               msg($this->lang['NotInternalOrUrlPage'].': '.$this->Vc_TargetPage.'',-1); +
-106c106 +
-<                       msg($this->lang('SourcePageExist').' : <a href="'.wl($this->Vc_SourcePage).'">'.hsc($title).'</a>',-1); +
---- +
->                       msg($this->lang['SourcePageExist'].' : <a href="'.wl($this->Vc_SourcePage).'">'.hsc($title).'</a>',-1); +
-</code> +
- +
-==== Configuration Problem ==== +
- +
-{{ http://www.lyrics-translated.org/404manager_problem_snapshot.jpg?300}}I'm trying to set up the 404manager plugin and after installing it (along with the note and pagemove plugins) it doesn't appear on the admin page. Could this be a conflict with the [[plugin:redirect|redirect]] plugin? +
- +
-I'm using the 05-05-2008 version of dokuwiki. Upgrading at the moment is hard as I've personalised a lot of dokuwiki's config files, but if that's likely to be the problem then I'll do it +
- +
-Merçi +
- +
->> Nicolas GERARD : +
->> What happens, if you do this one : +
->> http://youwikiurl/?do=admin&page=404manager +
- +
->> The name in the admin menu is returned by the function getMenuText of the admin.php file in the plugin. +
->> If the function don't find a translation, you normally must see the name of the plugin. +
- +
->>>> Problem solved. I just pressed the update button on the plugin management page. Don't understand what happened but the problem's solved. Thanks  +
- +
-==== IsRedirectionPresent & GoToEditMode Problem ==== +
- +
-There were apparently problems with implementing 404, both with this plugin and the core config option, with some users reporting that IE didn't get the edit page or the new page create dialogs properly. In testing with up-to-date versions of DokuWiki and IE this no longer seems to be an issue. +
- +
-==== Default Namespace Template issue ==== +
- +
-Hi. This plugin ignores my __template.txt.+
  
plugin/404manager.1392796646.txt.gz · Last modified: 2014-02-19 08:57 by 14.201.111.244

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