Author Topic: Multiple Themes  (Read 3286 times)

Offline stapuff106

  • Jr. Member
  • **
  • Posts: 10
Multiple Themes
« 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 - http://www.roundcube.mysite.com so I goto http://www.roundcube.mysite.com to view emails.

I have a second domain http://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

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Multiple Themes
« Reply #1 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.
Julius Caesar

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

Offline stapuff106

  • Jr. Member
  • **
  • Posts: 10
Multiple Themes
« Reply #2 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


caroline

  • Guest
cheap ugg boots
« Reply #4 on: January 24, 2011, 10:35:32 PM »
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

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Multiple Themes
« Reply #5 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';
« Last Edit: January 25, 2011, 10:23:50 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline stapuff106

  • Jr. Member
  • **
  • Posts: 10
Multiple Themes
« Reply #6 on: January 25, 2011, 10:20:59 AM »
awesome....I am going to give it a try.

Thanks for the posts.

stapuff106

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Multiple Themes
« Reply #7 on: January 25, 2011, 10:52:09 AM »
Please notice: Code has been edited. Duplicate $skin definition has been removed!
Regards,
Rosali
__________________
MyRoundcube Project (commercial)