DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy

devel:event:io_wikipage_write

This is an old revision of the document!


IO_WIKIPAGE_WRITE

Description:
intercept page writes
DefaultAction:
writes a wiki page to disk
Preventable:
no
Added:
2006-07-05

The event is signalled by io_writeWikiPage() in inc/io.php.

The page content may be modified by action plugins between DokuWiki and the disk.

Page creation may be detected by checking if the file already exists and the revision is false.

Page deletion may be detected by checking for empty page content. On update to an existing page this event is called twice, once for the transfer of the old version to the attic (rev will have a value) and once to write the new version of the page into the wiki (rev is false)

Passed Data

  • $data[0] – The raw arguments for io_saveFile as an array. Do not change file path.
    • $data[0][0] – the file path.
    • $data[0][1] – the content to be saved, and may be modified.
  • $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.
  • $data[3] – rev: The page revision, false for current wiki pages.

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/io_wikipage_write.1299431397.txt.gz · Last modified: 2011-03-06 18:09 by 83.83.95.223