User Tools

Site Tools


plugins:demo

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
Next revision Both sides next revision
plugins:demo [2014/02/22 15:54]
nuxwin
plugins:demo [2014/02/23 09:30]
nuxwin [Disabled actions]
Line 1: Line 1:
-=====i-MSCP ​Demo Plugin =====+=====Demo Plugin=====
  
 ======Introduction====== ======Introduction======
  
-The demo plugin ​for i-MSCP ​allow to setup an i-MSCP demo server in few minutes.+The demo plugin allow to setup an i-MSCP demo server in few minutes.
 It allow to: It allow to:
  
Line 17: Line 17:
  
 To describe an user account, you must add a new section like below in the configuration file: To describe an user account, you must add a new section like below in the configuration file:
-<code php> + 
-... +  ... 
- '​user_accounts'​ => array( +   '​user_accounts'​ => array( 
- array( +   array( 
- '​label'​ => '​Administrator 1', +   '​label'​ => '​Administrator 1', 
- '​username'​ => '​admin1',​ +   '​username'​ => '​admin1',​ 
- '​password'​ => '​admin1',​ +   '​password'​ => '​admin1',​ 
- '​protected'​ => true +   '​protected'​ => true 
- +  
-+  
-... +  ...
-</​code>​+
  
 **Note:** User accounts are shown in dialog box only if they exists in the i-MSCP database. **Note:** User accounts are shown in dialog box only if they exists in the i-MSCP database.
Line 38: Line 37:
 ====Disabled actions==== ====Disabled actions====
  
-The plugin allows to disable some actions such as '**addFtp**''**EditFtp**''**DeleteFtp**'. The action names are same as event names dispatched in i-MSCP code. Only the **onBefore*** actions are supported since the others are not really relevant in the demo plugin context. You can see all integrated events by reading the [[https://​github.com/​i-MSCP/​imscp/​blob/​master/​gui/​library/​iMSCP/​Events.php|iMSCP_Events]] class.+The plugin allows to disable some actions such as **addFtp**, **EditFtp**,​ **DeleteFtp**. The action names are same as event names dispatched in i-MSCP code. Only the **onBefore*** actions are supported since the others are not really relevant in the demo plugin context. You can see all integrated events by reading the [[https://​github.com/​i-MSCP/​imscp/​blob/​master/​gui/​library/​iMSCP/​Events.php|iMSCP_Events]] class.
  
 To disable one or more actions, you must add a new section like below in the plugin configuration file: To disable one or more actions, you must add a new section like below in the plugin configuration file:
  
-<code php> +  ​... 
-... +   '​disabled_actions'​ => array( 
- '​disabled_actions'​ => array( +   '​onBeforeAddFtp',​ 
- '​onBeforeAddFtp',​ +   '​onBeforeEditFtp',​ 
- '​onBeforeEditFtp',​ +   '​onBeforeDeleteFtp',​ 
- '​onBeforeDeleteFtp',​ +   '​onBeforeAddSqlUser',​ 
- '​onBeforeAddSqlUser',​ +   '​onBeforeEditSqlUser',​ 
- '​onBeforeEditSqlUser',​ +   '​onBeforeDeleteSqlUser',​ 
- '​onBeforeDeleteSqlUser',​ +   '​onBeforeAddSqlDb',​ 
- '​onBeforeAddSqlDb',​ +   '​onBeforeDeleteSqlDb'​ 
- '​onBeforeDeleteSqlDb'​ +  
-+  ... 
-... +
-</​code>​+
  
 ====Configuration file sample==== ====Configuration file sample====
/var/www/virtual/i-mscp.net/wiki/htdocs/data/pages/plugins/demo.txt · Last modified: 2014/02/23 09:44 by nuxwin