this great module would be much greater if the badges would shown immediatly after a new message (or whatever) is in the inbox without reload the page every time.

any ideas how to make that happen?

regards

Comments

zengenuity’s picture

Category: support » feature
Status: Active » Postponed

It's an interesting idea, but I probably don't have time to write this. You would need to add a javascript polling loop that periodically checks for updates and adjusts the badges as needed.

If you (or someone else) want to provide a patch, I will integrate it into this module.

willvincent’s picture

Sounds like a good use case for node.js leveraging socket.io (or something similar) for push notifications.

zengenuity’s picture

I'm sure this feature would be better with node.js, but it's significantly harder for most users to set that up. A polling loop would work on any server.

Either way, I still don't have much time right now to implement this and welcome patches from others.

godot882’s picture

Maybe using AJAX with Views? Don't know...

willvincent’s picture

Polling loop would work, but it does add extra unnecessary traffic to the server.

foxfabi’s picture

you can use https://drupal.org/project/views_autorefresh

check also https://drupal.org/project/block_refresh
but you need to add link_badges.css to your html.. put this lines into your theme preprocess_html ..

drupal_add_css(drupal_get_path('module', 'link_badges') . '/link_badges.css');
jason.fisher’s picture

Issue summary: View changes

If you can render the menu using a View, and have badges based on flags, you could potentially use the Views Flag Refresh module for this.

firewaller’s picture

Can somebody confirm that Views Flag Refresh works? It doesn't seem to be working for me.

Ddroid_za’s picture

Cool module.

I am also trying to update the counter. I tried Views Flag refresh to work, but I see there is no "AJAX" option on the Menu Badge display. I also tried refreshing the view via js, but the counter on my menu link is actually wrapped in a span and not a view, so I 'm stuck. Any pointers?

pribeh’s picture

Block refresh works.