MyBB Community Forums

Full Version: Plugin vs. PHP Template Conditional + Patches plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It seems there are 3 ways to add new features to mybb. First one is core edits which is not recommended and then there are plugins but there is also the option of using Patches plugin.

With the PHP template conditional plugin and patches plugin, it seems you can introduce any feature on the site but yet people make dedicated plugins for some features.

With mybb whats the pros and cons of each?

Is php not recommended in the stylesheet templates? If patches plugin keeps track of changes then why make a plugin?
A plugin can be a big piece of software utilizing a whole array of hooks, core edits, or template changes, and add standalone features too.

I made the 'Hooks' plugin for small fry stuff (I don't need a dedicated plugin with boilerplate for each simple hook change and nothing else) and likewise 'Patches' for independent core edits. For templates its similar, if whatever a plugin does can just as well be done with a simple template edit, why bother keeping it as a plugin?

For a more complex whole, a dedicated plugin is better. While the functionality of my 'Google SEO' plugin could somehow be forced into 'Hooks' and 'Patches' only, it would be silly to even consider it.

Also with Patches in particular you have to keep in mind they are potentially unstable. It's possible for core code to change in some incompatible way and then you have to adapt the patch to make it work again. Making a patch is a last resort; if it can be done with plugin hooks, you should do that instead.