![]() |
|
|
|||||||
| For more information about the ads and why they're here, please see the FAQ |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I don't know about you, but I used to like this modification that allowed you to display the current user when you logged in.
So, I tried what they said again for 0.1 stable (I'd previously been using SVN releases) and noticed it didn't work properly. First of all the CSS wasn't working, and secondly some buttons that shouldn't be greyed-out were, javascript functionality was broken, etc. So I played around with the code for a bit. And got it working again... here's what you need to do. ![]() 1. Open program/include/main.inc and search for 'username' => 'rcmail_current_username', You should see: Code:
// register common UI objects $OUTPUT->add_handlers(array( 'loginform' => 'rcmail_login_form', 'username' => 'rcmail_current_username', 'message' => 'rcmail_message_container', 'charsetselector' => 'rcmail_charset_selector', )); Code:
// register common UI objects $OUTPUT->add_handlers(array( 'loginform' => 'rcmail_login_form', 'username' => 'rcmail_current_username', 'userdisplay' => 'rcmail_user_display', 'message' => 'rcmail_message_container', 'charsetselector' => 'rcmail_charset_selector', )); Above it add: Code:
/***** display user information *****/
function rcmail_user_display($attrib)
{
if (!$attrib['id'])
$attrib['id'] = 'rcmuserdisplay';
// 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 .= '</span>';
return $out;
}
Above it, add: Code:
.mailuser
{
position: absolute;
top: 12px;
left: 200px;
height: 8px;
width: 120px;
color: #333333;
text-decoration: none;
font-size: 10px;
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
z-index: 10;
}
Code:
<div id="mailuser"> <roundcube:object name="userdisplay" class="mailuser" /> </div> Enjoy, BTCentral
__________________
http://www.btcentral.org.uk - Cheap, Top Quality Web-design. |
|
#2
|
|||
|
|||
|
Thats a very nice mod and it works perfectly, this kind of thing should be included in releases by default, because you see this kind of thing in GMail and Yahoo and Hotmail... So why not roundcube?
Thanks. |
|
#3
|
||||
|
||||
|
Hi.
Nice mod, works just fine. It would be even more fun if the text "User" followed the selected language. Would be in program/localization/labeles.inc i think. Yes, a lot off file to edit if You want all languages. I made i even more simple, I removed the "User:" text....... Have a nice day Gunnar |
|
#4
|
|||
|
|||
|
That's pretty awesome. Unfortunately it only shows IMAP User name. And that is something like web1p*.
Nonetheless nice plugin. |
|
#5
|
|||
|
|||
|
Ahh, yeah I noticed that... But none the less it works fine, you dont really need the "User:" but anyway...
|
|
#6
|
|||
|
|||
|
i get the foll error :
Quote:
|
|
#7
|
||||
|
||||
|
Quote:
![]() Quote:
Quote:
Cheers, BTCentral
__________________
http://www.btcentral.org.uk - Cheap, Top Quality Web-design. |
|
#8
|
|||
|
|||
|
Yes,it does but how do i fix it, sorry my knowledge about php is very less, so pls help.
thnx.. |
|
#9
|
|||
|
|||
|
What do you think about this hack to view username?
http://roundcubeforum.net/forum/index.php?topic=2796.0[/b] |
|
#10
|
|||
|
|||
|
It's hard to click that link bacause of bad bbc.
Here's that link again. Link to http://roundcubeforum.net/forum/index.php?topic=2796.0 I prefer this version of the mod since it works better for me. The one that starts this thread is good but on my layout (which is standard) it puts the User: xxxx@yyyy beneath the RoundCube logo. Must be something weird in the css code. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
| For more information about the ads and why they're here, please see the FAQ |