Actions

Plugin config file: Difference between revisions

From LimeSurvey Manual

 
Line 20: Line 20:
| name || string || Name of plugin. MUST be the same as folder name and main plugin file
| name || string || Name of plugin. MUST be the same as folder name and main plugin file
|-
|-
| version || string || Plugin version. TODO: Semantic? Add alpha/beta?
| version || string || Plugin version. Compared using PHP version_compare.
|-
|-
| active || boolean || If true, plugin will be activated by default
| active || boolean || If true, plugin will be activated by default

Latest revision as of 14:44, 24 August 2016

Each plugin can include a file config.json in its root folder.

All config files are read at superadmin login. The configuration is only applied if the version in the configuration file is higher than the version in the database. PHP function version_compare is used to compare versions.

Example

{
    "name": "CintLink",
    "version": "1.0.0",
    "active": 1
}

Fields and explanations

Name Type Description
name string Name of plugin. MUST be the same as folder name and main plugin file
version string Plugin version. Compared using PHP version_compare.
active boolean If true, plugin will be activated by default

Suggested fields

  • deactivateable, if false, the button for deactivate will be hidden
  • Settings fields could be moved to config file, as some other fields. BUT: Localization?