The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I need different "Maximum Displayed Threads Before Page Split" for guests vs members
Which file do I need to edit to achieve different number of threads per page for guests versus members?
My current setting is 200 threads per page, which loads fast for guests because my guests are served fully cached pages. However, I'd like my members to view 50 threads per page so they don't suffer the speed decrease. Any help would be very much appreciated. |
#2
|
||||
|
||||
You should be able to do that with a plugin with a conditional in the plugin. I'm working on a mod now for my site that will have that option, among many others.
|
#3
|
|||
|
|||
Boofo, if it's not too big of a trouble, would you please give me a sample code to try for such plugin, and which hook location to use?
|
#4
|
||||
|
||||
Hook: global_bootstrap_init_start
Code:
$maxthreadsgroups = array(5,6,7); // Usergroups $maxthreadsids = array(); // User IDs if (is_member_of($vbulletin->userinfo, $maxthreadsgroups) OR in_array($vbulletin->userinfo['userid'], $maxthreadsids)) { $vbulletin->options['maxthreads'] = 50; } Change the numbers in red to your liking. You can also use userids. I have settings in a product for mine but this should give you what you need. TESTED and WORKS! |
#5
|
|||
|
|||
That sounds like the thing I need, but my 3.8.4 version of vB doesn't seem to have the required hook location. I only see global_complete, global_setup_complete, global_shutdown, and global_start.
Is there a way for me to accomplish it in my vB version somehow? Can I somehow add the hook location, or use an alternate hook location? I much appreciate you taking the time to help. |
#6
|
||||
|
||||
Try global_start and let me know if that works.
|
#7
|
|||
|
|||
Boofo, in the mean time I tested the forumdisplay_start hook, and it appears to work as intended, as far as I can tell.
Should forumdisplay_start be OK for this, or should I test it with the global_start? Thanks again, Boofo! |
#8
|
||||
|
||||
Do global_start
|
#9
|
|||
|
|||
Boofo, I switched to global_start, tested as a member vs guest, and it works as intended. I owe you one my friend. Thanks a million!
|
#10
|
||||
|
||||
I'd rather have the million.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|