Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2002, 12:16 AM
Sweet Cheeks's Avatar
Sweet Cheeks Sweet Cheeks is offline
 
Join Date: Mar 2002
Location: Carson City, Nevada
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Omitting a specific forums posts in *New Topics* search?

Sorry if that didnt make sense LMAO but I couldnt think of any better way to say it :dead:

I have one forum that I want to add some sort of setting to to where when someone posts in it, it wont be included in the users search results when they click on the *New posts* button.

Thanks in advance :smoke: :smoke: :smoke:
Reply With Quote
  #2  
Old 06-23-2002, 08:16 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Without hack:

You can disable access of the forum to some usergroups. Their search will automatically exclude this forum then.

With hack:

Edit search.php, find:
PHP Code:
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)) {
            
$forumsql.=",$forum[forumid]";
        }
        
$forumsql.=") ";
    } 
Replace line
PHP Code:
$forumsql.=",$forum[forumid]"
As:
PHP Code:
if ($forum[forumid]!=X) {$forumsql.=",$forum[forumid]";} 
Replace X with the forumid that will be excluded.

Not tested but should work..
Logician
Reply With Quote
  #3  
Old 06-23-2002, 02:11 PM
Sweet Cheeks's Avatar
Sweet Cheeks Sweet Cheeks is offline
 
Join Date: Mar 2002
Location: Carson City, Nevada
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh you are too awesome. I will try this and let you know how it works. Thanks a bunch!
Reply With Quote
  #4  
Old 08-23-2002, 10:35 PM
DudeSicko DudeSicko is offline
 
Join Date: Apr 2002
Location: Denmark
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have tryed to include it in the search.php but i dident get that result i had hoped for

The one i could use would be the one that calls the action

http://www.xxxxxxx.dk/forum/search.php?action=getnew

How do i modify it for that one ?
Reply With Quote
  #5  
Old 08-23-2002, 11:27 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Should be the same modification that Logican posted, just searcg for getnew in search.php and you will see the code to change just under it
Reply With Quote
  #6  
Old 08-24-2002, 11:44 AM
DudeSicko DudeSicko is offline
 
Join Date: Apr 2002
Location: Denmark
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep have found it, but when i modify it, nothing happens, i still get the page ;( SNIFF
Reply With Quote
  #7  
Old 08-25-2002, 11:06 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DudeSicko
Yep have found it, but when i modify it, nothing happens, i still get the page ;( SNIFF
To make sure you are doing the correct change:

Find:
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)) {
                
$forumsql.=",$forum[forumid]";
            }
            
$forumsql.=") ";
        } 
Replace line

PHP Code:
$forumsql.=",$forum[forumid]"
As:

PHP Code:
if ($forum[forumid]!=X) {$forumsql.=",$forum[forumid]";} 
Replace X with the forumid that will be excluded.

Is it exactly what you did?

Attention: This change will exclude the forum for GUESTS ONLY! If you logged in as a member, you have to make the change I referred for ~*Julie*~ above. In other words if you want to exlude the forum for BOTH guests and members apply BOTH changes..
Reply With Quote
  #8  
Old 09-03-2002, 01:47 PM
DudeSicko DudeSicko is offline
 
Join Date: Apr 2002
Location: Denmark
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the change i maid.

I got the 16 from this:



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)) {
                
//$forumsql.=",$forum[forumid]";
                
if ($forum[forumid]!=16) {$forumsql.=",$forum[forumid]";}
            }
            
$forumsql.=") ";
        } 
Reply With Quote
  #9  
Old 09-15-2002, 01:53 AM
heynurse heynurse is offline
 
Join Date: Jan 2002
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Logician,

Thanks for your assistance with the hack.

I have followed your instructions exactly, and the forum I do not want to show up in the "Todays Active Threads" still shows up? Any other ideas or suggestions? Thanks

BTW, my original post was at: https://vborg.vbsupport.ru/showthrea...threadid=43531
Reply With Quote
  #10  
Old 09-15-2002, 03:06 AM
Sweet Cheeks's Avatar
Sweet Cheeks Sweet Cheeks is offline
 
Join Date: Mar 2002
Location: Carson City, Nevada
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh I'm sorry I never replied back Thanks again, this has helped me alot, it woks awesome :banana: You rock!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04382 seconds
  • Memory Usage 2,283KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete