DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:io_wikipage_write

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
devel:event:io_wikipage_write [2010-09-19 22:07]
151.57.14.118 [Passed Data]
devel:event:io_wikipage_write [2018-12-08 15:46] (current)
torpedo doc updated according to issue #2615
Line 16: Line 16:
 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) 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 ===== ===== Passed Data =====
 +The passed [[xref>​Doku_Event]] object has the fields ''​$data''​ and ''​$result''​.
  
-    ​* $data[0] --   The raw arguments for io_saveFile as an array. Do not change file path.+The ''​$data''​ field is an array with the entries: 
 +  ​* $data[0] --   The raw arguments for [[xref>io_saveFile()]] as an array. Do not change file path.
     * $data[0][0] -- the file path.     * $data[0][0] -- the file path.
     * $data[0][1] -- the content to be saved, and may be modified. ​     * $data[0][1] -- the content to be saved, and may be modified. ​
 +    * $data[0][2] -- whether given content will be appended, default false.
   * $data[1] --   ns: The colon separated namespace path minus the trailing page name. (false if root ns)   * $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[2] --   ​page_name:​ The wiki page name.
   * $data[3] --   rev: The page revision, false for current wiki pages.   * $data[3] --   rev: The page revision, false for current wiki pages.
  
-===== Plugins handling this event =====+In the BEFORE ​event handler the ''​$data''​ can be modified, for example to modify the content.
  
-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.+In the AFTER event handler ​the ''​$result''​ field is available with the boolean result (success or fail) of the [[xref>​_io_writeWikiPage_action()]] method.
  
-  * [[plugin:​data]],​ [[plugin:​distributedacl]],​ [[plugin:​indexmenu]],​ [[plugin:​publish]],​ [[plugin:​tag]],​ [[plugin:​underconstruction]],​ [[plugin:​wikisign]],​ [[plugin:​wysiwyg]] 
  
 ===== See also ===== ===== See also =====
  
 +  * [[codesearch>​IO_WIKIPAGE_WRITE|Code related to this event]] used in any DokuWiki'​s files, plugins and templates
   * [[devel:​Action Plugins]]   * [[devel:​Action Plugins]]
   * [[devel:​Events]]   * [[devel:​Events]]
   * [[IO_WIKIPAGE_READ]]   * [[IO_WIKIPAGE_READ]]
devel/event/io_wikipage_write.1284926855.txt.gz · Last modified: 2010-09-19 22:07 by 151.57.14.118