The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Exclude certain forums from "New Posts"
I know there are at least two hacks here that let users exclude certain forums from get new posts, but I'm just looking to list a few myself as a plugin.
Basically, I have added a field to the forum table. Let's call this field "getnew" with a default value of 0. 0 Will mean that it is included in get new post results. 1 Will mean it is not. Then I have a query set like so: Code:
$forums = $db->query_read("SELECT forumid FROM " . TABLE_PREFIX . "forum AS forum WHERE getnew=1"); $vbulletin->GPC['exclude']...etc... I can use the search_getnew_start hook to add what I need, but I'm not positive on how to set up the second part. I have the initial query, but I need to get it into an array and then have all of forumid's in the array excluded from Get New Posts. I know it's a simple few lines of code but I'm not familiar with this part of the vB code enough to get it to work. I've been trying different formats with no luck. If anybody can help out I would appreciate it a lot. ~007 |
#2
|
|||
|
|||
^ ^
I wonder if this post would help you.. or it was obvious: https://vborg.vbsupport.ru/showthread.php?t=105771 Quote:
|
#3
|
||||
|
||||
Thanks for the link Borgs8472, but I was reading that earlier and that's not what I am trying to do.
I need to figure out how to get this to work dynamically and through queries. I have a lot of forums and the link would be enormous if I went that route you posted. Thanks anyway though. I appreciate the suggestion. Ok, I am now using this line of code in the search_getnew_start hook: PHP Code:
PHP Code:
|
#4
|
||||
|
||||
Does anybody have any ideas? I am at a standstill here and hava tried everything I can thing of.
Wouldn't you know my luck.. As soon as I posted again that I can't figure it out I got it to work! Problem solved! |
#5
|
|||
|
|||
For the benefit of others, an array is not a string.
You need to use implode. |
#6
|
||||
|
||||
Ok, sorry, the original query resulted in an array, which I had to convert to a string. Apologies!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|