The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#10
|
|||
|
|||
![]()
I don't think you need to do a query because the global $notifications_total should contain the total (assuming it's been calculated at the point you're trying to use it, of course), but it has to be registered to the template(s) where you want to use it. If you create a plugin using hook process_templates_complete you should be able to do preRegisters there. (process_templates_complete was just added a couple versions ago so it's possible you don't have it if you're not up to date).
You would have to register it to each template as I don't think there's any way to globally register to all templates. But there is a number of globals that *are* registered automatically in each template, so you could piggy back on one of those. For instance, $vbulletin->userinfo is registered as bbuserinfo, so in your plugin you could set $vbulletin->userinfo['notifications_total'] = $notifications_total then use {vb:raw bbuserinfo.notifications_total} in each template. (Probably some people will tell you that you shouldn't really do it this way, but I don't see a problem with it). |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|