Download Zarafa WebApp - Developers` Manual

Transcript
Chapter 13.
Deployment and Build System
13.1. Deployment
All plugins files should be created in a special separate plugin directory - webapp/plugins.
Each plugin or widget should have one separate directory. For example, Spreed plugin has the
following items inside:
• js - folder.
• data - folder //all classes realted to working with data are stored here.
• dialogs - folder //all classes realted to dialogs and ui should be placed here.
• SpreedPlugin.js //cannot be sorted properly being the main plugin class and is separate.
• php - folder.
• data - folder //data stored here like list of languages and timezones.
• inc - folder //php classes stored here.
• resources - folder.
• css - folder //css resources places here.
• icons - folder // different icons stored here.
• build.xml //for building spreed plugin (discussed further in chapter Build System build-system).
• config.php //defined php constants.
• manifest.xml //manifest file.
Example widget hierarchy let be end of world widget:
• js - folder.
• FBWidget.js //widget class.
• resources - folder.
• css - folder //css files for widget placed here.
• images - folder //images for widget go here.
• facebook.png
• build.xml
• manifest.xml
If you want your plugin to be enabled/disabled using Zarafa Settings menu you should create a new
folder in [WebApp root folder]/plugins directory with the name of your plugin e.g. plugins/facebook,
plugins/spreed. There you should create at least two files: manifest.xml plugin.facebook.php You may
also create config.php file to set default value for your plugin settings. Here goes the example of FB
plugin config.php file.
63