Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2002, 11:34 PM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Code needed checking please...:)

PHP Code:
     if ($bbuserinfo[usergroupid]==6) {

        if (
$filesize>$amfs) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;
        }

} elseif (
$bbuserinfo[usergroupid]==5) {

        if (
$filesize>$smmfs) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;
    }
} elseif (
$bbuserinfo[usergroupid]==7) {

        if (
$filesize>$mmfs) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;
}
      } else (
$filesize>$avatarmaxsize) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;

      }

I know it's wrong because I'm getting errors.

I have no idea why it's wrong lol - unexpected '{' apparently


Thank you
Reply With Quote
  #2  
Old 12-23-2002, 01:28 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Take out the last } and it will work.
Reply With Quote
  #3  
Old 12-23-2002, 01:50 AM
DrkFusion's Avatar
DrkFusion DrkFusion is offline
 
Join Date: Nov 2001
Posts: 1,926
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm maybe this may work better?

PHP Code:
if ($bbuserinfo[usergroupid]==6) {

        if (
$filesize>$amfs) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;
        }

} elseif (
$bbuserinfo[usergroupid]==5) {

        if (
$filesize>$smmfs) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;
        }
} elseif (
$bbuserinfo[usergroupid]==7) {

        if (
$filesize>$mmfs) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;
        } else (
$filesize>$avatarmaxsize) {
          eval(
"standarderror(\"".gettemplate("error_avatartoobig")."\");");
          
// file size too big
          
exit;

        }

Not sure?
Reply With Quote
  #4  
Old 12-23-2002, 11:21 AM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nothing seems to be working :/

Edit: I messed around with it a little and now have problems with both of thses codes. I think they're cancelling each other out

Code:
if ($bbuserinfo[usergroupid]==6) {
            if ($imginfo[0]>$amw or $imginfo[1]>$amh) {
              eval("standarderror(\"".gettemplate("error_aabd")."\");");
            }
	} elseif ($bbuserinfo[usergroupid]==5) {
		if ($imginfo[0]>$smmw or $imginfo[1]>$smmh) {
              eval("standarderror(\"".gettemplate("error_smabd")."\");");
            }
	} elseif ($bbuserinfo[usergroupid]==7) {
		if ($imginfo[0]>$mmw or $imginfo[1]>$mmh) {
              eval("standarderror(\"".gettemplate("error_mabd")."\");");
            }
        } elseif {
            	if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
              eval("standarderror(\"".gettemplate("error_avatarbaddimensions")."\");");
            }
        }
and this one

Code:
if ($bbuserinfo[usergroupid]==6) {

        if ($filesize>$amfs) {
          eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
          // file size too big
          exit;
        }

} elseif ($bbuserinfo[usergroupid]==5) {

        if ($filesize>$smmfs) {
          eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
          // file size too big
          exit;
        }
} elseif ($bbuserinfo[usergroupid]==7) {

        if ($filesize>$mmfs) {
          eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
          // file size too big
          exit;
        }
} elseif ($filesize>$avatarmaxsize) {
          eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
          // file size too big
          exit;

        }

}

The error i get is

Parse error: parse error, unexpected '{', expecting '(' in /home/******/*******/forum/member.php on line 1409


Thanks for any help
Reply With Quote
  #5  
Old 12-23-2002, 12:52 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What exactly is line 1409?
Reply With Quote
  #6  
Old 12-23-2002, 01:02 PM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
 } elseif {  // line 1409
                
if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
              eval(
"standarderror(\"".gettemplate("error_avatarbaddimensions")."\");");
            }
        } 
Reply With Quote
  #7  
Old 12-23-2002, 09:00 PM
geniuscrew's Avatar
geniuscrew geniuscrew is offline
 
Join Date: Nov 2001
Location: UK
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RAAAH! *bump*

Please help - people with custom avs can't change them and people can't view profiles!
Reply With Quote
  #8  
Old 12-24-2002, 01:41 AM
GSHelpBoy GSHelpBoy is offline
 
Join Date: Nov 2001
Location: Rhode Island
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The second code has an extra '}', I believe.
Reply With Quote
Reply


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 09:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04733 seconds
  • Memory Usage 2,251KB
  • 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
  • (2)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete