Roundcube Community Forum

 

Multiple Themes

Started by stapuff106, January 24, 2011, 11:44:25 AM

Previous topic - Next topic

stapuff106

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

Julius Caesar

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.
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

stapuff106

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


caroline

Nice topic , looking forwad to updating !
UGGs Classic Tall          UGG Bailey Button          UGG Classic Short         ugg classic tall chocolate        ugg classic tall grey         UGG Classic Cardy         UGG Bailey Button Kids Boot Gray

rosali

#5
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';
Regards,
Rosali

stapuff106

awesome....I am going to give it a try.

Thanks for the posts.

stapuff106

rosali

Please notice: Code has been edited. Duplicate $skin definition has been removed!
Regards,
Rosali