Author Topic: 4images comments to woltlab burning board  (Read 3997 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
4images comments to woltlab burning board
« on: September 07, 2010, 07:55:37 PM »
 :flag-de:
Ich möchte das die Bilderkommentare auch direkt in die Datenbank von woltlab burning board geschrieben werden. Das hat auch schon funktioniert.
 :flag-en:
I would like the pictures and comments directly to the database by Burning Board. This has also already works.

Details.php
      $sql "INSERT INTO ".COMMENTS_TABLE."
              (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date)
              VALUES
              (
$id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")";
      
$site_db->query($sql);
      
$commentid $site_db->get_insert_id();
	
  
// Forenpost erstellen
        
$sql "INSERT INTO wbb1_1_post
                 (threadID, enableHtml, username, subject, userID, message, time)
                 VALUES
                ("
.$image_row['image_thread'].", '0', '$user_name', '$comment_headline',  ".$user_info['user_id'].", '$comment_text', ".time().")";
      
$site_db->query($sql);
      
$commentid $site_db->get_insert_id();


 :flag-de:
Als nächstes möchte ich, dass die Kommentare auch wieder ausgegeben werden. Es sollen die in der 4images Datenbank eingetragenen Kommentare sowie die aus dem Forum angezeigt werden. Aber das funktioniert nicht richtig, hier der code

 :flag-en:
Next I would like the comments are also displayed again. It should in the 4images database registered comments, which are displayed from the forum. But that does not work properly, here is the code
  $sql "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_email").get_user_table_field(", u.""user_showemail").get_user_table_field(", u.""user_invisible").get_user_table_field(", u.""user_joindate").get_user_table_field(", u.""user_lastaction").get_user_table_field(", u.""user_comments").get_user_table_field(", u.""user_homepage").get_user_table_field(", u.""user_icq").", p.threadID, p.username, p.subject, p.userID, p.message, p.time
          FROM "
.COMMENTS_TABLE." c
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
	
	
  LEFT JOIN wbb1_1_post p ON (p.threadID = "
.$image_row['image_thread'].")
          WHERE c.image_id = 
$image_id
          ORDER BY c.comment_date ASC"
;
  
$result $site_db->query($sql);