Quote:
Originally Posted by Kuimera
I get this when i click "Manage Attachments"
Code:
Invalid Post specified. If you followed a valid link, please notify the administrator
This the code i have, I cant find the $_pmt = 1;
Code:
$extraattachmentinfo = $db->query_first("
SELECT userid,itemid,usedin
FROM " . TABLE_PREFIX . "attachment AS attachment
WHERE attachmentid = " . $vbulletin->GPC['attachmentid'] . ""
);
if ($extraattachmentinfo['usedin'] == 'pmtextid')
{
$pmUsers = $db->query_first("SELECT toUserArray FROM ".TABLE_PREFIX."pmtext WHERE pmtextid='".$extraattachmentinfo['itemid']."'");
$toUserArray = unserialize($pmUsers['toUserArray']);
if ($toUserArray[$vbulletin->userinfo['userid']] != $vbulletin->userinfo['username'] && $extraattachmentinfo['userid'] != $vbulletin->userinfo['userid'])
{
print_no_permission();
}
// bad thing to do, modify the main array with an int so the & operations will be true, any suggestions to improve this? (no file mods allowed!!)
$vbulletin->userinfo['permissions'] = $vbulletin->bf_ugp_forumpermissions['canview'] + $vbulletin->bf_ugp_forumpermissions['canviewthreads'] + $vbulletin->bf_ugp_forumpermissions['cangetattachment'] + $vbulletin->bf_ugp_forumpermissions['canviewothers'];
$imodcache = array();
$imodcache[0] = array("".$vbulletin->userinfo['userid']."" => 1, 'permissions' => $vbulletin->bf_misc_moderatorpermissions["canmoderateposts"]);
}
|
the code your looking for is at the top of the template you need to look in
about 5 or 6th line i think