From a77504aeacd4516156267fe10eeca1bfffcacf87 Mon Sep 17 00:00:00 2001 From: PhilW Date: Mon, 26 Aug 2013 12:22:34 +0100 Subject: allow different logos for different functions (eg. normal and print) --- config/defaults.inc.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 54d0b1d27..feed82f1b 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -240,6 +240,9 @@ $config['support_url'] = ''; // 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 different screens +// for example array("default" => "/images/roundcube_logo.png", "print" => "/images/roundcube_logo_print.png") +// available options: default, login, print $config['skin_logo'] = null; // automatically create a new Roundcube user when log-in the first time. -- cgit v1.2.3 From d81d69377a53f347eab1bef898dc405d3b5940e9 Mon Sep 17 00:00:00 2001 From: PhilW Date: Mon, 26 Aug 2013 13:45:30 +0100 Subject: use template file name rather than special attribute --- config/defaults.inc.php | 5 ++--- program/include/rcmail_output_html.php | 8 ++++---- skins/classic/includes/header.html | 2 +- skins/classic/templates/login.html | 2 +- skins/classic/templates/messageprint.html | 2 +- skins/larry/includes/header.html | 2 +- skins/larry/templates/login.html | 2 +- skins/larry/templates/messageprint.html | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) (limited to 'config') diff --git a/config/defaults.inc.php b/config/defaults.inc.php index feed82f1b..30ed70bd2 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -240,9 +240,8 @@ $config['support_url'] = ''; // 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 different screens -// for example array("default" => "/images/roundcube_logo.png", "print" => "/images/roundcube_logo_print.png") -// available options: default, login, print +// 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; // automatically create a new Roundcube user when log-in the first time. diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 39f79d119..ebf71cb3f 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -926,11 +926,11 @@ class rcmail_output_html extends rcmail_output $attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"'))); if (is_array($this->config->get('skin_logo'))) { - if (isset($attrib['type']) && array_key_exists($attrib['type'], $this->config->get('skin_logo'))) { - $attrib['src'] = $this->config->get('skin_logo')[$attrib['type']]; + if ($logo = $this->config->get('skin_logo')[$this->template_name]) { + $attrib['src'] = $logo; } - elseif (array_key_exists('default', $this->config->get('skin_logo'))) { - $attrib['src'] = $this->config->get('skin_logo')['default']; + elseif ($logo = $this->config->get('skin_logo')['*']) { + $attrib['src'] = $logo; } } elseif ($logo = $this->config->get('skin_logo')) { diff --git a/skins/classic/includes/header.html b/skins/classic/includes/header.html index 962e4dd7b..08d777af0 100644 --- a/skins/classic/includes/header.html +++ b/skins/classic/includes/header.html @@ -1,2 +1,2 @@ -