Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Kimmie on July 30, 2010, 03:32:23 PM

Title: Turning off Top Search Box
Post by: Kimmie on July 30, 2010, 03:32:23 PM
Is there a way to turn off the search box at the top and only have search as the menu option? This box doesnt seem to work very well and that would force everyone to use the more advanced search page.

(http://i29.tinypic.com/mcsvb6.png)
Title: Re: Turning off Top Search Box
Post by: Jokerâ„¢ on July 30, 2010, 03:37:30 PM
is that core theme ?

if yes then , go to

themes\core\index.template.php

Find:

<form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>
<input type="text" name="search" value="" style="width: 190px;" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex;" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>';


Replace it with:

';
Title: Re: Turning off Top Search Box
Post by: Kimmie on July 30, 2010, 04:22:32 PM
Well I dont permit my members to use the core or the default themes but figured since search generally isnt specific in custom themes, the default would be the only change required to be made if it was possible to do.

I will give that a go and see if it works. Thanks :)


EDIT: ok I made that change on the core theme and its still showing up on that theme. Any ideas? thanks :)
Title: Re: Turning off Top Search Box
Post by: TheListener on July 30, 2010, 07:32:18 PM
Which theme do you use?

Title: Re: Turning off Top Search Box
Post by: Kimmie on July 30, 2010, 11:44:07 PM
This one http://custom.simplemachines.org/themes/index.php?action=search;basic_search=playroom
Title: Re: Turning off Top Search Box
Post by: Jokerâ„¢ on July 31, 2010, 12:11:23 AM
Save the original file somewhere in your PC before making edits (as backup ;) )

go to themes\The_PlayRoom\index.template.php

Find:
<form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>';


replace it with:

';


Title: Re: Turning off Top Search Box
Post by: Kimmie on August 04, 2010, 01:30:58 AM
EXCELLENT.. you are my HERO  lol


Thanks :)