MyBB Community Forums

Full Version: Simplify plugins
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Bad title, bleh, so uncreative. Sue me.

Basically, I was thinking of making a plugin that allows you to create forms, and you can then have them submitted as a post. vBulletin has something like this. I asked Matt about it, and I got this. I figure that means you gotta do a bunch of crap to it to get it to submit. Why not have something like $mybb->submit_post("topic", "content", "attachments") or something? I haven't really had time to go through newthread.php to find out exactly how much work is required, but this would help people I'm sure.
There is a plugin that does something like this actually. Although it uses a custom forum page.

http://mybbsource.com/mods.php?act=view&id=41

It's probably more advanced than what you need but it will give you an idea.
$posthandler->set_data(array(
'subject' => whatever,
'message' => boring,
...etc...
));
$posthandler->validate();
$posthandler->insert_post();

The crux of it (and probably wrong too), but I agree it could be better.