No announcement yet.

Only allow searching of one forum at a time

  • Filter
  • Time
  • Show
Clear All
new posts

  • Only allow searching of one forum at a time

    How can I modify the search template so people can search only 1 forum (and possibly it's child forums) at a time? I already removed the "Search All Open Forums" option but it seems people can still search all forums....

    Searching all the forums crashed my forums twice yesterday.
    War is only fun when you are winning.

  • #2
    This appears to work:

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

    Remove the red code:

    						<select style="width:100%" name="forumchoice[]" size="13" multiple="multiple">
    							<option value="0" $noforumselected>$vbphrase[search_all_open_forums]</option>
    							<option value="subscribed">$vbphrase[search_subscribed_forums]</option>
    Now users can't manually select multiple forums in the list.
    Last edited by Jake Bunce; Tue 11 May '04, 6:56pm.


    • #3
      Originally posted by Jake Bunce
      This appears to work...
      ...except that if no forums are selected in the list then it wants to default to all forums, regardless of whether or not the Search All Open Forums option is there.

      I am looking at this and I am thinking code modifications which means you should post on, the official vB hacking site.


      • #4
        Thanks for your help again.

        I removed the multiple part as you suggested, and also added "selected" to the search subsribed forums option.
        <option value="subscribed" selected>$vbphrase[search_subscribed_forums]</option>
        This essentially forces people to pick a forum to search, w/o any code modifications.
        War is only fun when you are winning.


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