The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I need to change the search options for different user groups and I can't seem to do it. for example for registered users I want them to be able to perform a search like every 5 minutes or so and paid members to be able to search every 30 seconds or so.
Seems I read a thread either on here or vb.org and now I can't locate it. any help is appreciated. |
#2
|
||||
|
||||
![]()
Just write a plugin. Something like:
PHP Code:
(Find the option name in the page source for the vboptions page.) |
#3
|
|||
|
|||
![]()
so something like this should work?
if (in_array($vbulletin->userinfo['10'], array(x,y))) { $vbulletin->options['optionsform'] = '30'; } |
#4
|
||||
|
||||
![]()
No, that wouldn't work (you need to leave the variable name alone).
Actually better (I don't know why I didn't use this): PHP Code:
|
#5
|
|||
|
|||
![]()
Ok, I used this and with the hook location "search_start" and it does not seem to work. 2 is the usergroup id I want restricted to 480 seconds (4 minutes between searchs)
PHP Code:
|
#6
|
|||
|
|||
![]()
I'm still fighting this... where do I find the option name. ????
|
#7
|
||||
|
||||
![]()
Find the option in vboptions - it's in Message Search Options > Minimum Time Between Searches. View the page source around it and the option name is right there several time (I highlighted a couple of them in red):
Code:
<tbody id="tbody_error_enablesearches" style="display:none"><tr><td class="alt1 smallfont" colspan="2"><div style="padding:4px; border:solid 1px red; background-color:white; color:black"><strong>Error</strong>:<div id="span_error_enablesearches">1</div></div></td></tr></tbody><tbody><tr valign="top"> <td class="optiontitle" title="$vbulletin->options['searchfloodtime']" colspan="2"><div class="smallfont" style="float:right"> <a href="options.php?do=editsetting&varname=searchfloodtime">[Edit]</a> <a href="options.php?do=removesetting&varname=searchfloodtime">[Delete]</a> </div><div>Minimum Time Between Searches<a name="searchfloodtime"></a></div></td> </tr> </tbody><tbody id="tbody_searchfloodtime"> <tr valign="top"> <td class="alt1"><div class="smallfont"title="$vbulletin->options['searchfloodtime']">The minimum time (in seconds) that must expire before the user can perform a new search.<br /> <br /> Set this to 0 to allow users to search as frequently as they want.</div></td> <td class="alt1"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr valign="top"><td><div id="ctrl_setting[searchfloodtime]"><input type="text" class="bginput" name="setting[searchfloodtime]" id="it_setting[searchfloodtime]_275" value="20" size="40" dir="ltr" tabindex="1" title="name="setting[searchfloodtime]"" /></div></td><td align="right" style="padding-left:4px"><a class="helplink" href="#" onclick="js_open_help('options', 'options', 'searchfloodtime'); return false;"><img src="../cpstyles/vbtech/cp_help.gif" alt="" border="0" title="Click for help on this option" /></a> </td></tr></table></td> </tr> </tbody> |
#8
|
|||
|
|||
![]()
thanks Lynne. :up: Life is all good now
|
#9
|
|||
|
|||
![]()
Just wanted to clarify - to make this work in 3.8, would the hook location be search_start for the plugin?
|
#10
|
||||
|
||||
![]()
You can try that and see.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|