![]() |
vbulletin search times for different user groups
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. |
Just write a plugin. Something like:
PHP Code:
(Find the option name in the page source for the vboptions page.) |
so something like this should work?
if (in_array($vbulletin->userinfo['10'], array(x,y))) { $vbulletin->options['optionsform'] = '30'; } |
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:
|
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:
|
Quote:
|
Quote:
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"> |
thanks Lynne. :up: Life is all good now
|
Just wanted to clarify - to make this work in 3.8, would the hook location be search_start for the plugin?
|
You can try that and see.
|
Doesn't look like it's working with that hook location. Here's the code I'm using:
PHP Code:
|
Lynne, does my code look right? Any suggestions on hook locations?
|
It looks correct. Look up the hook location and see if it is the best one for you to use. If you are in debug mode, you can see the list of hooks on the bottom of the page and perhaps pick a better one.
|
All times are GMT. The time now is 07:08 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|