When you write an XML file and use plugin code at a certain hook location...does the code in your plugin execute before the hook location or after it?
Does your code run alongside the preexisting code in the PHP file, or does it replace it?
For example...if I had a xml file where I was trying to replace a certain chunk of code in the PHP file, how does that work?
Im trying to add a condition to this chunk of code without directly editing the file:
PHP Code:
if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')
{
$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']);
}