Creating a post using SQL request

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
User avatar
thepopol777
Registered User
Posts: 3
Joined: Sat Sep 21, 2013 8:16 pm

Creating a post using SQL request

Post by thepopol777 »

Hi there! :)

I'm not sure to be in the right section, but I need help for a painful question. Here it is:

I would like, with a php page, create a post on my phpbb forum, directly by executing the SQL requests.

I have all infos, like the forum id, the topic id, the user id, title, content.

I've already read thoses wiki:
https://wiki.phpbb.com/Function.submit_post
https://wiki.phpbb.com/Tutorial.Adding_pages

... But I'm not an expert of php and sql, so I didn't get how to use thoses lines of code. :?

It it possible ? I've read many discussion about it, but nobody seems to reach the goal.....

Thanks a lot ! :)

thepopol777

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Creating a post using SQL request

Post by EXreaction »

You should use the submit_post function. Doing it directly will require significant amounts of work as many things need to be updated to stay in sync.

User avatar
thepopol777
Registered User
Posts: 3
Joined: Sat Sep 21, 2013 8:16 pm

Re: Creating a post using SQL request

Post by thepopol777 »

Thanks a lot for this. :D

I've learned how to use it and I must say that it is perfect for what I needed.

But I have a new problem, regarding this. :x


I've installed a mod, Topic_Cement, which add an priority value for each topic, and order them properly. The fact is, to use it, I have to go on moderator pannel and change the value manually.

I would like to set the priority of the topics directly on their creation, while using the submit_post function. In the SQL, there is just a topic_priority column that have been added in the phpbb_topics table.

Do you have any ideas to achieve this?

Thanks a lot 8-)

User avatar
bonelifer
Community Team
Community Team
Posts: 120
Joined: Mon Jan 31, 2005 10:41 am

Re: Creating a post using SQL request

Post by bonelifer »

thepopol777 wrote:Thanks a lot for this. :D

I've learned how to use it and I must say that it is perfect for what I needed.

But I have a new problem, regarding this. :x


I've installed a mod, Topic_Cement, which add an priority value for each topic, and order them properly. The fact is, to use it, I have to go on moderator pannel and change the value manually.

I would like to set the priority of the topics directly on their creation, while using the submit_post function. In the SQL, there is just a topic_priority column that have been added in the phpbb_topics table.

Do you have any ideas to achieve this?

Thanks a lot 8-)
AREA51 isn't for modifications support, please ask your question in the Discussion tab on the modifications MOD DB page: https://www.phpbb.com/customise/db/mod/ ... t/support/
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .

User avatar
thepopol777
Registered User
Posts: 3
Joined: Sat Sep 21, 2013 8:16 pm

Re: Creating a post using SQL request

Post by thepopol777 »

Hi there!

Actually it wasn't for MOD support, I thought it would be more like updating the functions_posting.php to include my topic_priority, after that I would be able to use it with the submit_post() function...

Anyway, thanks, I've posted my question in the forum you gave.

Post Reply