Opened 2 years ago

Last modified 3 months ago

#1487816 new Feature Requests

New config option for custom watermark & favicon.ico

Reported by: brandond Owned by:
Priority: 5 Milestone: later
Component: User Interface Version: git-master
Severity: minor Keywords:
Cc: klonos@…

Description

A recent change to trunk added a new config option for custom logo. It would be nice if there was a similar option for the watermark image. Having both of these made configurable would remove almost all of my local skin customizations, and let me go back to the stock files.

Attachments (1)

logo.php (664 bytes) - added by alec 15 months ago.
Sample plugin

Download all attachments as: .zip

Change History (10)

comment:1 Changed 2 years ago by alec

  • Milestone changed from 0.6-beta to later

Because watermark.html page is not handled by templates engine, we'll need an option to replace the whole page too.

comment:2 Changed 2 years ago by thomasb

  • Severity changed from normal to minor

The watermark is more neutral than the logo itself. The reason why to make the logo easy configurable was to encourage ISPs to customize their webmail frontent. We get plenty of support requests from users who think that Roundcube is a free mail service like Gmail, Hotmail, etc. and the ask questions about their "Roundcube mail account".

comment:3 Changed 20 months ago by klonos

This feature would be really helpful to have. Custom favicon too please.

Last edited 20 months ago by klonos (previous) (diff)

Changed 15 months ago by alec

Sample plugin

comment:4 Changed 15 months ago by alec

I attached a sample plugin which replaces watermark.html file location and logo image.

comment:5 Changed 9 months ago by klonos

  • Summary changed from New config option for custom watermark to New config option for custom watermark & favicon.ico

comment:6 Changed 9 months ago by klonos

  • Cc klonos@… added

comment:7 Changed 9 months ago by klonos

...coming from #1487816 that was marked as a duplicate of this one. Also changing the issue title for better findability and in order to make sure that there's an option for the favicon as well (else the other issue is not a real duplicate).

So we're talking about adding a $rcmail_config['skin_watermark'] & a $rcmail_config['skin_favicon'] options in main.inc.php. Right?

comment:8 Changed 3 months ago by ASeques

Thanks to the great template system in roundcube, adding support for custom favicon is quite easy.

Change in the file links.html the line:

<link rel="shortcut icon" href="/images/favicon.ico"/>

Into:

<link rel="shortcut icon" href="/images/<roundcube:var name="config:skin_favicon" />"/>

And to enable the option, in main.inc.php you just have to add something like:

$rcmail_config['skin_favicon'] = 'favicon.png';

comment:9 Changed 3 months ago by klonos

The problem with the code in the previous post is that it still requires to place the custom favicon.ico file inside the /skins/larry/images/ folder. This means that the default favicon.ico file that already exists in that folder needs to be replaced. This in turn means that with the next upgrade the custom favicon will be overwritten with the skin's default which defeats the whole purpose of the hack.

I realize that the code could be changed so that the href tag points to a different folder than the skin's /images (or the custom favicon file could be renamed to something other than the standard "favicon.ico"). That would preserve the custom favicon file through successive upgrades, but still means placing a custom file within the file structure of a skin provided with the core code.

Furthermore, I wasn't able to figure a way to place the custom favicon.ico file in a level higher than that of the skin's folder. That is where the actual issue lies.

...I'll give a try to the sample plugin posted previously by alec and report back soon.

Note: See TracTickets for help on using tickets.