MyBB Community Forums

Full Version: Auto addition of all plugins modifications while adding a new theme to board
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I think in new mybb 2.0 you have make such a system which adds all modifications and plugin settings while importing a new theme to the board. In current mybb version we have to deactivate and activate again the plugins if we add a new theme to the board. So please make such a system which adds all settings of plugins and modifications to the newly added themes automatically.

I talked to Tom about this a while ago, it'll be added in at some point.
Would be definitely a nice edition.
NewPoints has that for its plugins Big Grin
Not directly though, it provides a tool to re-construct the templates (to re-do the edits to the existing templates) but its plugins will only work as well if they only alter the NewPoints' templates themselves.

Too hard to explain lol
(2011-12-04, 12:45 PM)Pirata Nervo Wrote: [ -> ]NewPoints has that for its plugins Big Grin
Not directly though, it provides a tool to re-construct the templates (to re-do the edits to the existing templates) but its plugins will only work as well if they only alter the NewPoints' templates themselves.

Too hard to explain lol
I got that. Wink

(2011-12-04, 12:45 PM)Pirata Nervo Wrote: [ -> ]NewPoints has that for its plugins Big Grin
Not directly though, it provides a tool to re-construct the templates (to re-do the edits to the existing templates) but its plugins will only work as well if they only alter the NewPoints' templates themselves.

Too hard to explain lol

You can maybe add a new function to plugins called "pluginname_reconstruct()", that is ran on every new theme that is added by the administrator?
My plan was to have a pluginname_add_template_edits and pluginname_remove_template_edits, as you'd need to know what action you're performing and would still need it to work properly in the standard activate/deactivate functions, where you'd just call pluginname_add_template_edits/pluginname_remove_template_edits as required.
In the MyPlaza Turbo days I did it like this:
1. Main function which "undoes" the default template edits and "redoes" them back.
2. Each module/subplugin had two functions, one for undoing and one for redoing the edits. All of these functions would be run after step 1.
3. All themes (if possible) should have been edited with the correct changes.

This is far from being perfect but it worked for most cases. Something like this could be added in MyBB 1.6 but it would require an update from all plugins. The problem is that most plugin authors wouldn't probably bother to update them with the new functionality.
If it gets implemented then will be nice.....
I just have one problem. It's already possible to do this in 1.6, albeit with an extra hook or so.

So by utilising a function instead of a hook, which is ultimately a function, what makes you think people will actually use it? This is a perfect example, just like template caching, where the fault lies with documentation/bad developing.
Pages: 1 2 3