The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
bbuserinfo.pmunread and bbuserinfo.pmtotal display but permissions.pmquota doesn't?
I am trying to add some PM information to the header in our forum. I started out trying the vbadvanced welcome module line of:
{vb:rawphrase x_new_have_y_of_z_allowed, {vb:raw bbuserinfo.pmunread}, {vb:raw bbuserinfo.pmtotal}, {vb:raw permissions.pmquota}} Which works fine in the module on the cms. But when added to the header template the number for {vb:raw permissions.pmquota} does not show at all. I checked the code for the pm list template and it also uses {vb:raw permissions.pmquota}. I am not terribly experienced with vBulletin but why is it {vb:raw permissions.pmquota} does not show. Is there some dependency needed in the template? |
#2
|
|||
|
|||
$permissions would need to be registered to the template you're using it in. But since it's a global variable, you might also be able to display it like this:
Code:
{vb:raw GLOBALS.permissions.pmquota} |
#3
|
|||
|
|||
Thank you this has worked well so far. Is there something you can point me to about registering a variable or whatever to a template. I have started looking but not using the right search terms at this point I guess.
|
#4
|
|||
|
|||
Here's an article on the subject: https://vborg.vbsupport.ru/showthread.php?t=228078 . Since I believe you are talking about using it in existing templates, you'd be interested in the section titled "Save into an array and preregister to use in an existing/stock template ".
|
#5
|
|||
|
|||
Still not sure what file to put it in for a stock template since I am not exactly writing a plugin or anything but I was pretty tired and will look into it later.
I have an issue related to the former global variable seemingly caused by a plugin registering another variable though. Was hoping maybe there was some insight into it though I informed the developer. Code:
$date = date('Y'); $templater = vB_Template::create('dbtech_vbdonate_adv_portal_donate'); $templater->register('output', $output); $templater->register('date', $date); $show['dbtech_vbdonate_adv_portal_donate'] = $templater->render(); This was why I was hoping on trying to properly register the variable to the stock template and I am sure when I get up in the morning I will figure out what file to edit but it might not do anything anyways so i figured id ask why this other template registering variables not related all of a sudden screws this up. This plugin that is causing this the specific file with that specific code which when removed stops the problem is hooking at global_start if it matters. |
#6
|
|||
|
|||
Hmm...try using {vb:raw bbuserinfo.permissions.pmquota} instead and see if that solves the problem.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|