User and context based themes
Introduction
Currently you cannot define user or context based themes within the Open-Xchange Server. For this reason we created a UI plug in that will disable all selectable themes in the User front end, so that the user cannot change his current theme. With this plug in the server would be able to set a theme for a user, and that theme cannot be changed by the user. This functionality is at least a workaround as long the function isn't offered officially by the Open-Xchange Server, and is currently experimental. Setting theGUI configuration for a user via RMI is described in the article Setting User/GUI Preferences via RMI, an example how this can be done e.g. with a UWA widget through the HTTP API can be found here: Adding a pre defined UWA widget for a User.
Setup description
$ vim /opt/open-xchange/etc/groupware/settings/disableUserThemeSelection.properties modules/disableUserThemeSelection/enabled=true
$ vim /path_to/ox6/plugins/disableUserThemeSelection/register.js /** * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, Version 2 as published * by the Free Software Foundation. * * Copyright (C) 2004-2007 Open-Xchange, Inc. * Mail: info@open-xchange.com * * @author: Stefan Preuss <stefan.preuss@open-xchange.com> * */ /* * NOTE: THE WORK IS PROVIDED "AS IS," AND COMES WITH ABSOLUTELY NO WARRANTY, * EXPRESS OR IMPLIED! */ var obj = {}; obj[configGetKey("gui.theme.path")] = configGetKey("gui.theme.name"); configSetKey("modules.themes", obj);
$ /etc/init.d/open-xchange-groupware restart
After you have setup the disableUserThemeSelection plug in has been enabled, the user cannot change his theme anymore. More he will only have the currently selected theme in his dropdownbox on the theme selection page.
Server set's theme for a user / context
Setting theGUI configuration for a user via RMI is described in the article Setting User/GUI Preferences via RMI, an example how this can be done e.g. with a UWA widget through the HTTP API can be found here: Adding a pre defined UWA widget for a User.
Now you have to ensure that the server sets the correct theme on the user creation.