WebApp own Theme

Hello Kopano Forum,

I have make my own WepApp Theme and place it on:

/usr/share/kopano-webapp/plugins/THEMENAME

But when the user change the theme in the preferences in webapp and he want go back to my own theme, the theme is not listed.

My own Theme is configured as default in the config.php.

 define("THEME", 'THEMENAME');

Did you also changed the other files, like /usr/share/kopano-webapp/plugins/THEMENAME/jsTheme.js
Also check the name, it is case sensitive

Yes, this is my jsTheme.js:

// Create the namespace that will be used for this plugin
Ext.namespace('Zarafa.plugins.SWT');

/**
 * A theme plugin should extend {@link Zarafa.core.ThemePlugin}. If it only changes the css
 * there is nothing to implement in this class.
 * @class Zarafa.plugins.themeexample.Theme
 * @extends Zarafa.core.ThemePlugin
 */
Zarafa.plugins.SWT.Theme = Ext.extend(Zarafa.core.ThemePlugin, {});

// Register the plugin with the container after the WebApp has loaded.
Zarafa.onReady(function() {
    container.registerPlugin(new Zarafa.core.PluginMetaData({

        // To avoid problems the name of a plugin should be exactly the same as the
        // the name of the directory it is located in.
        name : 'SWT',

        // The displayName is what will be shown in the dropdown in which the user can pick a theme
        displayName : _('SWT'),

        // Do not allow the user to disable this plugin
        allowUserDisable : true,

        // Do not show this plugin in the plugin list
        allowUserVisible : true,

        pluginConstructor : Zarafa.plugins.SWT.Theme,

        // The 'about' text will be shown in the About part of the settings
        about : '<a target="_blank" href="http://www.swt-online.de">Background vector designed by SWT</a>'
    }));
});

hello @yythoss,

is the manifest.xml present in the same dir?

if not this is how it should look:

<?xml version="1.0"?>
<!DOCTYPE plugin SYSTEM "manifest.dtd">
<plugin version="2">
        <info>
                <version>1.0</version>
                <name>SWT</name>
                <title>SWT</title>
                <author>yythoss</author>
                <authorURL>www.yythoss.com</authorURL>
                <description>Theme for beeing fabolous and sparkel all the time</description>
        </info>
        <components>
                <component>
                        <files>
                                <client>
                                        <clientfile load="source">js/Theme.js</clientfile>
                                        <clientfile load="debug">js/Theme.js</clientfile>
                                        <clientfile load="release">js/Theme.js</clientfile>
                                </client>
                        </files>
                </component>
        </components>
</plugin>

note the path to your theme.js use your path/name

regards

coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.4.0-9.1
WebApp 3.4.5.1202-47.1 external Server - TCP-Socket
Z-Push 2.3.9+0-90.1
PHP-MAPI 8.5.4.0-9.1
PHP 5.6.25 with Zend OPcache v7.0.6-dev
DeskApp 1.5.0
Outlook 2016(64bit) KOE 1.6.282
Outlook 2010 -Zarafa 7.2.6

I’ve have made my theme adjustments at the “themeexample” theme and when that was working it changed the names in all the files until this was working.
This has worked out for me…

Yes, the manifest.xml was the problem.
Now it works perfekt THX.

Log in to reply

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.