MyBB Community Forums

Full Version: Modifying $latestthreads to only return threads from specific forum IDs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to either make a copy of the portal's latest threads that return only from specific FIDs, or modify the original so that it can pass a FID as an argument to return only those threads, or if the arg is blank just do the default list.

The idea is that on the portal it'd show 

Latest Threads        Latest Threads Popular Subforum #1     Latest Threads Popular Subforum #2

Tried making a hook to accomplish this but it just returns blank, anyone able to tell me why or how to modify the original so that there isn't two calls for the same thing?

Thanks!
ACP->Settings->Portal Settings. The last setting controls which forums to exclude.
Sorry, I guess I wasn't very clear.
I want to keep the latest threads as is, as well as have two other instances on the portal that return listings only from specific forums
First I think you need to use portal_end, not portal_start. Secondly, you need to globalize the variables $excludeforums and $tunviewwhere. I'm also unsure about what this part is for: AND t.fid='$tid'
(2015-02-25, 02:17 PM)dragonexpert Wrote: [ -> ]First I think you need to use portal_end, not portal_start.  Secondly, you need to globalize the variables $excludeforums and $tunviewwhere.  I'm also unsure about what this part is for: AND t.fid='$tid'

thanks, will try it out!

 t.fid='$tid' was supposed to be ='$fid', woops -_-
(calling the function as pthreadlist[$fid], then checking that threads for the threadlist are only from that forum)