allow different logos for different functions (eg. normal and print)

pull/107/head
PhilW 11 years ago
parent 62350ba021
commit a77504aeac

@ -240,6 +240,9 @@ $config['support_url'] = '';
// replace Roundcube logo with this image // replace Roundcube logo with this image
// specify an URL relative to the document root of this Roundcube installation // 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; $config['skin_logo'] = null;
// automatically create a new Roundcube user when log-in the first time. // automatically create a new Roundcube user when log-in the first time.

@ -924,8 +924,19 @@ class rcmail_output_html extends rcmail_output
} }
else if ($object == 'logo') { else if ($object == 'logo') {
$attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"'))); $attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"')));
if ($logo = $this->config->get('skin_logo'))
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']];
}
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; $attrib['src'] = $logo;
}
$content = html::img($attrib); $content = html::img($attrib);
} }
else if ($object == 'productname') { else if ($object == 'productname') {

@ -1,2 +1,2 @@
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" onclick="location.href='./?_page=1'" /> <roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" onclick="location.href='./?_page=1'" type="default" />
<roundcube:object name="message" id="message" /> <roundcube:object name="message" id="message" />

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

@ -7,7 +7,7 @@
</head> </head>
<body> <body>
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" /> <roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" type="print" />
<div id="printmessageframe"> <div id="printmessageframe">
<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" /> <roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" />

@ -29,7 +29,7 @@
<roundcube:button command="logout" label="logout" class="button-logout" classSel="button-logout" innerClass="button-inner" /> <roundcube:button command="logout" label="logout" class="button-logout" classSel="button-logout" innerClass="button-inner" />
<span class="minmodetoggle"></span> <span class="minmodetoggle"></span>
</div> </div>
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" /> <roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" type="default" />
</div> </div>
<roundcube:endif /> <roundcube:endif />

@ -9,7 +9,7 @@
<div id="login-form"> <div id="login-form">
<div class="box-inner"> <div class="box-inner">
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" /> <roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" type="login" />
<roundcube:form name="form" method="post"> <roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" size="40" /> <roundcube:object name="loginform" form="form" size="40" />

@ -7,7 +7,7 @@
</head> </head>
<body> <body>
<div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" /></div> <div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" type="print" /></div>
<div id="printmessageframe"> <div id="printmessageframe">
<roundcube:object name="messageHeaders" class="headers-table" /> <roundcube:object name="messageHeaders" class="headers-table" />

Loading…
Cancel
Save