MyBB Community Forums

Full Version: Search by Username set to OFF
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am modifying my theme (as usual) and I am trying to figure out how to have the search by username option in the search page set OFF by default rather than on as it is now.

Can anyone help?
You mean hide the 2 inputs from search.php? Give value="" to:
<input type="text" class="textbox" id="author" name="author" size="35" maxlength="{$mybb->settings['maxnamelength']}" />
Then remove checked="checked" from:
<input type="checkbox" class="checkbox" name="matchusername" value="1" checked="checked" />

Set both to invisible with style="display: none;" or whatever and remove the rest, like {$lang->match_username}.
I don't want to hide them, I want them to be available to use, but not set to checked as default. Otherwise I would just have used display:none etc.
^ pardon my ignorance. can't you just remove checked="checked" (ref1, ref2)
(2013-06-13, 02:45 PM)Leefish Wrote: [ -> ]I don't want to hide them, I want them to be available to use, but not set to checked as default. Otherwise I would just have used display:none etc.

I don't really understand what you would like to do then.

http://community.mybb.com/search.php
It's off by default, you need to type a username to give the input a value and search by it.
Theres only one checkbox on the username field within the search page and its "match exact username".

Remove ' checked="checked" ' from Search templates >> search
Thanks m, I was afraid it would break it, but that is perfect. It was bugging me that members had to put a username in OR untick the checkbox. Should not be default ticked and now it isn't.