The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Bypass attachment size for Admins
Can someone please help me make it so Admins can bypass the limit of attachment file size? I have it so Admins can bypass the size of avatars, but not the file size limit. The following code is what is in my functions.php right now:
Code:
code I have now: $filesize=filesize($attachment); if ($maxattachsize!=0 and $filesize>$maxattachsize) { // too big! eval("standarderror(\"".gettemplate("error_attachtoobig")."\");"); unlink($attachment); exit; } Code:
if ($maxattachsize!=0 and $filesize>$maxattachsize and $bbuserinfo[usergroupid]!=6) { // too big! eval("standarderror(\"".gettemplate("error_attachtoobig")."\");"); exit; } if ($filesize!=$attachment_size and $bbuserinfo[usergroupid]!=6) { |
#2
|
||||
|
||||
In your new code, Replace
if ($maxattachsize!=0 and $filesize>$maxattachsize) { AS if ($maxattachsize!=0 and $filesize>$maxattachsize and $bbuserinfo[usergroupid]!=6) { |
#3
|
||||
|
||||
That's what I thought I should do, but I wanted to make sure before I messed with it. Thank you for the confirmation.
Quote:
|
#4
|
||||
|
||||
Make sure $bbuserinfo is a global in that function, I'm not sure it is.
|
#5
|
||||
|
||||
And how would I do that?
Quote:
|
#6
|
||||
|
||||
Never mind, it is.
|
#7
|
||||
|
||||
Ok, if you say so. (That question went way over me head, anyway. ).
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|