The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I'm using a HACK that pulls threads from the forums table and displays the latest X threads. There are permissions on the HACk, but there's no way to exclude specific forums. So, I was hoping someone might be able to look at the section of code below and perhaps suggest a way to either exclude specific forums, or add forums to the viewing list. I would be happy enough to add 50 forum ID's to restrict one forum. Cheers PHP Code:
|
#2
|
||||
|
||||
![]()
What is $excludedthreads ? I'm assuming it contains "WHERE" - so make sure that its either always there or make it that way.
Here would be the condition to limit it to certain forums: [sql]thread.forumid IN (1, 2, 3)[/sql] and to exclude: [sql]NOT (thread.forumid IN (1, 2, 3))[/sql]You're probably best off loading them into an array and imploding them inside the query PHP Code:
|
#3
|
|||
|
|||
![]()
Hi and thanks for your reply.
I should have posted the entire code to make sure the addition fits in. I tried to add the statement(s) below and it failed ![]() Here's the entire section PHP Code:
|
#4
|
||||
|
||||
![]()
Try this, and just add to the $excludearray at the beginning to exclude more forums or the $includeforums to only show those forums,
PHP Code:
|
#5
|
|||
|
|||
![]()
Hey,
I tried to remove the Included forums and add the ones to the exclude and got a blank white page, I then tried to code as is and got the same blank page ![]() |
#6
|
||||
|
||||
![]()
My Apologies... near the top, change this
PHP Code:
PHP Code:
|
#7
|
|||
|
|||
![]()
OK, added the changes and no more blank pages. Removed the entries in the Include section and added one subforum to the exclude list, but posts in this subforum still appear.
Is it different for subforums? Thanks again., |
#8
|
||||
|
||||
![]()
Can you post your exact code here, thanks.
|
#9
|
|||
|
|||
![]() PHP Code:
|
#10
|
||||
|
||||
![]()
Typo, change this
PHP Code:
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|