Agent Moose
|
|
« on: September 07, 2009, 06:43:29 pm » |
|
Footers: <script type="text/javascript"> var a = document.getElementsByTagName("form"); for(x=0;x<a.length;x++){ //Created by Agent Moose (revolutionx.smfforfree3.com) if(a[x].action.match(/action=search2/i) && a[x].parentNode.valign == "top" && a[x].nowrap == "nowrap" && a[x].parentNode.parentNode.parentNode.parentNode.id == "upshrinkHeader2" && location.href.match(/board,(\d+)./i)){ a[x].innerHTML = "<form id='searchform' name='searchform' accept-charset='ISO-8859-1' method='post' action='" + smf_scripturl + "action=search2'><input type='text' style='width: 190px;' name='search'/><input id='brd" + RegExp.$1 + "' type='hidden' checked='checked' value='" + RegExp.$1 + "' name='brd[" + RegExp.$1 + "]'/><input type='submit' value='Search' name='submit'/></form>" };}; </script> Original Request: http://revolutionx.smfforfree3.com/index.php/topic,1073.0.htmlThis code is very simple. It changes the search bar you have up top, to make it only search the board that you are in. If you are on the index page, or any other page that doesn't deal with a board, it will search the whole forum Enjoy
|
|
« Last Edit: November 19, 2009, 08:30:51 pm by Agent Moose »
|
Report Spam
Logged
|
|
|
|
|
xboi209
|
|
« Reply #1 on: September 07, 2009, 07:04:37 pm » |
|
hmm, i didn't expect this to be in the footers though but its still good
|
|
|
|
|
Agent Moose
|
|
« Reply #2 on: September 07, 2009, 08:57:39 pm » |
|
If you put it in the headers, it would be to high to get anything
|
|
|
|
xboi209
|
|
« Reply #3 on: September 07, 2009, 09:03:39 pm » |
|
yea but i was thinking of having one where you can put it anywhere you want.
|
|
|
|
DzinestaR
|
|
« Reply #4 on: September 07, 2009, 10:08:04 pm » |
|
That's a great code.
-DzinestaR
|
|
|
|
Agent Moose
|
|
« Reply #5 on: September 08, 2009, 09:14:31 am » |
|
yea but i was thinking of having one where you can put it anywhere you want.
I could make it so you can put it in the headers or footers it will still have the same concept of searching what ever board you are viwing.
|
|
|
|
|
|
|