vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How to change post number on thread page? (https://vborg.vbsupport.ru/showthread.php?t=252820)

DamasGate 10-29-2010 09:20 AM

How to change post number on thread page?
 
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:
PHP Code:

if (is_member_of($vbulletin->bbuserinfoX)) $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?
PHP Code:

if (is_member_of($vbulletin->bbuserinfoX)) $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

PHP Code:

if (is_member_of($vbulletin->bbuserinfo1)) $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.

kh99 10-30-2010 05:24 PM

nvm

Lynne 10-30-2010 06:43 PM

Argh!!! It's $vbulletin->userinfo, not $vbulletin->bbuserinfo. This works:

PHP Code:

if (is_member_of($vbulletin->userinfo1)) $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


All times are GMT. The time now is 02:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01690 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete