Forum Moderators: coopster

Message Too Old, No Replies

Help with parse error, unexpected $

         

malaki

8:49 am on Oct 13, 2004 (gmt 0)

10+ Year Member



I'm getting:Parse error: parse error, unexpected $ in /......./phpBB2/includes/usercp_viewprofile.php on line 244

I used Jedit to see if I can figure it out, from what I've been able to figure, line #182 the first line in bold below is connected to line #244, the second line in bold below. Now I'm not sure what to look for between those 2 lines.

$template->assign_vars(array(
'USERNAME' => $profiledata['username'],
'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,
'POSTS_PER_DAY' => $posts_per_day,
'POSTS' => $profiledata['user_posts'],
'PERCENTAGE' => $percentage . '%',
'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day),
'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage),

'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,

'LOCATION' => ( $profiledata['user_from'] )? $profiledata['user_from'] : ' ',
'OCCUPATION' => ( $profiledata['user_occ'] )? $profiledata['user_occ'] : ' ',
'INTERESTS' => ( $profiledata['user_interests'] )? $profiledata['user_interests'] : ' ',
// Start add - Birthday MOD
'BIRTHDAY' => $user_birthday,
// End add - Birthday MOD
'AVATAR_IMG' => $avatar_img,

'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']),
'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']),
'L_AVATAR' => $lang['Avatar'],
'L_POSTER_RANK' => $lang['Poster_rank'],
'L_JOINED' => $lang['Joined'],
'L_TOTAL_POSTS' => $lang['Total_posts'],
'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']),
'L_CONTACT' => $lang['Contact'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_EMAIL' => $lang['Email'],
'L_PM' => $lang['Private_Message'],
'L_ICQ_NUMBER' => $lang['ICQ'],
'L_YAHOO' => $lang['YIM'],
'L_AIM' => $lang['AIM'],
'L_MESSENGER' => $lang['MSNM'],
'L_WEBSITE' => $lang['Website'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_INTERESTS' => $lang['Interests'],
// Start add - Birthday MOD
'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD

'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username'])),

'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);

SofterLogic UK

11:35 am on Oct 13, 2004 (gmt 0)

10+ Year Member



odd error - it seems like the format is fine - try adding in a line at a time, see which line does it

coopster

1:27 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I think you need to look even further back in your code, prior to line 182. Is this snippet part of a class or function?

jatar_k

5:04 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it's in the phpbb signup
[webmasterworld.com...]

malaki

7:21 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



it's in the phpbb signup
Actually it's not jatar_k.....If you read my previous posts in that thread you refered to I completly reuploaded my original files and the only error I'm getting now is the one mentioned above.

I think you need to look even further back in your code, prior to line 182. Is this snippet part of a class or function?

Here is the file with the line right above included up to the last line in question coopster, hopefully you can see somthing:

//
// Generate page
//
$page_title = $lang['Viewing_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->assign_vars(array(
'USERNAME' => $profiledata['username'],
'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,
'POSTS_PER_DAY' => $posts_per_day,
'POSTS' => $profiledata['user_posts'],
'PERCENTAGE' => $percentage . '%',
'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day),
'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage),

'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,

'LOCATION' => ( $profiledata['user_from'] )? $profiledata['user_from'] : ' ',
'OCCUPATION' => ( $profiledata['user_occ'] )? $profiledata['user_occ'] : ' ',
'INTERESTS' => ( $profiledata['user_interests'] )? $profiledata['user_interests'] : ' ',
// Start add - Birthday MOD
'BIRTHDAY' => $user_birthday,
// End add - Birthday MOD
'AVATAR_IMG' => $avatar_img,

'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']),
'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']),
'L_AVATAR' => $lang['Avatar'],
'L_POSTER_RANK' => $lang['Poster_rank'],
'L_JOINED' => $lang['Joined'],
'L_TOTAL_POSTS' => $lang['Total_posts'],
'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']),
'L_CONTACT' => $lang['Contact'],
'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_EMAIL' => $lang['Email'],
'L_PM' => $lang['Private_Message'],
'L_ICQ_NUMBER' => $lang['ICQ'],
'L_YAHOO' => $lang['YIM'],
'L_AIM' => $lang['AIM'],
'L_MESSENGER' => $lang['MSNM'],
'L_WEBSITE' => $lang['Website'],
'L_LOCATION' => $lang['Location'],
'L_OCCUPATION' => $lang['Occupation'],
'L_INTERESTS' => $lang['Interests'],
// Start add - Birthday MOD
'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD

'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username'])),

'S_PROFILE_ACTION' => append_sid("profile.$phpE

dreamcatcher

10:41 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is your problem with this line?

include($phpbb_root_path . 'includes/page_header.'.$phpEx);

looks like one too many concatenating dots to me.

should it in fact be:

include($phpbb_root_path . 'includes/page_header'.$phpEx);

malaki

11:37 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



tried your suggestion dreamcatcher, still get the same error.

dreamcatcher

11:44 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



actually now I look at it again, it is correct. Thats a real baffler I`m afraid. That error usually appears when you accidentally put two $ symbols together for a variable. Can`t see anything in your code.

malaki

12:06 am on Oct 14, 2004 (gmt 0)

10+ Year Member



you want me to post the whole file so you can have a look see?

dreamcatcher

8:52 am on Oct 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can send it to me via e-mail if you want and I will take a look.