Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 4 Customizing Sugar : Creating New Themes : Packaging Custom Themes

Packaging Custom Themes
The Upgrade Wizard, accessible through the Admin screen, allows you to apply themes without needing to unzip the files manually. The theme is also actually added to the “Theme” dropdown on the Sugar Login screen.
The Upgrade Wizard relies on a file named manifest.php, which should reside alongside the root directory of your theme ZIP file.
The following section outlines the format of the manifest file. An example manifest file can be found in the following section.
o
acceptable_sugar_flavors Contains which Sugar Editions the package can be installed on. Accepted values are any combination of: CE, PRO, and ENT.
o
acceptable_sugar_versions This directive contains two arrays:
o
o
o
author Contains the author of the package, e.g. “SugarCRM Inc.”
o
copy_files An array detailing the source and destination of files that should be copied during installation of the package. See the example manifest file below for details.
o
description A description of the package. Displayed during installation.
o
icon A path (within the package ZIP file) to an icon image that will be displayed during installation. Examples include “./patch_directory/icon.gif” and “./patch_directory/images/theme.gif”
o
is_uninstallable Setting this directive to TRUE allows the Sugar administrator to uninstall the package. Setting this directive to FALSE disables the uninstall feature.
o
name The name of the package. Displayed during installation.
o
published_date The date the package was published. Displayed during installation.
o
type The package type. This should be set to “theme”
o
version The version of the patch, i.e. “1.0” or “0.96-pre1”
Example Theme Manifest File
The following is an example manifest.php file, for the GoldenGate theme:
<?php
$manifest = array (
'acceptable_sugar_versions' =>
array (
'exact_matches' =>
array (
),
'regex_matches' =>
array (
0 => '3.5.[01][a-z]?'
),
),
'acceptable_sugar_flavors' =>
array (
0 => 'OS',
1 => 'PRO',
2 => 'ENT',
),
'name' => 'Golden Gate Theme',
'description' => 'San Francisco inspired theme',
'author' => 'SugarCRM Inc.',
'published_date' => '2005-09-15 16:00:00',
'version' => '3.5.1',
'type' => 'theme',
'is_uninstallable' => TRUE,
'icon' => 'GoldenGate/images/Themes.gif',
'copy_files' =>
array (
'from_dir' => 'GoldenGate',
'to_dir' => 'themes/GoldenGate',
'force_copy' =>
array (
),
),
); ?>
Example File Structure: The following is an example of the file structure of the GoldenGate theme:
GoldenGate.zip
| manifest.php | \---GoldenGate
| config.php
| cookie.js
| footer.php
| <more files>
|
\---images
accept_inline.gif
AccountReports.gif
Accounts.gif
<more images>
 
You’ll need to create a root directory that contains the theme directory. The name of this root directory (i.e. GoldenGate) is what should be used in the from_dir element of the copy_files array in manifest.php. You’ll also need to place your manifest.php alongside this root directory. Create a ZIP file containing the root directory and the manifest.php file at the top level. Now your language pack is ready to be installed with the Upgrade Wizard.

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License