Le 11/11/2012 15:20, Thomas Bruederli a écrit :
Cor Bosman wrote:
It looks like right now there is no easy way to add/modify the topline div. Would be nice to get some hooks up in there.
We can add a <roundcube:container name="topline" id="topline" /> in the skin template. But the question is, where to place that exactly. The top line has a left and a right part. This hook wouldn't help if you want to modify either one of the existing contents. However, the gui_container object would allow one to inject content, best done with javascript because you can easily control where to add it.
I just added it in https://github.com/roundcube/roundcubemail/commit/d0751fba0e9. Please let me know if it's usable for you.
Hi,
thanks for your reply.
In fact, you actually added a container on very right of the topline, just after the logout button. I think it's preferable to add it between the username and the logout button, letting the logout button to always be le last one on the right.
Actually, I'm thinking of a comment left on roundcube-users mailing list on 2012-09-06 requesting for full name (default identity) & last login information on topline instead of roundcube username. Full name instead of roundcube username (which could be full email or user part of email depending on settings of the imap server roundcube rely on) can make sense (and I have to deal with accounts having email & username but no full name set), and showing last login time is a security feature which is a best practice (so the user can see if someone else has used their webmail account) I've published a (very early alpha version) plugin named topline aimed to add information to the topline. https://github.com/sblaisot/roundcube-topline/
Well, with larry skin (dindn't check with classic skin), the only use of username is in the topline, so I can replace it with full name or whatever information I want using the template_object_username hook but IMHO this is bad behaviour because some skin or plugin may use this object elsewhere and became broken.
Last login is a bit more complicated because when user logs in, the rcube_user->push() method updates the last login information, resulting in last login actually being the ... current login time. Right now, the last login is only usable to check the database in a maintenance script to find users that didn't use roundcube for a while. It would be useful to store in user session the login time of the previous session before updating it, but I don't know yet is this is realistic or if it is better to store it in database (but updating database schema only for that is probably not the most efficient way as it is a big change).
I think that it could be interesting to add container for left, middle AND right of the topline (maybe naming them topline_left, topline_center and topline_right), allowing plugins to add information where it is needed.
don't know what would be the preferable way to change/remove information from the topline.
regards,
S.B.