Roundcube Community Forum

Themes & Styling => Theme Releases => Topic started by: plomax on June 28, 2012, 12:13:35 PM

Title: Dynamic Theme Selection
Post by: plomax on June 28, 2012, 12:13:35 PM
Hi

I'd like to know if its possible to programatically display a given theme based on either the
username of the person logging in, or the domainname/URL they have entered to get to the webmail
interface.

So for example within the same implementation of roundcube UserA could enter http://webmail.abc123.com/
and see Theme1 whereas UserB could enter http://webmail.xyz123.com/ and see Theme2.

I suppose it boils down to whether its possible to amend main.inc.php programatically and change the
skin folder name? ...or change the config 'skin' variable once its been read but before its used?

Any help would be greatly appreciated.
cheers

Title: Re: Dynamic Theme Selection
Post by: SKaero on June 29, 2012, 01:48:11 AM
Yes you can change the theme dynamically, I don't remember off the the top of my head but I think changing it in the startup hook works. If not you could save it into preferences when the user was created.
Title: Re: Dynamic Theme Selection
Post by: JohnDoh on June 29, 2012, 02:42:43 AM
you could also use the include_host_config to change the config when different urls are used to access the site.
Title: Re: Dynamic Theme Selection
Post by: plomax on June 29, 2012, 02:54:47 AM
Excellent! thanks sorted it