MyBB Community Forums

Full Version: Create new thread direct into MyBB database.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to add a new thread directly into the MyBB database and not using the actual forum submit thread form?

I have a largish website which has many user who submit information to another database and I want some of the information to be added to create a new thread in the MyBB database, then the members can add their own posts etc. the login username would be my account so its just the subject and thread content text that needs adding.

I am currently copy and pasting each new thread and its taking a lot of my time up!!

Is this something which is straight forward to do?

Many thanks any advice,

Steve
PhpMyAdmin perhaps? You sound quite confusing.
Thanks for the fast reply doc, sorry if its a bit confused, but basically all i want to do is automatically add a new thread to MyBB from within another PHP script.

So I have an existing page which has the information in and is added to an existing database, and i also want the subject and text to be added directly to the MyBB as a new thread without me having to do it manually each time.

Hope thats a bit clearer!
It can be done with a script, although I have never done it before, but I thought you had to run other queries along with it, to update post counts, newest reply, post id and so forth.
You'd have to talk to Tikitiki about that stuff, as I am sure he knows more about it than I do, as he is a Developer Wink

Dr Small
Thanks for the help, I have been searching the forum for the last couple of hours and came across a thread which looks like it will do the trick http://community.mybboard.net/showthread.php?tid=5829

Cheers
Steve
Yes you can do that. You'll need two includes: 1) global.php and 2) inc/datahandlers/post.php

You can then setup the class in inc/datahandlers/post.php to submit the thread to the database. It should be an array and you can find how to set it up in newreply.php and newthread.php as well as comments throughout inc/datahandlers/post.php

Ryan