Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 10 von 14

Thema: phpBB2 Deutsch

  1. #1
    thomas fuchs
    Gast

    Standard phpBB2 Deutsch

    Hallo,

    einer meiner Kollegen vom Projekt hat sich irgendwie auf phpbb.de aufgeführt und wurde verbannt.Nur euch könnte ich darum bitten.
    Es geht um /Language/German bzw. /Language/Deutsch.

    Könntet ihr mir bitte von einer Deutschen phpbb software die Language für Deutsch bitte zum Download anbieten?


    Mfg. Thomas
    Achtung: Dies ist ein alter Thread im HTML und Webmaster Forum
    Diese Diskussion ist älter als 90 Tage. Die darin enthaltenen Informationen sind möglicherweise nicht mehr aktuell. Erstelle bitte zu deiner Frage ein neues Thema im Forum !!!!!

  2. #2
    Kaiserliche Hoheit
    Registriert seit
    25.08.2005
    Ort
    Tjah
    Beiträge
    1.643
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard

    warum wurde(s)t ihr/du gebannt ?warst du brav dort ?

  3. #3
    thomas fuchs
    Gast

    Standard dgg

    Zitat Zitat von topgreen
    warum wurde(s)t ihr/du gebannt ?warst du brav dort ?
    wir sind alle mit einer IP von der Schule unterwegs... und da war der Alfred wieder schlimm *g*

    könnten Sie mir vielleicht bitte die Dateien hier als Anhang machen,also German?

    Mfg. Thomas

  4. #4
    Adlerr2000
    Gast

    Standard gggfgggggggggg

    Zitat Zitat von topgreen
    warum wurde(s)t ihr/du gebannt ?warst du brav dort ?
    Frage mal an dich topgreen.

    Du bist doch einer ausm HH,oder?
    Sorry,falls ich dich mit jemandem anderen verwechselt hab.

    @Thomas:

    puhh... mal schaun,aber wird ein bisschen dauern,vielleicht ist ja der topgreen schneller,mal schauen

  5. #5
    Kaiserliche Hoheit
    Registriert seit
    25.08.2005
    Ort
    Tjah
    Beiträge
    1.643
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard

    Hier Language Pack (deutsch mit der anrede "du")
    Angehängte Dateien Angehängte Dateien

  6. #6
    Administrator Avatar von admin
    Registriert seit
    16.01.2003
    Ort
    Karlsruhe
    Beiträge
    12.779
    Danke
    1
    Bekam 4 mal "Danke" in 2 Postings
    Blog-Einträge
    42

    Standard

    Die Sprachpackete findet man auch hier
    http://www.phpbb.com/downloads.php
    Die Forenregeln und Nutzungsbedingungen sind auch zum lesen da !!!


  7. #7
    sd
    Gast

    Standard sd

    Zitat Zitat von admin
    Die Sprachpackete findet man auch hier
    http://www.phpbb.com/downloads.php
    danke,habe alles gefunden
    Auch wenn der verbannt wurde,konnte ich noch im Cache alles anschauen ...

    Nun aber ein neues Problem mit diesem Cashmod(unteres Thema):

    Code:
    Parse error: syntax error, unexpected ';' in /usr/export/www/vhosts/funnetwork/hosting/phpdz/forum/phpBB2/posting.php on line 293
    Die Anleitung für Cashmod:
    #-----[ OPEN ]------------------------------------------
    #
    posting.php

    #
    #-----[ FIND ]------------------------------------------
    #
    define('IN_PHPBB', true);

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    define('IN_CASHMOD', true);
    define('CM_POSTING', true);

    #
    #-----[ FIND ]------------------------------------------
    #
    $sql = "SELECT f.*, t.topic_status, t.topic_title

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    t.topic_title

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , t.topic_poster

    #
    #-----[ FIND ]------------------------------------------
    #
    $select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    $temp = $submit;
    $submit = !(!$submit || ( isset($board_config['cash_disable']) && !$board_config['cash_disable'] && (($mode == 'editpost') || ($mode == 'delete'))));

    #
    #-----[ FIND ]------------------------------------------
    #
    $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $submit = $temp;
    unset($temp);

    #
    #-----[ FIND ]------------------------------------------
    #
    $post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    $post_data['post_text'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['post_text'] : '';
    $post_data['bbcode_uid'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['bbcode_uid'] : '';

    #
    #-----[ FIND ]------------------------------------------
    #
    $post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    $post_data['topic_poster'] = ( $mode == 'reply' ) ? $post_info['topic_poster'] : 0;
    Und noch mein posting.php:

    Code:
    <?php
    /***************************************************************************
     *                                posting.php
     *                            -------------------
     *   begin                &#58; Saturday, Feb 13, 2001
     *   copyright            &#58; &#40;C&#41; 2001 The phpBB Group
     *   email                &#58; >> Edit by Admin &#58;Das Posten von Email-Adressen ist hier nicht gestattet <<<phpbb.com
     *
     *   $Id&#58; posting.php,v 1.159.2.28 2006/01/28 14&#58;56&#58;51 grahamje Exp $
     *
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *   This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   &#40;at your option&#41; any later version.
     *
     ***************************************************************************/
    
    define&#40;'IN_PHPBB', true&#41;;
    define&#40;'IN_CASHMOD', true&#41;;
    define&#40;'CM_POSTING', true&#41;;
    $phpbb_root_path = './';
    include&#40;$phpbb_root_path . 'extension.inc'&#41;;
    include&#40;$phpbb_root_path . 'common.'.$phpEx&#41;;
    include&#40;$phpbb_root_path . 'includes/bbcode.'.$phpEx&#41;;
    include&#40;$phpbb_root_path . 'includes/functions_post.'.$phpEx&#41;;
    
    //
    // Check and set various parameters
    //
    $params = array&#40;'submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode'&#41;;
    while&#40; list&#40;$var, $param&#41; = @each&#40;$params&#41; &#41;
    &#123;
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; || !empty&#40;$HTTP_GET_VARS&#91;$param&#93;&#41; &#41;
    	&#123;
    		$$var = &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#41; ? htmlspecialchars&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#58; htmlspecialchars&#40;$HTTP_GET_VARS&#91;$param&#93;&#41;;
    	&#125;
    	else
    	&#123;
    		$$var = '';
    	&#125;
    &#125;
    
    $confirm = isset&#40;$HTTP_POST_VARS&#91;'confirm'&#93;&#41; ? true &#58; false;
    
    $params = array&#40;'forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL&#41;;
    while&#40; list&#40;$var, $param&#41; = @each&#40;$params&#41; &#41;
    &#123;
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; || !empty&#40;$HTTP_GET_VARS&#91;$param&#93;&#41; &#41;
    	&#123;
    		$$var = &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#41; ? intval&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#58; intval&#40;$HTTP_GET_VARS&#91;$param&#93;&#41;;
    	&#125;
    	else
    	&#123;
    		$$var = '';
    	&#125;
    &#125;
    
    $refresh = $preview || $poll_add || $poll_edit || $poll_delete;
    $orig_word = $replacement_word = array&#40;&#41;;
    
    //
    // Set topic type
    //
    $topic_type = &#40; !empty&#40;$HTTP_POST_VARS&#91;'topictype'&#93;&#41; &#41; ? intval&#40;$HTTP_POST_VARS&#91;'topictype'&#93;&#41; &#58; POST_NORMAL;
    $topic_type = &#40; in_array&#40;$topic_type, array&#40;POST_NORMAL, POST_STICKY, POST_ANNOUNCE&#41;&#41; &#41; ? $topic_type &#58; POST_NORMAL;
    
    //
    // If the mode is set to topic review then output
    // that review ...
    //
    if &#40; $mode == 'topicreview' &#41;
    &#123;
    	require&#40;$phpbb_root_path . 'includes/topic_review.'.$phpEx&#41;;
    
    	topic_review&#40;$topic_id, false&#41;;
    	exit;
    &#125;
    else if &#40; $mode == 'smilies' &#41;
    &#123;
    	generate_smilies&#40;'window', PAGE_POSTING&#41;;
    	exit;
    &#125;
    
    //
    // Start session management
    //
    $userdata = session_pagestart&#40;$user_ip, PAGE_POSTING&#41;;
    init_userprefs&#40;$userdata&#41;;
    //
    // End session management
    //
    
    //
    // Was cancel pressed? If so then redirect to the appropriate
    // page, no point in continuing with any further checks
    //
    if &#40; isset&#40;$HTTP_POST_VARS&#91;'cancel'&#93;&#41; &#41;
    &#123;
    	if &#40; $post_id &#41;
    	&#123;
    		$redirect = "viewtopic.$phpEx?" . POST_POST_URL . "=$post_id";
    		$post_append = "#$post_id";
    	&#125;
    	else if &#40; $topic_id &#41;
    	&#123;
    		$redirect = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
    		$post_append = '';
    	&#125;
    	else if &#40; $forum_id &#41;
    	&#123;
    		$redirect = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
    		$post_append = '';
    	&#125;
    	else
    	&#123;
    		$redirect = "index.$phpEx";
    		$post_append = '';
    	&#125;
    
    	redirect&#40;append_sid&#40;$redirect, true&#41; . $post_append&#41;;
    &#125;
    
    //
    // What auth type do we need to check?
    //
    $is_auth = array&#40;&#41;;
    switch&#40; $mode &#41;
    &#123;
    	case 'newtopic'&#58;
    		if &#40; $topic_type == POST_ANNOUNCE &#41;
    		&#123;
    			$is_auth_type = 'auth_announce';
    		&#125;
    		else if &#40; $topic_type == POST_STICKY &#41;
    		&#123;
    			$is_auth_type = 'auth_sticky';
    		&#125;
    		else
    		&#123;
    			$is_auth_type = 'auth_post';
    		&#125;
    		break;
    	case 'reply'&#58;
    	case 'quote'&#58;
    		$is_auth_type = 'auth_reply';
    		break;
    	case 'editpost'&#58;
    		$is_auth_type = 'auth_edit';
    		break;
    	case 'delete'&#58;
    	case 'poll_delete'&#58;
    		$is_auth_type = 'auth_delete';
    		break;
    	case 'vote'&#58;
    		$is_auth_type = 'auth_vote';
    		break;
    	case 'topicreview'&#58;
    		$is_auth_type = 'auth_read';
    		break;
    	default&#58;
    		message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_post_mode'&#93;&#41;;
    		break;
    &#125;
    
    //
    // Here we do various lookups to find topic_id, forum_id, post_id etc.
    // Doing it here prevents spoofing &#40;eg. faking forum_id, topic_id or post_id
    //
    $error_msg = '';
    $post_data = array&#40;&#41;;
    switch &#40; $mode &#41;
    &#123;
    	case 'newtopic'&#58;
    		if &#40; empty&#40;$forum_id&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'Forum_not_exist'&#93;&#41;;
    		&#125;
    
    		$sql = "SELECT *
    			FROM " . FORUMS_TABLE . "
    			WHERE forum_id = $forum_id";
    		break;
    
    	case 'reply'&#58;
    	case 'vote'&#58;
    		if &#40; empty&#40; $topic_id&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_topic_id'&#93;&#41;;
    		&#125;
    
    		$sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_poster, t.topic_type
    			FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
    			WHERE t.topic_id = $topic_id
    				AND f.forum_id = t.forum_id";
    		break;
    
    	case 'quote'&#58;
    	case 'editpost'&#58;
    	case 'delete'&#58;
    	case 'poll_delete'&#58;
    		if &#40; empty&#40;$post_id&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_post_id'&#93;&#41;;
    		&#125;
    
                     $temp = $submit;
    		$submit = !&#40;!$submit || &#40; isset&#40;$board_config&#91;'cash_disable'&#93;&#41; && !$board_config&#91;'cash_disable'&#93; && &#40;&#40;$mode == 'editpost'&#41; || &#40;$mode == 'delete'&#41;&#41;&#41;&#41;;
                     $select_sql = &#40;!$submit&#41; ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' &#58; '';
    		$from_sql = &#40; !$submit &#41; ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" &#58; '';
    		$where_sql = &#40; !$submit &#41; ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" &#58; '';
                     $submit = $temp;
    		unset&#40;$temp&#41;;
    
    		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
    			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
    			WHERE p.post_id = $post_id
    				AND t.topic_id = p.topic_id
    				AND f.forum_id = p.forum_id
    				$where_sql";
    		break;
    
    	default&#58;
    		message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_valid_mode'&#93;&#41;;
    &#125;
    
    if &#40; $result = $db->sql_query&#40;$sql&#41; &#41;
    &#123;
    	$post_info = $db->sql_fetchrow&#40;$result&#41;;
    	$db->sql_freeresult&#40;$result&#41;;
    
    	$forum_id = $post_info&#91;'forum_id'&#93;;
    	$forum_name = $post_info&#91;'forum_name'&#93;;
    
    	$is_auth = auth&#40;AUTH_ALL, $forum_id, $userdata, $post_info&#41;;
    
    	if &#40; $post_info&#91;'forum_status'&#93; == FORUM_LOCKED && !$is_auth&#91;'auth_mod'&#93;&#41;
    	&#123;
    	   message_die&#40;GENERAL_MESSAGE, $lang&#91;'Forum_locked'&#93;&#41;;
    	&#125;
    	else if &#40; $mode != 'newtopic' && $post_info&#91;'topic_status'&#93; == TOPIC_LOCKED && !$is_auth&#91;'auth_mod'&#93;&#41;
    	&#123;
    	   message_die&#40;GENERAL_MESSAGE, $lang&#91;'Topic_locked'&#93;&#41;;
    	&#125;
    
    	if &#40; $mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete' &#41;
    	&#123;
    		$topic_id = $post_info&#91;'topic_id'&#93;;
    
                     $post_data&#91;'post_text'&#93; = &#40; &#40;$mode == 'editpost'&#41; || &#40;$mode == 'delete'&#41; &#41; ? $post_info&#91;'post_text'&#93; &#58; '';
    		$post_data&#91;'bbcode_uid'&#93; = &#40; &#40;$mode == 'editpost'&#41; || &#40;$mode == 'delete'&#41; &#41; ? $post_info&#91;'bbcode_uid'&#93; &#58; '';
                     $post_data&#91;'poster_post'&#93; = &#40; $post_info&#91;'poster_id'&#93; == $userdata&#91;'user_id'&#93; &#41; ? true &#58; false;
    		$post_data&#91;'first_post'&#93; = &#40; $post_info&#91;'topic_first_post_id'&#93; == $post_id &#41; ? true &#58; false;
    		$post_data&#91;'last_post'&#93; = &#40; $post_info&#91;'topic_last_post_id'&#93; == $post_id &#41; ? true &#58; false;
    		$post_data&#91;'last_topic'&#93; = &#40; $post_info&#91;'forum_last_post_id'&#93; == $post_id &#41; ? true &#58; false;
    		$post_data&#91;'has_poll'&#93; = &#40; $post_info&#91;'topic_vote'&#93; &#41; ? true &#58; false;
    		$post_data&#91;'topic_type'&#93; = $post_info&#91;'topic_type'&#93;;
    		$post_data&#91;'poster_id'&#93; = $post_info&#91;'poster_id'&#93;;
    
    		if &#40; $post_data&#91;'first_post'&#93; && $post_data&#91;'has_poll'&#93; &#41;
    		&#123;
    			$sql = "SELECT *
    				FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
    				WHERE vd.topic_id = $topic_id
    					AND vr.vote_id = vd.vote_id
    				ORDER BY vr.vote_option_id";
    			if &#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41;
    			&#123;
    				message_die&#40;GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql&#41;;
    			&#125;
    
    			$poll_options = array&#40;&#41;;
    			$poll_results_sum = 0;
    			if &#40; $row = $db->sql_fetchrow&#40;$result&#41; &#41;
    			&#123;
    				$poll_title = $row&#91;'vote_text'&#93;;
    				$poll_id = $row&#91;'vote_id'&#93;;
    				$poll_length = $row&#91;'vote_length'&#93; / 86400;
    
    				do
    				&#123;
    					$poll_options&#91;$row&#91;'vote_option_id'&#93;&#93; = $row&#91;'vote_option_text'&#93;;
    					$poll_results_sum += $row&#91;'vote_result'&#93;;
    				&#125;
    				while &#40; $row = $db->sql_fetchrow&#40;$result&#41; &#41;;
    			&#125;
    			$db->sql_freeresult&#40;$result&#41;;
    
    			$post_data&#91;'edit_poll'&#93; = &#40; &#40; !$poll_results_sum || $is_auth&#91;'auth_mod'&#93; &#41; && $post_data&#91;'topic_poster'&#93; = &#40; $mode == 'reply' &#41; ? $post_info&#91;'topic_poster'&#93; &#58; 0;
                             $post_data&#91;'first_post'&#93; &#41; ? true &#58; 0;
    		&#125;
    		else
    		&#123;
    			$post_data&#91;'edit_poll'&#93; = &#40;$post_data&#91;'first_post'&#93; && $is_auth&#91;'auth_pollcreate'&#93;&#41; ? true &#58; false;
    		&#125;
    
    		//
    		// Can this user edit/delete the post/poll?
    		//
    		if &#40; $post_info&#91;'poster_id'&#93; != $userdata&#91;'user_id'&#93; && !$is_auth&#91;'auth_mod'&#93; &#41;
    		&#123;
    			$message = &#40; $delete || $mode == 'delete' &#41; ? $lang&#91;'Delete_own_posts'&#93; &#58; $lang&#91;'Edit_own_posts'&#93;;
    			$message .= '
    
    ' . sprintf&#40;$lang&#91;'Click_return_topic'&#93;, '', ''&#41;;
    
    			message_die&#40;GENERAL_MESSAGE, $message&#41;;
    		&#125;
    		else if &#40; !$post_data&#91;'last_post'&#93; && !$is_auth&#91;'auth_mod'&#93; && &#40; $mode == 'delete' || $delete &#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'Cannot_delete_replied'&#93;&#41;;
    		&#125;
    		else if &#40; !$post_data&#91;'edit_poll'&#93; && !$is_auth&#91;'auth_mod'&#93; && &#40; $mode == 'poll_delete' || $poll_delete &#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'Cannot_delete_poll'&#93;&#41;;
    		&#125;
    	&#125;
    	else
    	&#123;
    		if &#40; $mode == 'quote' &#41;
    		&#123;
    			$topic_id = $post_info&#91;'topic_id'&#93;;
    		&#125;
    		if &#40; $mode == 'newtopic' &#41;
    		&#123;
    			$post_data&#91;'topic_type'&#93; = POST_NORMAL;
    		&#125;
    
    		$post_data&#91;'first_post'&#93; = &#40; $mode == 'newtopic' &#41; ? true &#58; 0;
    		$post_data&#91;'last_post'&#93; = false;
    		$post_data&#91;'has_poll'&#93; = false;
    		$post_data&#91;'edit_poll'&#93; = false;
    	&#125;
    	if &#40; $mode == 'poll_delete' && !isset&#40;$poll_id&#41; &#41;
    	&#123;
    		message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_such_post'&#93;&#41;;
    	&#125;
    &#125;
    else
    &#123;
    	message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_such_post'&#93;&#41;;
    &#125;
    
    //
    // The user is not authed, if they're not logged in then redirect
    // them, else show them an error message
    //
    if &#40; !$is_auth&#91;$is_auth_type&#93; &#41;
    &#123;
    	if &#40; $userdata&#91;'session_logged_in'&#93; &#41;
    	&#123;
    		message_die&#40;GENERAL_MESSAGE, sprintf&#40;$lang&#91;'Sorry_' . $is_auth_type&#93;, $is_auth&#91;$is_auth_type . "_type"&#93;&#41;&#41;;
    	&#125;
    
    	switch&#40; $mode &#41;
    	&#123;
    		case 'newtopic'&#58;
    			$redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;
    			break;
    		case 'reply'&#58;
    		case 'topicreview'&#58;
    			$redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;
    			break;
    		case 'quote'&#58;
    		case 'editpost'&#58;
    			$redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;
    			break;
    	&#125;
    
    	redirect&#40;append_sid&#40;"login.$phpEx?redirect=posting.$phpEx&" . $redirect, true&#41;&#41;;
    &#125;
    
    //
    // Set toggles for various options
    //
    if &#40; !$board_config&#91;'allow_html'&#93; &#41;
    &#123;
    	$html_on = 0;
    &#125;
    else
    &#123;
    	$html_on = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'disable_html'&#93;&#41; &#41; ? 0 &#58; TRUE &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? $board_config&#91;'allow_html'&#93; &#58; $userdata&#91;'user_allowhtml'&#93; &#41;;
    &#125;
    
    if &#40; !$board_config&#91;'allow_bbcode'&#93; &#41;
    &#123;
    	$bbcode_on = 0;
    &#125;
    else
    &#123;
    	$bbcode_on = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'disable_bbcode'&#93;&#41; &#41; ? 0 &#58; TRUE &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? $board_config&#91;'allow_bbcode'&#93; &#58; $userdata&#91;'user_allowbbcode'&#93; &#41;;
    &#125;
    
    if &#40; !$board_config&#91;'allow_smilies'&#93; &#41;
    &#123;
    	$smilies_on = 0;
    &#125;
    else
    &#123;
    	$smilies_on = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'disable_smilies'&#93;&#41; &#41; ? 0 &#58; TRUE &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? $board_config&#91;'allow_smilies'&#93; &#58; $userdata&#91;'user_allowsmile'&#93; &#41;;
    &#125;
    
    if &#40; &#40;$submit || $refresh&#41; && $is_auth&#91;'auth_read'&#93;&#41;
    &#123;
    	$notify_user = &#40; !empty&#40;$HTTP_POST_VARS&#91;'notify'&#93;&#41; &#41; ? TRUE &#58; 0;
    &#125;
    else
    &#123;
    	if &#40; $mode != 'newtopic' && $userdata&#91;'session_logged_in'&#93; && $is_auth&#91;'auth_read'&#93; &#41;
    	&#123;
    		$sql = "SELECT topic_id
    			FROM " . TOPICS_WATCH_TABLE . "
    			WHERE topic_id = $topic_id
    				AND user_id = " . $userdata&#91;'user_id'&#93;;
    		if &#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql&#41;;
    		&#125;
    
    		$notify_user = &#40; $db->sql_fetchrow&#40;$result&#41; &#41; ? TRUE &#58; $userdata&#91;'user_notify'&#93;;
    		$db->sql_freeresult&#40;$result&#41;;
    	&#125;
    	else
    	&#123;
    		$notify_user = &#40; $userdata&#91;'session_logged_in'&#93; && $is_auth&#91;'auth_read'&#93; &#41; ? $userdata&#91;'user_notify'&#93; &#58; 0;
    	&#125;
    &#125;
    
    $attach_sig = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'attach_sig'&#93;&#41; &#41; ? TRUE &#58; 0 &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? 0 &#58; $userdata&#91;'user_attachsig'&#93; &#41;;
    
    // --------------------
    //  What shall we do?
    //
    if &#40; &#40; $delete || $poll_delete || $mode == 'delete' &#41; && !$confirm &#41;
    &#123;
    	//
    	// Confirm deletion
    	//
    	$s_hidden_fields = '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
    	$s_hidden_fields .= &#40; $delete || $mode == "delete" &#41; ? '<input type="hidden" name="mode" value="delete" />' &#58; '<input type="hidden" name="mode" value="poll_delete" />';
    
    	$l_confirm = &#40; $delete || $mode == 'delete' &#41; ? $lang&#91;'Confirm_delete'&#93; &#58; $lang&#91;'Confirm_delete_poll'&#93;;
    
    	//
    	// Output confirmation page
    	//
    	include&#40;$phpbb_root_path . 'includes/page_header.'.$phpEx&#41;;
    
    	$template->set_filenames&#40;array&#40;
    		'confirm_body' => 'confirm_body.tpl'&#41;
    	&#41;;
    
    	$template->assign_vars&#40;array&#40;
    		'MESSAGE_TITLE' => $lang&#91;'Information'&#93;,
    		'MESSAGE_TEXT' => $l_confirm,
    
    		'L_YES' => $lang&#91;'Yes'&#93;,
    		'L_NO' => $lang&#91;'No'&#93;,
    
    		'S_CONFIRM_ACTION' => append_sid&#40;"posting.$phpEx"&#41;,
    		'S_HIDDEN_FIELDS' => $s_hidden_fields&#41;
    	&#41;;
    
    	$template->pparse&#40;'confirm_body'&#41;;
    
    	include&#40;$phpbb_root_path . 'includes/page_tail.'.$phpEx&#41;;
    &#125;
    else if &#40; $mode == 'vote' &#41;
    &#123;
    	//
    	// Vote in a poll
    	//
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;'vote_id'&#93;&#41; &#41;
    	&#123;
    		$vote_option_id = intval&#40;$HTTP_POST_VARS&#91;'vote_id'&#93;&#41;;
    
    		$sql = "SELECT vd.vote_id
    			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
    			WHERE vd.topic_id = $topic_id
    				AND vr.vote_id = vd.vote_id
    				AND vr.vote_option_id = $vote_option_id
    			GROUP BY vd.vote_id";
    		if &#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql&#41;;
    		&#125;
    
    		if &#40; $vote_info = $db->sql_fetchrow&#40;$result&#41; &#41;
    		&#123;
    			$vote_id = $vote_info&#91;'vote_id'&#93;;
    
    			$sql = "SELECT *
    				FROM " . VOTE_USERS_TABLE . "
    				WHERE vote_id = $vote_id
    					AND vote_user_id = " . $userdata&#91;'user_id'&#93;;
    			if &#40; !&#40;$result2 = $db->sql_query&#40;$sql&#41;&#41; &#41;
    			&#123;
    				message_die&#40;GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql&#41;;
    			&#125;
    
    			if &#40; !&#40;$row = $db->sql_fetchrow&#40;$result2&#41;&#41; &#41;
    			&#123;
    				$sql = "UPDATE " . VOTE_RESULTS_TABLE . "
    					SET vote_result = vote_result + 1
    					WHERE vote_id = $vote_id
    						AND vote_option_id = $vote_option_id";
    				if &#40; !$db->sql_query&#40;$sql, BEGIN_TRANSACTION&#41; &#41;
    				&#123;
    					message_die&#40;GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql&#41;;
    				&#125;
    
    				$sql = "INSERT INTO " . VOTE_USERS_TABLE . " &#40;vote_id, vote_user_id, vote_user_ip&#41;
    					VALUES &#40;$vote_id, " . $userdata&#91;'user_id'&#93; . ", '$user_ip'&#41;";
    				if &#40; !$db->sql_query&#40;$sql, END_TRANSACTION&#41; &#41;
    				&#123;
    					message_die&#40;GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql&#41;;
    				&#125;
    
    				$message = $lang&#91;'Vote_cast'&#93;;
    			&#125;
    			else
    			&#123;
    				$message = $lang&#91;'Already_voted'&#93;;
    			&#125;
    			$db->sql_freeresult&#40;$result2&#41;;
    		&#125;
    		else
    		&#123;
    			$message = $lang&#91;'No_vote_option'&#93;;
    		&#125;
    		$db->sql_freeresult&#40;$result&#41;;
    
    		$template->assign_vars&#40;array&#40;
    			'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid&#40;"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"&#41; . '">'&#41;
    		&#41;;
    		$message .=  '
    
    ' . sprintf&#40;$lang&#91;'Click_view_message'&#93;, '', ''&#41;;
    		message_die&#40;GENERAL_MESSAGE, $message&#41;;
    	&#125;
    	else
    	&#123;
    		redirect&#40;append_sid&#40;"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true&#41;&#41;;
    	&#125;
    &#125;
    else if &#40; $submit || $confirm &#41;
    &#123;
    	//
    	// Submit post/vote &#40;newtopic, edit, reply, etc.&#41;
    	//
    	$return_message = '';
    	$return_meta = '';
    
    	switch &#40; $mode &#41;
    	&#123;
    		case 'editpost'&#58;
    		case 'newtopic'&#58;
    		case 'reply'&#58;
    			$username = &#40; !empty&#40;$HTTP_POST_VARS&#91;'username'&#93;&#41; &#41; ? $HTTP_POST_VARS&#91;'username'&#93; &#58; '';
    			$subject = &#40; !empty&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41; &#41; ? trim&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41; &#58; '';
    			$message = &#40; !empty&#40;$HTTP_POST_VARS&#91;'message'&#93;&#41; &#41; ? $HTTP_POST_VARS&#91;'message'&#93; &#58; '';
    			$poll_title = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_title'&#93;&#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41; ? $HTTP_POST_VARS&#91;'poll_title'&#93; &#58; '';
    			$poll_options = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_option_text'&#93;&#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41; ? $HTTP_POST_VARS&#91;'poll_option_text'&#93; &#58; '';
    			$poll_length = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_length'&#93;&#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41; ? $HTTP_POST_VARS&#91;'poll_length'&#93; &#58; '';
    			$bbcode_uid = '';
    
    			prepare_post&#40;$mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length&#41;;
    
    			if &#40; $error_msg == '' &#41;
    			&#123;
    				$topic_type = &#40; $topic_type != $post_data&#91;'topic_type'&#93; && !$is_auth&#91;'auth_sticky'&#93; && !$is_auth&#91;'auth_announce'&#93; &#41; ? $post_data&#91;'topic_type'&#93; &#58; $topic_type;
    
    				submit_post&#40;$mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace&#40;"\'", "''", $username&#41;, str_replace&#40;"\'", "''", $subject&#41;, str_replace&#40;"\'", "''", $message&#41;, str_replace&#40;"\'", "''", $poll_title&#41;, $poll_options, $poll_length&#41;;
    			&#125;
    			break;
    
    		case 'delete'&#58;
    		case 'poll_delete'&#58;
    			delete_post&#40;$mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id&#41;;
    			break;
    	&#125;
    
    	if &#40; $error_msg == '' &#41;
    	&#123;
    		if &#40; $mode != 'editpost' &#41;
    		&#123;
    			$user_id = &#40; $mode == 'reply' || $mode == 'newtopic' &#41; ? $userdata&#91;'user_id'&#93; &#58; $post_data&#91;'poster_id'&#93;;
    			update_post_stats&#40;$mode, $post_data, $forum_id, $topic_id, $post_id, $user_id&#41;;
    		&#125;
    
    		if &#40;$error_msg == '' && $mode != 'poll_delete'&#41;
    		&#123;
    			user_notification&#40;$mode, $post_data, $post_info&#91;'topic_title'&#93;, $forum_id, $topic_id, $post_id, $notify_user&#41;;
    		&#125;
    
    		if &#40; $mode == 'newtopic' || $mode == 'reply' &#41;
    		&#123;
    			$tracking_topics = &#40; !empty&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_t'&#93;&#41; &#41; ? unserialize&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_t'&#93;&#41; &#58; array&#40;&#41;;
    			$tracking_forums = &#40; !empty&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_f'&#93;&#41; &#41; ? unserialize&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_f'&#93;&#41; &#58; array&#40;&#41;;
    
    			if &#40; count&#40;$tracking_topics&#41; + count&#40;$tracking_forums&#41; == 100 && empty&#40;$tracking_topics&#91;$topic_id&#93;&#41; &#41;
    			&#123;
    				asort&#40;$tracking_topics&#41;;
    				unset&#40;$tracking_topics&#91;key&#40;$tracking_topics&#41;&#93;&#41;;
    			&#125;
    
    			$tracking_topics&#91;$topic_id&#93; = time&#40;&#41;;
    
    			setcookie&#40;$board_config&#91;'cookie_name'&#93; . '_t', serialize&#40;$tracking_topics&#41;, 0, $board_config&#91;'cookie_path'&#93;, $board_config&#91;'cookie_domain'&#93;, $board_config&#91;'cookie_secure'&#93;&#41;;
    		&#125;
    
    		$template->assign_vars&#40;array&#40;
    			'META' => $return_meta&#41;
    		&#41;;
    		message_die&#40;GENERAL_MESSAGE, $return_message&#41;;
    	&#125;
    &#125;
    
    if&#40; $refresh || isset&#40;$HTTP_POST_VARS&#91;'del_poll_option'&#93;&#41; || $error_msg != '' &#41;
    &#123;
    	$username = &#40; !empty&#40;$HTTP_POST_VARS&#91;'username'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'username'&#93;&#41;&#41;&#41; &#58; '';
    	$subject = &#40; !empty&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41;&#41;&#41; &#58; '';
    	$message = &#40; !empty&#40;$HTTP_POST_VARS&#91;'message'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'message'&#93;&#41;&#41;&#41; &#58; '';
    
    	$poll_title = &#40; !empty&#40;$HTTP_POST_VARS&#91;'poll_title'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'poll_title'&#93;&#41;&#41;&#41; &#58; '';
    	$poll_length = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_length'&#93;&#41; &#41; ? max&#40;0, intval&#40;$HTTP_POST_VARS&#91;'poll_length'&#93;&#41;&#41; &#58; 0;
    
    	$poll_options = array&#40;&#41;;
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;'poll_option_text'&#93;&#41; &#41;
    	&#123;
    		while&#40; list&#40;$option_id, $option_text&#41; = @each&#40;$HTTP_POST_VARS&#91;'poll_option_text'&#93;&#41; &#41;
    		&#123;
    			if&#40; isset&#40;$HTTP_POST_VARS&#91;'del_poll_option'&#93;&#91;$option_id&#93;&#41; &#41;
    			&#123;
    				unset&#40;$poll_options&#91;$option_id&#93;&#41;;
    			&#125;
    			else if &#40; !empty&#40;$option_text&#41; &#41;
    			&#123;
    				$poll_options&#91;intval&#40;$option_id&#41;&#93; = htmlspecialchars&#40;trim&#40;stripslashes&#40;$option_text&#41;&#41;&#41;;
    			&#125;
    		&#125;
    	&#125;
    
    	if &#40; isset&#40;$poll_add&#41; && !empty&#40;$HTTP_POST_VARS&#91;'add_poll_option_text'&#93;&#41; &#41;
    	&#123;
    		$poll_options&#91;&#93; = htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'add_poll_option_text'&#93;&#41;&#41;&#41;;
    	&#125;
    
    	if &#40; $mode == 'newtopic' || $mode == 'reply'&#41;
    	&#123;
    		$user_sig = &#40; $userdata&#91;'user_sig'&#93; != '' && $board_config&#91;'allow_sig'&#93; &#41; ? $userdata&#91;'user_sig'&#93; &#58; '';
    	&#125;
    	else if &#40; $mode == 'editpost' &#41;
    	&#123;
    		$user_sig = &#40; $post_info&#91;'user_sig'&#93; != '' && $board_config&#91;'allow_sig'&#93; &#41; ? $post_info&#91;'user_sig'&#93; &#58; '';
    		$userdata&#91;'user_sig_bbcode_uid'&#93; = $post_info&#91;'user_sig_bbcode_uid'&#93;;
    	&#125;
    
    	if&#40; $preview &#41;
    	&#123;
    		$orig_word = array&#40;&#41;;
    		$replacement_word = array&#40;&#41;;
    		obtain_word_list&#40;$orig_word, $replacement_word&#41;;
    
    		$bbcode_uid = &#40; $bbcode_on &#41; ? make_bbcode_uid&#40;&#41; &#58; '';
    		$preview_message = stripslashes&#40;prepare_message&#40;addslashes&#40;unprepare_message&#40;$message&#41;&#41;, $html_on, $bbcode_on, $smilies_on, $bbcode_uid&#41;&#41;;
    		$preview_subject = $subject;
    		$preview_username = $username;
    
    		//
    		// Finalise processing as per viewtopic
    		//
    		if&#40; !$html_on &#41;
    		&#123;
    			if&#40; $user_sig != '' || !$userdata&#91;'user_allowhtml'&#93; &#41;
    			&#123;
    				$user_sig = preg_replace&#40;'#&#40;<&#41;&#40;&#91;\/&#93;?.*?&#41;&#40;>&#41;#is', '&lt;\2&gt;', $user_sig&#41;;
    			&#125;
    		&#125;
    
    		if&#40; $attach_sig && $user_sig != '' && $userdata&#91;'user_sig_bbcode_uid'&#93; &#41;
    		&#123;
    			$user_sig = bbencode_second_pass&#40;$user_sig, $userdata&#91;'user_sig_bbcode_uid'&#93;&#41;;
    		&#125;
    
    		if&#40; $bbcode_on &#41;
    		&#123;
    			$preview_message = bbencode_second_pass&#40;$preview_message, $bbcode_uid&#41;;
    		&#125;
    
    		if&#40; !empty&#40;$orig_word&#41; &#41;
    		&#123;
    			$preview_username = &#40; !empty&#40;$username&#41; &#41; ? preg_replace&#40;$orig_word, $replacement_word, $preview_username&#41; &#58; '';
    			$preview_subject = &#40; !empty&#40;$subject&#41; &#41; ? preg_replace&#40;$orig_word, $replacement_word, $preview_subject&#41; &#58; '';
    			$preview_message = &#40; !empty&#40;$preview_message&#41; &#41; ? preg_replace&#40;$orig_word, $replacement_word, $preview_message&#41; &#58; '';
    		&#125;
    
    		if&#40; $user_sig != '' &#41;
    		&#123;
    			$user_sig = make_clickable&#40;$user_sig&#41;;
    		&#125;
    		$preview_message = make_clickable&#40;$preview_message&#41;;
    
    		if&#40; $smilies_on &#41;
    		&#123;
    			if&#40; $userdata&#91;'user_allowsmile'&#93; && $user_sig != '' &#41;
    			&#123;
    				$user_sig = smilies_pass&#40;$user_sig&#41;;
    			&#125;
    
    			$preview_message = smilies_pass&#40;$preview_message&#41;;
    		&#125;
    
    		if&#40; $attach_sig && $user_sig != '' &#41;
    		&#123;
    			$preview_message = $preview_message . '
    
    _________________
    ' . $user_sig;
    		&#125;
    
    		$preview_message = str_replace&#40;"\n", '
    ', $preview_message&#41;;
    
    		$template->set_filenames&#40;array&#40;
    			'preview' => 'posting_preview.tpl'&#41;
    		&#41;;
    
    		$template->assign_vars&#40;array&#40;
    			'TOPIC_TITLE' => $preview_subject,
    			'POST_SUBJECT' => $preview_subject,
    			'POSTER_NAME' => $preview_username,
    			'POST_DATE' => create_date&#40;$board_config&#91;'default_dateformat'&#93;, time&#40;&#41;, $board_config&#91;'board_timezone'&#93;&#41;,
    			'MESSAGE' => $preview_message,
    
    			'L_POST_SUBJECT' => $lang&#91;'Post_subject'&#93;,
    			'L_PREVIEW' => $lang&#91;'Preview'&#93;,
    			'L_POSTED' => $lang&#91;'Posted'&#93;,
    			'L_POST' => $lang&#91;'Post'&#93;&#41;
    		&#41;;
    		$template->assign_var_from_handle&#40;'POST_PREVIEW_BOX', 'preview'&#41;;
    	&#125;
    	else if&#40; $error_msg != '' &#41;
    	&#123;
    		$template->set_filenames&#40;array&#40;
    			'reg_header' => 'error_body.tpl'&#41;
    		&#41;;
    		$template->assign_vars&#40;array&#40;
    			'ERROR_MESSAGE' => $error_msg&#41;
    		&#41;;
    		$template->assign_var_from_handle&#40;'ERROR_BOX', 'reg_header'&#41;;
    	&#125;
    &#125;
    else
    &#123;
    	//
    	// User default entry point
    	//
    	if &#40; $mode == 'newtopic' &#41;
    	&#123;
    		$user_sig = &#40; $userdata&#91;'user_sig'&#93; != '' &#41; ? $userdata&#91;'user_sig'&#93; &#58; '';
    
    		$username = &#40;$userdata&#91;'session_logged_in'&#93;&#41; ? $userdata&#91;'username'&#93; &#58; '';
    		$poll_title = '';
    		$poll_length = '';
    		$subject = '';
    		$message = '';
    	&#125;
    	else if &#40; $mode == 'reply' &#41;
    	&#123;
    		$user_sig = &#40; $userdata&#91;'user_sig'&#93; != '' &#41; ? $userdata&#91;'user_sig'&#93; &#58; '';
    
    		$username = &#40; $userdata&#91;'session_logged_in'&#93; &#41; ? $userdata&#91;'username'&#93; &#58; '';
    		$subject = '';
    		$message = '';
    
    	&#125;
    	else if &#40; $mode == 'quote' || $mode == 'editpost' &#41;
    	&#123;
    		$subject = &#40; $post_data&#91;'first_post'&#93; &#41; ? $post_info&#91;'topic_title'&#93; &#58; $post_info&#91;'post_subject'&#93;;
    		$message = $post_info&#91;'post_text'&#93;;
    
    		if &#40; $mode == 'editpost' &#41;
    		&#123;
    			$attach_sig = &#40; $post_info&#91;'enable_sig'&#93; && $post_info&#91;'user_sig'&#93; != '' &#41; ? TRUE &#58; 0;
    			$user_sig = $post_info&#91;'user_sig'&#93;;
    
    			$html_on = &#40; $post_info&#91;'enable_html'&#93; &#41; ? true &#58; false;
    			$bbcode_on = &#40; $post_info&#91;'enable_bbcode'&#93; &#41; ? true &#58; false;
    			$smilies_on = &#40; $post_info&#91;'enable_smilies'&#93; &#41; ? true &#58; false;
    		&#125;
    		else
    		&#123;
    			$attach_sig = &#40; $userdata&#91;'user_attachsig'&#93; &#41; ? TRUE &#58; 0;
    			$user_sig = $userdata&#91;'user_sig'&#93;;
    		&#125;
    
    		if &#40; $post_info&#91;'bbcode_uid'&#93; != '' &#41;
    		&#123;
    			$message = preg_replace&#40;'/\&#58;&#40;&#40;&#91;a-z0-9&#93;&#58;&#41;?&#41;' . $post_info&#91;'bbcode_uid'&#93; . '/s', '', $message&#41;;
    		&#125;
    
    		$message = str_replace&#40;'<', '&lt;', $message&#41;;
    		$message = str_replace&#40;'>', '&gt;', $message&#41;;
    		$message = str_replace&#40;'
    ', "\n", $message&#41;;
    
    		if &#40; $mode == 'quote' &#41;
    		&#123;
    			$orig_word = array&#40;&#41;;
    			$replacement_word = array&#40;&#41;;
    			obtain_word_list&#40;$orig_word, $replace_word&#41;;
    
    			$msg_date =  create_date&#40;$board_config&#91;'default_dateformat'&#93;, $postrow&#91;'post_time'&#93;, $board_config&#91;'board_timezone'&#93;&#41;;
    
    			// Use trim to get rid of spaces placed there by MS-SQL 2000
    			$quote_username = &#40; trim&#40;$post_info&#91;'post_username'&#93;&#41; != '' &#41; ? $post_info&#91;'post_username'&#93; &#58; $post_info&#91;'username'&#93;;
    			$message = '&#91;quote="' . $quote_username . '"&#93;' . $message . '&#91;/quote&#93;';
    
    			if &#40; !empty&#40;$orig_word&#41; &#41;
    			&#123;
    				$subject = &#40; !empty&#40;$subject&#41; &#41; ? preg_replace&#40;$orig_word, $replace_word, $subject&#41; &#58; '';
    				$message = &#40; !empty&#40;$message&#41; &#41; ? preg_replace&#40;$orig_word, $replace_word, $message&#41; &#58; '';
    			&#125;
    
    			if &#40; !preg_match&#40;'/^Re&#58;/', $subject&#41; && strlen&#40;$subject&#41; > 0 &#41;
    			&#123;
    				$subject = 'Re&#58; ' . $subject;
    			&#125;
    
    			$mode = 'reply';
    		&#125;
    		else
    		&#123;
    			$username = &#40; $post_info&#91;'user_id'&#93; == ANONYMOUS && !empty&#40;$post_info&#91;'post_username'&#93;&#41; &#41; ? $post_info&#91;'post_username'&#93; &#58; '';
    		&#125;
    	&#125;
    &#125;
    
    //
    // Signature toggle selection
    //
    if&#40; $user_sig != '' &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_signature_checkbox', array&#40;&#41;&#41;;
    &#125;
    
    //
    // HTML toggle selection
    //
    if &#40; $board_config&#91;'allow_html'&#93; &#41;
    &#123;
    	$html_status = $lang&#91;'HTML_is_ON'&#93;;
    	$template->assign_block_vars&#40;'switch_html_checkbox', array&#40;&#41;&#41;;
    &#125;
    else
    &#123;
    	$html_status = $lang&#91;'HTML_is_OFF'&#93;;
    &#125;
    
    //
    // BBCode toggle selection
    //
    if &#40; $board_config&#91;'allow_bbcode'&#93; &#41;
    &#123;
    	$bbcode_status = $lang&#91;'BBCode_is_ON'&#93;;
    	$template->assign_block_vars&#40;'switch_bbcode_checkbox', array&#40;&#41;&#41;;
    &#125;
    else
    &#123;
    	$bbcode_status = $lang&#91;'BBCode_is_OFF'&#93;;
    &#125;
    
    //
    // Smilies toggle selection
    //
    if &#40; $board_config&#91;'allow_smilies'&#93; &#41;
    &#123;
    	$smilies_status = $lang&#91;'Smilies_are_ON'&#93;;
    	$template->assign_block_vars&#40;'switch_smilies_checkbox', array&#40;&#41;&#41;;
    &#125;
    else
    &#123;
    	$smilies_status = $lang&#91;'Smilies_are_OFF'&#93;;
    &#125;
    
    if&#40; !$userdata&#91;'session_logged_in'&#93; || &#40; $mode == 'editpost' && $post_info&#91;'poster_id'&#93; == ANONYMOUS &#41; &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_username_select', array&#40;&#41;&#41;;
    &#125;
    
    //
    // Notify checkbox - only show if user is logged in
    //
    if &#40; $userdata&#91;'session_logged_in'&#93; && $is_auth&#91;'auth_read'&#93; &#41;
    &#123;
    	if &#40; $mode != 'editpost' || &#40; $mode == 'editpost' && $post_info&#91;'poster_id'&#93; != ANONYMOUS &#41; &#41;
    	&#123;
    		$template->assign_block_vars&#40;'switch_notify_checkbox', array&#40;&#41;&#41;;
    	&#125;
    &#125;
    
    //
    // Delete selection
    //
    if &#40; $mode == 'editpost' && &#40; &#40; $is_auth&#91;'auth_delete'&#93; && $post_data&#91;'last_post'&#93; && &#40; !$post_data&#91;'has_poll'&#93; || $post_data&#91;'edit_poll'&#93; &#41; &#41; || $is_auth&#91;'auth_mod'&#93; &#41; &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_delete_checkbox', array&#40;&#41;&#41;;
    &#125;
    
    //
    // Topic type selection
    //
    $topic_type_toggle = '';
    if &#40; $mode == 'newtopic' || &#40; $mode == 'editpost' && $post_data&#91;'first_post'&#93; &#41; &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_type_toggle', array&#40;&#41;&#41;;
    
    	if&#40; $is_auth&#91;'auth_sticky'&#93; &#41;
    	&#123;
    		$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
    		if &#40; $post_data&#91;'topic_type'&#93; == POST_STICKY || $topic_type == POST_STICKY &#41;
    		&#123;
    			$topic_type_toggle .= ' checked="checked"';
    		&#125;
    		$topic_type_toggle .= ' /> ' . $lang&#91;'Post_Sticky'&#93; . '';
    	&#125;
    
    	if&#40; $is_auth&#91;'auth_announce'&#93; &#41;
    	&#123;
    		$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
    		if &#40; $post_data&#91;'topic_type'&#93; == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE &#41;
    		&#123;
    			$topic_type_toggle .= ' checked="checked"';
    		&#125;
    		$topic_type_toggle .= ' /> ' . $lang&#91;'Post_Announcement'&#93; . '';
    	&#125;
    
    	if &#40; $topic_type_toggle != '' &#41;
    	&#123;
    		$topic_type_toggle = $lang&#91;'Post_topic_as'&#93; . '&#58; <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . &#40; &#40; $post_data&#91;'topic_type'&#93; == POST_NORMAL || $topic_type == POST_NORMAL &#41; ? ' checked="checked"' &#58; '' &#41; . ' /> ' . $lang&#91;'Post_Normal'&#93; . '' . $topic_type_toggle;
    	&#125;
    &#125;
    
    $hidden_form_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
    
    switch&#40; $mode &#41;
    &#123;
    	case 'newtopic'&#58;
    		$page_title = $lang&#91;'Post_a_new_topic'&#93;;
    		$hidden_form_fields .= '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
    		break;
    
    	case 'reply'&#58;
    		$page_title = $lang&#91;'Post_a_reply'&#93;;
    		$hidden_form_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
    		break;
    
    	case 'editpost'&#58;
    		$page_title = $lang&#91;'Edit_Post'&#93;;
    		$hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
    		break;
    &#125;
    
    // Generate smilies listing for page output
    generate_smilies&#40;'inline', PAGE_POSTING&#41;;
    
    //
    // Include page header
    //
    include&#40;$phpbb_root_path . 'includes/page_header.'.$phpEx&#41;;
    
    $template->set_filenames&#40;array&#40;
    	'body' => 'posting_body.tpl',
    	'pollbody' => 'posting_poll_body.tpl',
    	'reviewbody' => 'posting_topic_review.tpl'&#41;
    &#41;;
    make_jumpbox&#40;'viewforum.'.$phpEx&#41;;
    
    $template->assign_vars&#40;array&#40;
    	'FORUM_NAME' => $forum_name,
    	'L_POST_A' => $page_title,
    	'L_POST_SUBJECT' => $lang&#91;'Post_subject'&#93;,
    
    	'U_VIEW_FORUM' => append_sid&#40;"viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"&#41;&#41;
    &#41;;
    
    //
    // This enables the forum/topic title to be output for posting
    // but not for privmsg &#40;where it makes no sense&#41;
    //
    $template->assign_block_vars&#40;'switch_not_privmsg', array&#40;&#41;&#41;;
    
    //
    // Output the data to the template
    //
    $template->assign_vars&#40;array&#40;
    	'USERNAME' => $username,
    	'SUBJECT' => $subject,
    	'MESSAGE' => $message,
    	'HTML_STATUS' => $html_status,
    	'BBCODE_STATUS' => sprintf&#40;$bbcode_status, '', ''&#41;,
    	'SMILIES_STATUS' => $smilies_status,
    
    	'L_SUBJECT' => $lang&#91;'Subject'&#93;,
    	'L_MESSAGE_BODY' => $lang&#91;'Message_body'&#93;,
    	'L_OPTIONS' => $lang&#91;'Options'&#93;,
    	'L_PREVIEW' => $lang&#91;'Preview'&#93;,
    	'L_SPELLCHECK' => $lang&#91;'Spellcheck'&#93;,
    	'L_SUBMIT' => $lang&#91;'Submit'&#93;,
    	'L_CANCEL' => $lang&#91;'Cancel'&#93;,
    	'L_CONFIRM_DELETE' => $lang&#91;'Confirm_delete'&#93;,
    	'L_DISABLE_HTML' => $lang&#91;'Disable_HTML_post'&#93;,
    	'L_DISABLE_BBCODE' => $lang&#91;'Disable_BBCode_post'&#93;,
    	'L_DISABLE_SMILIES' => $lang&#91;'Disable_Smilies_post'&#93;,
    	'L_ATTACH_SIGNATURE' => $lang&#91;'Attach_signature'&#93;,
    	'L_NOTIFY_ON_REPLY' => $lang&#91;'Notify'&#93;,
    	'L_DELETE_POST' => $lang&#91;'Delete_post'&#93;,
    
    	'L_BBCODE_B_HELP' => $lang&#91;'bbcode_b_help'&#93;,
    	'L_BBCODE_I_HELP' => $lang&#91;'bbcode_i_help'&#93;,
    	'L_BBCODE_U_HELP' => $lang&#91;'bbcode_u_help'&#93;,
    	'L_BBCODE_Q_HELP' => $lang&#91;'bbcode_q_help'&#93;,
    	'L_BBCODE_C_HELP' => $lang&#91;'bbcode_c_help'&#93;,
    	'L_BBCODE_L_HELP' => $lang&#91;'bbcode_l_help'&#93;,
    	'L_BBCODE_O_HELP' => $lang&#91;'bbcode_o_help'&#93;,
    	'L_BBCODE_P_HELP' => $lang&#91;'bbcode_p_help'&#93;,
    	'L_BBCODE_W_HELP' => $lang&#91;'bbcode_w_help'&#93;,
    	'L_BBCODE_A_HELP' => $lang&#91;'bbcode_a_help'&#93;,
    	'L_BBCODE_S_HELP' => $lang&#91;'bbcode_s_help'&#93;,
    	'L_BBCODE_F_HELP' => $lang&#91;'bbcode_f_help'&#93;,
    	'L_EMPTY_MESSAGE' => $lang&#91;'Empty_message'&#93;,
    
    	'L_FONT_COLOR' => $lang&#91;'Font_color'&#93;,
    	'L_COLOR_DEFAULT' => $lang&#91;'color_default'&#93;,
    	'L_COLOR_DARK_RED' => $lang&#91;'color_dark_red'&#93;,
    	'L_COLOR_RED' => $lang&#91;'color_red'&#93;,
    	'L_COLOR_ORANGE' => $lang&#91;'color_orange'&#93;,
    	'L_COLOR_BROWN' => $lang&#91;'color_brown'&#93;,
    	'L_COLOR_YELLOW' => $lang&#91;'color_yellow'&#93;,
    	'L_COLOR_GREEN' => $lang&#91;'color_green'&#93;,
    	'L_COLOR_OLIVE' => $lang&#91;'color_olive'&#93;,
    	'L_COLOR_CYAN' => $lang&#91;'color_cyan'&#93;,
    	'L_COLOR_BLUE' => $lang&#91;'color_blue'&#93;,
    	'L_COLOR_DARK_BLUE' => $lang&#91;'color_dark_blue'&#93;,
    	'L_COLOR_INDIGO' => $lang&#91;'color_indigo'&#93;,
    	'L_COLOR_VIOLET' => $lang&#91;'color_violet'&#93;,
    	'L_COLOR_WHITE' => $lang&#91;'color_white'&#93;,
    	'L_COLOR_BLACK' => $lang&#91;'color_black'&#93;,
    
    	'L_FONT_SIZE' => $lang&#91;'Font_size'&#93;,
    	'L_FONT_TINY' => $lang&#91;'font_tiny'&#93;,
    	'L_FONT_SMALL' => $lang&#91;'font_small'&#93;,
    	'L_FONT_NORMAL' => $lang&#91;'font_normal'&#93;,
    	'L_FONT_LARGE' => $lang&#91;'font_large'&#93;,
    	'L_FONT_HUGE' => $lang&#91;'font_huge'&#93;,
    
    	'L_BBCODE_CLOSE_TAGS' => $lang&#91;'Close_Tags'&#93;,
    	'L_STYLES_TIP' => $lang&#91;'Styles_tip'&#93;,
    
    	'U_VIEWTOPIC' => &#40; $mode == 'reply' &#41; ? append_sid&#40;"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postorder=desc"&#41; &#58; '',
    	'U_REVIEW_TOPIC' => &#40; $mode == 'reply' &#41; ? append_sid&#40;"posting.$phpEx?mode=topicreview&amp;" . POST_TOPIC_URL . "=$topic_id"&#41; &#58; '',
    
    	'S_HTML_CHECKED' => &#40; !$html_on &#41; ? 'checked="checked"' &#58; '',
    	'S_BBCODE_CHECKED' => &#40; !$bbcode_on &#41; ? 'checked="checked"' &#58; '',
    	'S_SMILIES_CHECKED' => &#40; !$smilies_on &#41; ? 'checked="checked"' &#58; '',
    	'S_SIGNATURE_CHECKED' => &#40; $attach_sig &#41; ? 'checked="checked"' &#58; '',
    	'S_NOTIFY_CHECKED' => &#40; $notify_user &#41; ? 'checked="checked"' &#58; '',
    	'S_TYPE_TOGGLE' => $topic_type_toggle,
    	'S_TOPIC_ID' => $topic_id,
    	'S_POST_ACTION' => append_sid&#40;"posting.$phpEx"&#41;,
    	'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields&#41;
    &#41;;
    
    //
    // Poll entry switch/output
    //
    if&#40; &#40; $mode == 'newtopic' || &#40; $mode == 'editpost' && $post_data&#91;'edit_poll'&#93;&#41; &#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41;
    &#123;
    	$template->assign_vars&#40;array&#40;
    		'L_ADD_A_POLL' => $lang&#91;'Add_poll'&#93;,
    		'L_ADD_POLL_EXPLAIN' => $lang&#91;'Add_poll_explain'&#93;,
    		'L_POLL_QUESTION' => $lang&#91;'Poll_question'&#93;,
    		'L_POLL_OPTION' => $lang&#91;'Poll_option'&#93;,
    		'L_ADD_OPTION' => $lang&#91;'Add_option'&#93;,
    		'L_UPDATE_OPTION' => $lang&#91;'Update'&#93;,
    		'L_DELETE_OPTION' => $lang&#91;'Delete'&#93;,
    		'L_POLL_LENGTH' => $lang&#91;'Poll_for'&#93;,
    		'L_DAYS' => $lang&#91;'Days'&#93;,
    		'L_POLL_LENGTH_EXPLAIN' => $lang&#91;'Poll_for_explain'&#93;,
    		'L_POLL_DELETE' => $lang&#91;'Delete_poll'&#93;,
    
    		'POLL_TITLE' => $poll_title,
    		'POLL_LENGTH' => $poll_length&#41;
    	&#41;;
    
    	if&#40; $mode == 'editpost' && $post_data&#91;'edit_poll'&#93; && $post_data&#91;'has_poll'&#93;&#41;
    	&#123;
    		$template->assign_block_vars&#40;'switch_poll_delete_toggle', array&#40;&#41;&#41;;
    	&#125;
    
    	if&#40; !empty&#40;$poll_options&#41; &#41;
    	&#123;
    		while&#40; list&#40;$option_id, $option_text&#41; = each&#40;$poll_options&#41; &#41;
    		&#123;
    			$template->assign_block_vars&#40;'poll_option_rows', array&#40;
    				'POLL_OPTION' => str_replace&#40;'"', '&quot;', $option_text&#41;,
    
    				'S_POLL_OPTION_NUM' => $option_id&#41;
    			&#41;;
    		&#125;
    	&#125;
    
    	$template->assign_var_from_handle&#40;'POLLBOX', 'pollbody'&#41;;
    &#125;
    
    //
    // Topic review
    //
    if&#40; $mode == 'reply' && $is_auth&#91;'auth_read'&#93; &#41;
    &#123;
    	require&#40;$phpbb_root_path . 'includes/topic_review.'.$phpEx&#41;;
    	topic_review&#40;$topic_id, true&#41;;
    
    	$template->assign_block_vars&#40;'switch_inline_mode', array&#40;&#41;&#41;;
    	$template->assign_var_from_handle&#40;'TOPIC_REVIEW_BOX', 'reviewbody'&#41;;
    &#125;
    
    $template->pparse&#40;'body'&#41;;
    
    include&#40;$phpbb_root_path . 'includes/page_tail.'.$phpEx&#41;;
    
    ?>

  8. #8
    Kaiserliche Hoheit
    Registriert seit
    25.08.2005
    Ort
    Tjah
    Beiträge
    1.643
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard Re: sd

    Zitat Zitat von sd
    Zitat Zitat von admin
    Die Sprachpackete findet man auch hier
    http://www.phpbb.com/downloads.php
    danke,habe alles gefunden
    Auch wenn der verbannt wurde,konnte ich noch im Cache alles anschauen ...

    Nun aber ein neues Problem mit diesem Cashmod(unteres Thema):

    Code:
    Parse error&#58; syntax error, unexpected ';' in /usr/export/www/vhosts/funnetwork/hosting/phpdz/forum/phpBB2/posting.php on line 293
    Die Anleitung für Cashmod:
    #-----[ OPEN ]------------------------------------------
    #
    posting.php

    #
    #-----[ FIND ]------------------------------------------
    #
    define('IN_PHPBB', true);

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    define('IN_CASHMOD', true);
    define('CM_POSTING', true);

    #
    #-----[ FIND ]------------------------------------------
    #
    $sql = "SELECT f.*, t.topic_status, t.topic_title

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    t.topic_title

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , t.topic_poster

    #
    #-----[ FIND ]------------------------------------------
    #
    $select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    $temp = $submit;
    $submit = !(!$submit || ( isset($board_config['cash_disable']) && !$board_config['cash_disable'] && (($mode == 'editpost') || ($mode == 'delete'))));

    #
    #-----[ FIND ]------------------------------------------
    #
    $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $submit = $temp;
    unset($temp);

    #
    #-----[ FIND ]------------------------------------------
    #
    $post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    $post_data['post_text'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['post_text'] : '';
    $post_data['bbcode_uid'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['bbcode_uid'] : '';

    #
    #-----[ FIND ]------------------------------------------
    #
    $post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    $post_data['topic_poster'] = ( $mode == 'reply' ) ? $post_info['topic_poster'] : 0;
    Und noch mein posting.php:

    Code:
    <?php
    /***************************************************************************
     *                                posting.php
     *                            -------------------
     *   begin                &#58; Saturday, Feb 13, 2001
     *   copyright            &#58; &#40;C&#41; 2001 The phpBB Group
     *   email                &#58; >> Edit by Admin &#58;Das Posten von Email-Adressen ist hier nicht gestattet <<<phpbb.com
     *
     *   $Id&#58; posting.php,v 1.159.2.28 2006/01/28 14&#58;56&#58;51 grahamje Exp $
     *
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *   This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   &#40;at your option&#41; any later version.
     *
     ***************************************************************************/
    
    define&#40;'IN_PHPBB', true&#41;;
    define&#40;'IN_CASHMOD', true&#41;;
    define&#40;'CM_POSTING', true&#41;;
    $phpbb_root_path = './';
    include&#40;$phpbb_root_path . 'extension.inc'&#41;;
    include&#40;$phpbb_root_path . 'common.'.$phpEx&#41;;
    include&#40;$phpbb_root_path . 'includes/bbcode.'.$phpEx&#41;;
    include&#40;$phpbb_root_path . 'includes/functions_post.'.$phpEx&#41;;
    
    //
    // Check and set various parameters
    //
    $params = array&#40;'submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode'&#41;;
    while&#40; list&#40;$var, $param&#41; = @each&#40;$params&#41; &#41;
    &#123;
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; || !empty&#40;$HTTP_GET_VARS&#91;$param&#93;&#41; &#41;
    	&#123;
    		$$var = &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#41; ? htmlspecialchars&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#58; htmlspecialchars&#40;$HTTP_GET_VARS&#91;$param&#93;&#41;;
    	&#125;
    	else
    	&#123;
    		$$var = '';
    	&#125;
    &#125;
    
    $confirm = isset&#40;$HTTP_POST_VARS&#91;'confirm'&#93;&#41; ? true &#58; false;
    
    $params = array&#40;'forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL&#41;;
    while&#40; list&#40;$var, $param&#41; = @each&#40;$params&#41; &#41;
    &#123;
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; || !empty&#40;$HTTP_GET_VARS&#91;$param&#93;&#41; &#41;
    	&#123;
    		$$var = &#40; !empty&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#41; ? intval&#40;$HTTP_POST_VARS&#91;$param&#93;&#41; &#58; intval&#40;$HTTP_GET_VARS&#91;$param&#93;&#41;;
    	&#125;
    	else
    	&#123;
    		$$var = '';
    	&#125;
    &#125;
    
    $refresh = $preview || $poll_add || $poll_edit || $poll_delete;
    $orig_word = $replacement_word = array&#40;&#41;;
    
    //
    // Set topic type
    //
    $topic_type = &#40; !empty&#40;$HTTP_POST_VARS&#91;'topictype'&#93;&#41; &#41; ? intval&#40;$HTTP_POST_VARS&#91;'topictype'&#93;&#41; &#58; POST_NORMAL;
    $topic_type = &#40; in_array&#40;$topic_type, array&#40;POST_NORMAL, POST_STICKY, POST_ANNOUNCE&#41;&#41; &#41; ? $topic_type &#58; POST_NORMAL;
    
    //
    // If the mode is set to topic review then output
    // that review ...
    //
    if &#40; $mode == 'topicreview' &#41;
    &#123;
    	require&#40;$phpbb_root_path . 'includes/topic_review.'.$phpEx&#41;;
    
    	topic_review&#40;$topic_id, false&#41;;
    	exit;
    &#125;
    else if &#40; $mode == 'smilies' &#41;
    &#123;
    	generate_smilies&#40;'window', PAGE_POSTING&#41;;
    	exit;
    &#125;
    
    //
    // Start session management
    //
    $userdata = session_pagestart&#40;$user_ip, PAGE_POSTING&#41;;
    init_userprefs&#40;$userdata&#41;;
    //
    // End session management
    //
    
    //
    // Was cancel pressed? If so then redirect to the appropriate
    // page, no point in continuing with any further checks
    //
    if &#40; isset&#40;$HTTP_POST_VARS&#91;'cancel'&#93;&#41; &#41;
    &#123;
    	if &#40; $post_id &#41;
    	&#123;
    		$redirect = "viewtopic.$phpEx?" . POST_POST_URL . "=$post_id";
    		$post_append = "#$post_id";
    	&#125;
    	else if &#40; $topic_id &#41;
    	&#123;
    		$redirect = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
    		$post_append = '';
    	&#125;
    	else if &#40; $forum_id &#41;
    	&#123;
    		$redirect = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
    		$post_append = '';
    	&#125;
    	else
    	&#123;
    		$redirect = "index.$phpEx";
    		$post_append = '';
    	&#125;
    
    	redirect&#40;append_sid&#40;$redirect, true&#41; . $post_append&#41;;
    &#125;
    
    //
    // What auth type do we need to check?
    //
    $is_auth = array&#40;&#41;;
    switch&#40; $mode &#41;
    &#123;
    	case 'newtopic'&#58;
    		if &#40; $topic_type == POST_ANNOUNCE &#41;
    		&#123;
    			$is_auth_type = 'auth_announce';
    		&#125;
    		else if &#40; $topic_type == POST_STICKY &#41;
    		&#123;
    			$is_auth_type = 'auth_sticky';
    		&#125;
    		else
    		&#123;
    			$is_auth_type = 'auth_post';
    		&#125;
    		break;
    	case 'reply'&#58;
    	case 'quote'&#58;
    		$is_auth_type = 'auth_reply';
    		break;
    	case 'editpost'&#58;
    		$is_auth_type = 'auth_edit';
    		break;
    	case 'delete'&#58;
    	case 'poll_delete'&#58;
    		$is_auth_type = 'auth_delete';
    		break;
    	case 'vote'&#58;
    		$is_auth_type = 'auth_vote';
    		break;
    	case 'topicreview'&#58;
    		$is_auth_type = 'auth_read';
    		break;
    	default&#58;
    		message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_post_mode'&#93;&#41;;
    		break;
    &#125;
    
    //
    // Here we do various lookups to find topic_id, forum_id, post_id etc.
    // Doing it here prevents spoofing &#40;eg. faking forum_id, topic_id or post_id
    //
    $error_msg = '';
    $post_data = array&#40;&#41;;
    switch &#40; $mode &#41;
    &#123;
    	case 'newtopic'&#58;
    		if &#40; empty&#40;$forum_id&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'Forum_not_exist'&#93;&#41;;
    		&#125;
    
    		$sql = "SELECT *
    			FROM " . FORUMS_TABLE . "
    			WHERE forum_id = $forum_id";
    		break;
    
    	case 'reply'&#58;
    	case 'vote'&#58;
    		if &#40; empty&#40; $topic_id&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_topic_id'&#93;&#41;;
    		&#125;
    
    		$sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_poster, t.topic_type
    			FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
    			WHERE t.topic_id = $topic_id
    				AND f.forum_id = t.forum_id";
    		break;
    
    	case 'quote'&#58;
    	case 'editpost'&#58;
    	case 'delete'&#58;
    	case 'poll_delete'&#58;
    		if &#40; empty&#40;$post_id&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_post_id'&#93;&#41;;
    		&#125;
    
                     $temp = $submit;
    		$submit = !&#40;!$submit || &#40; isset&#40;$board_config&#91;'cash_disable'&#93;&#41; && !$board_config&#91;'cash_disable'&#93; && &#40;&#40;$mode == 'editpost'&#41; || &#40;$mode == 'delete'&#41;&#41;&#41;&#41;;
                     $select_sql = &#40;!$submit&#41; ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' &#58; '';
    		$from_sql = &#40; !$submit &#41; ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" &#58; '';
    		$where_sql = &#40; !$submit &#41; ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" &#58; '';
                     $submit = $temp;
    		unset&#40;$temp&#41;;
    
    		$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
    			FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
    			WHERE p.post_id = $post_id
    				AND t.topic_id = p.topic_id
    				AND f.forum_id = p.forum_id
    				$where_sql";
    		break;
    
    	default&#58;
    		message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_valid_mode'&#93;&#41;;
    &#125;
    
    if &#40; $result = $db->sql_query&#40;$sql&#41; &#41;
    &#123;
    	$post_info = $db->sql_fetchrow&#40;$result&#41;;
    	$db->sql_freeresult&#40;$result&#41;;
    
    	$forum_id = $post_info&#91;'forum_id'&#93;;
    	$forum_name = $post_info&#91;'forum_name'&#93;;
    
    	$is_auth = auth&#40;AUTH_ALL, $forum_id, $userdata, $post_info&#41;;
    
    	if &#40; $post_info&#91;'forum_status'&#93; == FORUM_LOCKED && !$is_auth&#91;'auth_mod'&#93;&#41;
    	&#123;
    	   message_die&#40;GENERAL_MESSAGE, $lang&#91;'Forum_locked'&#93;&#41;;
    	&#125;
    	else if &#40; $mode != 'newtopic' && $post_info&#91;'topic_status'&#93; == TOPIC_LOCKED && !$is_auth&#91;'auth_mod'&#93;&#41;
    	&#123;
    	   message_die&#40;GENERAL_MESSAGE, $lang&#91;'Topic_locked'&#93;&#41;;
    	&#125;
    
    	if &#40; $mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete' &#41;
    	&#123;
    		$topic_id = $post_info&#91;'topic_id'&#93;;
    
                     $post_data&#91;'post_text'&#93; = &#40; &#40;$mode == 'editpost'&#41; || &#40;$mode == 'delete'&#41; &#41; ? $post_info&#91;'post_text'&#93; &#58; '';
    		$post_data&#91;'bbcode_uid'&#93; = &#40; &#40;$mode == 'editpost'&#41; || &#40;$mode == 'delete'&#41; &#41; ? $post_info&#91;'bbcode_uid'&#93; &#58; '';
                     $post_data&#91;'poster_post'&#93; = &#40; $post_info&#91;'poster_id'&#93; == $userdata&#91;'user_id'&#93; &#41; ? true &#58; false;
    		$post_data&#91;'first_post'&#93; = &#40; $post_info&#91;'topic_first_post_id'&#93; == $post_id &#41; ? true &#58; false;
    		$post_data&#91;'last_post'&#93; = &#40; $post_info&#91;'topic_last_post_id'&#93; == $post_id &#41; ? true &#58; false;
    		$post_data&#91;'last_topic'&#93; = &#40; $post_info&#91;'forum_last_post_id'&#93; == $post_id &#41; ? true &#58; false;
    		$post_data&#91;'has_poll'&#93; = &#40; $post_info&#91;'topic_vote'&#93; &#41; ? true &#58; false;
    		$post_data&#91;'topic_type'&#93; = $post_info&#91;'topic_type'&#93;;
    		$post_data&#91;'poster_id'&#93; = $post_info&#91;'poster_id'&#93;;
    
    		if &#40; $post_data&#91;'first_post'&#93; && $post_data&#91;'has_poll'&#93; &#41;
    		&#123;
    			$sql = "SELECT *
    				FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
    				WHERE vd.topic_id = $topic_id
    					AND vr.vote_id = vd.vote_id
    				ORDER BY vr.vote_option_id";
    			if &#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41;
    			&#123;
    				message_die&#40;GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql&#41;;
    			&#125;
    
    			$poll_options = array&#40;&#41;;
    			$poll_results_sum = 0;
    			if &#40; $row = $db->sql_fetchrow&#40;$result&#41; &#41;
    			&#123;
    				$poll_title = $row&#91;'vote_text'&#93;;
    				$poll_id = $row&#91;'vote_id'&#93;;
    				$poll_length = $row&#91;'vote_length'&#93; / 86400;
    
    				do
    				&#123;
    					$poll_options&#91;$row&#91;'vote_option_id'&#93;&#93; = $row&#91;'vote_option_text'&#93;;
    					$poll_results_sum += $row&#91;'vote_result'&#93;;
    				&#125;
    				while &#40; $row = $db->sql_fetchrow&#40;$result&#41; &#41;;
    			&#125;
    			$db->sql_freeresult&#40;$result&#41;;
    
    			$post_data&#91;'edit_poll'&#93; = &#40; &#40; !$poll_results_sum || $is_auth&#91;'auth_mod'&#93; &#41; && $post_data&#91;'topic_poster'&#93; = &#40; $mode == 'reply' &#41; ? $post_info&#91;'topic_poster'&#93; &#58; 0;
                             $post_data&#91;'first_post'&#93; &#41; ? true &#58; 0;
    		&#125;
    		else
    		&#123;
    			$post_data&#91;'edit_poll'&#93; = &#40;$post_data&#91;'first_post'&#93; && $is_auth&#91;'auth_pollcreate'&#93;&#41; ? true &#58; false;
    		&#125;
    
    		//
    		// Can this user edit/delete the post/poll?
    		//
    		if &#40; $post_info&#91;'poster_id'&#93; != $userdata&#91;'user_id'&#93; && !$is_auth&#91;'auth_mod'&#93; &#41;
    		&#123;
    			$message = &#40; $delete || $mode == 'delete' &#41; ? $lang&#91;'Delete_own_posts'&#93; &#58; $lang&#91;'Edit_own_posts'&#93;;
    			$message .= '
    
    ' . sprintf&#40;$lang&#91;'Click_return_topic'&#93;, '', ''&#41;;
    
    			message_die&#40;GENERAL_MESSAGE, $message&#41;;
    		&#125;
    		else if &#40; !$post_data&#91;'last_post'&#93; && !$is_auth&#91;'auth_mod'&#93; && &#40; $mode == 'delete' || $delete &#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'Cannot_delete_replied'&#93;&#41;;
    		&#125;
    		else if &#40; !$post_data&#91;'edit_poll'&#93; && !$is_auth&#91;'auth_mod'&#93; && &#40; $mode == 'poll_delete' || $poll_delete &#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_MESSAGE, $lang&#91;'Cannot_delete_poll'&#93;&#41;;
    		&#125;
    	&#125;
    	else
    	&#123;
    		if &#40; $mode == 'quote' &#41;
    		&#123;
    			$topic_id = $post_info&#91;'topic_id'&#93;;
    		&#125;
    		if &#40; $mode == 'newtopic' &#41;
    		&#123;
    			$post_data&#91;'topic_type'&#93; = POST_NORMAL;
    		&#125;
    
    		$post_data&#91;'first_post'&#93; = &#40; $mode == 'newtopic' &#41; ? true &#58; 0;
    		$post_data&#91;'last_post'&#93; = false;
    		$post_data&#91;'has_poll'&#93; = false;
    		$post_data&#91;'edit_poll'&#93; = false;
    	&#125;
    	if &#40; $mode == 'poll_delete' && !isset&#40;$poll_id&#41; &#41;
    	&#123;
    		message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_such_post'&#93;&#41;;
    	&#125;
    &#125;
    else
    &#123;
    	message_die&#40;GENERAL_MESSAGE, $lang&#91;'No_such_post'&#93;&#41;;
    &#125;
    
    //
    // The user is not authed, if they're not logged in then redirect
    // them, else show them an error message
    //
    if &#40; !$is_auth&#91;$is_auth_type&#93; &#41;
    &#123;
    	if &#40; $userdata&#91;'session_logged_in'&#93; &#41;
    	&#123;
    		message_die&#40;GENERAL_MESSAGE, sprintf&#40;$lang&#91;'Sorry_' . $is_auth_type&#93;, $is_auth&#91;$is_auth_type . "_type"&#93;&#41;&#41;;
    	&#125;
    
    	switch&#40; $mode &#41;
    	&#123;
    		case 'newtopic'&#58;
    			$redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;
    			break;
    		case 'reply'&#58;
    		case 'topicreview'&#58;
    			$redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;
    			break;
    		case 'quote'&#58;
    		case 'editpost'&#58;
    			$redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;
    			break;
    	&#125;
    
    	redirect&#40;append_sid&#40;"login.$phpEx?redirect=posting.$phpEx&" . $redirect, true&#41;&#41;;
    &#125;
    
    //
    // Set toggles for various options
    //
    if &#40; !$board_config&#91;'allow_html'&#93; &#41;
    &#123;
    	$html_on = 0;
    &#125;
    else
    &#123;
    	$html_on = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'disable_html'&#93;&#41; &#41; ? 0 &#58; TRUE &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? $board_config&#91;'allow_html'&#93; &#58; $userdata&#91;'user_allowhtml'&#93; &#41;;
    &#125;
    
    if &#40; !$board_config&#91;'allow_bbcode'&#93; &#41;
    &#123;
    	$bbcode_on = 0;
    &#125;
    else
    &#123;
    	$bbcode_on = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'disable_bbcode'&#93;&#41; &#41; ? 0 &#58; TRUE &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? $board_config&#91;'allow_bbcode'&#93; &#58; $userdata&#91;'user_allowbbcode'&#93; &#41;;
    &#125;
    
    if &#40; !$board_config&#91;'allow_smilies'&#93; &#41;
    &#123;
    	$smilies_on = 0;
    &#125;
    else
    &#123;
    	$smilies_on = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'disable_smilies'&#93;&#41; &#41; ? 0 &#58; TRUE &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? $board_config&#91;'allow_smilies'&#93; &#58; $userdata&#91;'user_allowsmile'&#93; &#41;;
    &#125;
    
    if &#40; &#40;$submit || $refresh&#41; && $is_auth&#91;'auth_read'&#93;&#41;
    &#123;
    	$notify_user = &#40; !empty&#40;$HTTP_POST_VARS&#91;'notify'&#93;&#41; &#41; ? TRUE &#58; 0;
    &#125;
    else
    &#123;
    	if &#40; $mode != 'newtopic' && $userdata&#91;'session_logged_in'&#93; && $is_auth&#91;'auth_read'&#93; &#41;
    	&#123;
    		$sql = "SELECT topic_id
    			FROM " . TOPICS_WATCH_TABLE . "
    			WHERE topic_id = $topic_id
    				AND user_id = " . $userdata&#91;'user_id'&#93;;
    		if &#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql&#41;;
    		&#125;
    
    		$notify_user = &#40; $db->sql_fetchrow&#40;$result&#41; &#41; ? TRUE &#58; $userdata&#91;'user_notify'&#93;;
    		$db->sql_freeresult&#40;$result&#41;;
    	&#125;
    	else
    	&#123;
    		$notify_user = &#40; $userdata&#91;'session_logged_in'&#93; && $is_auth&#91;'auth_read'&#93; &#41; ? $userdata&#91;'user_notify'&#93; &#58; 0;
    	&#125;
    &#125;
    
    $attach_sig = &#40; $submit || $refresh &#41; ? &#40; &#40; !empty&#40;$HTTP_POST_VARS&#91;'attach_sig'&#93;&#41; &#41; ? TRUE &#58; 0 &#41; &#58; &#40; &#40; $userdata&#91;'user_id'&#93; == ANONYMOUS &#41; ? 0 &#58; $userdata&#91;'user_attachsig'&#93; &#41;;
    
    // --------------------
    //  What shall we do?
    //
    if &#40; &#40; $delete || $poll_delete || $mode == 'delete' &#41; && !$confirm &#41;
    &#123;
    	//
    	// Confirm deletion
    	//
    	$s_hidden_fields = '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
    	$s_hidden_fields .= &#40; $delete || $mode == "delete" &#41; ? '<input type="hidden" name="mode" value="delete" />' &#58; '<input type="hidden" name="mode" value="poll_delete" />';
    
    	$l_confirm = &#40; $delete || $mode == 'delete' &#41; ? $lang&#91;'Confirm_delete'&#93; &#58; $lang&#91;'Confirm_delete_poll'&#93;;
    
    	//
    	// Output confirmation page
    	//
    	include&#40;$phpbb_root_path . 'includes/page_header.'.$phpEx&#41;;
    
    	$template->set_filenames&#40;array&#40;
    		'confirm_body' => 'confirm_body.tpl'&#41;
    	&#41;;
    
    	$template->assign_vars&#40;array&#40;
    		'MESSAGE_TITLE' => $lang&#91;'Information'&#93;,
    		'MESSAGE_TEXT' => $l_confirm,
    
    		'L_YES' => $lang&#91;'Yes'&#93;,
    		'L_NO' => $lang&#91;'No'&#93;,
    
    		'S_CONFIRM_ACTION' => append_sid&#40;"posting.$phpEx"&#41;,
    		'S_HIDDEN_FIELDS' => $s_hidden_fields&#41;
    	&#41;;
    
    	$template->pparse&#40;'confirm_body'&#41;;
    
    	include&#40;$phpbb_root_path . 'includes/page_tail.'.$phpEx&#41;;
    &#125;
    else if &#40; $mode == 'vote' &#41;
    &#123;
    	//
    	// Vote in a poll
    	//
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;'vote_id'&#93;&#41; &#41;
    	&#123;
    		$vote_option_id = intval&#40;$HTTP_POST_VARS&#91;'vote_id'&#93;&#41;;
    
    		$sql = "SELECT vd.vote_id
    			FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
    			WHERE vd.topic_id = $topic_id
    				AND vr.vote_id = vd.vote_id
    				AND vr.vote_option_id = $vote_option_id
    			GROUP BY vd.vote_id";
    		if &#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41;
    		&#123;
    			message_die&#40;GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql&#41;;
    		&#125;
    
    		if &#40; $vote_info = $db->sql_fetchrow&#40;$result&#41; &#41;
    		&#123;
    			$vote_id = $vote_info&#91;'vote_id'&#93;;
    
    			$sql = "SELECT *
    				FROM " . VOTE_USERS_TABLE . "
    				WHERE vote_id = $vote_id
    					AND vote_user_id = " . $userdata&#91;'user_id'&#93;;
    			if &#40; !&#40;$result2 = $db->sql_query&#40;$sql&#41;&#41; &#41;
    			&#123;
    				message_die&#40;GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql&#41;;
    			&#125;
    
    			if &#40; !&#40;$row = $db->sql_fetchrow&#40;$result2&#41;&#41; &#41;
    			&#123;
    				$sql = "UPDATE " . VOTE_RESULTS_TABLE . "
    					SET vote_result = vote_result + 1
    					WHERE vote_id = $vote_id
    						AND vote_option_id = $vote_option_id";
    				if &#40; !$db->sql_query&#40;$sql, BEGIN_TRANSACTION&#41; &#41;
    				&#123;
    					message_die&#40;GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql&#41;;
    				&#125;
    
    				$sql = "INSERT INTO " . VOTE_USERS_TABLE . " &#40;vote_id, vote_user_id, vote_user_ip&#41;
    					VALUES &#40;$vote_id, " . $userdata&#91;'user_id'&#93; . ", '$user_ip'&#41;";
    				if &#40; !$db->sql_query&#40;$sql, END_TRANSACTION&#41; &#41;
    				&#123;
    					message_die&#40;GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql&#41;;
    				&#125;
    
    				$message = $lang&#91;'Vote_cast'&#93;;
    			&#125;
    			else
    			&#123;
    				$message = $lang&#91;'Already_voted'&#93;;
    			&#125;
    			$db->sql_freeresult&#40;$result2&#41;;
    		&#125;
    		else
    		&#123;
    			$message = $lang&#91;'No_vote_option'&#93;;
    		&#125;
    		$db->sql_freeresult&#40;$result&#41;;
    
    		$template->assign_vars&#40;array&#40;
    			'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid&#40;"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"&#41; . '">'&#41;
    		&#41;;
    		$message .=  '
    
    ' . sprintf&#40;$lang&#91;'Click_view_message'&#93;, '', ''&#41;;
    		message_die&#40;GENERAL_MESSAGE, $message&#41;;
    	&#125;
    	else
    	&#123;
    		redirect&#40;append_sid&#40;"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true&#41;&#41;;
    	&#125;
    &#125;
    else if &#40; $submit || $confirm &#41;
    &#123;
    	//
    	// Submit post/vote &#40;newtopic, edit, reply, etc.&#41;
    	//
    	$return_message = '';
    	$return_meta = '';
    
    	switch &#40; $mode &#41;
    	&#123;
    		case 'editpost'&#58;
    		case 'newtopic'&#58;
    		case 'reply'&#58;
    			$username = &#40; !empty&#40;$HTTP_POST_VARS&#91;'username'&#93;&#41; &#41; ? $HTTP_POST_VARS&#91;'username'&#93; &#58; '';
    			$subject = &#40; !empty&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41; &#41; ? trim&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41; &#58; '';
    			$message = &#40; !empty&#40;$HTTP_POST_VARS&#91;'message'&#93;&#41; &#41; ? $HTTP_POST_VARS&#91;'message'&#93; &#58; '';
    			$poll_title = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_title'&#93;&#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41; ? $HTTP_POST_VARS&#91;'poll_title'&#93; &#58; '';
    			$poll_options = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_option_text'&#93;&#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41; ? $HTTP_POST_VARS&#91;'poll_option_text'&#93; &#58; '';
    			$poll_length = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_length'&#93;&#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41; ? $HTTP_POST_VARS&#91;'poll_length'&#93; &#58; '';
    			$bbcode_uid = '';
    
    			prepare_post&#40;$mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length&#41;;
    
    			if &#40; $error_msg == '' &#41;
    			&#123;
    				$topic_type = &#40; $topic_type != $post_data&#91;'topic_type'&#93; && !$is_auth&#91;'auth_sticky'&#93; && !$is_auth&#91;'auth_announce'&#93; &#41; ? $post_data&#91;'topic_type'&#93; &#58; $topic_type;
    
    				submit_post&#40;$mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace&#40;"\'", "''", $username&#41;, str_replace&#40;"\'", "''", $subject&#41;, str_replace&#40;"\'", "''", $message&#41;, str_replace&#40;"\'", "''", $poll_title&#41;, $poll_options, $poll_length&#41;;
    			&#125;
    			break;
    
    		case 'delete'&#58;
    		case 'poll_delete'&#58;
    			delete_post&#40;$mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id&#41;;
    			break;
    	&#125;
    
    	if &#40; $error_msg == '' &#41;
    	&#123;
    		if &#40; $mode != 'editpost' &#41;
    		&#123;
    			$user_id = &#40; $mode == 'reply' || $mode == 'newtopic' &#41; ? $userdata&#91;'user_id'&#93; &#58; $post_data&#91;'poster_id'&#93;;
    			update_post_stats&#40;$mode, $post_data, $forum_id, $topic_id, $post_id, $user_id&#41;;
    		&#125;
    
    		if &#40;$error_msg == '' && $mode != 'poll_delete'&#41;
    		&#123;
    			user_notification&#40;$mode, $post_data, $post_info&#91;'topic_title'&#93;, $forum_id, $topic_id, $post_id, $notify_user&#41;;
    		&#125;
    
    		if &#40; $mode == 'newtopic' || $mode == 'reply' &#41;
    		&#123;
    			$tracking_topics = &#40; !empty&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_t'&#93;&#41; &#41; ? unserialize&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_t'&#93;&#41; &#58; array&#40;&#41;;
    			$tracking_forums = &#40; !empty&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_f'&#93;&#41; &#41; ? unserialize&#40;$HTTP_COOKIE_VARS&#91;$board_config&#91;'cookie_name'&#93; . '_f'&#93;&#41; &#58; array&#40;&#41;;
    
    			if &#40; count&#40;$tracking_topics&#41; + count&#40;$tracking_forums&#41; == 100 && empty&#40;$tracking_topics&#91;$topic_id&#93;&#41; &#41;
    			&#123;
    				asort&#40;$tracking_topics&#41;;
    				unset&#40;$tracking_topics&#91;key&#40;$tracking_topics&#41;&#93;&#41;;
    			&#125;
    
    			$tracking_topics&#91;$topic_id&#93; = time&#40;&#41;;
    
    			setcookie&#40;$board_config&#91;'cookie_name'&#93; . '_t', serialize&#40;$tracking_topics&#41;, 0, $board_config&#91;'cookie_path'&#93;, $board_config&#91;'cookie_domain'&#93;, $board_config&#91;'cookie_secure'&#93;&#41;;
    		&#125;
    
    		$template->assign_vars&#40;array&#40;
    			'META' => $return_meta&#41;
    		&#41;;
    		message_die&#40;GENERAL_MESSAGE, $return_message&#41;;
    	&#125;
    &#125;
    
    if&#40; $refresh || isset&#40;$HTTP_POST_VARS&#91;'del_poll_option'&#93;&#41; || $error_msg != '' &#41;
    &#123;
    	$username = &#40; !empty&#40;$HTTP_POST_VARS&#91;'username'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'username'&#93;&#41;&#41;&#41; &#58; '';
    	$subject = &#40; !empty&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'subject'&#93;&#41;&#41;&#41; &#58; '';
    	$message = &#40; !empty&#40;$HTTP_POST_VARS&#91;'message'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'message'&#93;&#41;&#41;&#41; &#58; '';
    
    	$poll_title = &#40; !empty&#40;$HTTP_POST_VARS&#91;'poll_title'&#93;&#41; &#41; ? htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'poll_title'&#93;&#41;&#41;&#41; &#58; '';
    	$poll_length = &#40; isset&#40;$HTTP_POST_VARS&#91;'poll_length'&#93;&#41; &#41; ? max&#40;0, intval&#40;$HTTP_POST_VARS&#91;'poll_length'&#93;&#41;&#41; &#58; 0;
    
    	$poll_options = array&#40;&#41;;
    	if &#40; !empty&#40;$HTTP_POST_VARS&#91;'poll_option_text'&#93;&#41; &#41;
    	&#123;
    		while&#40; list&#40;$option_id, $option_text&#41; = @each&#40;$HTTP_POST_VARS&#91;'poll_option_text'&#93;&#41; &#41;
    		&#123;
    			if&#40; isset&#40;$HTTP_POST_VARS&#91;'del_poll_option'&#93;&#91;$option_id&#93;&#41; &#41;
    			&#123;
    				unset&#40;$poll_options&#91;$option_id&#93;&#41;;
    			&#125;
    			else if &#40; !empty&#40;$option_text&#41; &#41;
    			&#123;
    				$poll_options&#91;intval&#40;$option_id&#41;&#93; = htmlspecialchars&#40;trim&#40;stripslashes&#40;$option_text&#41;&#41;&#41;;
    			&#125;
    		&#125;
    	&#125;
    
    	if &#40; isset&#40;$poll_add&#41; && !empty&#40;$HTTP_POST_VARS&#91;'add_poll_option_text'&#93;&#41; &#41;
    	&#123;
    		$poll_options&#91;&#93; = htmlspecialchars&#40;trim&#40;stripslashes&#40;$HTTP_POST_VARS&#91;'add_poll_option_text'&#93;&#41;&#41;&#41;;
    	&#125;
    
    	if &#40; $mode == 'newtopic' || $mode == 'reply'&#41;
    	&#123;
    		$user_sig = &#40; $userdata&#91;'user_sig'&#93; != '' && $board_config&#91;'allow_sig'&#93; &#41; ? $userdata&#91;'user_sig'&#93; &#58; '';
    	&#125;
    	else if &#40; $mode == 'editpost' &#41;
    	&#123;
    		$user_sig = &#40; $post_info&#91;'user_sig'&#93; != '' && $board_config&#91;'allow_sig'&#93; &#41; ? $post_info&#91;'user_sig'&#93; &#58; '';
    		$userdata&#91;'user_sig_bbcode_uid'&#93; = $post_info&#91;'user_sig_bbcode_uid'&#93;;
    	&#125;
    
    	if&#40; $preview &#41;
    	&#123;
    		$orig_word = array&#40;&#41;;
    		$replacement_word = array&#40;&#41;;
    		obtain_word_list&#40;$orig_word, $replacement_word&#41;;
    
    		$bbcode_uid = &#40; $bbcode_on &#41; ? make_bbcode_uid&#40;&#41; &#58; '';
    		$preview_message = stripslashes&#40;prepare_message&#40;addslashes&#40;unprepare_message&#40;$message&#41;&#41;, $html_on, $bbcode_on, $smilies_on, $bbcode_uid&#41;&#41;;
    		$preview_subject = $subject;
    		$preview_username = $username;
    
    		//
    		// Finalise processing as per viewtopic
    		//
    		if&#40; !$html_on &#41;
    		&#123;
    			if&#40; $user_sig != '' || !$userdata&#91;'user_allowhtml'&#93; &#41;
    			&#123;
    				$user_sig = preg_replace&#40;'#&#40;<&#41;&#40;&#91;\/&#93;?.*?&#41;&#40;>&#41;#is', '&lt;\2&gt;', $user_sig&#41;;
    			&#125;
    		&#125;
    
    		if&#40; $attach_sig && $user_sig != '' && $userdata&#91;'user_sig_bbcode_uid'&#93; &#41;
    		&#123;
    			$user_sig = bbencode_second_pass&#40;$user_sig, $userdata&#91;'user_sig_bbcode_uid'&#93;&#41;;
    		&#125;
    
    		if&#40; $bbcode_on &#41;
    		&#123;
    			$preview_message = bbencode_second_pass&#40;$preview_message, $bbcode_uid&#41;;
    		&#125;
    
    		if&#40; !empty&#40;$orig_word&#41; &#41;
    		&#123;
    			$preview_username = &#40; !empty&#40;$username&#41; &#41; ? preg_replace&#40;$orig_word, $replacement_word, $preview_username&#41; &#58; '';
    			$preview_subject = &#40; !empty&#40;$subject&#41; &#41; ? preg_replace&#40;$orig_word, $replacement_word, $preview_subject&#41; &#58; '';
    			$preview_message = &#40; !empty&#40;$preview_message&#41; &#41; ? preg_replace&#40;$orig_word, $replacement_word, $preview_message&#41; &#58; '';
    		&#125;
    
    		if&#40; $user_sig != '' &#41;
    		&#123;
    			$user_sig = make_clickable&#40;$user_sig&#41;;
    		&#125;
    		$preview_message = make_clickable&#40;$preview_message&#41;;
    
    		if&#40; $smilies_on &#41;
    		&#123;
    			if&#40; $userdata&#91;'user_allowsmile'&#93; && $user_sig != '' &#41;
    			&#123;
    				$user_sig = smilies_pass&#40;$user_sig&#41;;
    			&#125;
    
    			$preview_message = smilies_pass&#40;$preview_message&#41;;
    		&#125;
    
    		if&#40; $attach_sig && $user_sig != '' &#41;
    		&#123;
    			$preview_message = $preview_message . '
    
    _________________
    ' . $user_sig;
    		&#125;
    
    		$preview_message = str_replace&#40;"\n", '
    ', $preview_message&#41;;
    
    		$template->set_filenames&#40;array&#40;
    			'preview' => 'posting_preview.tpl'&#41;
    		&#41;;
    
    		$template->assign_vars&#40;array&#40;
    			'TOPIC_TITLE' => $preview_subject,
    			'POST_SUBJECT' => $preview_subject,
    			'POSTER_NAME' => $preview_username,
    			'POST_DATE' => create_date&#40;$board_config&#91;'default_dateformat'&#93;, time&#40;&#41;, $board_config&#91;'board_timezone'&#93;&#41;,
    			'MESSAGE' => $preview_message,
    
    			'L_POST_SUBJECT' => $lang&#91;'Post_subject'&#93;,
    			'L_PREVIEW' => $lang&#91;'Preview'&#93;,
    			'L_POSTED' => $lang&#91;'Posted'&#93;,
    			'L_POST' => $lang&#91;'Post'&#93;&#41;
    		&#41;;
    		$template->assign_var_from_handle&#40;'POST_PREVIEW_BOX', 'preview'&#41;;
    	&#125;
    	else if&#40; $error_msg != '' &#41;
    	&#123;
    		$template->set_filenames&#40;array&#40;
    			'reg_header' => 'error_body.tpl'&#41;
    		&#41;;
    		$template->assign_vars&#40;array&#40;
    			'ERROR_MESSAGE' => $error_msg&#41;
    		&#41;;
    		$template->assign_var_from_handle&#40;'ERROR_BOX', 'reg_header'&#41;;
    	&#125;
    &#125;
    else
    &#123;
    	//
    	// User default entry point
    	//
    	if &#40; $mode == 'newtopic' &#41;
    	&#123;
    		$user_sig = &#40; $userdata&#91;'user_sig'&#93; != '' &#41; ? $userdata&#91;'user_sig'&#93; &#58; '';
    
    		$username = &#40;$userdata&#91;'session_logged_in'&#93;&#41; ? $userdata&#91;'username'&#93; &#58; '';
    		$poll_title = '';
    		$poll_length = '';
    		$subject = '';
    		$message = '';
    	&#125;
    	else if &#40; $mode == 'reply' &#41;
    	&#123;
    		$user_sig = &#40; $userdata&#91;'user_sig'&#93; != '' &#41; ? $userdata&#91;'user_sig'&#93; &#58; '';
    
    		$username = &#40; $userdata&#91;'session_logged_in'&#93; &#41; ? $userdata&#91;'username'&#93; &#58; '';
    		$subject = '';
    		$message = '';
    
    	&#125;
    	else if &#40; $mode == 'quote' || $mode == 'editpost' &#41;
    	&#123;
    		$subject = &#40; $post_data&#91;'first_post'&#93; &#41; ? $post_info&#91;'topic_title'&#93; &#58; $post_info&#91;'post_subject'&#93;;
    		$message = $post_info&#91;'post_text'&#93;;
    
    		if &#40; $mode == 'editpost' &#41;
    		&#123;
    			$attach_sig = &#40; $post_info&#91;'enable_sig'&#93; && $post_info&#91;'user_sig'&#93; != '' &#41; ? TRUE &#58; 0;
    			$user_sig = $post_info&#91;'user_sig'&#93;;
    
    			$html_on = &#40; $post_info&#91;'enable_html'&#93; &#41; ? true &#58; false;
    			$bbcode_on = &#40; $post_info&#91;'enable_bbcode'&#93; &#41; ? true &#58; false;
    			$smilies_on = &#40; $post_info&#91;'enable_smilies'&#93; &#41; ? true &#58; false;
    		&#125;
    		else
    		&#123;
    			$attach_sig = &#40; $userdata&#91;'user_attachsig'&#93; &#41; ? TRUE &#58; 0;
    			$user_sig = $userdata&#91;'user_sig'&#93;;
    		&#125;
    
    		if &#40; $post_info&#91;'bbcode_uid'&#93; != '' &#41;
    		&#123;
    			$message = preg_replace&#40;'/\&#58;&#40;&#40;&#91;a-z0-9&#93;&#58;&#41;?&#41;' . $post_info&#91;'bbcode_uid'&#93; . '/s', '', $message&#41;;
    		&#125;
    
    		$message = str_replace&#40;'<', '&lt;', $message&#41;;
    		$message = str_replace&#40;'>', '&gt;', $message&#41;;
    		$message = str_replace&#40;'
    ', "\n", $message&#41;;
    
    		if &#40; $mode == 'quote' &#41;
    		&#123;
    			$orig_word = array&#40;&#41;;
    			$replacement_word = array&#40;&#41;;
    			obtain_word_list&#40;$orig_word, $replace_word&#41;;
    
    			$msg_date =  create_date&#40;$board_config&#91;'default_dateformat'&#93;, $postrow&#91;'post_time'&#93;, $board_config&#91;'board_timezone'&#93;&#41;;
    
    			// Use trim to get rid of spaces placed there by MS-SQL 2000
    			$quote_username = &#40; trim&#40;$post_info&#91;'post_username'&#93;&#41; != '' &#41; ? $post_info&#91;'post_username'&#93; &#58; $post_info&#91;'username'&#93;;
    			$message = '&#91;quote="' . $quote_username . '"&#93;' . $message . '&#91;/quote&#93;';
    
    			if &#40; !empty&#40;$orig_word&#41; &#41;
    			&#123;
    				$subject = &#40; !empty&#40;$subject&#41; &#41; ? preg_replace&#40;$orig_word, $replace_word, $subject&#41; &#58; '';
    				$message = &#40; !empty&#40;$message&#41; &#41; ? preg_replace&#40;$orig_word, $replace_word, $message&#41; &#58; '';
    			&#125;
    
    			if &#40; !preg_match&#40;'/^Re&#58;/', $subject&#41; && strlen&#40;$subject&#41; > 0 &#41;
    			&#123;
    				$subject = 'Re&#58; ' . $subject;
    			&#125;
    
    			$mode = 'reply';
    		&#125;
    		else
    		&#123;
    			$username = &#40; $post_info&#91;'user_id'&#93; == ANONYMOUS && !empty&#40;$post_info&#91;'post_username'&#93;&#41; &#41; ? $post_info&#91;'post_username'&#93; &#58; '';
    		&#125;
    	&#125;
    &#125;
    
    //
    // Signature toggle selection
    //
    if&#40; $user_sig != '' &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_signature_checkbox', array&#40;&#41;&#41;;
    &#125;
    
    //
    // HTML toggle selection
    //
    if &#40; $board_config&#91;'allow_html'&#93; &#41;
    &#123;
    	$html_status = $lang&#91;'HTML_is_ON'&#93;;
    	$template->assign_block_vars&#40;'switch_html_checkbox', array&#40;&#41;&#41;;
    &#125;
    else
    &#123;
    	$html_status = $lang&#91;'HTML_is_OFF'&#93;;
    &#125;
    
    //
    // BBCode toggle selection
    //
    if &#40; $board_config&#91;'allow_bbcode'&#93; &#41;
    &#123;
    	$bbcode_status = $lang&#91;'BBCode_is_ON'&#93;;
    	$template->assign_block_vars&#40;'switch_bbcode_checkbox', array&#40;&#41;&#41;;
    &#125;
    else
    &#123;
    	$bbcode_status = $lang&#91;'BBCode_is_OFF'&#93;;
    &#125;
    
    //
    // Smilies toggle selection
    //
    if &#40; $board_config&#91;'allow_smilies'&#93; &#41;
    &#123;
    	$smilies_status = $lang&#91;'Smilies_are_ON'&#93;;
    	$template->assign_block_vars&#40;'switch_smilies_checkbox', array&#40;&#41;&#41;;
    &#125;
    else
    &#123;
    	$smilies_status = $lang&#91;'Smilies_are_OFF'&#93;;
    &#125;
    
    if&#40; !$userdata&#91;'session_logged_in'&#93; || &#40; $mode == 'editpost' && $post_info&#91;'poster_id'&#93; == ANONYMOUS &#41; &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_username_select', array&#40;&#41;&#41;;
    &#125;
    
    //
    // Notify checkbox - only show if user is logged in
    //
    if &#40; $userdata&#91;'session_logged_in'&#93; && $is_auth&#91;'auth_read'&#93; &#41;
    &#123;
    	if &#40; $mode != 'editpost' || &#40; $mode == 'editpost' && $post_info&#91;'poster_id'&#93; != ANONYMOUS &#41; &#41;
    	&#123;
    		$template->assign_block_vars&#40;'switch_notify_checkbox', array&#40;&#41;&#41;;
    	&#125;
    &#125;
    
    //
    // Delete selection
    //
    if &#40; $mode == 'editpost' && &#40; &#40; $is_auth&#91;'auth_delete'&#93; && $post_data&#91;'last_post'&#93; && &#40; !$post_data&#91;'has_poll'&#93; || $post_data&#91;'edit_poll'&#93; &#41; &#41; || $is_auth&#91;'auth_mod'&#93; &#41; &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_delete_checkbox', array&#40;&#41;&#41;;
    &#125;
    
    //
    // Topic type selection
    //
    $topic_type_toggle = '';
    if &#40; $mode == 'newtopic' || &#40; $mode == 'editpost' && $post_data&#91;'first_post'&#93; &#41; &#41;
    &#123;
    	$template->assign_block_vars&#40;'switch_type_toggle', array&#40;&#41;&#41;;
    
    	if&#40; $is_auth&#91;'auth_sticky'&#93; &#41;
    	&#123;
    		$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
    		if &#40; $post_data&#91;'topic_type'&#93; == POST_STICKY || $topic_type == POST_STICKY &#41;
    		&#123;
    			$topic_type_toggle .= ' checked="checked"';
    		&#125;
    		$topic_type_toggle .= ' /> ' . $lang&#91;'Post_Sticky'&#93; . '';
    	&#125;
    
    	if&#40; $is_auth&#91;'auth_announce'&#93; &#41;
    	&#123;
    		$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
    		if &#40; $post_data&#91;'topic_type'&#93; == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE &#41;
    		&#123;
    			$topic_type_toggle .= ' checked="checked"';
    		&#125;
    		$topic_type_toggle .= ' /> ' . $lang&#91;'Post_Announcement'&#93; . '';
    	&#125;
    
    	if &#40; $topic_type_toggle != '' &#41;
    	&#123;
    		$topic_type_toggle = $lang&#91;'Post_topic_as'&#93; . '&#58; <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . &#40; &#40; $post_data&#91;'topic_type'&#93; == POST_NORMAL || $topic_type == POST_NORMAL &#41; ? ' checked="checked"' &#58; '' &#41; . ' /> ' . $lang&#91;'Post_Normal'&#93; . '' . $topic_type_toggle;
    	&#125;
    &#125;
    
    $hidden_form_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
    
    switch&#40; $mode &#41;
    &#123;
    	case 'newtopic'&#58;
    		$page_title = $lang&#91;'Post_a_new_topic'&#93;;
    		$hidden_form_fields .= '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
    		break;
    
    	case 'reply'&#58;
    		$page_title = $lang&#91;'Post_a_reply'&#93;;
    		$hidden_form_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
    		break;
    
    	case 'editpost'&#58;
    		$page_title = $lang&#91;'Edit_Post'&#93;;
    		$hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
    		break;
    &#125;
    
    // Generate smilies listing for page output
    generate_smilies&#40;'inline', PAGE_POSTING&#41;;
    
    //
    // Include page header
    //
    include&#40;$phpbb_root_path . 'includes/page_header.'.$phpEx&#41;;
    
    $template->set_filenames&#40;array&#40;
    	'body' => 'posting_body.tpl',
    	'pollbody' => 'posting_poll_body.tpl',
    	'reviewbody' => 'posting_topic_review.tpl'&#41;
    &#41;;
    make_jumpbox&#40;'viewforum.'.$phpEx&#41;;
    
    $template->assign_vars&#40;array&#40;
    	'FORUM_NAME' => $forum_name,
    	'L_POST_A' => $page_title,
    	'L_POST_SUBJECT' => $lang&#91;'Post_subject'&#93;,
    
    	'U_VIEW_FORUM' => append_sid&#40;"viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"&#41;&#41;
    &#41;;
    
    //
    // This enables the forum/topic title to be output for posting
    // but not for privmsg &#40;where it makes no sense&#41;
    //
    $template->assign_block_vars&#40;'switch_not_privmsg', array&#40;&#41;&#41;;
    
    //
    // Output the data to the template
    //
    $template->assign_vars&#40;array&#40;
    	'USERNAME' => $username,
    	'SUBJECT' => $subject,
    	'MESSAGE' => $message,
    	'HTML_STATUS' => $html_status,
    	'BBCODE_STATUS' => sprintf&#40;$bbcode_status, '', ''&#41;,
    	'SMILIES_STATUS' => $smilies_status,
    
    	'L_SUBJECT' => $lang&#91;'Subject'&#93;,
    	'L_MESSAGE_BODY' => $lang&#91;'Message_body'&#93;,
    	'L_OPTIONS' => $lang&#91;'Options'&#93;,
    	'L_PREVIEW' => $lang&#91;'Preview'&#93;,
    	'L_SPELLCHECK' => $lang&#91;'Spellcheck'&#93;,
    	'L_SUBMIT' => $lang&#91;'Submit'&#93;,
    	'L_CANCEL' => $lang&#91;'Cancel'&#93;,
    	'L_CONFIRM_DELETE' => $lang&#91;'Confirm_delete'&#93;,
    	'L_DISABLE_HTML' => $lang&#91;'Disable_HTML_post'&#93;,
    	'L_DISABLE_BBCODE' => $lang&#91;'Disable_BBCode_post'&#93;,
    	'L_DISABLE_SMILIES' => $lang&#91;'Disable_Smilies_post'&#93;,
    	'L_ATTACH_SIGNATURE' => $lang&#91;'Attach_signature'&#93;,
    	'L_NOTIFY_ON_REPLY' => $lang&#91;'Notify'&#93;,
    	'L_DELETE_POST' => $lang&#91;'Delete_post'&#93;,
    
    	'L_BBCODE_B_HELP' => $lang&#91;'bbcode_b_help'&#93;,
    	'L_BBCODE_I_HELP' => $lang&#91;'bbcode_i_help'&#93;,
    	'L_BBCODE_U_HELP' => $lang&#91;'bbcode_u_help'&#93;,
    	'L_BBCODE_Q_HELP' => $lang&#91;'bbcode_q_help'&#93;,
    	'L_BBCODE_C_HELP' => $lang&#91;'bbcode_c_help'&#93;,
    	'L_BBCODE_L_HELP' => $lang&#91;'bbcode_l_help'&#93;,
    	'L_BBCODE_O_HELP' => $lang&#91;'bbcode_o_help'&#93;,
    	'L_BBCODE_P_HELP' => $lang&#91;'bbcode_p_help'&#93;,
    	'L_BBCODE_W_HELP' => $lang&#91;'bbcode_w_help'&#93;,
    	'L_BBCODE_A_HELP' => $lang&#91;'bbcode_a_help'&#93;,
    	'L_BBCODE_S_HELP' => $lang&#91;'bbcode_s_help'&#93;,
    	'L_BBCODE_F_HELP' => $lang&#91;'bbcode_f_help'&#93;,
    	'L_EMPTY_MESSAGE' => $lang&#91;'Empty_message'&#93;,
    
    	'L_FONT_COLOR' => $lang&#91;'Font_color'&#93;,
    	'L_COLOR_DEFAULT' => $lang&#91;'color_default'&#93;,
    	'L_COLOR_DARK_RED' => $lang&#91;'color_dark_red'&#93;,
    	'L_COLOR_RED' => $lang&#91;'color_red'&#93;,
    	'L_COLOR_ORANGE' => $lang&#91;'color_orange'&#93;,
    	'L_COLOR_BROWN' => $lang&#91;'color_brown'&#93;,
    	'L_COLOR_YELLOW' => $lang&#91;'color_yellow'&#93;,
    	'L_COLOR_GREEN' => $lang&#91;'color_green'&#93;,
    	'L_COLOR_OLIVE' => $lang&#91;'color_olive'&#93;,
    	'L_COLOR_CYAN' => $lang&#91;'color_cyan'&#93;,
    	'L_COLOR_BLUE' => $lang&#91;'color_blue'&#93;,
    	'L_COLOR_DARK_BLUE' => $lang&#91;'color_dark_blue'&#93;,
    	'L_COLOR_INDIGO' => $lang&#91;'color_indigo'&#93;,
    	'L_COLOR_VIOLET' => $lang&#91;'color_violet'&#93;,
    	'L_COLOR_WHITE' => $lang&#91;'color_white'&#93;,
    	'L_COLOR_BLACK' => $lang&#91;'color_black'&#93;,
    
    	'L_FONT_SIZE' => $lang&#91;'Font_size'&#93;,
    	'L_FONT_TINY' => $lang&#91;'font_tiny'&#93;,
    	'L_FONT_SMALL' => $lang&#91;'font_small'&#93;,
    	'L_FONT_NORMAL' => $lang&#91;'font_normal'&#93;,
    	'L_FONT_LARGE' => $lang&#91;'font_large'&#93;,
    	'L_FONT_HUGE' => $lang&#91;'font_huge'&#93;,
    
    	'L_BBCODE_CLOSE_TAGS' => $lang&#91;'Close_Tags'&#93;,
    	'L_STYLES_TIP' => $lang&#91;'Styles_tip'&#93;,
    
    	'U_VIEWTOPIC' => &#40; $mode == 'reply' &#41; ? append_sid&#40;"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postorder=desc"&#41; &#58; '',
    	'U_REVIEW_TOPIC' => &#40; $mode == 'reply' &#41; ? append_sid&#40;"posting.$phpEx?mode=topicreview&amp;" . POST_TOPIC_URL . "=$topic_id"&#41; &#58; '',
    
    	'S_HTML_CHECKED' => &#40; !$html_on &#41; ? 'checked="checked"' &#58; '',
    	'S_BBCODE_CHECKED' => &#40; !$bbcode_on &#41; ? 'checked="checked"' &#58; '',
    	'S_SMILIES_CHECKED' => &#40; !$smilies_on &#41; ? 'checked="checked"' &#58; '',
    	'S_SIGNATURE_CHECKED' => &#40; $attach_sig &#41; ? 'checked="checked"' &#58; '',
    	'S_NOTIFY_CHECKED' => &#40; $notify_user &#41; ? 'checked="checked"' &#58; '',
    	'S_TYPE_TOGGLE' => $topic_type_toggle,
    	'S_TOPIC_ID' => $topic_id,
    	'S_POST_ACTION' => append_sid&#40;"posting.$phpEx"&#41;,
    	'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields&#41;
    &#41;;
    
    //
    // Poll entry switch/output
    //
    if&#40; &#40; $mode == 'newtopic' || &#40; $mode == 'editpost' && $post_data&#91;'edit_poll'&#93;&#41; &#41; && $is_auth&#91;'auth_pollcreate'&#93; &#41;
    &#123;
    	$template->assign_vars&#40;array&#40;
    		'L_ADD_A_POLL' => $lang&#91;'Add_poll'&#93;,
    		'L_ADD_POLL_EXPLAIN' => $lang&#91;'Add_poll_explain'&#93;,
    		'L_POLL_QUESTION' => $lang&#91;'Poll_question'&#93;,
    		'L_POLL_OPTION' => $lang&#91;'Poll_option'&#93;,
    		'L_ADD_OPTION' => $lang&#91;'Add_option'&#93;,
    		'L_UPDATE_OPTION' => $lang&#91;'Update'&#93;,
    		'L_DELETE_OPTION' => $lang&#91;'Delete'&#93;,
    		'L_POLL_LENGTH' => $lang&#91;'Poll_for'&#93;,
    		'L_DAYS' => $lang&#91;'Days'&#93;,
    		'L_POLL_LENGTH_EXPLAIN' => $lang&#91;'Poll_for_explain'&#93;,
    		'L_POLL_DELETE' => $lang&#91;'Delete_poll'&#93;,
    
    		'POLL_TITLE' => $poll_title,
    		'POLL_LENGTH' => $poll_length&#41;
    	&#41;;
    
    	if&#40; $mode == 'editpost' && $post_data&#91;'edit_poll'&#93; && $post_data&#91;'has_poll'&#93;&#41;
    	&#123;
    		$template->assign_block_vars&#40;'switch_poll_delete_toggle', array&#40;&#41;&#41;;
    	&#125;
    
    	if&#40; !empty&#40;$poll_options&#41; &#41;
    	&#123;
    		while&#40; list&#40;$option_id, $option_text&#41; = each&#40;$poll_options&#41; &#41;
    		&#123;
    			$template->assign_block_vars&#40;'poll_option_rows', array&#40;
    				'POLL_OPTION' => str_replace&#40;'"', '&quot;', $option_text&#41;,
    
    				'S_POLL_OPTION_NUM' => $option_id&#41;
    			&#41;;
    		&#125;
    	&#125;
    
    	$template->assign_var_from_handle&#40;'POLLBOX', 'pollbody'&#41;;
    &#125;
    
    //
    // Topic review
    //
    if&#40; $mode == 'reply' && $is_auth&#91;'auth_read'&#93; &#41;
    &#123;
    	require&#40;$phpbb_root_path . 'includes/topic_review.'.$phpEx&#41;;
    	topic_review&#40;$topic_id, true&#41;;
    
    	$template->assign_block_vars&#40;'switch_inline_mode', array&#40;&#41;&#41;;
    	$template->assign_var_from_handle&#40;'TOPIC_REVIEW_BOX', 'reviewbody'&#41;;
    &#125;
    
    $template->pparse&#40;'body'&#41;;
    
    include&#40;$phpbb_root_path . 'includes/page_tail.'.$phpEx&#41;;
    
    ?>
    Hast wahrscheinlich was bei posting.php falsch gemacht,war auch bei mir der Fehler doch ich habe ihn schnell gelöst

  9. #9
    gggg
    Gast

    Standard Finde in nicht!

    hallo topgreen.

    eine andere möglichkeit wäre,wenn du es mir machen könntest,also alle wichtigen cashmod dateien(also nur die was man bearbeitet hat) zu mir schicken oder dass du mir es selber machen könntest.

    pro modifikation würdest du 15€ bzw. was auch immer da bekommen,also ich bräuchte nur den Cashmod...
    ahja mein bruder,er ist admin von so einer seite,glaub zepi oder so. er kann so einen raumgestalter machen.
    Aber er ist derzeit leider nicht da...

    und daher könnte ich ihn überreden,dir einen dafür gratis zu geben.

    Edit: www.zepi.ch heisst seine seite

  10. #10
    Kaiserliche Hoheit
    Registriert seit
    25.08.2005
    Ort
    Tjah
    Beiträge
    1.643
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard

    du musst doch nur die anleitung genau durchlesen und alles langsam machen und dich dabei konzentrieren.dann kannst du auch nichts falsch machen.
    probiers doch einfach nochmal und gehe es in ruhe durch

Ähnliche Themen

  1. phpbb2 datenbackup
    Von volente im Forum Webanwendungen - Webapplikationen
    Antworten: 2
    Letzter Beitrag: 10.05.2007, 15:37
  2. suche PHPBB2 mod
    Von Telmata im Forum Webanwendungen - Webapplikationen
    Antworten: 0
    Letzter Beitrag: 09.05.2007, 13:09
  3. Stylesuche für phpbb2
    Von im Forum HTML & CSS Forum
    Antworten: 19
    Letzter Beitrag: 01.11.2006, 03:52
  4. Sig funzt ned bei phpbb2
    Von mrmaik im Forum HTML & CSS Forum
    Antworten: 3
    Letzter Beitrag: 01.09.2006, 01:21
  5. phpbb2 probleme
    Von Speedstar im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 1
    Letzter Beitrag: 18.11.2004, 20:47

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •