Author Topic: [SOLVED] Configure to use different logo for every domain name.  (Read 7015 times)

Offline MIGs

  • Newbie
  • *
  • Posts: 2
[SOLVED] Configure to use different logo for every domain name.
« on: September 17, 2012, 09:25:35 AM »
Hi !
I use Roundcube Webmail 0.8.1 Stable release.

I have configured
Code: [Select]
...
$rcmail_config['username_domain'] = '%d';
$rcmail_config['mail_domain'] = '%d';
$rcmail_config['skin_logo'] = 'mydomain.com_logo.png';
...
It works, I can log in, I see this new logo, BUT I wish to set up diferent logo for every domain or at least different logo for one special domain.

What is correct way to do this ?!
I tried something like this, but nothing works:
Code: [Select]
$rcmail_config['mail_domain'] = '%d_logo.png';
$rcmail_config['mail_domain'] = '%d logo.png';
$rcmail_config['mail_domain'] = '%d' 'logo.png';
etc...
If i put something together with %d it stops parse it as variable and prints out in HTML as %d_logo.png etc...

What is the correct syntax ?
« Last Edit: September 17, 2012, 10:29:36 AM by MIGs »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,752
    • SKaero - Custom Roundcube development

Offline MIGs

  • Newbie
  • *
  • Posts: 2
Re: Configure to use different logo for every domain name.
« Reply #2 on: September 17, 2012, 10:28:58 AM »
Thanks SKaero - this helped !

I figured out that if I hawe Apache(1.3 on OpenBSD 4.5) config like this:
Code: [Select]
<VirtualHost *>
ServerName mail.domain1.com
ServerAlias mail.domain2.com
ServerAlias mail.domain3.com
ServerAlias mail.domain4.com
ServerAlias mail.domain5.com
ServerAlias mail.*.*
DocumentRoot /var/www/htdocs/mail/roundcube
</VirtualHost>
Variable %d in username_domian & mail_domain works only on "ServerName" domain.
I made include file for every domain: e.g.:

File: mail.domain1.com.inc.php
Code: [Select]
<?php
$rcmail_config
['skin_logo'] = 'domain1.com_logo.png';
$rcmail_config['username_domain'] = 'domain1.com';
$rcmail_config['mail_domain'] = 'domain1.com';
?>

File: mail.domain2.com.inc.php
Code: [Select]
<?php
$rcmail_config
['skin_logo'] = 'domain2.com_logo.png';
$rcmail_config['username_domain'] = 'domain2.com';
$rcmail_config['mail_domain'] = 'domain2.com';
?>
etc.

Now it works.

Thanks one more time !