PDA

View Full Version : Super moderators ignore attachment size


mli
08-26-2003, 05:45 PM
Is there a hack out there to set it so super mods don't have to abide by the max attachment size? I would like moderators to completely ignore that max attachment size value and attach as big of files as they want.

Logician
08-27-2003, 09:18 AM
not tested but should work:

edit functions.php, find:

if ($maxattachsize!=0 and $filesize>$maxattachsize) {


REplace it as:

if ($maxattachsize!=0 and $filesize>$maxattachsize AND ($bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5)) {


find:

global $safeupload,$tmppath, $allowduplicates, $allowimgsizefailure;

and replace it as:

global $safeupload,$tmppath, $allowduplicates, $allowimgsizefailure;
global $bbuserinfo;


However please note that this still wont give mods or admins to upload attachmetns with unlimited sizes. There are PHP/MYSQL restrictions set in the PHP/MYSQL options in your server and you can not exceed these restrictions with coding in your scripts. Your host needs to change such settings to disable them.