Translations of this page?:

TPL_ACT_UNKNOWN

Description:
Output XHTML in the main DokuWiki window
DefaultAction:
Displays an "action unknown" message
Preventable:
yes
Added:
2006-04-25

Signaled by tpl_content() in inc/template.php, if it does not recognise the $ACT value. You can use this event to output XHTML for a custom $ACT1) value, which will be displayed in the main dokuwiki window - ie. where the wiki page would normally be displayed.

Passed Data

$data contains the contents of the $ACT variable.

Note for implementors

Please note that if you want to display XHTML instead of the normal page content, you have to implement an additional event handler for ACTION_ACT_PREPROCESS. Otherwise the act_clean function will sanitize the action and your handler for TPL_ACT_UNKNOWN will never be called.

Example for handling ”&do=my_action”:

   function register(&$controller) {
    $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE',  $this, 'allow_my_action');
    $controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE',  $this, 'my_action');
  }
 
  function allow_my_action(&$event, $param) {
    if($event->data != 'my_action') return; 
    $event->preventDefault();
  }
 
  function my_action(&$event, $param) {
    // output your XHTML content here
  }

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

See also

devel/event/tpl_act_unknown.txt · Last modified: 2011/12/20 16:36 by birke
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate