View Full Version : bbuserinfo.pmunread and bbuserinfo.pmtotal display but permissions.pmquota doesn't?
soulz2003
10-08-2012, 05:28 AM
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?
$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:
{vb:raw GLOBALS.permissions.pmquota}
soulz2003
10-15-2012, 10:30 PM
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.
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 ".
soulz2003
10-16-2012, 08:33 AM
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.
$date = date('Y');
$templater = vB_Template::create('dbtech_vbdonate_adv_portal_do nate');
$templater->register('output', $output);
$templater->register('date', $date);
$show['dbtech_vbdonate_adv_portal_donate'] = $templater->render();
With this code present and the file enabled all of a sudden {vb:raw GLOBALS.permissions.pmquota} in the header stops working on pages this part of the plugin works on which would be any vbAdvanced pages, the index and i added one other page. But all other pages the variable still displays fine.
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.
Hmm...try using {vb:raw bbuserinfo.permissions.pmquota} instead and see if that solves the problem.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.