MyBB Hacks

Full Version: Running hook only in certain sub-forums?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

Can XThreads allow you to selectively run a hook for certain sub-forums? I know XThreads can allow custom fields and custom templates for specific sub-forums, and I'm already using those features.

For example, I want to use the newthread_do_newthread_end hook, but only one of the sub-forums. The purpose is that new threads in this sub-forum are "more than just threads", and I want to hold state data for these threads, which interacts with other functionality in that sub-forum.

I was going to just write "if I'm in the special forum, then..." code, but I want to check if I'm missing something about XThreads first.

Cheers!
No, an if condition to check the fid is fine.
Reference URL's