The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hi,
I'm currently using PHP Code:
Is there a conditional I could use that would avoid this, i.e one that could consider how many posts are actually showing on the current page in a showthread? |
|
#2
|
|||
|
|||
|
Off the top of my head, you going to need the $perpage variable on showthread, which is already registered to the template. Obviously, you will need to divide ($threadinfo[resultcount] / $perpage) and handle it correctly, but I have not looked at the code as of yet. When I get a chance I will do so.
Code:
// Hook: postbit_display_complete
// Settings->Options->Thread Display Options (showthread)->Maximum Displayed Posts Before Page Split.
//
// Use the following variable for your condition in your selected postbit template.
// The following variable contains an on-going post count from the page query.
// {vb:raw tb_postbit_postcount}
if (THIS_SCRIPT == 'showthread')
{
global $tb_postbit_postcount;
vB_Template::preRegister('postbit_legacy',array('tb_postbit_postcount' => ++$tb_postbit_postcount));
}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|