Announcement

Collapse
No announcement yet.

omit a forum from default search.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • omit a forum from default search.

    In the advance search I know you can choose what forum to search in specifically, but I'd like the RSS forum to be omitted because it monopolizes the results if you do an "any" search.

    Index New Posts in Search Engine (Setting this to 'No' will prevent anyone from being able to search in this forum)

    I'm aware of this in admincp, but I don't think it's the option I want..here's why:

    -If I set this to no, then even the Search this Forum & Search this Thread won't work?
    -If I set to no, if I choose to set to yes again in the future, will it auto index everything that was omitted previously, or will it just start indexing from that point on?
    Last edited by scorpio24; Thu 4 Jan '07, 7:21am.

  • #2
    Admin CP -> Styles & Templates -> Style Manager -> « » -> Search Templates -> search_forums

    Add the red code:

    Code:
    $stylevar[htmldoctype]
    <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
    <head>
    $headinclude
    <title>$vboptions[bbtitle] - $vbphrase[search_forums]</title>
    </head>
    <body>
    $header
    $navbar
    
    <form action="search.php?do=process" method="post" name="vbform" id="searchform">
    <input type="hidden" name="exclude" value="2" />
    <input type="hidden" name="s" value="$session[sessionhash]" />
    <input type="hidden" name="do" value="process" />
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    	<td class="tcat">
    		$vbphrase[search_forums]
    	</td>
    </tr>
    Change the value to specify the forumid of your RSS forum.

    Comment


    • #3
      thanks Jake, works great.

      Is there a way to do the same for the quick search? The RSS feed still shows up there.

      Comment


      • #4
        Admin CP -> Styles & Templates -> Style Manager -> « » -> Navigation / Breadcrumb Templates -> navbar

        Code:
        	<if condition="$show['searchbuttons']">
        	<!-- header quick search form -->
        	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
        		<form action="search.php?do=process" method="post">
        		<table cellpadding="4" cellspacing="1" border="0">
        		<tr>
        			<td class="thead">$vbphrase[search_forums]</td>
        		</tr>
        		<tr>
        			<td class="vbmenu_option" title="nohilite">
        				<input type="hidden" name="exclude" value="2" />
        				<input type="hidden" name="do" value="process" />
        				<input type="hidden" name="quicksearch" value="1" />
        				<input type="hidden" name="s" value="$session[sessionhash]" />
        				<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
        			</td>
        		</tr>
        		<tr>
        			<td class="vbmenu_option" title="nohilite">
        				<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
        				&nbsp;
        				<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
        			</td>
        		</tr>
        		<tr>
        			<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
        		</tr>
        		</table>
        		</form>
        	</div>
        	<!-- / header quick search form -->
        	</if>

        Comment


        • #5
          Hi,

          I have a very similar search problem.

          I have three new RSS forums, and all work great.

          However members complain that the 'New Forum Posts' option is packed out with material from the 3 RSS forums.

          I tried the setting to not include these 3 forums in searches, and then deleted all existing messages in those areas, and deleted the search indexes and created them afresh.

          But... new messages arriving in the RSS forums are still showing up when the 'New Forum Posts' option is chosen.

          Is there something I can do to prevent this please? Is there some code like that given earlier in this thread that can block all three forums from the search.php?do=getnew instruction that seems to be run when people click on 'New Forum Posts'?

          Thanks for any help you can give!

          Steve

          Comment


          • #6
            Yep.

            search.php?do=getnew&exclude=12,17,29

            Comment


            • #7
              Thank you Feldon23.

              I did that and it works fine.. though of course there are a number of those searches and all of them have to be changed, and then kept changed as each new VB comes out.

              It needs doing to the New Posts searches and Today's messages searches etc as well as the ones that come up when there are no finds and so on.

              I've just been taking the moderators displayed on each forum out, and likewise that needed every forumdisplay we use edited, and we use lots of them, and will need to keep that up. We don't have moderators or want to talk of them as such, but our Admin folks are shown as moderators at the bottom of forums unless we edit them out of each forumdisplay we use.

              It is a shame to have to do all this editing, and to have to keep doing it for new versions etc. Switches/settings to not display moderators at the bottom of forums and to not include some forums (like those used for RSS) in set searches etc etc would be so much easier.

              Thanks again for your help.

              Steve

              Comment


              • #8
                http://www.vbulletin.com/forum/showthread.php?t=172811

                Comment


                • #9
                  Steve_GB,

                  You are making a request that has definitely been made before. Not sure how likely it is to appear in a future version.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X