MyBB Community Forums

Full Version: mod hooks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have made a plugin which bans a post on some conditions. if a you-tube video is attached, it extracts its code and logs in a separate video table but with banned video flag.

if moderator or admin goes and approves that post form modcp/moderation queue , that post is published but video remains banned and does not display on my separate video page.

is there any hook, which can run on " approve_posts " method of class : \inc\class_moderation.php

i have written a custom query, that will update video table for videos under this post.

but i don't know , for moderator, i can bind with hook ????
There aren't any actual hooks within the "approve_posts" method unfortunately. There will be another way round it though - I'll take a look later on.
yap, any body from dev team must look, otherwise the way to edit the core files is not recommended and MyBB aim is not achieved ( hooking the code ).
i think if i edit the core files and at some point i may need to update mybb files, the changes will be lost. am i right?

(2012-04-11, 10:26 AM)Charlie Hadden Wrote: [ -> ]http://wiki.mybb.com/index.php/MyBB_Plugin_Hooks

thanks but does not help. a lot of things are not clear. every hook must have a description and an example for using them etc.