vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Admin Attachment (https://vborg.vbsupport.ru/showthread.php?t=32691)

Ambex Net 11-25-2001 10:20 PM

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.

Admin 11-26-2001 12:29 PM

In functions.php, replace this:
Code:

    if ($maxattachsize!=0 and $filesize>$maxattachsize) {
      // too big!
      eval("standarderror(\"".gettemplate("error_attachtoobig")."\");");
      exit;
    }
    if ($filesize!=$attachment_size) {

with this:
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) {


Ambex Net 11-28-2001 08:56 PM

THANKS!!! Do you also know how to do this with avatars? Like admins can use any size for avatar instead of the set size?

Admin 11-29-2001 01:28 PM

Sure, in member.php replace this:
Code:

          if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
with this:
Code:

          if (($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) and $bbuserinfo[usergroupid]!=6) {

DarkReaper 11-29-2001 03:17 PM

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 :)

snakes1100 04-29-2002 01:13 AM

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) {

heretic 04-29-2002 02:02 AM

if ($filesize!=$attachment_size && $bbuserinfo[usergroupid]!=6 || $bbuserinfo[usergroupid]!=5) {

snakes1100 04-29-2002 07:44 PM

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?

heretic 04-29-2002 09:49 PM

PHP Code:

if ($maxattachsize!=&& $filesize>$maxattachsize && $bbuserinfo[usergroupid]!=|| $bbuserinfo[usergroupid]!=5) { 
// too big! 
eval("standarderror(\"".gettemplate("error_attachtoobig")."\");"); 
exit; 

if (
$filesize!=$attachment_size && $bbuserinfo[usergroupid]!=6) || $bbuserinfo[usergroupid]!=5) { 


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

snakes1100 04-30-2002 07:24 AM

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


All times are GMT. The time now is 01:41 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
  • Page Generation 0.01184 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete