MyBB Community Forums

Full Version: Plugins Documentation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i really like the plugins feature of the forum. And really want to make mods for it, but i don't really like keeping track of my changes / documenting them, so uploading some files into the plugins folder seems really easy, and i don't need to worry about breaking other people's scripts and what not.

anyway, is there a place i can go to learn all the things i can do through plugins..i.e. the things i can mod through them, and not having to modify any of the actual forum files?
allow me to bump this month old post. . . mainly cuz i'd like to do the same thing.

i got the http://community.mybboard.net/showthread.php?tid=3553 post, but that appears to just be a list of functions.

please?
At the moment there aren't any tutorials as far as I know.

Your best bet is to take real simlple plugin like the welcomepm message or the unreadpm plugin and look at the source to figure out how they work.
Unless you are lucky with the mods choose, you will need to edit some forum files some time. (shameful plug to EI in my sig) Wink.

But as Shochu said. I find it must better to look at people's code rather than documentation. Although it is handy for some things.

Like figuring out your information/activation functions for your plugin need to be the same name as your plugin filename minus the php extension.
Call your plugin test_plugin.php and your activation functions become test_plugin_activate() and test_plugin_info().
decswxaqz Wrote:Unless you are lucky with the mods choose, you will need to edit some forum files some time. (shameful plug to EI in my sig) Wink.

But as Shochu said. I find it must better to look at people's code rather than documentation. Although it is handy for some things.

Like figuring out your information/activation functions for your plugin need to be the same name as your plugin filename minus the php extension.
Call your plugin test_plugin.php and your activation functions become test_plugin_activate() and test_plugin_info().

but using yoru example... isn't that more of a protocol "you should do it this way" rather than "you MUST do it this way or it won't work" you know... for organizational purposes? and even if not, i'm sure there are protocols that should be followed to make it easier for others to follow your work... and it'd kinda be nice to know that stuff up front.
The names of the activation, deactivation, and info functions MUST be the name of your file (minus the extention) + _activate, _deactivate, or _info respectively. Any other functions in your plugin can be called anything you choose, but it is common to prefix them with the name of your file (minus the extention) in order to avoid clashes with other plugins.
"alright. important safety tip. thanks egon." --Pete Venkman

* monsto added this tip to the wiki
That list, is a list of all the files that have hooks for running plugins through.

Basically, if you use that hook, thats where the code is going to be run.

Unfortunately I find some of the hooks difficult and confusing in their placement, and following the file to find out what variables I can edit.

I particularly wanna make a mod that, changes the content of a post, but yeah, not quite up to it yet.