So you want to add
PHP Code:
!$_REQUEST['refer']
to this part
PHP Code:
if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')
?
If so, then I think you have to edit the php file.
Also have you tried putting the exact same code in the plugin and see if it works? So that you're plugin would look the exact same with that extra condition?
PHP Code:
if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend' OR !$_REQUEST['refer'])
{
$forumperms = fetch_permissions($threadinfo['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canemail']) OR (($threadinfo['postuserid'] != $vbulletin->userinfo['userid']) AND !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'])))
{
print_no_permission();
}
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
}
not sure if that will work but give it a try.