Members of the toolbar in the chatbox
3 posters
Page 1 of 1
Members of the toolbar in the chatbox
Hi to all of you,
I have this script on every page to view the chatbox on the toolbar,
it would be possible to display the button before the number of connected members on the chatbox?
This is the script in question:
thank you a lot
a++
I have this script on every page to view the chatbox on the toolbar,
it would be possible to display the button before the number of connected members on the chatbox?
This is the script in question:
- Code:
jQuery(document).ready(function() { jQuery('body').append('<table id="M14_Chat_Box"style="display:none;position:fixed; top:30px;left:10%;background-color: #;z-index:10000;"><tr><td><div scrolling="no" style="width: 800px; height: 400px; marginwidth="0" marginheight="0" frameborder="0" title="ChatBox">
<iframe id="M14"src="/chatbox/index.forum?page=front" style="width: 800px; height: 380px;" ></iframe>
</div></td><td id="M14_Close"style="vertical-align: bottom;cursor:pointer;"title="Fermer la Chatbox"><img src="http://i37.servimg.com/u/f37/11/44/92/25/fermer10.png"/></td></tr></table>'); } );
$(function(){
$(function(){
$('<span id="M14_Chat"style="cursor:pointer;"title="Rejoindre la Chatbox"> <img src="http://i39.servimg.com/u/f39/11/26/21/37/ouvrir10.png"alt="Rejoindre la ChatBox" align="absmiddle"/></span>').insertBefore('#fa_menu');
})});
$(function(){
$(function(){
$('#M14_Chat').click(function(){
$('#M14_Chat_Box').fadeIn(800);
});
});});
$(function(){
$(function(){
$('#M14_Close').click(function(){
$('#M14_Chat_Box').fadeOut(800);
});
});});
thank you a lot
a++
Re: Members of the toolbar in the chatbox
If you use this: https://help.forumotion.com/t143414-add-the-chatbox-to-your-toolbar?highlight=chatbox , it will show the number of members logged into the chatbox.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Members of the toolbar in the chatbox
Hi SL Gray,
thank you but I prefer to have just connected members on the toolbar and simply nothing else.
Thank you in advance.
a++
thank you but I prefer to have just connected members on the toolbar and simply nothing else.
Thank you in advance.
a++
Re: Members of the toolbar in the chatbox
Hi @Milouze14,
Try replacing your script with this :
I just took the member count from the script I wrote and modified it to work with your chatbox.
Try replacing your script with this :
- Code:
$(function() {
$('body').append('<table id="M14_Chat_Box"style="display:none;position:fixed; top:30px;left:10%;background-color: #;z-index:10000;"><tr><td><div scrolling="no" style="width: 800px; height: 400px; marginwidth="0" marginheight="0" frameborder="0" title="ChatBox"><iframe id="fa_chat_frame"src="/chatbox/index.forum?page=front" style="width: 800px; height: 380px;" ></iframe></div></td><td id="M14_Close"style="vertical-align: bottom;cursor:pointer;"title="Fermer la Chatbox"><img src="http://i37.servimg.com/u/f37/11/44/92/25/fermer10.png"/></td></tr></table>');
window.$fa_chat = {
listen : function() {
var users = $fa_chat.members.getElementsByTagName('LI').length;
if (users > $fa_chat.users || users < $fa_chat.users) {
$fa_chat.users = users;
$fa_chat.chatters.innerHTML = '(' + $fa_chat.users + ')';
}
},
users : 0,
chatters : document.createElement('SPAN')
};
$fa_chat.chatters.innerHTML = '(0)';
document.getElementById('fa_chat_frame').onload = function() {
if (window.$fa_chat.poll) window.clearInterval($fa_chat.poll);
if (this.contentDocument || this.contentWindow) {
$fa_chat.document = this.contentDocument ? this.contentDocument : this.contentWindow.document;
$fa_chat.members = $fa_chat.document.getElementById('chatbox_members');
window.$fa_chat.poll = window.setInterval($fa_chat.listen, 300);
}
};
$(function() {
$('<span id="M14_Chat"style="cursor:pointer;"title="Rejoindre la Chatbox"> <img src="http://i39.servimg.com/u/f39/11/26/21/37/ouvrir10.png"alt="Rejoindre la ChatBox" align="absmiddle"/></span>').insertBefore('#fa_menu');
$('#M14_Chat').click(function() {
$('#M14_Chat_Box').fadeIn(800);
}).prepend($fa_chat.chatters);
$('#M14_Close').click(function() {
$('#M14_Chat_Box').fadeOut(800);
});
});
});
I just took the member count from the script I wrote and modified it to work with your chatbox.
Re: Members of the toolbar in the chatbox
Hello Ange Tuteur ,
thank you already for your legendary responsiveness friend, always surprising ease.
Sorry, but you have the option of having the Pseudonyms are please?
If this is not possible, it is not really important, do not you doing the head for it .
Thank you
a++
thank you already for your legendary responsiveness friend, always surprising ease.
Sorry, but you have the option of having the Pseudonyms are please?
If this is not possible, it is not really important, do not you doing the head for it .
Thank you
a++
Re: Members of the toolbar in the chatbox
You could add it to the title for the chat members, so when you hover the number it'll show you a list of users. Like this :
This is the updated script :
This is the updated script :
- Code:
$(function() {
$('body').append('<table id="M14_Chat_Box"style="display:none;position:fixed; top:30px;left:10%;background-color: #;z-index:10000;"><tr><td><div scrolling="no" style="width: 800px; height: 400px; marginwidth="0" marginheight="0" frameborder="0" title="ChatBox"><iframe id="fa_chat_frame"src="/chatbox/index.forum?page=front" style="width: 800px; height: 380px;" ></iframe></div></td><td id="M14_Close"style="vertical-align: bottom;cursor:pointer;"title="Fermer la Chatbox"><img src="http://i37.servimg.com/u/f37/11/44/92/25/fermer10.png"/></td></tr></table>');
window.$fa_chat = {
listen : function() {
var li = $fa_chat.members.getElementsByTagName('LI'),
users = li.length,
i = 0;
if (users > $fa_chat.users || users < $fa_chat.users) {
$fa_chat.users = users;
$fa_chat.chatters.innerHTML = '(' + $fa_chat.users + ')';
$fa_chat.chatters.title = '';
for (; i < users; i++) $fa_chat.chatters.title += $('.chatbox-username', li[i]).text() + '\n';
}
},
users : 0,
chatters : document.createElement('SPAN')
};
$fa_chat.chatters.innerHTML = '(0)';
document.getElementById('fa_chat_frame').onload = function() {
if (window.$fa_chat.poll) window.clearInterval($fa_chat.poll);
if (this.contentDocument || this.contentWindow) {
$fa_chat.document = this.contentDocument ? this.contentDocument : this.contentWindow.document;
$fa_chat.members = $fa_chat.document.getElementById('chatbox_members');
window.$fa_chat.poll = window.setInterval($fa_chat.listen, 300);
}
};
$(function() {
$('<span id="M14_Chat"style="cursor:pointer;"title="Rejoindre la Chatbox"> <img src="http://i39.servimg.com/u/f39/11/26/21/37/ouvrir10.png"alt="Rejoindre la ChatBox" align="absmiddle"/></span>').insertBefore('#fa_menu');
$('#M14_Chat').click(function() {
$('#M14_Chat_Box').fadeIn(800);
}).prepend($fa_chat.chatters);
$('#M14_Close').click(function() {
$('#M14_Chat_Box').fadeOut(800);
});
});
});
Re: Members of the toolbar in the chatbox
Ugh, it gets more baffling that so you find it all in
very little time.
thank you a lot Ange Tuteur .
You are a god coding
If if I insist
a++
very little time.
thank you a lot Ange Tuteur .
You are a god coding
If if I insist
a++
Similar topics
» Add the chatbox to your toolbar
» Toolbar Chatbox
» Chatbox in toolbar problem
» Chatbox in Toolbar adjustment
» Any New Java Script removes Chatbox from Toolbar?
» Toolbar Chatbox
» Chatbox in toolbar problem
» Chatbox in Toolbar adjustment
» Any New Java Script removes Chatbox from Toolbar?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum