Author Topic: Dynamic Theme Selection  (Read 7728 times)

Offline plomax

  • Newbie
  • *
  • Posts: 2
Dynamic Theme Selection
« 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


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,880
    • SKaero - Custom Roundcube development
Re: Dynamic Theme Selection
« Reply #1 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.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: Dynamic Theme Selection
« Reply #2 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline plomax

  • Newbie
  • *
  • Posts: 2
Re: Dynamic Theme Selection
« Reply #3 on: June 29, 2012, 02:54:47 AM »
Excellent! thanks sorted it