phpBB manualy create forum posts with SQL query

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
Phyllis109
Registered User
Posts: 1
Joined: Fri Jan 04, 2019 8:55 am

phpBB manualy create forum posts with SQL query

Post by Phyllis109 »

I create a WordPress plugin and I like to post posts from WordPress in phpBB forums. As I know there is no any bridge that can do that in the WordPress phpBB latest versions. Now my question is:

How can I create posts into phpBB database manual by building the SQL queries and execute them. Is there any good tutorial ? Do you have to suggest anything ?

Thanks a lot :)
Last edited by bonelifer on Wed Jan 09, 2019 12:23 pm, edited 1 time in total.
Reason: Moved from Extension Request - https://www.phpbb.com/community/viewforum.php?f=496
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: phpBB manualy create forum posts with SQL query

Post by Ger »

My advice is to use my Feed Post Bot extension: https://www.phpbb.com/customise/db/exte ... edpostbot/
Set up a feed from your Wordpress site and import that into your phpBB Board. Make sure you read up on the phpBB Cron: https://www.phpbb.com/customise/db/exte ... t/faq/2446
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
hanzzzzzzzzzzz
Registered User
Posts: 8
Joined: Thu Jan 10, 2019 12:35 pm

Re: phpBB manualy create forum posts with SQL query

Post by hanzzzzzzzzzzz »

You're gonna need some way to generate the bbcode_uid or whatever, I inserted a ton of posts through SQL and all of the bbcode parsing was missing
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB manualy create forum posts with SQL query

Post by Brf »

hanzzzzzzzzzzz wrote: Wed Jan 16, 2019 5:18 pm You're gonna need some way to generate the bbcode_uid or whatever,
generate_text_for_storage does that already.
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: phpBB manualy create forum posts with SQL query

Post by mrgoldy »

When creating a post there are a lot of 'small' things you have to take into consideration aswell.
For example the Forums and Topics table have to be updated aswell, with their 'last post and poster' information.

Use the submit_post() function in functions_posting.php and let phpBB handle about the rest.
There you can simply define the crucial/required data that you retrieved from the wordpress plugin.

Good luck :+1:
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
Post Reply

Return to “phpBB Custom Coding”