diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-03-01 21:58:54 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-03-01 21:58:54 +0000 |
| commit | 0a9b9b380f367a5834f5193e608c5d65c37e3bb3 (patch) | |
| tree | 6becfbdb26cfaea93ebe48179cb7495c2dc17879 | |
| parent | 11e70bebf45e56b5b4b3855442d4fd96e6ad63cc (diff) | |
New config option for custom logo; allow skins to define/override texts
git-svn-id: https://svn.roundcube.net/trunk@4585 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 2 | ||||
| -rw-r--r-- | roundcubemail/config/main.inc.php.dist | 4 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcmail.php | 4 | ||||
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 9 | ||||
| -rw-r--r-- | roundcubemail/skins/default/includes/header.html | 2 | ||||
| -rw-r--r-- | roundcubemail/skins/default/templates/login.html | 2 |
6 files changed, 20 insertions, 3 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 0d7d39476..5687ca14b 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,8 @@ 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 - Fix parsing links with non-printable characters inside (#1487805) - Force IE to send referers (#1487806) diff --git a/roundcubemail/config/main.inc.php.dist b/roundcubemail/config/main.inc.php.dist index db029f152..cdec12715 100644 --- a/roundcubemail/config/main.inc.php.dist +++ b/roundcubemail/config/main.inc.php.dist @@ -199,6 +199,10 @@ $rcmail_config['login_lc'] = false; // set to false if only registered users can use this service $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 $rcmail_config['skin_include_php'] = false; diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php index 319e53cc0..980efe43d 100644 --- a/roundcubemail/program/include/rcmail.php +++ b/roundcubemail/program/include/rcmail.php @@ -874,6 +874,10 @@ class rcmail $nr = is_numeric($attrib['nr']) ? $attrib['nr'] : 1; $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 if ($domain && ($text_item = $this->texts[$domain.'.'.$name])) diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index 11c290a16..c4b7a4426 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/program/include/rcube_template.php @@ -658,7 +658,8 @@ class rcube_template extends rcube_html_page // show a label case 'label': 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; @@ -709,6 +710,12 @@ class rcube_template extends rcube_html_page else if (function_exists($handler)) { $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') { $name = !empty($this->config['product_name']) ? $this->config['product_name'] : 'Roundcube Webmail'; $content = Q($name); diff --git a/roundcubemail/skins/default/includes/header.html b/roundcubemail/skins/default/includes/header.html index 393ee9218..37db1e8ca 100644 --- a/roundcubemail/skins/default/includes/header.html +++ b/roundcubemail/skins/default/includes/header.html @@ -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" /> diff --git a/roundcubemail/skins/default/templates/login.html b/roundcubemail/skins/default/templates/login.html index a315557bf..7fb4370ca 100644 --- a/roundcubemail/skins/default/templates/login.html +++ b/roundcubemail/skins/default/templates/login.html @@ -7,7 +7,7 @@ </head> <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" /> |
