Let's try this...create a new plugin hooked at "notifications_list" and give it the title "PM Quota Past Threshold" with the following Plugin PHP Code:
PHP Code:
global $vbulletin;
$threshold = 0.25;
if ($vbulletin->userinfo['pmtotal']/$vbulletin->userinfo['permissions']['pmquota'] > $threshold)
{
$template_name = 'header';
$t_temp = $vbulletin->templatecache[$template_name];
$find = '/(<li class="welcomelink">.*?<\/li>)/';
$t_temp = preg_replace($find, '$1' .'<li style="padding: 3px 4px; color: #ffffff; font-weight: bold;">Your PM quota is over ' . $threshold*100 . '% capacity!</li>', $t_temp);
$vbulletin->templatecache[$template_name] = $t_temp;
}
You can change the value of 0.25 for the variable $threshold to suit your liking. Once you see how this looks, we can make any tweaks to it you like.