User Tools

Site Tools


plugins:configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugins:configuration [2014/04/11 03:11]
nuxwin
plugins:configuration [2018/03/21 11:10] (current)
nuxwin
Line 3: Line 3:
 =====Plugin Main Configuration Files===== =====Plugin Main Configuration Files=====
  
-Each plugin can provide a configuration file, which is a simple PHP file which return an associative array. This file allow the administrator to configure the plugin for its own needs.+Any plugin can provide a config.php ​configuration file, which is a simple PHP file which return an associative array. This file allows ​the administrator to configure the plugin for its own needs.
  
-When you want modify the configuration for a specific plugin, you must edit it configuration file and trigger a plugin update by clicking on the **Update Plugins** button ​which is available in the plugin management interface.+When you want modify the configuration for a specific plugin, you must edit it configuration file and trigger a plugin ​list update by clicking on the **Update Plugins** button ​that is available in the plugin management interface.
  
-__You must be aware__ that the main plugin configuration files are not persistent, meaning that each time you update a plugin to a new version, your changes are lost. Therefore, to remediate ​to this problemyou must in order:+__You must be aware__ that the main plugin configuration files are not persistent, meaning that each time you update a plugin to a new version, your changes are lost. One way to addrese ​this problem ​is to follow the following steps when you update ​ a plugin:
  
   - Make a backup of the plugin configuration file   - Make a backup of the plugin configuration file
Line 17: Line 17:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Plugin local configuration files doesn'​t prevent you to check main plugin configuration files when the plugins get updated. It's your responsability to check for new parameters and deprecated parameters.**+**Plugin local configuration files doesn'​t prevent you to check plugin configuration files when the plugins get updated. It's your responsability to check for new parameters and deprecated parameters.**
 </​WRAP>​ </​WRAP>​
  
 ====Introduction==== ====Introduction====
  
-Most plugins provide a standardized configuration file (see above) which is located at root of their directory. This file is not persistent, meaning that on each plugin update, you'll have to backup and restore it once the new plugin version will be uploaded.+Most plugins provide a standardized ​config.php ​configuration file (see above) which is located at root of their directory. This file is not persistent, meaning that on each plugin update, you'll have to backup and restore it once the new plugin version will be uploaded.
  
-Because ​such behavior is not really convenient, the plugin API provide ​a way to create plugin ​local configuration files, which are automatically merged with the main configuration files. Those files are persistent and never deleted automatically,​ even when i-MSCP ​get updated.+Because ​that behavior is not really convenient, the plugin API provides ​a way to solve that issue in a more elegant way by creating ​local configuration files. Local plugin configuration files are automatically merged with the primary ​configuration files. Those files are persistent and are never deleted automatically,​ even when i-MSCP ​is being updated.
  
 ====How It Works==== ====How It Works====
  
-When a local configuration file is found for a plugin, both, the main configuration file and the local configuration file are merged together.+When a local configuration file is found for a plugin, both, the primary ​configuration file and the local configuration file are merged together.
  
-Parameters defined in the local configuration files take precedence over those defined in the main configuration files.+Parameters defined in the local configuration files take precedence over those defined in the primary ​configuration files.
  
 ====Creating Plugin Local Configuration File==== ====Creating Plugin Local Configuration File====
Line 36: Line 36:
 All plugin local configuration files must be stored in the **imscp/​gui/​data/​persistent/​plugins** directory. All plugin local configuration files must be stored in the **imscp/​gui/​data/​persistent/​plugins** directory.
  
-Local configuration files *MUST* be named with plugin name followed by the php file extension. For instance, if the plugin for which you want create a local configuration file is named **JailKit**, the local configuration file *MUST* be named **JailKit.php**+Local configuration files *MUST* be named with plugin name followed by the php file extension. For instance, if the plugin for which you want create a local configuration file is named **InstanSSH**, the local configuration file *MUST* be named **InstanSSH.php**
  
 ====Plugin Local Configuration File Sample==== ====Plugin Local Configuration File Sample====
Line 111: Line 111:
   <?php   <?php
   return array(   return array(
-   '​__OVERRIDE__'​ => array( 
-   // Override default jail roor directory 
-   '​root_jail_dir'​ => '/​var/​www/​imscp-jails',​ 
-  ​ 
-   // Append the git section to the jail_app_sections parameter 
-   '​jail_app_sections'​ => array( 
- '​git'​ 
-   ) 
-   ), 
    '​__REMOVE__'​ => array(    '​__REMOVE__'​ => array(
    // Remove mysql-client section from the jail_app_section parameter    // Remove mysql-client section from the jail_app_section parameter
Line 133: Line 124:
   );   );
  
-Here, the special array key **%%__OVERRIDE__%%** defines an array which contain elements to add/​override,​ and the second ​special array key **%%__REMOVE__%%**, an array which contain ​elements to remove.+Here, the special array key **%%__REMOVE__%%** ​contains ​elements to remove.
  
  --- //​[[[email protected]|Nuxwin]] 2014/02/24 06:00//  --- //​[[[email protected]|Nuxwin]] 2014/02/24 06:00//
/var/www/virtual/i-mscp.net/wiki/htdocs/data/attic/plugins/configuration.1397185904.txt.gz · Last modified: 2014/04/11 03:11 by nuxwin