Support » Plugin: Twitch Status » Insert MULTI-Twitch Online Status in Navigation

  • Hey Nicolas,

    great plugin, it works like a charm.

    I have one request:

    Is it possible to add the option, that when “someone” of X-People go Online on twitch, the Status goes “Live!” and not only one person ?

    example here: http://www.playzoom.de

    -> navigation: “Offline” – “Online” -> only one person right now

    Would be great, since we want to add the option, when “if one of the twitch guys go online then go “Live” Status” – maybe even clicking on it goes directly to his channel or at least tells ppl who is streaming right now !

    I hope it is possible. 🙂

    Best Wishes.

    Sho

Viewing 4 replies - 1 through 4 (of 4 total)
  • I was going to ask for the same, The plugin is really awesome and this is the only feature i miss since we are 4-5 people that is streaming. It would be nice, that we can show if any in the group is currently streaming or not 🙂

    Thread Starter shoryuuga

    (@shoryuuga)

    Why don’t the dev reply ? That is sad…

    Plugin Author Nicolas Bernier

    (@nicolasbernier)

    Hi

    This is not planned ATM.

    However you can create some custom javascript using the data provided by the plugin using in the twitchStatus object.

    Example

    jQuery( document ).ready( function () {
    
    	// Target where to append the Twitch online tag
    	var target = jQuery('#menu-item-816');
    
    	var tag = jQuery('<span class="twitch-status-tag"></span>');
    	target.append(tag);
    
    	setInterval(function() {
    
    		// Modify the following to match the names of your channels
    		if (
    			(twitchStatus.data.channelname1.status == 'online') ||
    			(twitchStatus.data.channelname2.status == 'online') ||
    			(twitchStatus.data.channelname3.status == 'online')
    		) 		
    		{
    			tag.removeClass( 'twitch-offline' );
    			tag.addClass( 'twitch-online' );
    			tag.html( twitchStatus.buttonHTML.online );
    		}
    		else
    		{
    			tag.removeClass( 'twitch-online' );
    			tag.addClass( 'twitch-offline' );
    			tag.html( twitchStatus.buttonHTML.offline );
    		}
    	}, 1000);
    
    });

    i ended up doing this, since i wanted to check with any channels added to the plugin.

    jQuery( document ).ready( function () {
    
    	// Target where to append the Twitch online tag
    	var target = jQuery('#menu-item-1003 a');
    
    	var tag = jQuery('<span class="twitch-status-tag"></span>');
    	target.append(tag);
    
    	setInterval(function() {
          	twitchStatus.Globalstatus = 'offline';
    
    		// Modify the following to match the names of your channels
    		jQuery.each(twitchStatus.data, function( i, val ) {
              //console.log(i);
              //console.log(val);
              if(val.status == 'online')
              {
                twitchStatus.Globalstatus = 'online';
              }
            });
          	if(twitchStatus.Globalstatus == 'online')
            {
    			tag.removeClass( 'twitch-offline' );
    			tag.addClass( 'twitch-online' );
    			tag.html( twitchStatus.buttonHTML.online );
    		}
          	else
    		{
    			tag.removeClass( 'twitch-online' );
    			tag.addClass( 'twitch-offline' );
    			tag.html( twitchStatus.buttonHTML.offline );
    		}
    	}, 3000);
    
    });
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Insert MULTI-Twitch Online Status in Navigation’ is closed to new replies.