snollic
04-06-2008 07:46:53
Hello,
First of all the alpha rocks

Big thanks for all your work!
I was wondering how to display the number of users (online sessions / broadcasts) directly next to the titles. So that users notice broadcasts/online users quickly.
Like this
[url2ye9kvra]http://collinkicken.nl/skuur_extra/vibe/vibe.jpg[/url2ye9kvra]
Where do i have to look?
Thanks in advance.
Collin
check out the addons/vibestreamer/js/addons.js folder.. although this was a good idea, so I might take a look at it if it should be implemented in the official version.
snollic
04-06-2008 10:39:29
Ok i found the code but i don`t know how to edit.
Sessions
[codeuatp9w2i]vibestreamer.addons.SessionsModule = Ext.extend(Ext.tree.TreePanel,
{
// private: task runner
taskRunner : null,
// public: task runner interval
interval : 10000,
// private: constructor
initComponent : function()
{
Ext.apply(this,
{
autoScroll: true,
border: false,
iconCls: "nav",
lines:false,
loader: null,
root: new Ext.tree.TreeNode(),
rootVisible: false,
title: "Online Sessions"
});
vibestreamer.addons.SessionsModule.superclass.initComponent.call(this);
this.taskRunner = new Ext.util.TaskRunner();
this.taskRunner.start({
interval: this.interval,
run: function() {
vibestreamer.util.JsonLoader.load("addons/vibestreamer/ajax/get-sessions-json.vibe",
this.jsonCallback,this);
},
scope: this
});
},
// private: callback used by the task runner
jsonCallback : function(success,jsonObject)
{
if ( !success ) {
return;
}
var node; // clear tree
while ( node = this.root.childNodes[0] ) {
this.root.removeChild(node);
}
this.root.beginUpdate();
var sessionsLength = jsonObject.length;
for ( var i=0; i<sessionsLength; i++ )
{
var sessionObject = jsonObject[i];
var qtip = "Logged on: " + sessionObject.loginTime + "<br>" +
"Last: " + sessionObject.lastUri;
var sessionNode = new Ext.tree.TreeNode({
iconCls: "desktop-icon-user",
qtip: qtip,
text: sessionObject.userName + " (" + sessionObject.remoteAddress + ")"
});
sessionNode.attributes["json"] = sessionObject
this.root.appendChild(sessionNode);
}
this.root.endUpdate();
}
});[/codeuatp9w2i]
I have to do someting with >title "Online Sessions" < right? But what?P
Thnx!
edit int NumSessions ?