I want to perform some action while
#1. Adding new page to wiki
#2. Editing existing page of wiki
#3. Deleting existing wiki page
I found wiki hook
edit_wiki_article_end
which is helpful for above #1 and #2 tasks but it returns whole lot bunch of data but I didn’t managed to find specific action, if the page was added or edited .
What is best way of knowing if this action is “edit existing page” or “create new page” action ?
For above #3 Deleting existing page: I didn’t found any hook for this. Is there any hook for this ?
I just created hook for deleting wiki page
--- mod.wiki.php.orig 2010-01-28 14:35:46.647961379 +0100
+++ mod.wiki.php 2010-01-28 14:36:47.787949646 +0100
@@ -3903,6 +3903,8 @@
$this->EE->db->query("DELETE FROM exp_wiki_revisions WHERE page_id = '".$this->EE->db->escape_str($page_id)."'");
$this->EE->db->query("DELETE FROM exp_wiki_category_articles WHERE page_id = '".$this->EE->db->escape_str($page_id)."'");
+ $edata = $this->EE->extensions->universal_call('delete_wiki_article_end', $this, $this->EE->db->escape_str($page_id));
+ if ($this->EE->extensions->end_script === TRUE)
$this->redirect('', $this->title);
}Still my first question remains.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.