1 [Code] Chat như vbb V.2 Mon Nov 12, 2012 8:13 am
Admin
Trùm Forum
Demo:
Kiểu thứ 1:
[You must be registered and logged in to see this image.]
thay /h15-page thành địa chỉ chat rom của bạn
Kiểu thứ 2:
[You must be registered and logged in to see this image.]
Chèn cuối Footer End:
Chèn vào CSS:
Nguồn: Dust
Kiểu thứ 1:
[You must be registered and logged in to see this image.]
- Code:
/**********chatroom**********/
<script type="text/javascript">
var CopyrightNotice='Updating chatbox online count for all forumotion boards. Copyright © by LeopardGeckoForum. All Rights Reserved. Use, modification, and/or distribution of this script is not allowed without direct permission from [You must be registered and logged in to see this link.]. This entire copyright notice must remain in the original, copied, or modified script';
function showhide(elementname) {var displayed=document.getElementById(elementname).style.display;
if (displayed == 'none') { document.getElementById(elementname).style.display='block' }
if (displayed == 'block') { document.getElementById(elementname).style.display='none'}}
var timer=setTimeout('membercount();',1000);
function membercount() {
x=parent.LGchat.document.getElementById('chatbox_members');
z=jQuery(x).find('ul')[0];
if (z) {
y=z.getElementsByTagName('li');
chatno=y.length;
jQuery('#chatcount').html(chatno);
}
else { jQuery('#chatcount').html('0'); }
setTimeout('membercount();',3000);
}
</script>
<div class="wmenu" onclick="showhide('chat');">Chat (<span id="chatcount"></span>)</div>
<div class="LGmodule" style="display:none" id="chat">
<iframe name="LGchat" style="width:100%;height:450px;margin-top:5px;border:none" src="/h15-page?archives=1"></iframe></div>
/**********chatroom**********/
thay /h15-page thành địa chỉ chat rom của bạn
Kiểu thứ 2:
[You must be registered and logged in to see this image.]
Chèn cuối Footer End:
- Code:
<script type="text/javascript">
var CopyrightNotice='Updating chatbox online count for all forumotion boards. Copyright © by LeopardGeckoForum. All Rights Reserved. Use, modification, and/or distribution of this script is not allowed without this entire copyright notice in the original, copied, or modified script';
function showhide(elementname) {var displayed=document.getElementById(elementname).style.display;
if (displayed == 'none') { document.getElementById(elementname).style.display='block' }
if (displayed == 'block') { document.getElementById(elementname).style.display='none'}}
var timer=setTimeout('chatcount()',1500);
function chatcount() {
x=parent.LGchat.document.getElementById('chatbox_members');
z=jQuery(x).find('ul')[0];
var awayfix=jQuery(x).find('h4');
if (z) {
y=z.getElementsByTagName('li');
if (awayfix[0].innerHTML == 'Online') {
var chatno=y.length;
var awayno=0; }
else { chatno=0; awayno=y.length; }
} else { chatno=0; awayno=0;}
a=jQuery(x).find('ul')[1];
if (a) {
b=a.getElementsByTagName('li');
awayno=b.length; }
var onlineno=chatno + awayno;
jQuery('#chatcount').html(chatno + '/' + onlineno);
setTimeout('chatcount();',3000);
}
</script>
<div class="wmenu" onclick="showhide('chat');">Chat (<span id="chatcount"></span>)</div><div class="LGmodule" style="display:none" id="chat"><iframe name="LGchat" style="width:99%;height:450px;margin-top:5px;border:none" src="/chatbox/index.forum?archives=1"></iframe></div>
Chèn vào CSS:
- Code:
.wmenu {cursor: pointer; float: right; margin-right: 5px; width: 150px; height: 24px; line-height: 22px; background: #ddd; color: #660066; font-family: Tahoma,Arial; font-size: 13px; font-weight: bold; text-align: center; -moz-border-radius: 6px; border-radius: 6px ; border:1px solid #848; position: fixed; bottom: 1px; right: 1px;}
.wmenu:hover {color: #d31141;}
.LGmodule {z-index: 999; position: fixed; left:20%; bottom: 30px; width: 79%; margin: 0px; padding: 0px; background: #e8e8e8 color: #000000; border: #804080;}
Nguồn: Dust