Hallo Helmut,
vielen Dank funzt prima.
Für alle mit dem Selben Problem, sei folgendes noch ergänzt, da ja die Variablen auch für die Neuerstellung eines Beitrages übergeben werden müssen
Finde in der Datei
root/includes/functions_kb.php:
Code: Alles auswählen
// Post article if article have no post and categorie have post forum
if($row['post_id'] == 0 && $row['post_forum'] <> 0 && $kb_config['activ_post'])
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
$user_tmp['user_id'] = $user->data['user_id'];
$user_tmp['username'] = $user->data['username'];
$user_tmp['user_colour'] = $user->data['user_colour'];
$user->data['user_id'] = $row['user_id'];
$user->data['username'] = $row['username'];
$user->data['user_colour'] = $row['user_colour'];
$message = replace_post_text($row, $kb_config['post_message']);
$subject = replace_post_text($row, $kb_config['post_subject']);
$poll = $uid = $bitfield = $options = '';
generate_text_for_storage($message, $uid, $bitfield, $options, true, true, true);
$data = array(
'poster_id' => $kb_config['post_user'],
'forum_id' => $row['post_forum'],
'icon_id' => false,
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => true,
'message' => $message,
'topic_time_limit' => 0,
'message_md5' => md5($message),
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'post_edit_locked' => 0,
'topic_title' => $subject,
'notify_set' => false,
'notify' => false,
'post_time' => 0,
'forum_name' => '',
'enable_indexing' => true,
Und füge danach ein:
Code: Alles auswählen
'seo_desc' => '',
'seo_key' => '',
'seo_post_key' => '',
'topic_seo_title' => '',
Finde in der Datei
root/includes/functions_kb.php:
Code: Alles auswählen
/**
* Update the post in forum
*/
function update_article_post($article_id)
{
global $db, $user, $auth, $kb_config, $phpbb_root_path, $phpEx;
if ($kb_config['update_post'] == 1)
{
$post_data = array();
$sql_array = array(
'SELECT' => 'a.article_id, a.activ, a.article, a.titel, a.description, a.post_time, a.cat_id, a.type_id, a.user_id, a.page_uri, a.post_id, c.post_forum, c.cat_title, c.show_edits, t.name, ut.username, ut.user_colour, ut.user_id, ua.username AS author',
'FROM' => array(
KB_ARTICLE_TABLE => 'a',
),
'LEFT_JOIN' => array(
array(
'FROM' => array(KB_CATEGORIE_TABLE => 'c'),
'ON' => 'c.cat_id = a.cat_id'
),
array(
'FROM' => array(KB_TYPES_TABLE => 't'),
'ON' => 't.type_id = a.type_id'
),
array(
'FROM' => array(USERS_TABLE => 'ut'),
'ON' => 'ut.user_id = ' . (int) $kb_config['post_user']
),
array(
'FROM' => array(USERS_TABLE => 'ua'),
'ON' => 'ua.user_id = a.user_id'
)
),
'WHERE' => 'a.article_id = ' . (int) $article_id,
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$sql = 'SELECT t.topic_replies_real, t.topic_id
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
WHERE p.post_id = ' . (int) $row['post_id'] . '
AND t.topic_id = p.topic_id';
$result = $db->sql_query($sql);
$post_row = $db->sql_fetchrow($result);
if (!empty($post_row))
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
$user_tmp['user_id'] = $user->data['user_id'];
$user_tmp['username'] = $user->data['username'];
$user_tmp['user_colour'] = $user->data['user_colour'];
$user->data['user_id'] = $row['user_id'];
$user->data['username'] = $row['username'];
$user->data['user_colour'] = $row['user_colour'];
$message = replace_post_text($row, $kb_config['post_message']);
$subject = replace_post_text($row, $kb_config['post_subject']);
$poll = $uid = $bitfield = $options = '';
generate_text_for_storage($message, $uid, $bitfield, $options, true, true, true);
$data = array(
'topic_replies_real' => $post_row['topic_replies_real'],
'topic_id' => $post_row['topic_id'],
'post_edit_reason' => false,
'post_id' => $row['post_id'],
'poster_id' => $kb_config['post_user'],
'forum_id' => $row['post_forum'],
'icon_id' => false,
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => true,
'message' => $message,
'topic_time_limit' => 0,
'message_md5' => md5($message),
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'topic_first_post_id' => false,
'topic_last_post_id' => false,
'post_edit_locked' => 0,
'post_edit_reason' => ($kb_config['show_post_edit'] == 1) ? $user->lang['POST_UPDATE_MESSAGE'] : '',
'post_edit_user' => ($kb_config['show_post_edit'] == 1) ? $user_tmp['user_id'] : '',
'topic_title' => $subject,
'notify_set' => false,
'notify' => false,
'post_time' => 0,
'forum_name' => '',
'enable_indexing' => true,
Und füge danach ein:
Code: Alles auswählen
'seo_desc' => '',
'seo_key' => '',
'seo_post_key' => '',
'topic_seo_title' => '',