Das Topic Description mod sieht so aus
Code: Alles auswählen
#
#-----[ OPEN ]---------------------------------------
#
includes/function_post.php
#
#-----[ FIND ]---------------------------------------
#
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)
#
#-----[ REPLACE WITH ]-------------------------------
#
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length, &$t_desc)
#
#-----[ FIND ]---------------------------------------
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
#
#-----[ REPLACE WITH ]-------------------------------
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_description) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, '$t_desc')" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", topic_description = '$t_desc' WHERE topic_id = $topic_id";
#
#-----[ FIND ]---------------------------------------
#
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
#
#-----[ REPLACE WITH ]-------------------------------
#
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, post_description) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '$t_desc')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject', post_description = '$t_desc' WHERE post_id = $post_id";Code: Alles auswählen
#
#-----[ OPEN ]----------------------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]----------------------------------------------------------------
#
// Check subject
if (!empty($subject))
{
#
#-----[ AFTER, ADD ]----------------------------------------------------------
#
// Disallow Special Characters In Subject
$german_umlauts = ($board_config['allow_ger_umlauts_in_subject']) ? 'üÜäÄöÖß' : '';
if (!preg_match('/^[A-Za-z0-9 '.$german_umlauts.str_replace('-', '\-', preg_quote($board_config['allowed_subject_special_chars'], '/')).']+$/', $subject ))
{
$error_msg .= (!empty($error_msg)) ? '<br /><br />' . $lang['found_forbidden_special_characters'] : $lang['found_forbidden_special_characters'];
$error_msg .= '<br />' . sprintf($lang['allowed_special_characters_in_subject'], (($board_config['allow_ger_umlauts_in_subject']) ? $lang['german_umlauts'] : ''), $board_config['allowed_subject_special_chars']);
}
// Disallow Special Characters In SubjectCode: Alles auswählen
// Check Topic Desciption
if ( !empty($topic_desc) )
{
// Disallow Special Characters In Subject
$german_umlauts = ($board_config['allow_ger_umlauts_in_subject']) ? 'üÜäÄöÖß' : '';
if (!preg_match('/^[A-Za-z0-9 '.$german_umlauts.str_replace('-', '\-', preg_quote($board_config['allowed_subject_special_chars'], '/')).']+$/', $topic_desc ))
{
$error_msg .= (!empty($error_msg)) ? '<br /><br />' . $lang['found_forbidden_special_characters'] : $lang['found_forbidden_special_characters'];
$error_msg .= '<br />' . sprintf($lang['allowed_special_characters_in_subject'], (($board_config['allow_ger_umlauts_in_subject']) ? $lang['german_umlauts'] : ''), $board_config['allowed_subject_special_chars']);
}
// Disallow Special Characters In SubjectCode: Alles auswählen
// Check Topic Desciption
if ( !empty($topic_desc) )
{