The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Simple Search Bar?
I'd like to place a simple search bar at the top centre of one of my forums but not on my front page (i.e navbar or header) actually in one of the forums under the catagories. I've tried the code below which works but it allows search to search the entire forum, I only want it to search the forum it's placed in...any ideas?
Quote:
|
#2
|
||||
|
||||
Add in a line like this:
HTML Code:
<input type="hidden" name="forumchoice[]" value="xx">
HTML Code:
<a style="text-decoration:none" href="search.php" accesskey="4" rel="nofollow" id="navbar_search" class=""></a> |
#3
|
|||
|
|||
I've no idea to be honest, I just copied the code from a mod, am I free to take that bit out?
Thanks for the extra line Also, although the code says "align center" when I add the code to my forumdisplay template the search box is way off to the left, any ideas how to get it in the middle? Thanks |
#4
|
||||
|
||||
The align center is for that one table cell which could be the left table cell so it's centered in the left table cell which is to the... left.
|
#5
|
|||
|
|||
So how would I use the centre table cell? Sorry to be a pain, I know nothing about coding unfortunately. Thanks x
|
#6
|
||||
|
||||
And I know nothing about your site layout, so I can't answer that. But, you would basically take the whole <form> and put it in the table cell you want. You basically added a whole <td> for your search bar and if you copy/pasted that, then you may be causing problems in the table with that. Usually you can't just add a new column without also adding a column to the other rows or you will have improper html on your page and cause weird things to happen.
|
#7
|
|||
|
|||
hello, i have a trouble. this code search any word but when we the word has extensions, the code cannot find the word(s) and users do not know this. for example, when i wrote "windows", code finds the "windows" topics. but when i wrote "windowsxp" the code finds nothing. how must i modify the code? thnx
|
#8
|
||||
|
||||
If there are no posts with exactly "windowsxp" then it will return nothing. I would have thought you meant "windows xp" though (with the space). That won't work unless you allow 2 character searches. If you are using fulltext search then that means recompiling mysql to allow 2 characters searches.
|
#9
|
|||
|
|||
sorry but i dont mean that. i need to give an other example. when i wrote the search bar "thunder", the code finds me the only "thunder" words. i want to see "thundercats", "thuderbirds" or "thunderXXXXX" in the search results. i think u got it. thnx again my friend.
Quote:
|
#10
|
||||
|
||||
I think you would need to type in "thunder*" to see all posts with anything like what you said. Or even "*thunder*" to get "catsthundercats". Or, if you are using fulltext search, I think there is some option added to the usergroups in usergroup manager that gives permissions regarding searching (sorry, but I don't use fulltext search and so I don't see the option but I could swear it was there when I tested out fulltext search on my test site before.)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|