Release Support > Pending Issues

Change logo based on login

(1/5) > >>

jeffshead:
The website for the 'Custom Logo' plugin that is listed in the repository (http://trac.roundcube.net/wiki/Plugin_Repository) has been down for a very long time.

Can someone share this plugin?

I want to use the same URL (https://www.mysite.com/webmail/) to login and check email for all of my domains. Then I can simply enter the full email address (e.g., me@mysite.com, me@mysite2.com) and the logo changes based on the domain part of the email address that is entered during login.

If the plugin is not available or will not work with RC 0.95, can someone please tell me how to have the logo change based on the domain part of the email address that is entered during login?

alec:
You can write PHP code in config file, e.g.:

if (strpos($_SESSION['username'], '@domain1.tld'))
    $rcmail_config['skin_logo'] = 'path/to/logo/file1';
else if (strpos($_SESSION['username'], '@domain2.tld'))
    $rcmail_config['skin_logo'] = 'path/to/logo/file2';

Dennis1993:
You don't Need the plugin. You can define various logos to RoundCube by default.

Look into your config:

--- Quote ---// replace Roundcube logo with this image
// specify an URL relative to the document root of this Roundcube installation
// an array can be used to specify different logos for specific template files, '*' for default logo
// for example array("*" => "/images/roundcube_logo.png", "messageprint" => "/images/roundcube_logo_print.png")
$config['skin_logo'] = null;
--- End quote ---

And you can define special config files for every domain you have and set the right logo for all users.

jeffshead:

--- Quote from: alec on November 08, 2013, 04:10:34 AM ---You can write PHP code in config file, e.g.:

if (strpos($_SESSION['username'], '@domain1.tld'))
    $rcmail_config['skin_logo'] = 'path/to/logo/file1';
else if (strpos($_SESSION['username'], '@domain2.tld'))
    $rcmail_config['skin_logo'] = 'path/to/logo/file2';

--- End quote ---

Thanks for the code but it does not work. I did verify the paths for the other logos. The paths are correct. Any suggestions?

jeffshead:

--- Quote from: Dennis1993 on November 08, 2013, 06:48:03 AM ---You don't Need the plugin. You can define various logos to RoundCube by default.

Look into your config:

--- Quote ---// replace Roundcube logo with this image
// specify an URL relative to the document root of this Roundcube installation
// an array can be used to specify different logos for specific template files, '*' for default logo
// for example array("*" => "/images/roundcube_logo.png", "messageprint" => "/images/roundcube_logo_print.png")
$config['skin_logo'] = null;
--- End quote ---

And you can define special config files for every domain you have and set the right logo for all users.

--- End quote ---

As I stated in my original post, I'm using the same URL to access RC for all domains so I don't see how RC will know to include a domain specific config file. Maybe I'm not following you.

Navigation

[0] Message Index

[#] Next page

Go to full version