DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:replace

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
Next revisionBoth sides next revision
plugin:replace [2011-01-23 20:21]
– [Comments] 94.210.200.16
plugin:replace [2014-05-11 18:38]
– old revision restored (2012-01-23 14:29) ach
Line 8: Line 8:
 lastupdate : 2009-04-13 lastupdate : 2009-04-13
 compatible : 2009-02-14 compatible : 2009-02-14
 +similar    : easyvar, kixovar, fields, macros, textinsert
 tags       : search, replace tags       : search, replace
  
Line 71: Line 72:
             'name'   => 'Replacer',             'name'   => 'Replacer',
             'desc'   => 'Replaces words thought DokuWiki automatically from replace.conf with the snippet defined.',             'desc'   => 'Replaces words thought DokuWiki automatically from replace.conf with the snippet defined.',
-            'url'    => 'http://www.dokuwiki.org/wiki:plugins',+            'url'    => 'http://www.dokuwiki.org/plugin:replace',
         );         );
     }     }
Line 118: Line 119:
 ===== Comments ===== ===== Comments =====
 Thank you very much for this plugin. For me it has been extremely helpful. (For beginners: Copy the PHP code into dokuwiki/lib/plugins/replace/syntax.php and create the file dokuwiki/conf/replace.conf with the substitutions. Use the %% markup to substitute plain text) Thank you very much for this plugin. For me it has been extremely helpful. (For beginners: Copy the PHP code into dokuwiki/lib/plugins/replace/syntax.php and create the file dokuwiki/conf/replace.conf with the substitutions. Use the %% markup to substitute plain text)
 +
 +==== Integration with confmanager-plugin ====
 +
 +To modify replace.conf via admin-menu install [[confmanager|confmanager-plugin]] and modify following lines:
 +
 +admn.php (line 9): add "replace"
 +<code php>
 +    var $cnffiles = array('acronyms','entities','interwiki','mime','smileys','replace'); // add conf-files here; must be filename
 +</code>
 +
 +lang.php (for german)
 +<code css>
 +$lang['cnf_replace'  = 'Replace';
 +$lang['head_replace'  = 'Replace';
 +$lang['text_replace'  = 'Hier sind die Einstellungen f&uuml;r die Replace-Plugin-Ersetzung. F&uuml;r genauere Informationen besuchen sie <a class="interwiki iw_doku" href="http://www.dokuwiki.org/plugin:replace">Replace-Plugin</a>';
 +</code>
  
  
Line 214: Line 231:
 </code> --- //[[holger@doessing.net|Holger Doessing]] 2009/05/11 16:50// </code> --- //[[holger@doessing.net|Holger Doessing]] 2009/05/11 16:50//
  
 +
 +==== Bugfix for special chars (2012/23/01) ====
 +
 +<code php>
 +<?php
 +
 +function preConnect() {
 +    if(!count($this->replace)) return;
 +    $replacers = array_map('preg_quote', array_keys($this->replace));
 +    // removed '\b' at beginning and end. Had problems to replace "@cloud." with "~~TAGCLOUD~~"
 +    $this->pattern = join('|', $replacers);
 +}
 +
 +</code>
 +[[robert.jaeckel@verwaltung.uni-halle.de|Robert Jäckel]]
plugin/replace.txt · Last modified: 2018-06-05 22:56 by Klap-in

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