![]() |
totalposts in header
hi,
how can i display {vb: totalposts} in the header template? ty :) --------------- Added [DATE]1358591472[/DATE] at [TIME]1358591472[/TIME] --------------- ???? |
Try this: create a new plugin using hook parse_template and this code:
Code:
global $vbulletin; Then you should be able to use {vb:raw totalposts} in the header (I know you didn't ask for totalthreads, but it was there so I thought I'd just leave it). |
It only works that I found in ForumHOME but when I entered the forum everything turns to 0 ...
And how to do it too to totalonline? --------------- Added [DATE]1358688103[/DATE] at [TIME]1358688103[/TIME] --------------- ??? |
???
|
You're right, it doesn't work on all pages because the information isn't always in the forum cache. Sorry, my mistake. You could change the code to something like this:
Code:
global $vbulletin; but you should be aware that this will add a query to each page that didn't already have the information, which could be significant if your forum is busy. It would be better to set something up to cache the information periodically, but that's a little more complicated. |
All times are GMT. The time now is 01:19 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:
|