DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:io_wikipage_read

IO_WIKIPAGE_READ

Description:
intercept reading the raw wiki text data
DefaultAction:
reads a wiki page
Preventable:
no
Added:
2006-07-05

This event is signalled by io_readWikiPage() in inc/io.php. The page content may be modified by action plugins between the disk and DokuWiki.

Passed Data

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

The $data field is an array with the entries:

  • $data[0] – The raw arguments for io_readFile() as an array. Do not change.
    • $data[0][0] – the file path.
    • $data[0][1] – whether to convert line endings to unix format, default true.
  • $data[1] – ns: The colon separated namespace path minus the trailing page name. (false if root ns)
  • $data[2] – page_name: The wiki page name without the namespace.
  • $data[3] – rev: The page revision, false for current wiki pages.

In the BEFORE event handler the $data can be modified to influence the reading action.

In the AFTER event handler the $result field is available with the read result of the _io_readWikiPage_action() method. The AFTER event handler can modify this field.

See also

devel/event/io_wikipage_read.txt · Last modified: 2018-12-08 15:46 by torpedo

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