Roundcube Community Forum

 

New message notification

Started by th23, August 11, 2010, 05:10:16 AM

Previous topic - Next topic

th23

Hi together,

using RoundCube for some while now, I came across an idea: How about a simple notification of an arrived new message via the window/ tab title?

Explanation:

1) RoundCube displays somthing like "(23) Webmail :: Inbox" as window/ tab title normaly, 23 indicating the number of unread messages.
2) When checking in the background and retrieving a new message, this can be changed to "(24*) Webmail :: Inbox" or something alike to indicate a new message without needing to remember the number that it was before.
3) When the window/ tab gets the focus again and/ or any other user action within RoundCube since the arrivial of the new message, the window/ tab title is changed to "(24) Webmail :: Inbox" if the user has not yet read the new message or "(23) Webmail :: Inbox" if he has read it.

What do you think about this? Would this be something as a core feature - or can it be done via a mod?

Thanks
th23

SKaero

Not a bad idea, I think it could be done as a plugin but don't quote me on that.

th23

Quote from: skaero;29282I think it could be done as a plugin...

Thanks for the feedback...is there anybody willing to take this one up - or anybody that can give me some directions regarding coding of RoundCube plugins?

SKaero

It basically all JavaScript, and just a small PHP shell to include the JavaScript file. I'd think you'd just use the JavaScript hook insertrow and then update the title and then change the title again when the window receives focus. I don't have time to code it but if you want to give it a try check out the plugin documentation http://trac.roundcube.net/wiki/Doc_Plugins and http://trac.roundcube.net/wiki/Plugin_Events

ABerglund

You may want to take a look at Rosali's sound_notifier plugin. It's part of his myroundcube plugin bundle (myroundcube - Project Hosting on Google Code). Even if it isn't quite what you need, you could use it as a guide for how the plugin would need to be coded.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

th23

Thanks for the hints/ help...I put together a plugin with the functionality I wanted :)

I uploaded it here - in the Plugin forum!

Cheers
th23

CarlB

Thanks, this is a huge help. I use this with sound notifier and it works well.

But I would like to make it more eye catching. To do so I want to have the title switch from what is currently there (the message count) and "New Mail!"

Can any javascript pros help with this?

Thanks.