It's better when it's simple

User Tools

Site Tools


This is an old revision of the document!


handle, process & generate data for a subscribe request
subscription style, target and action are validated and data (time) is generated

This event is signaled by act_subscription() in inc/actions.php when receiving a subscribe request, handlers can use it to allow different subscription styles, targets and actions.

Passed Data

The passed Doku_Event object has the fields: $data and $result.

The $data field is an array with the entries:

  • $data['target'] – Target page or namespace ID; Namespaces are denoted by a trailing :.
  • $data['style'] – Subscription style; core allows 'every' and 'digest' for pages and namespaces, and 'list' for namespaces.
  • $data['action'] – Subscription action; core knows subscribe and unsubscribe.

In the BEFORE event handler you can modify the $data field and eventually you can use here preventDefault() to skip execution of DokuWiki's default subscription_handle_post().

The $result field is always null because this event has no default action that sets this field. The AFTER event handler let you process the $data field further after the default processing.

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.

  • none

See also

devel/event/action_handle_subscribe.1418854006.txt.gz · Last modified: 2014-12-17 23:06 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