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.


All times are GMT. The time now is 11:53 PM.

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.01175 seconds
  • Memory Usage 1,754KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete