View Full Version : How to change post number on thread page?
DamasGate
10-29-2010, 09:20 AM
Hello,
"In show thread page"
How i can make the default post number per page for "guests" 5,
But still 20 posts for members per page?
Thanks for help
Lynne
10-29-2010, 01:52 PM
$vbulletin->options['maxposts'] is the variable you want to change. So, probably something like:
if (is_member_of($vbulletin->bbuserinfo, X)) $vbulletin->options['maxposts'] = 5;
Change X to the usergroupid. Try some global hook location.
DamasGate
10-29-2010, 06:20 PM
Thank you Lynne,
But i did not know how to do that, any steps how to do please?
Where to add this line?
if (is_member_of($vbulletin->bbuserinfo, X)) $vbulletin->options['maxposts'] = 5;
Thanks again
Lynne
10-29-2010, 10:43 PM
You'd have to create a plugin with that code. Like I said, you'd probably want to try a global_* hook location, but since I haven't tried this, I can't really say exactly which to use.
DamasGate
10-30-2010, 05:41 AM
I try add it to all global_x in plugin manager, Not work
This what i need. "In show thread page"
Default post number per page for "guests" 5,
Default post number per page for "members" 10,
Thank you again
Lynne
10-30-2010, 02:11 PM
Exactly what did you put in the plugin (you cannot put exactly what I wrote, as I said)? And did you turn the plugin on? Try a showthread_* plugin if the others aren't working.
DamasGate
10-30-2010, 04:38 PM
I put this line exactly
if (is_member_of($vbulletin->bbuserinfo, 1)) $vbulletin->options['maxposts'] = 5;2- Turned the plugin on
3- Name: Only 5 post for guests
4-order = 5
5- Hook Location, i try all global_x AND all showthread_x And All postbit_x
Not working for me
I really very appreciate your patience and cooperation.
Lynne
10-30-2010, 06:43 PM
Argh!!! It's $vbulletin->userinfo, not $vbulletin->bbuserinfo. This works:
if (is_member_of($vbulletin->userinfo, 1)) $vbulletin->options['maxposts'] = 5;
{{{Lynne hangs head in shame...}}}
DamasGate
10-30-2010, 08:59 PM
Greeeeeeeeeeeeeat,
Working very good, work like charm NOW.
Thanks a lot
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.