View Full Version : Which variable stores the number of posts displayed on current page?
empservices
05-07-2006, 07:41 PM
Is there a variable which shows the number of posts on the current page?
I need it to be accessible in the postbit template.
note: I don't want the maximum number of posts allowed, but the ACTUAL number of posts being displayed on the current page
Adrian Schneider
05-07-2006, 08:23 PM
This might work....
hook: showthread_postbit_create
if (empty($postsOnThisPage))
{
$postsOnThisPage = $vbulletin->db->num_rows($posts);
}
$post['postsonpage'] =& $postsOnThisPage;
then accessing it through $post[postsonthispage] in the template should work.
not tested...
empservices
05-08-2006, 07:21 AM
wouldnt' that return the total number of posts for the thread and not the page?
Adrian Schneider
05-09-2006, 06:08 PM
wouldnt' that return the total number of posts for the thread and not the page?
Nope. The query only returns posts on that page.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.