MyBB Community Forums

Full Version: should this be a plugin? creating threads outside of mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am building a site where people can (outside of mybb) create an event that I store in a mysql database.

What I would like is for the script that adds the event to also create a thread in a specific forum as well as add a calendar event. I would want them both to be listed under my user account (and never another one if that helps).

My initial idea was to simply insert data into the mybb database with some queries, but it seems like that could create some issues. Is there a way to simply pass some values to a mybb function and have it do it the correct way?

I have pulled values from a mybb database several times before (showing recent posts on my main page, showing new arcade scores, etc), but this is my first venture into trying to insert information, and I do not want to get too far into something only to find out it could damage my forum.

i plugin wont work for you if you are not using mybb in the first place as there is nothing to run teh plugin.

if you take a look at the newthread and calendar code you can see what you need to create code-wise so that you can use the built-in mybb datahandlers

basically your code "includes" \datahandlers\post.php and whatever the calendar uses and you create the post array and send it through the datahandler to validate and post it.
Thank you very much for the datahandlers information. That appears to be just what I needed! I did a quick test and it worked great.

Thanks again!