| Author |
Post |
|
|
#1 Thu Jun 15, 2006 10:31 am
|
|
Member
Registered: Jun 2006
Posts: 2
|
Hello! At first, excuse me for my broken english! I want that when someone comments a wordpress article, this comment appears too in a UseBB post as a reply. How can I do it? In wordpress the form fields are: 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID' An in UseBB forums the fields (in a Visitor reply) are: 'user','content' Can I send comments directly to post_reply.php? Do you understand me? Thanks!!
|
|
|
#2 Thu Jun 15, 2006 11:32 am
|
|
Member
Registered: Apr 2004
Posts: 192
Location: Brussels Belgium
|
That wont be easy, I think the best thing to do is edit your wordpress so that it inserts a row in the usebb mysql.
|
|
|
#3 Thu Jun 15, 2006 12:28 pm
|
|
Member
Registered: Jun 2006
Posts: 2
|
I think that the query would be:
INSERT INTO usebb_posts VALUES(NULL, 2, '0', '', '".$comment_author_IP."', '".$_POST['comment_content']."', ".time().", 0, 0, 1, 1, 0, 0)";
I'm going to test it...
(It must be in wordpress files)
|
|
|
#4 Thu Jun 15, 2006 4:47 pm
|
|
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
|
"INSERT INTO ".TABLE_PREFIX."posts VALUES(NULL, ".$_GET['topic'].", ".$poster_id.", '".$poster_guest."', '".$session->sess_info['ip_addr']."', '".$_POST['content']."', ".time().", 0, 0, ".$_POST['enable_bbcode'].", ".$_POST['enable_smilies'].", ".$_POST['enable_sig'].", ".$_POST['enable_html'].")" "UPDATE ".TABLE_PREFIX."topics SET last_post_id = ".$inserted_post_id.", count_replies = count_replies+1".$update_topic_status." WHERE id = ".$_GET['topic'] "UPDATE ".TABLE_PREFIX."forums SET posts = posts+1, last_topic_id = ".$_GET['topic']." WHERE id = ".$topicdata['forum_id'] "UPDATE ".TABLE_PREFIX."stats SET content = content+1 WHERE name = 'posts'" These are the basic queries to insert a post. Note there isn't really an ideal way to do this from outside UseBB.
|