Actions

Plugin autoactivation: Difference between revisions

From LimeSurvey Manual

(→‎Solution idea: directory (dev version))
 
Line 15: Line 15:
* Put a file for enabled plugin in a specific directory : https://github.com/LimeSurvey/LimeSurvey/tree/develop/protected/config/plugins for develop version : BUT (for git/gitignore) : we need to allow adding a new file in it, but allow user to remove a file .......
* Put a file for enabled plugin in a specific directory : https://github.com/LimeSurvey/LimeSurvey/tree/develop/protected/config/plugins for develop version : BUT (for git/gitignore) : we need to allow adding a new file in it, but allow user to remove a file .......
* Put a file in the plugin directory : when search for plugin, if plugin is new AND have this file : activate plugin. BUT see comment https://github.com/LimeSurvey/LimeSurvey/blob/master/application/libraries/PluginManager/PluginManager.php#L202 . Directory scanning is a bad idea.
* Put a file in the plugin directory : when search for plugin, if plugin is new AND have this file : activate plugin. BUT see comment https://github.com/LimeSurvey/LimeSurvey/blob/master/application/libraries/PluginManager/PluginManager.php#L202 . Directory scanning is a bad idea.
[[Category:Plugin Development]]

Latest revision as of 14:25, 27 July 2016

Discussion about plugin activation / deactivation.

Why open this page

Some plugin must be activated by default : the first is AuthDB : https://github.com/LimeSurvey/LimeSurvey/tree/master/application/core/plugins/Authdb

But AuthDB contains all core export plugin : have a way to activate a plugin by default allow us to move the core export plugin to own plugin (core plugin) For example https://github.com/LimeSurvey/LimeSurvey/tree/master/application/core/plugins/exportDoc can really be moved to a sibgle deactivated allowed plugin.

Solutions

Actual solution

Add a DB upgrade to activate the plugin by default. OK for core plugin, but can not be done in other system (limeservice can have some activated plugin too for example)

Solution idea