Skip to content

Commit

Permalink
use template file name rather than special attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoh committed Aug 26, 2013
1 parent a77504a commit d81d693
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions config/defaults.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,8 @@

// 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.
Expand Down
8 changes: 4 additions & 4 deletions program/include/rcmail_output_html.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,11 @@ protected function xml_command($matches)
$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')) {
Expand Down
2 changes: 1 addition & 1 deletion skins/classic/includes/header.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" onclick="location.href='./?_page=1'" type="default" />
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" onclick="location.href='./?_page=1'" />
<roundcube:object name="message" id="message" />
2 changes: 1 addition & 1 deletion skins/classic/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>

<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" style="margin:0 11px" type="login" />
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" style="margin:0 11px" />

<roundcube:object name="message" id="message" />

Expand Down
2 changes: 1 addition & 1 deletion skins/classic/templates/messageprint.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>

<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" type="print" />
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" />

<div id="printmessageframe">
<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" />
Expand Down
2 changes: 1 addition & 1 deletion skins/larry/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<roundcube:button command="logout" label="logout" class="button-logout" classSel="button-logout" innerClass="button-inner" />
<span class="minmodetoggle"></span>
</div>
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" type="default" />
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" />
</div>
<roundcube:endif />

Expand Down
2 changes: 1 addition & 1 deletion skins/larry/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div id="login-form">
<div class="box-inner">
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" type="login" />
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" />

<roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" size="40" />
Expand Down
2 changes: 1 addition & 1 deletion skins/larry/templates/messageprint.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>

<div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" type="print" /></div>
<div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" /></div>

<div id="printmessageframe">
<roundcube:object name="messageHeaders" class="headers-table" />
Expand Down

0 comments on commit d81d693

Please sign in to comment.