Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 19, 20177 yr Hi all, I'm working on a migration from IPB3 to 4, and a lot things have changed. I'm struggling to work out where the most appropriate place to add a post-post hook is (yes, I'm aware of the awkward overloaded language). I tried following the code from the API implementation, but that quickly diverted me ff down to the database layer or the generic comment classes, so I'm a bit confused. Any pointers would be greatly appreciated. Thanks, Chris
May 19, 20177 yr Extend \IPS\forums\Topic\Post and overload the postCreate() method. public function postCreate() { /* Let the parent do its thing first */ parent::postCreate(); /* Then do your stuff here */ }
Archived
This topic is now archived and is closed to further replies.