UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » Send wordpress comments as an useBBforum post reply

Send wordpress comments as an useBBforum post reply

Moderators: Gaia.

Page: 1

Author Post
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!!
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.
_______________
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)
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.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog

Page: 1

UseBB Community » Help & Support » Send wordpress comments as an useBBforum post reply

UseBB Community is powered by UseBB 1 Forum Software