Hi folks,
Larry skin introduced topline (the line on top of screen showing About and support link on the left and username and logout link on the right).
I want to make a plugin to add/change some information on that line without making a new skin.
(first need is to add last login information)
template_container hook seems to be just fine for that but unfortunately, this container doesn't exist in that call.
Could it be possible to add that container to this hook ?
Actually, I'm playing with template_object_username to change this part of the topline because it is not called anywhere else in larry skin, but I think this can broke other plugins or skins.
regards,
Humm, well, I think I misunderstood this hook.
This is not a way to change the content of some container, but only the way to ADD some information (button or something) into the container.
So this is not the thing I need.
So, what would be the preferred way to change the content of the topline ?
maybe using the render_page or send_page hook ?
regards,
Hi all,
I'm sending my question again since I didn't find the "good" way to change the top line content.
Can someone give me any advice on how to do it properly ?
Regards,
S. Blaisot
Le 07/09/2012 21:36, Sébastien BLAISOT a écrit :
Humm, well, I think I misunderstood this hook.
This is not a way to change the content of some container, but only the way to ADD some information (button or something) into the container.
So this is not the thing I need.
So, what would be the preferred way to change the content of the topline ?
maybe using the render_page or send_page hook ?
regards,
-- Sébastien BLAISOT
Le 2012-09-07 20:53, Sébastien BLAISOT a écrit :
Hi folks,
Larry skin introduced topline (the line on top of screen showing About and support link on the left and username and logout link on the right).
I want to make a plugin to add/change some information on that line without making a new skin.
(first need is to add last login information)
template_container hook seems to be just fine for that but unfortunately, this container doesn't exist in that call.
Could it be possible to add that container to this hook ?
Actually, I'm playing with template_object_username to change this part of the topline because it is not called anywhere else in larry skin, but I think this can broke other plugins or skins.
regards,
-- Sébastien BLAISOT
Roundcube Development discussion mailing list dev@lists.roundcube.net mailto:dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev
On Nov 6, 2012, at 9:54 PM, Sébastien BLAISOT sebastien@blaisot.org wrote:
Hi all,
I'm sending my question again since I didn't find the "good" way to change the top line content.
Can someone give me any advice on how to do it properly ?
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.
Cor
Cor Bosman wrote:
On Nov 6, 2012, at 9:54 PM, Sébastien BLAISOT sebastien@blaisot.org wrote:
Hi all,
I'm sending my question again since I didn't find the "good" way to change the top line content.
Can someone give me any advice on how to do it properly ?
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.
Best, Thomas
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.
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.