thanks - but I don't think so....unless I'm really missing something here:
here's the standard code - I did not change the original condition in the if statement with the ANDS, I just spread it out to make it more readable.
PHP Code:
if ($vbulletin->options['apboupc_global_enable'] AND ($vbulletin->options['apboupc_pm_amount']>0) AND (THIS_SCRIPT=='private'))
{
if (($vbulletin->options['apboupc_pm_amount'] !='0') AND ($vbulletin->options['apboupc_pm_amount'] > $vbulletin->userinfo[posts]) AND (!is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['apboupc_pm_excludedgroups']))))
{
$apboupc_pmsnote = construct_phrase($vbphrase['apboupc_pm_note'], $vbulletin->options['apboupc_pm_amount']);
$vbulletin->templatecache['pm_newpm'] = str_replace('$vbphrase[separate_multiple_names]', '$vbphrase[separate_multiple_names]<br /><br />$apboupc_pmsnote', $vbulletin->templatecache['pm_newpm']);
}
}
and here's my modded code:
PHP Code:
if ($vbulletin->options['apboupc_global_enable'] AND ($vbulletin->options['apboupc_pm_amount']>0) AND (THIS_SCRIPT=='private'))
{
$min_days = 7;
$days_registered = floor((TIMENOW - $vbulletin->userinfo['joindate']) / 86400);
if ( ($vbulletin->options['apboupc_pm_amount'] !='0') AND
($vbulletin->options['apboupc_pm_amount'] > $vbulletin->userinfo[posts]) AND
(!is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['apboupc_pm_excludedgroups'])))
)
or ($days_registered <= $min_days)
{
$apboupc_pmsnote = construct_phrase($vbphrase['apboupc_pm_note'], $vbulletin->options['apboupc_pm_amount']);
$vbulletin->templatecache['pm_newpm'] = str_replace('$vbphrase[separate_multiple_names]', '$vbphrase[separate_multiple_names]<br /><br />$apboupc_pmsnote', $vbulletin->templatecache['pm_newpm']);
}
}
you wrote: Edit: except one other thing...if you were to set $vbulletin->options['apboupc_pm_amount'] option to 0 it wouldn't kick in even if they days registered was too low.
you are correct - I have it set to 15 and I'm the only person who touches the admin panel so this is not a concern of mine.
ps: thank you for you help thus far - it is much appreciated.