Live Notifications with Tinycon v1.0

Release Notes

Release Initial

  • a nice idea, thanks for sharing!

    i have tested this in 1.12.6 and have a few issues in firefox 44.0.2:

    1. the notification in the favicon is not aligned correctly. the number is centrally aligned and the red background is further right, so the outcome is that i can't really read the number.
    2. the notifier has a lot of entries in it that are empty - which appear to relate to events which occurred prior to activating your plugin. new notifications have entries in the notifier, but older notifications have no text or link.
    3. currently i am looking at a page where the favicon shows a notification of '1', which is correct - but the topbar in elgg has no count for notifications above the notification icon. (this did work earlier for me, but now it does not).
    4. the notification options page now has no options to choose whether or not notifications go to the main elgg inbox or to the new notifier. the only option is whether or not the notifications go to emails. ideally, users could choose any of these options (as juho's notifier plugin supports).

    a nice addon would be an admin panel that allows admins to customise the JS parameters for the favicon notification - such as background colour of the notification and font size etc.

  • I did it for πανος custom needs but you can customize this plugins too.

    For TinyIcon see at live_notifications\js\tinycon.js file:

    var defaults = {
    
    width:7,
    
    height:10,
    
    font:9*r+'px arial',
    
    colour:'#ffffff',
    
    background:'#F03D25',
    
    fallback:true,
    
    crossOrigin:true,
    
    abbreviate:true
    
    };

    Read this Q&A also. There my answer was  about how TinyIcon works.

    Uploaded on community repo plugin has a two actions that calls TinyIcon.

    I recommend leaving only 1 of 2: or notifications, or unread messages bubble icon:

    $("#live_notifications_link").click(function(){
            var num = parseInt($("#count_unread_notifications").html());
            if(num > 0){
                elgg.action('live_notifications/read_all', function(response) {
                    Tinycon.setBubble(num);
                });
    
    ......
    
    elgg.register_hook_handler('init', 'system', function() {
        if(elgg.is_logged_in()) {
           setInterval(function() {
                elgg.action('refresh_count', function(response) {
                    var new_count = parseInt(response.output);
                    if(new_count != 0){
                        Tinycon.setBubble(new_count);
                    }
  • right ok, so he will need to fix the issues with his code then to make it usable - i see.

  • Please update the plugin to elgg version 3.0

Nikolai Shcherbin

Founder, CEO, Product Manager, Lead Developer at Platform for Social Apps :: https://wzm.me :: Elgg on Telegram https://t.me/elggnews

Stats

  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2018-3-3
  • Downloads: 1059
  • Recommendations: 4

Other Projects

View Nikolai Shcherbin's plugins