We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Wiki hooks for deleting wiki page ?

Development and Programming

Gurudutt Verma's avatar
Gurudutt Verma
74 posts
16 years ago
Gurudutt Verma's avatar Gurudutt Verma

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 ?

       
Gurudutt Verma's avatar
Gurudutt Verma
74 posts
16 years ago
Gurudutt Verma's avatar Gurudutt Verma

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.

       
Ingmar's avatar
Ingmar
29,245 posts
16 years ago
Ingmar's avatar Ingmar

Let me run this by the devs, Gurudutt. Thanks for your patience.

       
Ingmar's avatar
Ingmar
29,245 posts
16 years ago
Ingmar's avatar Ingmar

Let me move this to Extensions. I am afraid if the required hook is not in place, a Feature Request would be your best bet.

       
Gurudutt Verma's avatar
Gurudutt Verma
74 posts
16 years ago
Gurudutt Verma's avatar Gurudutt Verma

Hi Ingmar Greil,

Thank you 😊

I hope we will get this important hook in coming release 😊

       
Ingmar's avatar
Ingmar
29,245 posts
16 years ago
Ingmar's avatar Ingmar

By all means, make that FR 😊 Thanks.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.