Bug: About a week ago I reported that the chatbox shifted the page down & up by ~2 pixels in IE7 whenever the "refreshing messages" appeared. Several other people have confirmed this bug, but no fix has yet been posted. Well, I finally got annoyed and decided to debug it myself.
Solution: Currently, when the chatbox is about to update messages, it hides the "Refreshing Messages" text. The solution simply displays "Updating Messages" instead - you can change this to whatever text you want. I prefer to change the color of the "Refreshing Messages" instead of changing the text so I added that code to the hack. Unfortunately, the color change does not work in IE7 (so IE7 will get the text change and other browsers will get the color change) - you can change the colors to whatever you want or even remove the condition to check for non-IE browsers. So finally here's the
3-steps fix on how to squash the bug - the problem is in the Ccb_getMessages() and Ccb_updateMessages() functions in the chatbox template (surprise, surprise ....): Go to Style Manager > Edit Templates > Cybernetec Templates >
cyb_chatbox, and
1. FIND:
PHP Code:
ccb_Messages = new vB_AJAX_Handler(true);
ccb_Messages.onreadystatechange(Ccb_updateMessages);
ccb_Messages.send('misc.php?show=ccbmessages');
}
}
function Ccb_updateMessages()
{
if (ccb_Messages)
{
.
REPLACE WITH:
PHP Code:
if (navigator.userAgent.indexOf('MSIE') > -1)
fetch_object('cybcb_infoarea').innerHTML = ':: Updating Messages';
else
fetch_object('cybcb_infoarea').style.color = 'aqua';
ccb_Messages = new vB_AJAX_Handler(true);
ccb_Messages.onreadystatechange(Ccb_updateMessages);
ccb_Messages.send('misc.php?show=ccbmessages');
}
}
function Ccb_updateMessages()
{
if (ccb_Messages)
{
fetch_object('cybcb_infoarea').innerHTML = ':: $vbphrase[cybcb_status_refreshing]';
fetch_object('cybcb_infoarea').style.color = 'gray';
.
2. FIND AND DELETE:
PHP Code:
if (!Ccb_nowLoading)
{
fetch_object('cybcb_infoarea').style.display = 'none';
fetch_object('ccb_entermessage').style.height = '$cybcb_height_input';
}
.
3. FOR MAC USERS: to fix a mac sizing bug where the text area will contract & expand on refresh, find all:
Quote:
$cybcb_height_input_wstatus
|
and replace with:
Hope that helps everyone from gettin' shifty eyes when using IE7