Jump to content


- - - - -

Need help removing a certain part in the Search Funtion


  • Please log in to reply
1 reply to this topic

#1 visionz510

visionz510

    Advanced Member

  • Members
  • PipPipPipPip
  • 58 posts
  • Location:NY
  • Real Name:Joshua
  • IPB Version:v3.1.x

Posted 25 July 2010 - 05:04 PM

Does anyone know how to remove the "All Forums" from the "Search Where" box when you do a search? I want people to be able to choose specific forums when searching....not search on all of them at once, because it uses up alot resources on the site when they choose "All"

Thanks!
My Mood Pack for (V22) Member Moods

#2 AndyF

AndyF

    Cogito ergo sum

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 8,414 posts
  • Location:Derby, UK
  • Real Name:Andy
  • IPB Version:v3.2.x
Contributor

Posted 25 July 2010 - 05:44 PM

Try this:

Note this is untested as I tried it with an almost empty database so have no 'results' anyway.

Open /sources/action_public/search.php

Around line 756:

		$forums   = "<select name='forums[]' class='forminput' size='10' multiple='multiple'>\n"
				   ."<option value='all'".$init_sel.">".$this->ipsclass->lang['all_forums']."</option>"
				   . $the_html
				   . "</select>";

Replace with:

		$forums   = "<select name='forums[]' class='forminput' size='10' multiple='multiple'>\n"
				   . $the_html
				   . "</select>";

You are effectively just removing this line:

."<option value='all'".$init_sel.">".$this->ipsclass->lang['all_forums']."</option>"

Does remove the 'All Forums' option from the search page, although check a search in a forum (or multiple forums) to confirm it does work properly.

View my tutorials

Please do NOT pm me with support related questions unless requested.
If you are in need of help or assistance, please post on the forum in the appropriate section!



A Look Back - 1.0.1 - 1.3.1 - 2.0.0 - 2.1.7 - 2.2.0 - 2.3.6




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users