![]() |
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.
|
In functions.php, replace this:
Code:
if ($maxattachsize!=0 and $filesize>$maxattachsize) { Code:
if ($maxattachsize!=0 and $filesize>$maxattachsize and $bbuserinfo[usergroupid]!=6) { |
THANKS!!! Do you also know how to do this with avatars? Like admins can use any size for avatar instead of the set size?
|
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) { |
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 :) |
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) { |
if ($filesize!=$attachment_size && $bbuserinfo[usergroupid]!=6 || $bbuserinfo[usergroupid]!=5) {
|
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? |
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 |
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 |
deleted.
|
Satan
|
Anybody?
|
Anybody what?
If you are trying to make it for all staff, change the "and" to "&&"... That should make it work... PHP Code:
You didnt close the brackets, which made the parse error... Satan |
Ok...
Maybe not... Try : PHP Code:
|
[QUOTE]Originally posted by hellsatan
If you are trying to make it for all staff, change the "and" to "&&"... |
I thought it was that...Then I was wrong...Thanks for clearing it up...
Then I noticed that there were stray ")" on the end of codes, and that there were no "(" to start! I am not sure if that works or not, but I think it should... Satan |
Ill try when i get home thanx satan...
|
Np...
@FireFly - I have indentified a problem... When Moderators and Users try and add attachments, it will not allow them to...Even when they are within the restrictions... I am only using the Basic code you first mentioned, as I dont want Mods over-working the board... Satan |
@satan
Im running the basic line that firefly wrote, it runs fine and all users can upload. |
Hmmm...
Confusing... What version of vB are you using? Satan |
Im running 2.2.5
Your latest code didnt work either, still get the same parse errors. |
Hmmm...
I am also running 2.2.5... Try this : PHP Code:
Strange...Maybe our vB just doesnt like many hacks... Satan |
satan, still getting the same parse error...
|
Hmmm...
I am not sure where to go from here... PHP Code:
If it does, let me know... That way you can give some Mods and Admins access, and not allow others... Maybe I will come up with something soon... Satan |
ooooops! :dead:
|
Hmmm...
I thought not... Sorry FireFly...Nice attempt, but it aint workin... Any clues as to where you went wrong? Satan |
uhh ohh, found out what the problem was and fix'd it.
The original code by firefly is working OK, it was a error on my part after editing the file late last night. I have no ftp access at work, so i couldn't ck it out. I knew i had it working originaly. @satan, sorry for the mix up bud and appreciate all your help so far. |
Hey...
I do my best... I am going to wait for FireFly to make an excuse now...:D Satan |
ok, for one thing show more than just this code. because every example there's anopen bracket- show all of the hack, and the affected block
|
the affected block code you asked for.
this is from my functions.php, this also has the member must have a certain amount of posts to upload hack in it(in bold). PHP Code:
|
Anybody?
|
Whoa...
Thats alot of php... I shall sift through it, see if I find anything... Satan |
Anybody?
Just need to add an additional usergroup to allow them to bypass the file size limit... |
help firefly.... :bunny:
|
I know this is an old thread, but that guys question never got answered because everyone had a logic error.. lol, I've encountered this before, it's kinda a mind-bender, anyhow, here's the proper line of code:
PHP Code:
|
Actually, eoc_Jason; I believe it would be (PLEASE TRY THE TOP ONE FIRST, IF NOT THEN THE SECOND ONE):
PHP Code:
PHP Code:
Dave. |
All times are GMT. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|