Ich hoffe die Änderungen funktionieren. Danach musst du zusätzlich zum Titel auch die NewsID mit der URL-Variable
Code: Alles auswählen
##############################################################
## MOD Author: Patrik < patrik@working-sheepdogs.at > (Patrik Sporeni) http://diezone.uttx.net/
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit:
## includes/functions_post.php
## posting.php
##
## Included Files: N/A
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
#
#-----[ AFTER ADD ]------------------------------------------
#
//
// News
//
if(($mode == 'newtopic') && (!empty($news_id)))
{
$sql = "UPDATE deine_news_tabelle
SET topic_id = $topic_id
WHERE news_id = $news_id";
if(!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in news', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ OPEN ]------------------------------------------
#
includes/posting.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_uid = '';
#
#-----[ AFTER ADD ]------------------------------------------
#
$news_id = (!empty($HTTP_POST_VARS['nid'])) ? $HTTP_POST_VARS['nid'] : (!empty($HTTP_GET_VARS['nid'])) ? $HTTP_GET_VARS['nid'] : '';
#
#-----[ FIND ]------------------------------------------
#
submit_post($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("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
#
#-----[ REPLACE WITH ]------------------------------------------
#
if(empty($news_id))
{
submit_post($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("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
}
else
{
submit_post($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("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $news_id);
}
#
#-----[ FIND ]------------------------------------------
#
$hidden_form_fields .= '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$hidden_form_fields .= '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" /><input type="hidden" name="nid" value="' . $news_id . '" />';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM