Quote:
Originally Posted by ReCom
The following hack adds a 5-seconds delay before the chats are loaded the first time:
In template "mgc_cb_evo", replace:
Code:
<script type="text/javascript">
chatbox_refresh('forced');
</script>
with
Code:
<script type="text/javascript">
var chat_timer;
var chat_first_time = true;
var old_chatbox_refresh = chatbox_refresh;
chatbox_refresh = function(t, s)
{
var cc = fetch_object('chats');
if (!s)
{
if (cc && chat_first_time) {
cc.innerHTML = '$vbphrase[mgc_cb_evo_loading]';
chat_first_time = false;
}
if (chat_timer) clearTimeout(chat_timer);
old_chatbox_refresh(t);
}
else {
if (cc) {
cc.innerHTML = '<div style="text-align:center" class="smallfont">Loading chats in '+s+' seconds.<br /><a href="#mgc_cb_evo_top" onclick="javascript:chatbox_refresh(\''+t+'\')">Click to load now</a></div>';
s--;
}
chat_timer = setTimeout("chatbox_refresh('"+t+"', "+s+")",1000);
}
}
chatbox_refresh('forced',5);
</script>
|
Did not worked for me. Displays an IE error and the chats do not load, it remains on Loading......