PDA

View Full Version : Altering Usernote Content Question


random1231231231
03-20-2016, 09:56 AM
Removed

MarkFL
03-20-2016, 10:51 AM
You would want to use the PHP Plugin Hook "postbit_display_complete" and then your code would be like:

if (THIS_SCRIPT === 'usernote' AND is_member_of($vbulletin->userinfo, array(X, Y, Z, ...)))
{
$post['message'] .= '<br /><br />This is just an additional message';
}

where "X, Y, Z, ..." are the usergroupids of the usergroups you want to see the additional message.

MarkFL
03-20-2016, 01:37 PM
Thank you it works. But i have to add this line
global $vbulletin;

When i didn't have it, the $vbulletin->userinfo is null (i tried to var_dump it).

Yeah, for some reason I never need that on my dev site, but some folks seem to need it on their sites, and I sometimes forget to add that when posting code for others. :)