The following is the plugin code used for this mod at hook location 'global_start':
PHP Code:
if (THIS_SCRIPT == 'newattachment' AND $_REQUEST['type'] == 'pm')
{
$threadid = -1;
$vbulletin->userinfo['forumpermissions']['pm'] |= $vbulletin->bf_ugp_forumpermissions['canpostattachment'] + $vbulletin->bf_ugp_forumpermissions['canview'] + $vbulletin->bf_ugp_forumpermissions['canviewthreads'] + $vbulletin->bf_ugp_forumpermissions['canviewothers'] + $vbulletin->bf_ugp_forumpermissions['canreplyothers'] + $vbulletin->bf_ugp_forumpermissions['canreplyown'] + $vbulletin->bf_ugp_forumpermissions['canpostnew'];
$foruminfo['allowposting'] = 1;
$foruminfo['cancontainthreads'] = 1;
$foruminfo['forumid'] = 'pm';
}
Something in this code causes an error message when uploading attachments to thread posts:
'you don't have sufficient privileges / permissions to perform this action'. When the above plugin is disabled, there is no longer an error message on uploading attachments.