The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Making a Search Command in the Side Bar(missing security token problem)
i have made a pretty basic search bar and i was wondering a couple things about it
1. How do i fix the security token issue with in it. 2. How do i make it so it doesn't stretch the side bar. 3. How can i change the submit button to something i choose. Code:
<form action="search.php?do=process" method="post" name="vbform" id="searchform" > <input type="text" name="query" /> <input type="submit" /> </form> </div> |
#2
|
||||
|
||||
This thread here tells you about security tokens. It should tell you the line to add to your form - Implementing CSRF Protection in modifications
|
#3
|
|||
|
|||
Ok now i got the security token to work properly but it is not searching correctly can anyone take a look at the code and see what is wrong with it
Code:
<div class="sidebar_menu"><form action="search.php?do=process" method="post" name="vbform" id="searchform"\> <input type="text" class="bginput" name="search" id="search" size="20" accesskey="u" tabindex="101" value="Search" onfocus="if (this.value == 'Search') this.value = '';" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> </form></div> |
#4
|
||||
|
||||
Take a look at the search form in the navbar. You will need to have all the same input fields in your form as in the quick search form.
|
#5
|
|||
|
|||
can anyone provide some actual code that might be of some use. Either the actual code that i need or a example code for me to base my code off of would be very appreciated.
|
#6
|
||||
|
||||
Did you look in the navbar like I suggested? This is the form in the navbar - you'll have to edit it to fit your needs:
HTML Code:
<td class="vbmenu_option" title="nohilite"> <form action="search.php?do=process" method="post"> <input type="hidden" name="do" value="process" /> <input type="hidden" name="quicksearch" value="1" /> <input type="hidden" name="childforums" value="1" /> <input type="hidden" name="exactname" value="1" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div> <div style="margin-top:$stylevar[cellpadding]px"> <label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label> <label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label> </div> </form> </td> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|