parse error?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
preludexx
Forum Newbie
Posts: 4
Joined: Thu Mar 18, 2004 10:29 am

parse error?

Post by preludexx »

i installed a hack on my phpbb and there wasn't any problems until i tried to view a thread and it gave me a parse error x_X; it says :

Parse error: parse error, expecting `')'' in /home/painted/public_html/notorious/viewtopic.php on line 1208

here's my viewtopic.php file:

Code: Select all

//
	// Again this will be handled by the templating
	// code at some point
	//
	$row_color = ( !($i % 2) ) ? $themeї'td_color1'] : $themeї'td_color2'];
	$row_class = ( !($i % 2) ) ? $themeї'td_class1'] : $themeї'td_class2'];

	  if ( $board_configї'store_view_topic'] )
  {
		$temp_url = append_sid("store.$phpEx?mode=user_items&id=" . $poster_id);
		$user_items = '<a href="' . $temp_url . '" class="postdetails">' . $lang&#1111;'Store_users_items_goto'] . '</a>';
  &#125;
	else
	&#123;
		$user_items = '';
	&#125;$template->assign_block_vars('postrow', array(
		'ROW_COLOR' => '#' . $row_color,
		'ROW_CLASS' => $row_class,
		'POSTER_NAME' => $poster,
		'POSTER_RANK' => $poster_rank,
		'RANK_IMAGE' => $rank_image,
		'POSTER_JOINED' => $poster_joined,
		'POSTER_POSTS' => $poster_posts,
		'POSTER_FROM' => $poster_from,
		'POSTER_AVATAR' => $poster_avatar,
		'POST_DATE' => $post_date,
		'POST_SUBJECT' => $post_subject,
		'MESSAGE' => $message,
		'SIGNATURE' => $user_sig,
		'EDITED_MESSAGE' => $l_edited_by,

		'MINI_POST_IMG' => $mini_post_img,
		'PROFILE_IMG' => $profile_img,
		'PROFILE' => $profile,
		'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,
		'EDIT_IMG' => $edit_img,
		'EDIT' => $edit,
		'QUOTE_IMG' => $quote_img,
		'QUOTE' => $quote,
		'IP_IMG' => $ip_img,
		'IP' => $ip,
		'DELETE_IMG' => $delpost_img,
		'DELETE' => $delpost,

		'L_MINI_POST_ALT' => 		'USER_ITEMS' => $user_items,$mini_post_alt,

		'U_MINI_POST' => $mini_post_url,
		'U_POST_ID' => $postrow&#1111;$i]&#1111;'post_id'])	);

	$cm_viewtopic->post_vars($postrow&#1111;$i],$userdata,$forum_id
	);
&#125;

$template->pparse('body');

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

?>
line 1208 is 'L_MINI_POST_ALT' => 'USER_ITEMS' => $user_items,$mini_post_alt,

can someone tell me what's wrong?
Last edited by preludexx on Thu Mar 18, 2004 1:20 pm, edited 3 times in total.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Not really useful to post over 1800 lines of code for one parse error, and the way it pasted in here makes about 20 parse errors..

Mabye just post the line that has the error and the 2 lines above and below it?
TheBentinel.com
Forum Contributor
Posts: 282
Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio

Post by TheBentinel.com »

Agreed, but I didn't see anything suspicious on the line mentioned in the error. Of course, lines are counted differently by TextPad and PHP, I'm sure, so I may not even have been in the right area.

Try cutting out logical sections of the code to narrow down where the parse error is coming from. Can you get the first 1000 lines or so to compile? Then add in another chunk, and so on until it errors.
preludexx
Forum Newbie
Posts: 4
Joined: Thu Mar 18, 2004 10:29 am

Post by preludexx »

sorry about that, i editted my post... i can't seem to find what's wrong though :\
TheBentinel.com
Forum Contributor
Posts: 282
Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio

Post by TheBentinel.com »

preludexx wrote:sorry about that, i editted my post... i can't seem to find what's wrong though :\
We need more code. :-)

Seriously, the error suggests you have a mis-matched parenthesis in there somewhere, but I can't begin to guess where. You need to try to break the code down into some smaller chunks and get those working.

That is one complicated block of code. At least for a simple mind like mine.
preludexx
Forum Newbie
Posts: 4
Joined: Thu Mar 18, 2004 10:29 am

Post by preludexx »

lol, it's from phpbb >_>
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Code: Select all

&#1111;b]'L_MINI_POST_ALT' =>       'USER_ITEMS' => $user_items,$mini_post_alt,&#1111;/b]
1) i don't think those bold tags should be there....
2) it look as if your missing something inbetween 'L_MINI_POST_ALT' and 'USER_ITEMS'
3) i just looked at it again... try chanigng that line to this:

Code: Select all

'L_MINI_POST_ALT' =>$mini_post_alt,
'USER_ITEMS' => $user_items,
preludexx
Forum Newbie
Posts: 4
Joined: Thu Mar 18, 2004 10:29 am

Post by preludexx »

w00ts, that was the problem. thanks illusionist!
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

:-D nP!!
Post Reply