Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: stapuff106 on January 24, 2011, 11:44:25 AM

Title: Multiple Themes
Post by: stapuff106 on January 24, 2011, 11:44:25 AM
Is it possible to run a theme based on the domain name requesting roundcube email?

I uploaded roundcube in a folder just above the public_html level and added subdomains to retrieve emails.

Example - //www.roundcube.mysite.com so I goto //www.roundcube.mysite.com to view emails.

I have a second domain //www.roundcube.anothersite.com that also uses the same files as above.  Is there any way to say if mysite.com logs in....use theme1, if anothersite.com logs in use theme #2?

Thanks,

stapuff106
Title: Multiple Themes
Post by: Julius Caesar on January 24, 2011, 04:53:02 PM
Out of the box the only possibility is with a second Roundcube installation with a different theme in the ./config/main.inc.php.

Maybe some of the (plug-in)coders know if this can be done.

An alternative might be, setting the other theme for the users in the other domain and prevent changing the theme in the ./config/main.inc.php.
Title: Multiple Themes
Post by: stapuff106 on January 24, 2011, 09:16:42 PM
I appreciate the response back.  I am trying to prevent having multiple copies of the same so I was trying for just the themes if possible.

My basic concept is giving each of my hosting plans there own customized theme without needing to have the main files.

Again - thanks for your suggestion,

stapuff106
Title: Multiple Themes
Post by: SKaero on January 24, 2011, 10:10:43 PM
Check out: http://www.roundcubeforum.net/7-third-party-contributions/25-old-style-plug-ins/1924-custom-logos-welcome-text-based-domain-name.html#post7849
Title: cheap ugg boots
Post by: caroline on January 24, 2011, 10:35:32 PM
Nice topic , looking forwad to updating !
UGGs Classic Tall (http://www.pickuggboots.co.uk)          UGG Bailey Button (http://www.uggbaileybuttonuk.co.uk)          UGG Classic Short (http://www.myuggsclassictall.co.uk)         ugg classic tall chocolate (http://www.thecheapuggsboots.com)        ugg classic tall grey (http://www.newsuggbootssale.com)         UGG Classic Cardy (http://www.uggbootsgoods.com)         UGG Bailey Button Kids Boot Gray (http://www.ugg-boots-5825.com)
Title: Multiple Themes
Post by: rosali on January 25, 2011, 01:00:05 AM
Yes it is possible.

./config/main.inc.php

// skin name: folder from skins/
// map your skins here 'domain/host' => 'skin_name'
$skins = array(
  'mail.roundcube.de' => 'default',
  'roundcube.de' => 'groupvice4',
);
$pageURL = 'http';
if ($_SERVER['HTTPS'] == 'on')
  $pageURL .= 's';
$pageURL .= '://';
if ($_SERVER['SERVER_PORT'] != '80')
  $pageURL .= $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'];
else
  $pageURL .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$result = parse_url($pageURL);
if(get_input_value('skin', RCUBE_INPUT_GPC))
  $rcmail_config['skin'] = get_input_value('skin', RCUBE_INPUT_GPC);
elseif(isset($skins[$result['host']]))
  $rcmail_config['skin'] = $skins[$result['host']];
else
  $rcmail_config['skin'] = 'default';
Title: Multiple Themes
Post by: stapuff106 on January 25, 2011, 10:20:59 AM
awesome....I am going to give it a try.

Thanks for the posts.

stapuff106
Title: Multiple Themes
Post by: rosali on January 25, 2011, 10:52:09 AM
Please notice: Code has been edited. Duplicate $skin definition has been removed!