View Full Version : Search bar
jacobskinner811
11-19-2010, 09:12 PM
So in the member list you can search for members in clicking the "search members" button and down comes the search bar...i was hoping tho that i would be able to have that members search bar in replace of the search for post bar thats on the navbar...so basically i just want to copy the code for the member search and replace it with the search for the recent posts searchbar...is that possible at all to do?
BirdOPrey5
11-21-2010, 07:51 PM
Looking in the memberlist template the code that generates the "search members" box seems to be:
<form action="memberlist.php?do=getall" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_members]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="getall" />
<input type="text" class="bginput" name="ausername" size="20" value="$ltr" title="$vbphrase[username]" />$gobutton
</td>
</tr>
</table>
</form>
I haven't tested this but replacint the navbar search code with this should do it... at least it's a start.
jacobskinner811
12-02-2010, 09:30 PM
oh thats awesome, do you know where i could find the nav bar search code?
BirdOPrey5
12-02-2010, 09:33 PM
I would look in the NAVBAR template... search for instances of "search.php" - there may be more than 1 place.
jacobskinner811
12-02-2010, 09:35 PM
sweet thanks! im kind of worried it will mess up the website...do you think it would work? i feel the logic is there haha but im not sure
BirdOPrey5
12-02-2010, 09:39 PM
Well before you edit the navbar template copy and paste all of it into a text document and save it so you can always change back.
Also, if you've never made any other custom changes to the template you can always click the button 'Revert Template" to change it back to the default template- but you'd lose any changes you ever did make.
These are the types of changes you should make on your "test forum" first to make sure they work.
jacobskinner811
12-02-2010, 09:39 PM
my goal is that people will be able to find friedns without seeing the members list... i dont want people to know how many members my site has
BirdOPrey5
12-02-2010, 09:41 PM
If you want to remove the member's list from the navabar that's different... search the navbar template for "memberlist.php" instead and remove the associated code.
jacobskinner811
12-02-2010, 09:49 PM
the only problem is if i do that people wont be able to find friends unless they know the exact name....i want the search to be easier...so im hoping i can take the search members searchbar, replace it with the navbar searchbar then disable the members list...that way they could still use the search bar to look for friends but not be able to see how many people are on the site. i just dont know if that would work or not
BirdOPrey5
12-02-2010, 09:54 PM
I don't believe there is a way to search members on the navbar though... at least there isn't in the default style- unless I'm missing something?
jacobskinner811
12-02-2010, 09:57 PM
yah i dont think so either, i just dont understand what the searchbar in the navbar is for...i was hoping it would be to find people but its not
BirdOPrey5
12-02-2010, 09:59 PM
It's to search threads and posts for content.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.