PDA

View Full Version : Mini Mods - Navbar Search Form/Input Box


04-29-2008, 10:00 PM
Updated version of my older mod here (https://vborg.vbsupport.ru/showthread.php?t=147076), fixed for the new security token feature.

This is a quick template mod that roughly emulates the search box here at vB.org, without the forum select dropdown. I saw a few mods somewhat like it but none with the input box, and like many people here once vB.org released the new skin, I had to have the search box. So after a bit of coding and hacking around, here's the way I did it.

Note that simply clicking the search button with no query will bring you to the default search page.

Time to Install: 2 Minutes
Difficulty: Easy
Template Mods: 1
Demo: http://www.sevenstring.org
Login: guest/guest (unregistered search is disabled)

AdminCP -> Style Manager -> Edit Templates -> navbar

Find:


<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions</strong></div>
</if>
</td>


Add directly after, replacing the colored text with your domain/forum path to search.php


<!-- Search Box -->
<td valign="middle" class="alt1"> <div style="white-space:nowrap">
<form action="[B]http://www.yourdomain.com/forum/search.php" method="post">
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="text" style="width:100px;" class="bginput" name="query"/>
<input style="font: bold 10px Arial" type="submit" class="button" value="Search" /></form>
<a style="text-decoration:none" href="search.php" accesskey="4" rel="nofollow" id="navbar_search" class=""></a>&nbsp;
</div></td>
<!-- /Search Box -->


Note that the bold text is what's new for 3.7.

Optional: Remove the old search link from your navbar.

Simply comment out the search text, like so. I'm sure there's a better way to accomplish this, but that's how I pull it off on my site. Any input appreciated.


<!-- $vbphrase[search] -->

Screenshot:http://www.sevenstring.org/chris/vbmod_searchbox.jpg

This will be considered beta until I have it running with 3.7 for awhile to ensure there are no other hidden issues.

sunrunner_pei
04-30-2008, 06:06 PM
Just installed, and I wanted to note that the link for 'form action' has to be updated to reflect your own forums URL. Other than that, great job!

cafenetland
04-30-2008, 07:26 PM
installed.

digicom
05-01-2008, 08:57 AM
installed Thanks:up:

Defkalion
05-01-2008, 10:16 AM
nice mod. Is it possible to put also a second box that does the tag search?

Jasem
05-01-2008, 10:20 AM
Thank you very much :)

VNFriends
05-01-2008, 01:42 PM
thanks so much :D

chimaira
05-05-2008, 02:13 PM
Thanks, addded this to my sidebar :)

XnaMe
05-05-2008, 07:03 PM
Our records show that you have already registered under the name of Admin. If you have lost your password, click here (http://themobilebay.com/forum/login.php?do=lostpw). If you would like to modify your profile, click here (http://themobilebay.com/forum/profile.php?do=editprofile).

What's wrong with this?

chimaira
05-10-2008, 08:39 PM
https://vborg.vbsupport.ru/
Having this problem, How do i get rid of that arrow



No problem, fxied it

powerful_rogue
05-15-2008, 01:06 PM
How come I didnt get a little arrow to do the advance search?:p

J.kay
05-22-2008, 04:10 PM
How come I didnt get a little arrow to do the advance search?:p

quote

dvbusuario
07-02-2008, 02:14 PM
Nice mod, Install!

but how change method="post" to "only titles"?

ByB
11-19-2008, 10:32 AM
:)Installed thank you very good

momo2
11-23-2008, 01:04 AM
very nice, worked on 3.7.4 with no problem, if there is a way a text saying search in side and as soon your mouse hit the box make it clear ? that type the search ?

sunrunner_pei
05-20-2010, 05:35 PM
http://img363.imageshack.us/img363/4610/95212138pp1.jpg
Having this problem, How do i get rid of that arrow



No problem, fxied it

quote

I just did some navbar editing and ran into this problem. I was able to fix it by changing the 'id=' parameter slightly. Hope this helps someone!

Original:
<a style="text-decoration:none" href="search.php" accesskey="4" rel="nofollow" id="navbar_search" class=""></a>

Modified:
<a style="text-decoration:none" href="search.php" accesskey="4" rel="nofollow" id="navbar_search2" class=""></a>