Die ersten beiden Stellen sind locker zu finden, nämlich hier drinnen:
Code: Alles auswählen
$order_sql = (!$post_id) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_first_post_id, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_password, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . "
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . "
WHERE $join_sql
AND f.forum_id = t.forum_id
$order_sql";
Und für den 2. Teil suchste nach
Code: Alles auswählen
$template->assign_vars(array(
'L_TOTAL_VOTES' => $lang['Total_votes'],
'TOTAL_VOTES' => $vote_results_sum,
und ersetzt das mit
Code: Alles auswählen
$sql = "SELECT topic_id, vote_start FROM " . VOTE_DESC_TABLE . "
WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not read poll data!", '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$vote_started = intval($row['vote_start']);
}
$poll_option_close = (($forum_topic_data['topic_poster'] == $userdata['user_id'] || $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD) && !$poll_expired && $user_voted) ? '<input type="submit" name="poll_close" value="' . $lang['poll_close'] . '" class="liteoption">' : '';
$poll_option_delete = ($forum_topic_data['topic_poster'] == $userdata['user_id'] || $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD) ? '<input type="submit" name="poll_delete" value="'.$lang['Delete_poll'].'" class="liteoption"/><input type="hidden" name="mode" value="editpost">' : '';
if ($poll_option_close != '' || $poll_option_delete != '')
{
$first_post_id = $forum_topic_data['topic_first_post_id'];
$template->assign_block_vars('close_delete_poll', array(
'U_CLOSE_POLL' => append_sid("viewtopic.$phpEx?t=$topic_id"),
'U_DELETE_POLL' => append_sid("posting.$phpEx?p=$first_post_id"))
);
}
$poll_close_order = (isset ($_POST['poll_close']) ? 1 : 0);
if ($poll_close_order == 1)
{
$vote_length = time() - $vote_started;
$sql = "UPDATE " . VOTE_DESC_TABLE . "
SET vote_length = $vote_length
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update poll data!', '', __LINE__, __FILE__, $sql);
}
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$message = $lang['Poll_is_closed'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
$template->assign_vars(array(
'L_TOTAL_VOTES' => $lang['Total_votes'],
'TOTAL_VOTES' => $vote_results_sum,
'POLL_OPTION_CLOSE' => $poll_option_close,
'POLL_OPTION_DELETE' => $poll_option_delete,