In einer EXTERNEN DB befinden sich Daten, welche als Posting in ein Forum sollen. Bisher habe ich folgendes:
Code: Alles auswählen
$subject = $row["txsa"]." (".$row["txsb"].")";
$message = "Name: [b]".$row["txsa"]."[/b] (".$row["txsb"].")";
$phpbb_root_path='/forum/';
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
$forum_id="37";
$bbcode_on=1;
$html_on=0;
$smilies_on=1;
$topic_type='0';
$attach_sig='0';
$mode='newtopic';
$userdata = get_userdata(30);
init_userprefs($userdata);
$username = ( $userdata['session_logged_in'] ) ? $userdata['username'] : '';
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
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);
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
Bisher habe ich das in eine WHILE Schleife eingebunden, dann kommt aber folgende Fehlermeldung:
Weiss jemand Rat, oder gibt es sowas evtl. in Form eines MODs?Error in posting
DEBUG MODE
SQL Error : 1196 Warning: Some non-transactional changed tables couldn't be rolled back
UPDATE phpbb_users SET user_posts = user_posts + 1 WHERE user_id =
Line : 445
File : functions_post.php
Schonmal Danke für die Mühe ...