• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Input Quick tip on branding Roundcube

Denis Gomes Franco

Regular Pleskian
I'd like to share a quick and dirty hack that I used to brand my customers' Roundcube interface (now that it is running on v1.4) with their own logos. It was a fun little project and they absolutely loved it. With this, the customer will see their own logo on the login page and on the top left corner of the webmail interface.
Roundcube kinda allows for per-domain configuration but I figured this type of customization could be done without this. Here's what I did:

1. Created a "branding" directory inside /usr/share/psa-roundcube/ (or wherever your Roundcube instance is installed)
2. Uploaded customers logos to that directory. Files should be in PNG format with a square aspect ratio, and their names should be the same as the subdomain where Roundcube runs, eg., if the access URL is "webmail.mysupercompany.com" the file should be named "webmail.mysupercompany.com.png". You can upload logos for all your domains to that directory.
3. Added the following lines to /usr/share/psa-roundcube/config/config.inc.php:

PHP:
$logo_cliente = $_SERVER['SERVER_NAME'] . '.png';
if (file_exists('./branding/' . $logo_cliente)) {
  $config['skin_logo'] = '../../branding/' . $logo_cliente;
  } else {
  $config['skin_logo'] = '../../branding/placeholder.png';
}

Note that the above code is referencing a placeholder.png file. You should also upload a placeholder logo under that name, as it will be used instead whenever there is no custom logo present for a domain, or when you don't want to brand a particular domain. This configuration will override the Elastic skin default logo, and I am using my company logo as a placeholder. But if you'd like to use the default Elastic skin logo then just delete that line and the ELSE condition right above it.

Hope that helps! For me it works just like a charm :)
 
Last edited:
I'd like to share a quick and dirty hack that I used to brand my customers' Roundcube interface (now that it is running on v1.4) with their own logos. It was a fun little project and they absolutely loved it. With this, the customer will see their own logo on the login page and on the top left corner of the webmail interface.
Roundcube kinda allows for per-domain configuration but I figured this type of customization could be done without this. Here's what I did:

1. Created a "branding" directory inside /usr/share/psa-roundcube/ (or wherever your Roundcube instance is installed)
2. Uploaded customers logos to that directory. Files should be in PNG format with a square aspect ratio, and their names should be the same as the subdomain where Roundcube runs, eg., if the access URL is "webmail.mysupercompany.com" the file should be named "webmail.mysupercompany.com.png". You can upload logos for all your domains to that directory.
3. Added the following lines to /usr/share/psa-roundcube/config/config.inc.php:

PHP:
$logo_cliente = $_SERVER['SERVER_NAME'] . '.png';
if (file_exists('./branding/' . $logo_cliente)) {
  $config['skin_logo'] = '../../branding/' . $logo_cliente;
  } else {
  $config['skin_logo'] = '../../branding/placeholder.png';
}

Note that the above code is referencing a placeholder.png file. You should also upload a placeholder logo under that name, as it will be used instead whenever there is no custom logo present for a domain, or when you don't want to brand a particular domain. This configuration will override the Elastic skin default logo, and I am using my company logo as a placeholder. But if you'd like to use the default Elastic skin logo then just delete that line and the ELSE condition right above it.

Hope that helps! For me it works just like a charm :)
Perfectly done with no erros. Great contribution!
 
I'd like to share a quick and dirty hack that I used to brand my customers' Roundcube interface (now that it is running on v1.4) with their own logos. It was a fun little project and they absolutely loved it. With this, the customer will see their own logo on the login page and on the top left corner of the webmail interface.
Roundcube kinda allows for per-domain configuration but I figured this type of customization could be done without this. Here's what I did:

1. Created a "branding" directory inside /usr/share/psa-roundcube/ (or wherever your Roundcube instance is installed)
2. Uploaded customers logos to that directory. Files should be in PNG format with a square aspect ratio, and their names should be the same as the subdomain where Roundcube runs, eg., if the access URL is "webmail.mysupercompany.com" the file should be named "webmail.mysupercompany.com.png". You can upload logos for all your domains to that directory.
3. Added the following lines to /usr/share/psa-roundcube/config/config.inc.php:

PHP:
$logo_cliente = $_SERVER['SERVER_NAME'] . '.png';
if (file_exists('./branding/' . $logo_cliente)) {
  $config['skin_logo'] = '../../branding/' . $logo_cliente;
  } else {
  $config['skin_logo'] = '../../branding/placeholder.png';
}

Note that the above code is referencing a placeholder.png file. You should also upload a placeholder logo under that name, as it will be used instead whenever there is no custom logo present for a domain, or when you don't want to brand a particular domain. This configuration will override the Elastic skin default logo, and I am using my company logo as a placeholder. But if you'd like to use the default Elastic skin logo then just delete that line and the ELSE condition right above it.

Hope that helps! For me it works just like a charm :)

After five years of your contribution, it still works perfectly. Thank you very much! It’s a simple and effective solution.
 
Back
Top