Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Running hook only in certain sub-forums?
hansolo Offline
Junior Member
**
Posts: 22
Joined: Sep 2015
Post: #1
Running hook only in certain sub-forums?
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!
01-09-2016 03:46 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Running hook only in certain sub-forums?
No, an if condition to check the fid is fine.

My Blog
01-09-2016 09:11 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: