![]() |
Counting the number of posts displayed on a page?
OK, I've got a right column down the side of my forum pages, the code of which is contained in my footer template. When viewing a thread, I'd like to have access to a variable that contains the number of posts being displayed on that particular page. I know that $post[postcount] obviously exists within the scope of postbit, but that's not exactly what I want nor is it usable from within the footer template. Is there another way to accomplish this that I haven't yet thought of? Any simple way to modify the source code?
(Why do I want to do this? Basically, I want to show more advertisements in the right hand column as the number of posts on the page increase. These obviously extend the page downward and I would love to take advantage of that otherwise wasted real estate.) |
Put this code in a plugin on the postbit_display_complete hook
Code:
$GLOBALS['pagepostcount'] = $post['postcount']; |
Ah, OK, sucks about the evaluation order of the footer template. Thanks anyway, AP!
|
All times are GMT. The time now is 01:55 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|