Herramientas de usuario

Herramientas del sitio


informatica:cms_wiki:dokuwiki

¡Esta es una revisión vieja del documento!


Dokuwiki

Instalación

Plugins

Wrap

Blockquote

Vshare

Mathpublish

Abc

Latex

Dropfiles

Imgpaste

PlantUML

La versión más moderna ya no se ejecuta en local sino se conecta a una ws, ojo a esto.

Cuando se ejecutaba en local se tuvo estos problemas (buscar la versión en la que cambio a no ser local)

Al instalar en una wiki en PHP 7 la extensión PlantUML salio los siguientes errores:

En la parte alta de la wiki:

Warning: Declaration of action_plugin_plantuml::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in C:\xampp\htdocs\dokuwiki\lib\plugins\plantuml\action.php on line 22

En la parte interna del modulo de extensiones (parecido al problema del módulo plantuml, en este caso lo saque del plug in note, porque no volvió a aparecer el problema)

Error message :
Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /data/www/wiki/lib/plugins/note/syntax.php on line 188

Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /data/www/wiki/lib/plugins/note/syntax.php on line 188

Se arregló gracias a cambiar lo siguiente en action.php y sintax.php del módulo:

Cambiando &$controller por Doku_Event_Handler $controller

action.php
class action_plugin_plantuml extends DokuWiki_Action_Plugin {
 
    /**
     * Register the event handler
     */
    function register(&$controller) {
      if($this->getConf('button_enabled') == '1')
        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
    }

por

action.php
class action_plugin_plantuml extends DokuWiki_Action_Plugin {
 
    /**
     * Register the event handler
     */
    function register(Doku_Event_Handler $controller) {
      if($this->getConf('button_enabled') == '1')
        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
    }

y en

  • &$handler por Doku_Handler $handler
  • &$renderer por Doku_Handler $handler
sintax.php
    function handle($match, $state, $pos, &$handler) {
        // echo "handle: state=$state<br>";
        // echo "handle: match=$match<br>";
        // echo "handle: pos=$pos<br>";
 
        ...
 
    function render($mode, &$renderer, $data) {
        if ($mode == 'xhtml') {
            $img = DOKU_BASE . 'lib/plugins/plantuml/img.php?' . buildURLParams($data);
 
 

por

sintax.php
    function handle($match, $state, $pos, Doku_Handler $handler) {
        // echo "handle: state=$state<br>";
        // echo "handle: match=$match<br>";
        // echo "handle: pos=$pos<br>";
 
        ...
 
    function render($mode, Doku_Renderer $renderer, $data) {
        if ($mode == 'xhtml') {
            $img = DOKU_BASE . 'lib/plugins/plantuml/img.php?' . buildURLParams($data);

Fuente:

informatica/cms_wiki/dokuwiki.1743569589.txt.gz · Última modificación: 2025/04/02 04:53 por admin