The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
VM question
I'm trying to write a plugin to do the following:
When a member attempts to post a VM on another member's profile, the plugin checks - A) Is your own privacy setting set to only allow friends? B) Is the recipient of the VM a friend? If A is true and B is false, the VM is not posted, and the member attempting to post the VM gets an error dialog. What I've attempted (Hook Location is visitor_message_start): Code:
if ( ($vbulletin->options['vm_contactonly'] && !$userinfo['bbuser_iscontact_of_user'] { standard_error(fetch_error('ban_visitor_message', $vbulletin->userinfo['username'])); } Code:
$novmperm = explode(",", $vbulletin->options['vm_contactonly']); if (!$userinfo['bbuser_iscontact_of_user' && in_array($vbulletin->userinfo['userid'], $novmperm)) { standard_error(fetch_error('ban_visitor_message', $vbulletin->userinfo['username'])); } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|