So, this is just a clarification or best-practices question.
Imagine a payment module that has all the normal stuff and then its own admin page. So, if the user uploads both the includes and the zc_plugins folders, they will immediately see the payment plugin appearing in the modules>>payment page of admin. They will have the opportunity to 'install' the module on that page.
They will also have the option to install the plugin in the plugin manager. (In order to get the admin page to show etc.)
In fact they have to do both.
This seems confusing to me. Does anyone have thoughts about how best to manage it?
(On a different note, it means that the developer gets to agonise about where is best to put db table creation. Should I put it in the module like the old days? Should I put it in the installer? Does it matter? Aaaaaa!)
On a code suggestion it would be nice if there was a flag in admin/modules.php that disabled the module from showing unless it had been enabled in the plugin manager. So, it could be a method in the payment module class itself such as requires_plugin_activation() which defaults to false if that method does not exist and only is true if the developer makes it so. So, somewhere around ln206 of modules.php you check if you need to check that the module is installed. If it requires installation and is not installed then don't display it.
Actually, the problem is sort of worse on uninstall. If I uninstall in plugins manager then I guess I would expect that the module was 'removed' in the modules page.
As you can tell, I am a bit confused about best practice.![]()
Bookmarks