Hi
mein Board : phpbb3.0.7 PL1 Forum und
Board3 Portal 1.0.5
Problem : wenn ich testweise einen Beitrag mit nem Bild schrieben will oder nur nen Bild Posten will bekomm ich eine fehlermeldung und kann denn beitrag noch nicht mal lesen etc.
Fehlermeldung : Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/jacky/viewtopic.php on line 977
vor lauter fehlermeldung und koriegieren weiß ich langsam nicht mehr was ich ändern muss.
ich hab einfach mal ohne plan getestet und ausprobiert aber kene mich halt nicht aus in der php html welt.
Link zum Test Forum :
http://hosted.pulseone.at/~mentalmadness/index.php
hier ein auszug aus dem viewtopic.php code, vielleicht findet ihr ja denn fehler
Code: Alles auswählen
$poll_end = $topic_data['poll_length'] + $topic_data['poll_start'];
$template->assign_vars(array(
'POLL_QUESTION' => $topic_data['poll_title'],
'TOTAL_VOTES' => $poll_total,
'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'),
'L_MAX_VOTES' => ($topic_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $topic_data['poll_max_options']),
'L_POLL_LENGTH' => ($topic_data['poll_length']) ? sprintf($user->lang[($poll_end > time()) ? 'POLL_RUN_TILL' : 'POLL_ENDED_AT'], $user->format_date($poll_end)) : '',
'S_HAS_POLL' => true,
'S_CAN_VOTE' => $s_can_vote,
'S_DISPLAY_RESULTS' => $s_display_results,
'S_IS_MULTI_CHOICE' => ($topic_data['poll_max_options'] > 1) ? true : false,
'S_POLL_ACTION' => $viewtopic_url,
'U_VIEW_RESULTS' => $viewtopic_url . '&view=viewpoll')
);
unset($poll_end, $poll_info, $voted_id);
}
// If the user is trying to reach the second half of the topic, fetch it starting from the end
$store_reverse = false;
$sql_limit = $config['posts_per_page'];
$sql_sort_order = $direction = '';
if ($start > $total_posts / 2)
{
$store_reverse = true;
if ($start + $config['posts_per_page'] > $total_posts)
{
$sql_limit = min($config['posts_per_page'], max(1, $total_posts - $start));
}
// Select the sort order
$direction = (($sort_dir == 'd') ? 'ASC' : 'DESC');
$sql_start = max(0, $total_posts - $sql_limit - $start);
}
else
{
// Select the sort order
$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
$sql_start = $start;
}
if (is_array($sort_by_sql[$sort_key]))
{
$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
}
else
{
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
}
// Container for user details, only process once
$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array();
$has_attachments = $display_notice = false;
$bbcode_bitfield = '';
$i = $i_total = 0;
// Go ahead and pull all data for this topic
$sql = 'SELECT p.post_id
FROM ' . POSTS_TABLE . ' p' . (($join_user_sql[$sort_key]) ? ', ' . USERS_TABLE . ' u': '') . "
WHERE p.topic_id = $topic_id
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . "
" . (($join_user_sql[$sort_key]) ? 'AND u.user_id = p.poster_id': '') . "
$limit_posts_time
ORDER BY $sql_sort_order";
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
$i = ($store_reverse) ? $sql_limit - 1 : 0;
while ($row = $db->sql_fetchrow($result))
{
$post_list[$i] = (int) $row['post_id'];
($store_reverse) ? $i-- : $i++;
}
$db->sql_freeresult($result);
if (!sizeof($post_list))
{
if ($sort_days)
{
trigger_error('NO_POSTS_TIME_FRAME');
}
else
{
trigger_error('NO_TOPIC');
}
}
// Holding maximum post time for marking topic read
// We need to grab it because we do reverse ordering sometimes
$max_post_time = 0;
$sql = $db->sql_build_query('SELECT', array(
'SELECT' => 'u.*, z.friend, z.foe, p.*, gu.personal_album_id, gu.user_images',
'FROM' => array(
USERS_TABLE => 'u',
POSTS_TABLE => 'p',
)
),
'LEFT_JOIN' => array(
array(
'FROM' => array(ZEBRA_TABLE => 'z'),
'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
, array(
'FROM' => array(GALLERY_USERS_TABLE => 'gu'),
'ON' => 'gu.user_id = p.poster_id'
)
)
),
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
AND u.user_id = p.poster_id'
));
$result = $db->sql_query($sql);
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
// Posts are stored in the $rowset array while $attach_list, $user_cache
// and the global bbcode_bitfield are built
while ($row = $db->sql_fetchrow($result))
{
// Set max_post_time
if ($row['post_time'] > $max_post_time)
{
$max_post_time = $row['post_time'];
}
$poster_id = (int) $row['poster_id'];
// Does post have an attachment? If so, add it to the list
if ($row['post_attachment'] && $config['allow_attachments'])
{
$attach_list[] = (int) $row['post_id'];
if ($row['post_approved'])
{
$has_attachments = true;
}
}
$rowset[$row['post_id']] = array(
'hide_post' => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false,
'post_id' => $row['post_id'],
'post_time' => $row['post_time'],
'user_id' => $row['user_id'],
'username' => $row['username'],
'user_colour' => $row['user_colour'],
'topic_id' => $row['topic_id'],
'forum_id' => $row['forum_id'],
'post_subject' => $row['post_subject'],
'post_edit_count' => $row['post_edit_count'],
'post_edit_time' => $row['post_edit_time'],
'post_edit_reason' => $row['post_edit_reason'],
'post_edit_user' => $row['post_edit_user'],
'post_edit_locked' => $row['post_edit_locked'],
// Make sure the icon actually exists
'icon_id' => (isset($icons[$row['icon_id']]['img'], $icons[$row['icon_id']]['height'], $icons[$row['icon_id']]['width'])) ? $row['icon_id'] : 0,
'post_attachment' => $row['post_attachment'],
'post_approved' => $row['post_approved'],
'post_reported' => $row['post_reported'],
'post_username' => $row['post_username'],
'post_text' => $row['post_text'],
'bbcode_uid' => $row['bbcode_uid'],
'bbcode_bitfield' => $row['bbcode_bitfield'],
'enable_smilies' => $row['enable_smilies'],
'enable_sig' => $row['enable_sig'],
'friend' => $row['friend'],
'foe' => $row['foe'],
);
// Define the global bbcode bitfield, will be used to load bbcodes
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
// Is a signature attached? Are we going to display it?
if ($row['enable_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
{
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['user_sig_bbcode_bitfield']);
}
LG half ich hoffe ihr könnt mir helfen