Modifying $latestthreads to only return threads from specific forum IDs
#1
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!


Attached Files
.php   pthreadlist.php (Size: 2.38 KB / Downloads: 41)
Reply
#2
ACP->Settings->Portal Settings. The last setting controls which forums to exclude.
Reply
#3
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
Reply
#4
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'
Reply
#5
(02-25-2015, 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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)