The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Can someone make a hack so admins bypass the limit of file size. Like they can upload a file that is greater than the set limit.
|
#2
|
||||
|
||||
In functions.php, replace this:
Code:
if ($maxattachsize!=0 and $filesize>$maxattachsize) { // too big! eval("standarderror(\"".gettemplate("error_attachtoobig")."\");"); exit; } if ($filesize!=$attachment_size) { 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) { |
#3
|
||||
|
||||
THANKS!!! Do you also know how to do this with avatars? Like admins can use any size for avatar instead of the set size?
|
#4
|
||||
|
||||
Sure, in member.php replace this:
Code:
if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) { Code:
if (($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) and $bbuserinfo[usergroupid]!=6) { |
#5
|
|||
|
|||
Idea: Why not go all-out with this and make a hack where the admins/supermods/given usergroups can bypass all the limits, or only select ones?
And then release it as a full hack in the releases forum |
#6
|
|||
|
|||
Anybody, would this be correct if i wanted to also allow mods to bypass the limit also?
if ($maxattachsize!=0 and $filesize>$maxattachsize and $bbuserinfo[usergroupid]!=6) and $bbuserinfo[usergroupid]!=5) { // too big! eval("standarderror(\"".gettemplate("error_attacht oobig")."\");"); exit; } if ($filesize!=$attachment_size and $bbuserinfo[usergroupid]!=6) and $bbuserinfo[usergroupid]!=5) { |
#7
|
||||
|
||||
if ($filesize!=$attachment_size && $bbuserinfo[usergroupid]!=6 || $bbuserinfo[usergroupid]!=5) {
|
#8
|
|||
|
|||
Nope that isn't it heretic, all i get is this:
Parse error: parse error in /home/dssgrou/public_html/forums/admin/functions.php on line 1436 Fatal error: Call to undefined function: vbsetcookie() in /home/dssgrou/public_html/forums/admin/sessions.php on line 181 Anybody else? |
#9
|
||||
|
||||
PHP Code:
for one, you have a ) in the wrong spot on the first line, second, you were trying to say "if the file is greater than 0, larger than the max size, and the person is a mod AND admin, then..." fixed that, dunno if it'd work |
#10
|
|||
|
|||
No that was jsut a typo on my part.
I still get this from that code above if i add it: Parse error: parse error in /home/dssgrou/public_html/forums/admin/functions.php on line 1669 Warning: Cannot add header information - headers already sent by (output started at /home/dssgrou/public_html/forums/admin/functions.php:1669) in /home/dssgrou/public_html/forums/admin/functions.php on line 1545 Fatal error: Call to undefined function: makelogincode() in /home/dssgrou/public_html/forums/global.php on line 337 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|