New config option for custom logo; allow skins to define/override texts

release-0.6
thomascube 14 years ago
parent 715c7961ba
commit ae39c47c3a

@ -1,6 +1,8 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- New config option for custom logo
- Allow skins to define/override texts with <roundcube:label />
- Add simple ACL rights/namespace handling in folder manager - Add simple ACL rights/namespace handling in folder manager
- Fix parsing links with non-printable characters inside (#1487805) - Fix parsing links with non-printable characters inside (#1487805)
- Force IE to send referers (#1487806) - Force IE to send referers (#1487806)

@ -199,6 +199,10 @@ $rcmail_config['login_lc'] = false;
// set to false if only registered users can use this service // set to false if only registered users can use this service
$rcmail_config['auto_create_user'] = true; $rcmail_config['auto_create_user'] = true;
// replace Roundcube logo with this image
// specify an URL relative to the document root of this Roundcube installation
$rcmail_config['skin_logo'] = null;
// Includes should be interpreted as PHP files // Includes should be interpreted as PHP files
$rcmail_config['skin_include_php'] = false; $rcmail_config['skin_include_php'] = false;

@ -874,6 +874,10 @@ class rcmail
$nr = is_numeric($attrib['nr']) ? $attrib['nr'] : 1; $nr = is_numeric($attrib['nr']) ? $attrib['nr'] : 1;
$name = $attrib['name'] ? $attrib['name'] : ''; $name = $attrib['name'] ? $attrib['name'] : '';
// attrib contain text values: use them from now
if (($setval = $attrib[strtolower($_SESSION['language'])]) || ($setval = $attrib['en_us']))
$this->texts[$name] = $setval;
// check for text with domain // check for text with domain
if ($domain && ($text_item = $this->texts[$domain.'.'.$name])) if ($domain && ($text_item = $this->texts[$domain.'.'.$name]))

@ -658,7 +658,8 @@ class rcube_template extends rcube_html_page
// show a label // show a label
case 'label': case 'label':
if ($attrib['name'] || $attrib['command']) { if ($attrib['name'] || $attrib['command']) {
return Q(rcube_label($attrib + array('vars' => array('product' => $this->config['product_name'])))); $label = rcube_label($attrib + array('vars' => array('product' => $this->config['product_name'])));
return !$attrbi['noshow'] ? Q($label) : '';
} }
break; break;
@ -709,6 +710,12 @@ class rcube_template extends rcube_html_page
else if (function_exists($handler)) { else if (function_exists($handler)) {
$content = call_user_func($handler, $attrib); $content = call_user_func($handler, $attrib);
} }
else if ($object == 'logo') {
$attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"')));
if ($this->config['skin_logo'])
$attrib['src'] = $this->config['skin_logo'];
$content = html::img($attrib);
}
else if ($object == 'productname') { else if ($object == 'productname') {
$name = !empty($this->config['product_name']) ? $this->config['product_name'] : 'Roundcube Webmail'; $name = !empty($this->config['product_name']) ? $this->config['product_name'] : 'Roundcube Webmail';
$content = Q($name); $content = Q($name);

@ -1,3 +1,3 @@
<div id="header"><a href="./"><img id="logo" src="/images/roundcube_logo.png" alt="logo" title="<roundcube:object name='productname' />" /></a></div> <div id="header"><a href="./"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" alt="Logo" /></a></div>
<roundcube:object name="message" id="message" /> <roundcube:object name="message" id="message" />

@ -7,7 +7,7 @@
</head> </head>
<body> <body>
<img id="logo" src="/images/roundcube_logo.png" border="0" alt="<roundcube:object name='productname' />" style="margin:0 11px" /> <roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" style="margin:0 11px" />
<roundcube:object name="message" id="message" /> <roundcube:object name="message" id="message" />

Loading…
Cancel
Save