vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   profile..parse error? (https://vborg.vbsupport.ru/showthread.php?t=73087)

Chadi 12-19-2004 04:59 PM

profile..parse error?
 
I get this error when clicking on someone's profile

Parse error: parse error, unexpected T_CASE, expecting ':' or '{' in /home/chadi/public_html/includes/functions_online.php on line 153

Code:

switch($userinfo['activity'])
// Album user online Mod
case 'album':
    $userinfo['action'] = 'Browsing album';
    $userinfo['where'] = "<a href=\"$userinfo[location]\">$userinfo[location]</a>";
    break;
// End

the third line is line 153

Zachery 12-19-2004 05:14 PM

case 'album': try

case 'album';

Chadi 12-19-2004 05:18 PM

same error :(

Chadi 12-20-2004 12:51 AM

Anyone else know?

This happened after I installed the 4images mod (which works) but I don't know how to correct this

Paul M 12-20-2004 01:09 AM

You are missing the {} for the switch.

Try ;

PHP Code:

switch($userinfo['activity'])
{
// Album user online Mod
case 'album':
    
$userinfo['action'] = 'Browsing album';
    
$userinfo['where'] = "<a href=\"$userinfo[location]\">$userinfo[location]</a>";
    break;
// End


Since there is only one case, it seems daft using switch anyway, an if statement would have been better.

ZGeek 01-09-2005 11:38 PM

I also found this worked.

PHP Code:

    switch($userinfo['activity'])
{
            case 
'album':
        
$userinfo['action'] = 'Browsing album';
        
$userinfo['where'] = "<a href=\"$userinfo[location]\">$userinfo[location]</a>";
            break;
        case 
'showthread':
            
$userinfo['action'] = $vbphrase['viewing_thread'];
            if (
$seetitle


Mink_ 01-10-2005 12:22 AM

You missed these guys: {}
PHP Code:

switch($userinfo['activity'])
// Album user online Mod
{ case 'album':
    
$userinfo['action'] = 'Browsing album';
    
$userinfo['where'] = "<a href=\"$userinfo[location]\">$userinfo[location]</a>";
    break; }
// End 



All times are GMT. The time now is 05:54 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.02104 seconds
  • Memory Usage 1,730KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete