Author Topic: Unable to have dynamic config  (Read 3401 times)

Offline sami1255

  • Newbie
  • *
  • Posts: 5
Unable to have dynamic config
« on: October 23, 2012, 04:17:46 AM »
  • My mail server url is example1.com
    I have added another domain example2.com

Everything is working in terms of send, receive, spam check everything.

I wanted to have two domains show two different logos. My problem is I am unable to set up two roundcube config files based on these two domains. I have tried the array method as well as by setting include_host to true. For both domains it just seems to get configurations from main.inc.php.

main.inc.php
Code: [Select]
$rcmail_config['include_host_config'] = array (
'example1.com' => 'example1.inc.php',
'example2.com' => 'example2.inc.php'
);
// $rcmail_config['include_host_config'] = true; ( I have commented this line but it doesnt work in either case )
$rcmail_config['skin_logo'] = null;


example1.inc.php
Code: [Select]
<?php
$rcmail_config
['skin_logo'] = 'skins/larry/images/example1_logo.png';

example2.inc.php
Code: [Select]
<?php
$rcmail_config
['skin_logo'] = 'skins/larry/images/example2_logo.png';


I am in desperate need of help, so I'll return the favor by donating to your project or roundcube itself.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Unable to have dynamic config
« Reply #1 on: October 23, 2012, 01:17:54 PM »
The array keys must match $_SERVER['HTTP_HOST'] value, Add echo $_SERVER['HTTP_HOST'] in config file to make sure it contains a string you expect. Maybe you need to add www. prefix or sth.

Offline sami1255

  • Newbie
  • *
  • Posts: 5
Re: Unable to have dynamic config
« Reply #2 on: October 24, 2012, 06:17:41 AM »
Its resolved :)

I commented the include_host option. and added the array just below, it worked.

Thanks for the help alec :)