vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   exclude a forum from "Todays active Threads" (https://vborg.vbsupport.ru/showthread.php?t=43531)

heynurse 09-14-2002 06:28 PM

exclude a forum from "Todays active Threads"
 
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

Quote:

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:

PHP Code:

// ###################### Start get new #######################
if ($action=="getnew") {
  
// generate query
  // do it!
  
if ($bbuserinfo[userid]!=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

PHP Code:

// ###################### 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)

PHP Code:

 $wheresql.=" AND thread.open<>10"

and replace it as:

PHP Code:

 $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.

PHP Code:

$wheresql.=" AND thread.open<>10 AND thread.forumid!=98,112"

any ideas? Thanks again!

Logician 09-23-2002 04:47 PM

PHP Code:

$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

Quote:

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.. :)

Cyn 12-24-2003 04:29 AM

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.

Cyn 12-24-2003 07:07 AM

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&amp;minutes=15">$vbph rase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp;minutes=30">$vbph rase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp;minutes=45">$vbph rase[atin_Last_45]</a></td>

to <td class="vbmenu_option"><a href="search.php?do=getdaily&amp&exclude=152;minutes=15">$vbphrase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp&exclude=152;minutes=30">$vbphrase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp&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

Quote:

Originally Posted by crashys (Post 1549828)
It can be easier.

Change the template navbar_atim
And change
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp;minutes=15">$vbph rase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp;minutes=30">$vbph rase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp;minutes=45">$vbph rase[atin_Last_45]</a></td>

to <td class="vbmenu_option"><a href="search.php?do=getdaily&amp&exclude=152;minutes=15">$vbphrase[atin_Last_15]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp&exclude=152;minutes=30">$vbphrase[atin_Last_30]</a></td>
<td class="vbmenu_option"><a href="search.php?do=getdaily&amp&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.


All times are GMT. The time now is 06:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01317 seconds
  • Memory Usage 1,781KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete