Roundcube Community Forum

Release Support => Pending Issues => Topic started by: sami1255 on October 23, 2012, 04:17:46 AM

Title: Unable to have dynamic config
Post by: sami1255 on October 23, 2012, 04:17:46 AM

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.
Title: Re: Unable to have dynamic config
Post by: alec 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.
Title: Re: Unable to have dynamic config
Post by: sami1255 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 :)