Page 1 of 1

how to push post with external script

Posted: Sun Oct 25, 2015 2:53 pm
by Swen
Hi guys,

what are the requirements to push a post with an external script in to phpbb3.1?

I want to develop a script that post special messages from my system in to a special existing thread. How can i do this? What files i need for include and what must i do that e.g. Bot1 can post in thread "livepost" with id 13?

I dont want a complete script here. Only the sql query and files that i need.

Thank you!

Re: how to push post with external script

Posted: Sat Oct 31, 2015 4:27 am
by imkingdavid
Because there are multiple parts of the software that need to be updated when a post is added, there isn't just a simple query that can be run.

But I think the best way to learn what all goes on and what all you need to account for, and how to do it in the first place, would be to look at the actual code in the core. I'd start in functions_post.php. Look for the submit_post() function. You may also need to look at the context surrounding it when it is called in posting.php

Since that function likely requires certain parts of phpBB core to be included, you can't include the functions_post.php file and call that function, but you can likely extract and adapt parts of the function to do what you need.

Re: how to push post with external script

Posted: Wed Nov 04, 2015 8:28 am
by Wardormeur
I did it for the Wordpress bridge here if you want an example : https://github.com/Wardormeur/wpphpbbun ... c/Post.php

Re: how to push post with external script

Posted: Wed Nov 04, 2015 4:34 pm
by Swen
Nice, thanks Wardormeur. Will check this. Big thanks.