vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Different number of threads displayed depending on sub-forum (https://vborg.vbsupport.ru/showthread.php?t=272088)

thenamesgould 10-15-2011 12:32 PM

Different number of threads displayed depending on sub-forum
 
Hi there,

I'm not even sure if this is possible, but I've had a good search and can't find it mentioned anywhere.

I have a forum where I am creating a sub-forum that will be reference only - basically a listing of games played by a sport team - a different sub-forum for each year, and a different thread for each match. Now in those forums I want every game for the year to show up without the user having to go to another page - around 40 threads in some cases.

But I don't want to make all the other sub-forums display 40 threads on each page!

Is there any way to do this? Is a mod possible/easy enough for someone to do it?

BirdOPrey5 10-19-2011 02:36 PM

Make a new plugin on the hook forumdisplay_start with this code:

Code:

if ($foruminfo['forumid'] == 2)
  $perpage = $vbulletin->options['maxthreads'] = 200;

Where 2 is the forumid and 200 is the number of threads you want per page.

You can add additional lines for different forums-

Code:

if ($foruminfo['forumid'] == 2)
  $perpage = $vbulletin->options['maxthreads'] = 200;

if ($foruminfo['forumid'] == 3)
  $perpage = $vbulletin->options['maxthreads'] = 100;

if ($foruminfo['forumid'] == 4)
  $perpage = $vbulletin->options['maxthreads'] = 250;


thenamesgould 10-21-2011 11:39 AM

Thanks! I'll try this tomorrow and report back. :)

--------------- Added [DATE]1319282710[/DATE] at [TIME]1319282710[/TIME] ---------------

Works beautifully, thanks!!! :D


All times are GMT. The time now is 06:40 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
  • Page Generation 0.01089 seconds
  • Memory Usage 1,711KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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