Hello,
I worked on a plugin to modify some actions based on this discussion https://forum.dokuwiki.org/d/1571-create-a-new-action-with-a-plugin-solved
I worked on one site and wanted to test on another.
There, I see that the plugin prevents the display of images.
So I deleted everything and tried to understand by removing my code.
But even the code below, which should ultimately do nothing since all the lines are commented out, results in the images not being displayed.
I also tried with a new dokuwiki which I downloaded and uploaded to another domain. The behavior remains the same if I activate the "plugin that does nothing" the images no longer appear, and as soon as I deactivate it, they reappear.
Anyone got a lead?
Thanks in advance.
class action_plugin_xtralogindonothing extends DokuWiki_Action_Plugin {
// https://forum.dokuwiki.org/d/1571-create-a-new-action-with-a-plugin-solved/2
public function register(Doku_Event_Handler $controller){
//$controller->register_hook('ACTION_ACT_PREPROCESS','BEFORE', $this, 'preprocess_hello', []);
//$controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'result_hello', []);
}
public function preprocess_hello(Doku_Event $event, $param){
// if($event->data != 'hello') return;
// ok - we handle the action
// $event->preventDefault();
// return true;
}
public function result_hello(Doku_Event $event, $param){
//public function result_hello(&$event, $param){
// if($event->data != 'hello') return;
// ok - we handle the action
//msg("HELLO ?");
// print '<h1>Hello World!</h1>';
// $event->preventDefault();
}
}