Seite 1 von 2

Kann Foren nicht öffnen!

Verfasst: 10.07.2009 20:22
von Jano1
Hi Leutz,
ich kann meine Foren nicht mehr öffnen! Hab irgendetwas an der viewforum.php falsch??
Hier, er sagt da sei ein parse error in Zeile 681, da steht das :

Code: Alles auswählen

			'RATING_ICONS' => get_rating_img($row['topic_rating'], $row['topic_rating_total_votes']),
Könnt ihr einen Fehler sehen?

Das sind die Zeilen davor:

Code: Alles auswählen

		// Generate all the URIs ...
		$view_topic_url_params = 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id;
		$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);

		$topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
		$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
		$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $user->session_id) : '';

		// Send vars to template
		$template->assign_block_vars('topicrow', array(
			'FORUM_ID'					=> $forum_id,
			'TOPIC_ID'					=> $topic_id,
			'TOPIC_AUTHOR'				=> get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'TOPIC_AUTHOR_COLOUR'		=> get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'TOPIC_AUTHOR_FULL'			=> get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'FIRST_POST_TIME'			=> $user->format_date($row['topic_time']),
			'LAST_POST_SUBJECT'			=> censor_text($row['topic_last_post_subject']),
			'LAST_POST_TIME'			=> $user->format_date($row['topic_last_post_time']),
			'LAST_VIEW_TIME'			=> $user->format_date($row['topic_last_view_time']),
			'LAST_POST_AUTHOR'			=> get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
			'LAST_POST_AUTHOR_COLOUR'	=> get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
			'LAST_POST_AUTHOR_FULL'		=> get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),

			'PAGINATION'		=> topic_generate_pagination($replies, $view_topic_url),
			'REPLIES'			=> $replies,
			'VIEWS'				=> $row['topic_views'],
			'TOPIC_TITLE'		=> censor_text($row['topic_title']),
			'TOPIC_TYPE'		=> $topic_type,

			'TOPIC_FOLDER_IMG'		=> $user->img($folder_img, $folder_alt),
			'TOPIC_FOLDER_IMG_SRC'	=> $user->img($folder_img, $folder_alt, false, '', 'src'),
			'TOPIC_FOLDER_IMG_ALT'	=> $user->lang[$folder_alt],
			'TOPIC_FOLDER_IMG_WIDTH'=> $user->img($folder_img, '', false, '', 'width'),
			'TOPIC_FOLDER_IMG_HEIGHT'	=> $user->img($folder_img, '', false, '', 'height'),

			'TOPIC_ICON_IMG'		=> (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
			'TOPIC_ICON_IMG_WIDTH'	=> (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
			'TOPIC_ICON_IMG_HEIGHT'	=> (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
			'ATTACH_ICON_IMG'		=> ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
			'UNAPPROVED_IMG'		=> ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',

			'S_TOPIC_TYPE'			=> $row['topic_type'],
			'S_USER_POSTED'			=> (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
			'S_UNREAD_TOPIC'		=> $unread_topic,
			'S_TOPIC_REPORTED'		=> (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
			'S_TOPIC_UNAPPROVED'	=> $topic_unapproved,
			'S_POSTS_UNAPPROVED'	=> $posts_unapproved,
			'S_HAS_POLL'			=> ($row['poll_start']) ? true : false,
			'S_POST_ANNOUNCE'		=> ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
			'S_POST_GLOBAL'			=> ($row['topic_type'] == POST_GLOBAL) ? true : false,
			'S_POST_STICKY'			=> ($row['topic_type'] == POST_STICKY) ? true : false,
			'S_TOPIC_LOCKED'		=> ($row['topic_status'] == ITEM_LOCKED) ? true : false,
			'S_TOPIC_MOVED'			=> ($row['topic_status'] == ITEM_MOVED) ? true : false,

			'U_NEWEST_POST'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&view=unread') . '#unread',
			'U_LAST_POST'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
			'U_LAST_POST_AUTHOR'	=> get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
			'U_TOPIC_AUTHOR'		=> get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'U_VIEW_TOPIC'			=> $view_topic_url,
			'U_MCP_REPORT'			=> append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&f=' . $forum_id . '&t=' . $topic_id, true, $user->session_id),
			'U_MCP_QUEUE'			=> $u_mcp_queue,

			'S_TOPIC_TYPE_SWITCH'	=> ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test),
//MOD Ratings for topics
			'RATING_ICONS' => get_rating_img($row['topic_rating'], $row['topic_rating_total_votes']),
			'TOPIC_RATING' => $row['topic_rating'],			
			'TOPIC_RATING_TOTAL_VOTES' => $row['topic_rating_total_votes']
//END MOD

Re: Kann Foren nicht öffnen!

Verfasst: 11.07.2009 13:38
von Boecki91
In der letzten Zeile fehlt ein Komma nach der eckigen Klammer.



Wen du viel Code postest so ab ca. 30 Zeilen kannst du auch den Pastebin verwenden

Re: Kann Foren nicht öffnen!

Verfasst: 11.07.2009 16:30
von Jano1
achso, ok, ist das komma alles was den Fehler auslöst?

Edit: geht immer noch nicht...

Re: Kann Foren nicht öffnen!

Verfasst: 11.07.2009 16:40
von Metzle
Hallo,

Foren-Cache hast du geleert gehabt?

Re: Kann Foren nicht öffnen!

Verfasst: 11.07.2009 16:46
von Jano1
jup, hab ich. soll ich vllt mal das ganze dokument posten? (Im Pastebin)

Re: Kann Foren nicht öffnen!

Verfasst: 11.07.2009 16:48
von Metzle
Hallo,

kannst du durchaus machen und vielleicht mal noch die komplette Fehlermeldung herzeigen ;)

Re: Kann Foren nicht öffnen!

Verfasst: 11.07.2009 16:52
von Jano1
ok, mach ich eben.
Komplette Fehlermeldung:

Code: Alles auswählen

Parse error: parse error in C:\xampp\htdocs\xampp\phpbb\viewforum.php on line 681
mehr nicht.

Link zum Pastebin:

http://www.phpbb.de/support/pastebin.ph ... view&s=115

Re: Kann Foren nicht öffnen!

Verfasst: 12.07.2009 15:33
von ThomasO
Ändere mal bitte in Zeile 679 Folgendes:

Code: Alles auswählen

'S_TOPIC_TYPE_SWITCH'   => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test),
in dieses um:

Code: Alles auswählen

'S_TOPIC_TYPE_SWITCH'   => ($s_type_switch == $s_type_switch_test ? -1 : $s_type_switch_test),

Re: Kann Foren nicht öffnen!

Verfasst: 12.07.2009 19:48
von Jano1
Ich probiers grad mal.

Re: Kann Foren nicht öffnen!

Verfasst: 12.07.2009 19:54
von Jano1
Jetzt bekomme ich diese Meldung:

Code: Alles auswählen

Parse error: parse error in C:\xampp\htdocs\xampp\phpbb\viewforum.php on line 685
Zeile mit n paar Zeilen davor (Letzte Zeile ist die wo der Fehler sein soll):

Code: Alles auswählen

			'U_NEWEST_POST'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&view=unread') . '#unread',
			'U_LAST_POST'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
			'U_LAST_POST_AUTHOR'	=> get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
			'U_TOPIC_AUTHOR'		=> get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
			'U_VIEW_TOPIC'			=> $view_topic_url,
			'U_MCP_REPORT'			=> append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&f=' . $forum_id . '&t=' . $topic_id, true, $user->session_id),
			'U_MCP_QUEUE'			=> $u_mcp_queue,

			'S_TOPIC_TYPE_SWITCH'   => ($s_type_switch == $s_type_switch_test ? -1 : $s_type_switch_test),
//MOD Ratings for topics
			'RATING_ICONS' => get_rating_img($row['topic_rating'], $row['topic_rating_total_votes']),
			'TOPIC_RATING' => $row['topic_rating'],			
			'TOPIC_RATING_TOTAL_VOTES' => $row['topic_rating_total_votes'],
//END MOD
		);