View Full Version : exclude a forum from "Todays active Threads"
heynurse
09-14-2002, 06:28 PM
Is there a way to remove a public forum from Todays Active Threads"
For example I have an "Off-topic" or "Chit Chat" forum, that is getting several post per day, but I really don't want to have it take up half of the Todays Active topics results since the topics are irrelevant our sites Niche?
Hope this makes sense. Thanks for any advice.
Logician
09-14-2002, 08:13 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=40164" target="_blank">https://vborg.vbsupport.ru/showt...threadid=40164</a>
heynurse
09-14-2002, 10:07 PM
Logician,
Thanks for the link, I think it is the answer to my question :)
heynurse
09-18-2002, 02:56 AM
I followed the link in post #2 and I followed the instructions and it did not work, the forum I did not want included in results, remained in the results.
any other suggestions? Thanks
Logician
09-18-2002, 07:35 AM
try to apply Post 2 AND Post 7
heynurse
09-18-2002, 05:11 PM
Originally posted by Logician
try to apply Post 2 AND Post 7
I did apply both post #2 and #7, but the results are unchanged?
Here are the snippets from my search.php file that I am using:
// ###################### Start get new #######################
if ($action=="getnew") {
// generate query
// do it!
if ($bbuserinfo[userid]!=0 or $bbuserinfo[lastvisit]!=0) {
$forumsql=getallforumsql();
if (isset($forumid)) {
$forums=$DB_site->query("SELECT forumid FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',".addslashes($forumid).",')>0");
$forumsql.=" AND forumid IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
if ($forum[forumid]!=98) {$forumsql.=",$forum[forumid]";}
}
$forumsql.=") ";
}
and
// ###################### Start get daily #######################
if ($action=="getdaily") {
// get allowable forums:
$forumsql=getallforumsql();
if (isset($forumid)) {
$forums=$DB_site->query("SELECT forumid FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',".addslashes($forumid).",')>0");
$forumsql.=" AND forumid IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
if ($forum[forumid]!=98) {$forumsql.=",$forum[forumid]";}
}
$forumsql.=") ";
}
I hope this helps, thanks again with your help.
Logician
09-19-2002, 08:48 AM
ok lets try this:
First revert the changes you made in the code and instead of this find the line: (in search.php)
$wheresql.=" AND thread.open<>10";
and replace it as:
$wheresql.=" AND thread.open<>10 AND thread.forumid!=X";
There are 2 instances, one is for members, the other is for guest. If you want to exclude the forum for both of them, change the both lines.
Dont forget to replace X with your excluded forumid.
I guess this will do the trick now..
heynurse
09-23-2002, 04:07 PM
Logician,
That worked like a charm! Thanks a million.
Now, one more quick question, I do have one other forum, I would like to exclude, how would I go about excluding two or more fourms?
I tried putting in the two forums(98,112) separated by a comma, but that didn't work, I got an error message.
$wheresql.=" AND thread.open<>10 AND thread.forumid!=98,112";
any ideas? Thanks again!
Logician
09-23-2002, 04:47 PM
$wheresql.=" AND thread.open<>10 AND thread.forumid!=98 AND thread.forumid!=112";
Enjoy :)
heynurse
09-23-2002, 10:17 PM
Logician,
Thanks, you rock, worked like a charm.
Baptizer
02-01-2003, 04:32 AM
This is great, however, on my forums it still adds the excluded thread to the total number of new posts....does this happen for anyone else?
any way to exclude it from adding to the new post count?
Swedie
04-25-2003, 08:21 AM
Hey.. I used it .. it works great. but now my "show last 10 searches" doesn't work anymore. what's up?
JustAskJulie
06-10-2003, 06:58 PM
Thanks, that last bit worked. Any way that someone could merge this with the other topic?
Baptizer
06-19-2003, 11:32 PM
has anyone found a way to exclude it from the post count as well?
Logician
06-20-2003, 07:01 AM
do u mean in welcome panel?
shorty
08-26-2003, 04:33 PM
I know this is an old thread but I just wanted to say
Thank you Logician :) hope you are enjoying you vacation!
Logician
08-26-2003, 05:02 PM
Thank you Logician hope you are enjoying you vacation!
Thanks.. As a matter of fact, I've recently returned back and fighting with compiled mails.. :)
Very useful! I installed it a few months back and it's working fine in restricting but suddenly the member group I had setup to be able to see the full search now has been restricted as well and I can't figure out why. I must have a made a change to something somewhere that has affected this hack.
Sigh.
Logician
12-24-2003, 06:35 AM
how exactly did you apply the hack to that member group in your code? I'd suspect that section of your code be the culprit.
Thanks for your reply. I've restored search.php to the original so I can't show you that section of the code. I'm going to try redoing the whole thing and see if it works.
crashys
06-15-2008, 10:21 AM
It can be easier.
Change the template navbar_atim
And change
<td class="vbmenu_option"><a href="search.php?do=getdaily&minutes=15">$vbphrase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&minutes=30">$vbphrase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&minutes=45">$vbphrase[atin_Last_45]</a></td>
to <td class="vbmenu_option"><a href="search.php?do=getdaily&&exclude=152;minutes=15">$vbphrase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&&exclude=152;minutes=30">$vbphrase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&&exclude=152;minutes=45">$vbphrase[atin_Last_45]</a></td>
&exclude=152 is the number of the excluded form.
Logician
06-17-2008, 02:09 PM
It can be easier.
Change the template navbar_atim
And change
<td class="vbmenu_option"><a href="search.php?do=getdaily&minutes=15">$vbphrase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&minutes=30">$vbphrase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&minutes=45">$vbphrase[atin_Last_45]</a></td>
to <td class="vbmenu_option"><a href="search.php?do=getdaily&&exclude=152;minutes=15">$vbphrase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&&exclude=152;minutes=30">$vbphrase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&&exclude=152;minutes=45">$vbphrase[atin_Last_45]</a></td>
&exclude=152 is the number of the excluded form.
This is a thread from year 2002 and vbulletin version 2.0 times and your solution wouldn't work by then.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.