The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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.) |
#2
|
||||
|
||||
Put this code in a plugin on the postbit_display_complete hook
Code:
$GLOBALS['pagepostcount'] = $post['postcount']; |
#3
|
||||
|
||||
Ah, OK, sucks about the evaluation order of the footer template. Thanks anyway, AP!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|