I like this bit of code. I modified it so that it displays right under the logo. I also added a bit of text to it, including the domain based on the host
I modified the following code in program/include/main.inc to display "User:
username@host.ext".
/***** display user information *****/
function rcmail_user_display($attrib)
{
global $OUTPUT, $JS_OBJECT_NAME;
if (!$attrib['id'])
$attrib['id'] = 'rcmuserdisplay';
$OUTPUT->add_script(sprintf("%s.gui_object('userdisplay', '%s');", $JS_OBJECT_NAME, $attrib['id']));
// allow the following attributes to be added to the <span> tag
$attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));
$out = '<span' . $attrib_str . '>';
$out = '<b>User:</b> ';
$out .= $_SESSION['username'];
$out .= '@' . '' . str_replace("[url]www."[/url], "", $_SERVER['HTTP_HOST']);
$out .= '</span>';
return $out;
}
I also modified the CSS code (roundcube/skins/default/common.css) so that it would push the content to the correct place under the logo:
#myname
{
position: absolute;
top: 62px; /* Below the Main Logo */
left: 20px; /* Aligned with the left edge of logo */
height: 8px;
width: 130px; /* Made the width a lil bit bigger. */
color: #333333;
text-decoration: none;
font-size: 8pt;
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
z-index: 10;
}
I then editted the header.html file rather than the taskbar.html file.
In roundcube/skins/default/includes/header.html I ended up with the following:
My only fear with the result is how it will look with really long email addresses. By default, once the first line is full, the email address will be moved down below "User:". Meaning it would look like this:
User:
reallylongusername@reallylongdomain.comThe css gives us 130 pixels of width to work with.
Anywho, I like it so far.
Kevin L.