Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 11-25-2001, 10:20 PM
Ambex Net's Avatar
Ambex Net Ambex Net is offline
 
Join Date: Nov 2001
Location: USA
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #2  
Old 11-26-2001, 12:29 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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) {
Reply With Quote
  #3  
Old 11-28-2001, 08:56 PM
Ambex Net's Avatar
Ambex Net Ambex Net is offline
 
Join Date: Nov 2001
Location: USA
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THANKS!!! Do you also know how to do this with avatars? Like admins can use any size for avatar instead of the set size?
Reply With Quote
  #4  
Old 11-29-2001, 01:28 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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) {
Reply With Quote
  #5  
Old 11-29-2001, 03:17 PM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 04-29-2002, 01:13 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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) {
Reply With Quote
  #7  
Old 04-29-2002, 02:02 AM
heretic's Avatar
heretic heretic is offline
 
Join Date: Nov 2001
Posts: 285
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if ($filesize!=$attachment_size && $bbuserinfo[usergroupid]!=6 || $bbuserinfo[usergroupid]!=5) {
Reply With Quote
  #8  
Old 04-29-2002, 07:44 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 04-29-2002, 09:49 PM
heretic's Avatar
heretic heretic is offline
 
Join Date: Nov 2001
Posts: 285
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 04-30-2002, 07:24 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:07 PM.


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.04386 seconds
  • Memory Usage 2,256KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete