Vbulletin: how to put CHATBOX on Widget ?

This is a discussion on Vbulletin: how to put CHATBOX on Widget ? within the Development board part of the Software/Hardware and Mobile Phones category; Version: VSA 3.1.6 1) upload everything as needed for VSA 3.1.6 Chat. 2) (the files you get will always have ...

Results 1 to 7 of 7
  1. #1
    overboostaltima's Avatar
    overboostaltima is offline Advanced Hacker


    Array
    Join Date
    Oct 2010
    Location
    USA Boston / BRAZIL MG
    Posts
    419
    Rep Power
    5
    Reputation
    203

    Vbulletin: how to put CHATBOX on Widget ?

    Version: VSA 3.1.6

    1) upload everything as needed for VSA 3.1.6 Chat.
    2) (the files you get will always have instruction on how to import etc)
    3) This was done on a Static Html Widget (one of the kinds of widgets you can create)
    Then follow the steps on the picture. (IMAGE SIZE 1251x724)





    //For me it worked as is, but there is a way to shorten that code, theres toomuch thing you might not need, but the results are perfect on firefox, google chrome, and internet explorer.

    This is the code you need:
    Code:
                <div class="blockhead" style="height:16px;padding-right:4px;font-weight:bold">
                <span style="float:right">
                    <a class="collapse" style="margin-left:15px;position:static" id="collapse_vsacb_boxswitch" href="javascript:void(0);"><img src="http://www.d3scene.com/forum/images/styles/greynexus/buttons/collapse_40b.png" alt="" border="0" /></a>
                </span>
                <div class="popupmenu" style="float:left">
    
                    <a href="javascript://" class="popupctrl">ChatBox&nbsp;</a>
                    <ul class="popupbody popuphover" style="margin-top:8px;">
                        
                            <li>
                                <a rel="nofollow" href="misc.php?do=cchatbox">View ChatBox Full</a>
                            </li>
                        
                        
                            <li>
                                <a rel="nofollow" href="misc.php?do=ccarc">View ChatBox Archive</a>
    
                            </li>
                        
                        
                        
                        <li>
                            <a rel="nofollow" href="misc.php?ccbfind=unread">Find first unread message</a>
                        </li>
                        
                        <li>
                            <a rel="nofollow" href="misc.php?ccbfind=1">Find your last message</a>
                        </li>
                        
                        
                    </ul>
    
                </div>
            </div>
    
            <div id="vsacb_boxswitch" class="blockrow" style="padding:0;">
                
                
                    
        <form name="vsacb_post_form" action="misc.php?securitytoken=1295207162-b9960d199f6ba3821f559db3bcfa3ff73ab5d8bf" method="post" onsubmit="return VSacb_postMessage(this);">
            <input type="hidden" name="do" id="do" value="cb_postnew" />
            <input type="hidden" name="color" id="color" value="Black" />
            <input type="hidden" name="fontWeight" id="fontWeight" />
            <input type="hidden" name="fontStyle" id="fontStyle" />
    
            <input type="hidden" name="textDecoration" id="textDecoration" />
        <table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
            <tr>
                <td width="1%" class="blocksubhead" style="margin:0px;white-space:nowrap;padding-right:1px">
                    
                        <img class="inlineimg" style="cursor:pointer" id="vsacb_logbutton" src="http://www.d3scene.com/forum/images/styles/greynexus/statusicon/user-online.png" border="0" alt="Click here to Log-in/Log-out" onclick="VSacb_LogInOut();" /><img src="http://www.d3scene.com/forum/images/editor/separator.gif" border="0" alt="" style="padding-left:4px" />
                    
                </td>
                
                    <td width="1%" class="blocksubhead" style="padding-left:4px;padding-right:4px;" title="Text Color">
                        <span class="popupmenu colors">
                            <a id="vsacb_colorlink" href="javascript://" class="popupctrl" style="padding:0px;background-color:Black;border:1px solid #ACA899;"><span id="vsacb_m_color" style="padding-left:14px;">&nbsp;</span></a>
    
                            
                                <ul id="vsacb_colormenu" class="popupbody popuphover" style="margin-top:8px;">
                                    <li>
                                        <table cellpadding="0" cellspacing="0" border="0" align="center"><tr align="center"><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Black" href="javascript:void(0);" onclick="VSacb_updateColor('Black');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Black" href="javascript:void(0);" onclick="VSacb_updateColor('Black');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Gold" href="javascript:void(0);" onclick="VSacb_updateColor('Gold');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Khaki" href="javascript:void(0);" onclick="VSacb_updateColor('Khaki');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Orange" href="javascript:void(0);" onclick="VSacb_updateColor('Orange');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:LightPink" href="javascript:void(0);" onclick="VSacb_updateColor('LightPink');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Salmon" href="javascript:void(0);" onclick="VSacb_updateColor('Salmon');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Tomato" href="javascript:void(0);" onclick="VSacb_updateColor('Tomato');">&nbsp;</a></td></tr><tr align="center"><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Red" href="javascript:void(0);" onclick="VSacb_updateColor('Red');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Brown" href="javascript:void(0);" onclick="VSacb_updateColor('Brown');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Maroon" href="javascript:void(0);" onclick="VSacb_updateColor('Maroon');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:DarkGreen" href="javascript:void(0);" onclick="VSacb_updateColor('DarkGreen');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:DarkCyan" href="javascript:void(0);" onclick="VSacb_updateColor('DarkCyan');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:LightSeaGreen" href="javascript:void(0);" onclick="VSacb_updateColor('LightSeaGreen');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:LawnGreen" href="javascript:void(0);" onclick="VSacb_updateColor('LawnGreen');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:MediumSeaGreen" href="javascript:void(0);" onclick="VSacb_updateColor('MediumSeaGreen');">&nbsp;</a></td></tr><tr align="center"><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:BlueViolet" href="javascript:void(0);" onclick="VSacb_updateColor('BlueViolet');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Cyan" href="javascript:void(0);" onclick="VSacb_updateColor('Cyan');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:Blue" href="javascript:void(0);" onclick="VSacb_updateColor('Blue');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:DodgerBlue" href="javascript:void(0);" onclick="VSacb_updateColor('DodgerBlue');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:LightSkyBlue" href="javascript:void(0);" onclick="VSacb_updateColor('LightSkyBlue');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:White" href="javascript:void(0);" onclick="VSacb_updateColor('White');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:DimGray" href="javascript:void(0);" onclick="VSacb_updateColor('DimGray');">&nbsp;</a></td><td class="colorbutton"><a style="display:block;margin:2px;overflow:hidden;border:1px solid #ACA899;width:10px;height:10px;background-color:DarkGray" href="javascript:void(0);" onclick="VSacb_updateColor('DarkGray');">&nbsp;</a></td></tr></table>
                                    </li>
                                </ul>
                            
                        </span>
                    </td>
                
                <td width="1%" class="blocksubhead" style="margin:0px;padding-left:1px;white-space:nowrap;">
                    <input id="vsacb_m_bold" type="button" class="button" style="width:30px;font-weight:bold;" value="B" onclick='VSacb_updateSButton(this, "fontWeight")'  />
    
                    <input id="vsacb_m_italic" type="button" class="button" style="width:30px;font-style:italic;" value="I" onclick='VSacb_updateSButton(this, "fontStyle")'  />
                    <input id="vsacb_m_underline" type="button" class="button" style="width:30px;text-decoration:underline;" value="U" onclick='VSacb_updateSButton(this, "textDecoration")'  />
                    <img src="http://www.d3scene.com/forum/images/editor/separator.gif" border="0" alt="" /><img class="inlineimg" style="cursor:pointer" src="http://www.d3scene.com/forum/images/editor/removeformat.png" border="0" alt="Remove Text Formatting" onclick="VSacb_delCookies();" />
                </td>
                
                <td class="blocksubhead" style="margin:0px;">
                    <input type="text" class="primary textbox" name="vsacb_entermessage" id="vsacb_entermessage" style="width:100%;font-size:11px;color:Black" onkeydown="if (event.keyCode == 13) {return VSacb_postMessage(vsacb_post_form);}" onkeyup="VSacb_LimitChars('vsacb_entermessage', 'vsacb_counter','255');" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;vsacb_submitbutton.disabled=false;"  value="Message..." />
                </td>
                
                <td width="1%" class="blocksubhead" style="margin:0px;white-space:nowrap;">
                    <span class="shade" id="vsacb_counter">255</span> <input type="submit" class="button" id="vsacb_submitbutton" style="width:30px;font-family:Arial;" value="►" disabled="disabled" />
    
                </td>
                
            </tr>
        </table>
        </form>             
                
                <div class="blockrow" id="vsacb_messagearea" style="overflow:auto;height:100px;width:auto;font-size:11px">
                    Loading...
                </div>
                
                
                    
        <form id="vsacb_search" name="vsacb_search" action="misc.php?do=ccarc" method="post">
            <table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
                <tr class="blocksubhead" style="margin:0px;">
    
                    <td class="blocksubhead" align="left">
                        <select id="vsacb_m_size" name="vsacb_m_size" onchange="return VSacb_saveCookie('vsachatbox_txtsize', this.value);">
                             <option value="11"  selected="selected">11px</option> 
     <option value="12" >12px</option> 
     <option value="14" >14px</option> 
     <option value="16" >16px</option> 
    
                        </select>
                        <span >
                        <img src="http://www.d3scene.com/forum/images/editor/separator.gif" border="0" alt="" />                
                        Status: <span id="vsacb_infoarea" class="shade">Loading...</span></span>
    
                    </td>
                    <td class="blocksubhead" align="right" style="margin:0px;">
                        
                            <input type="hidden" name="securitytoken" value="1295207162-b9960d199f6ba3821f559db3bcfa3ff73ab5d8bf" />
                            <input type="text" class="primary textbox" name="cbt" size="20" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" value="Search Messages"  /> <input type="submit" class="button" value="Go"  />
                        
                    </td>
                </tr>
            </table>
        </form> 
                
    
                
            </div>
    
        <br /></td></tr></table>
        
    
        <script language="JavaScript" type="text/javascript">
        <!--
            VSacb_nowPosting = false;
            VSacb_nowLoading = true;
            VSacb_nowLogged = true;
            
                VSacb_KickInactive = setTimeout("VSacb_LogInOut('logout');", 5 * 1000 * 60);
                setTimeout("VSacb_nowLoading = false;VSacb_getMessages();", 10 * 1000);
            
            VSacb_nowRefreshing = null;
    
            function VSacb_LogInOut(todo)
            {
                vsacb_inputfield = fetch_object('vsacb_entermessage');
                vsacb_actbutton = fetch_object('vsacb_logbutton');
                vsacb_submitbutton = fetch_object('vsacb_submitbutton');
                vsacb_selsize = fetch_object('vsacb_m_size');
                vsacb_actusers = fetch_object('vsacb_actusersarea');
                if (!VSacb_nowLogged || (todo==''))
                {
                    VSacb_nowLogged = true;
                    vsacb_actbutton.src="http://www.d3scene.com/forum/images/styles/greynexus/statusicon/user-online.png";
                    vsacb_inputfield.disabled = false;
                    vsacb_submitbutton.disabled = false;
                    vsacb_selsize.disabled = false;
                    clearTimeout(VSacb_KickInactive);
                    VSacb_nowPosting = false;
                    VSacb_getMessages();
                    
                }
                else
                {
                    VSacb_nowLogged = false;
                    vsacb_actbutton.src="http://www.d3scene.com/forum/images/styles/greynexus/statusicon/user-offline.png";
                    vsacb_inputfield.disabled = true;
                    vsacb_submitbutton.disabled = true;
                    vsacb_selsize.disabled = true;
                    fetch_object('vsacb_infoarea').innerHTML = 'Not logged in (<a href="javascript:VSacb_LogInOut();">Log-In</a>)';
                    VSacb_nowPosting = true;
                    
                }
            }
    
            function VSacb_getMessages()
            {
                if (!VSacb_nowPosting)
                {
                    clearTimeout(VSacb_nowRefreshing);
                    if (VSacb_nowLoading)
                    {
                        fetch_object('vsacb_infoarea').innerHTML = 'No new messages since your last visit';
                    }
                    else
                    {
                        fetch_object('vsacb_infoarea').innerHTML = 'Refreshing Messages';
                    }
                    vsacb_Messages = new vB_AJAX_Handler(true);
                    vsacb_Messages.onreadystatechange(VSacb_updateMessages);
                    vsacb_Messages.send('misc.php?show=ccbmessages');
                }
            }
    
            function VSacb_updateMessages()
            {
                if (vsacb_Messages)
                {
                    if (vsacb_Messages.handler.readyState == 4 && vsacb_Messages.handler.status == 200 && vsacb_Messages.handler.responseText)
                    {
                        vsacb_MessagesDiv = fetch_object('vsacb_messagearea');
                        vsacb_MessagesDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="99%" align="left">' + vsacb_Messages.handler.responseText + '</table>';
                        
                        if (VSacb_nowLogged)
                        {
                            VSacb_nowRefreshing = setTimeout('VSacb_getMessages()', (10 * 1000));
                        }
                        
                        
                    }
                }
    
                if (!VSacb_nowLoading)
                {
                    if (!VSacb_nowLogged)
                    {
                        fetch_object('vsacb_infoarea').innerHTML = 'Not logged in (<a href="javascript:VSacb_LogInOut();">Log-In</a>)';
                    }
                    else
                    {
                        fetch_object('vsacb_infoarea').innerHTML = 'Idle';
                    }
                }
            }
    
            function VSacb_getUsers()
            {
                vsacb_Users = new vB_AJAX_Handler(true);
                vsacb_Users.onreadystatechange(VSacb_updateUsers);
                vsacb_Users.send('misc.php?show=ccbusers');
            }
    
            function VSacb_updateUsers()
            {
                if (vsacb_Users)
                {
                    if (vsacb_Users.handler.readyState == 4 && vsacb_Users.handler.status == 200 && vsacb_Users.handler.responseText)
                    {
                        vsacb_UsersDiv = fetch_object('vsacb_actusersarea');
                        vsacb_UsersDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">' + vsacb_Users.handler.responseText + '</table>';
                        
                        if (VSacb_nowLogged)
                        {
                            setTimeout('VSacb_getUsers()', (30 * 1000));
                        }
                        
                    }
                }
            }
    
            function VSacb_getSmilies()
            {
                document.getElementById("vsacb_smilies_more").innerHTML = 'Loading...';
                vsacb_Smilies = new vB_AJAX_Handler(true);
                vsacb_Smilies.onreadystatechange(VSacb_updateSmilies);
                vsacb_Smilies.send('misc.php?show=ccbsmilies');
            }
    
            function VSacb_updateSmilies()
            {
                if (vsacb_Smilies)
                {
                    if (vsacb_Smilies.handler.readyState == 4 && vsacb_Smilies.handler.status == 200 && vsacb_Smilies.handler.responseText)
                    {
                        vsacb_SmiliesDiv = fetch_object('vsacb_smiliesarea');
                        vsacb_SmiliesDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">' + vsacb_Smilies.handler.responseText + '</table>';
                        document.getElementById("vsacb_smilies_more").style.display = "none";
                    }
                }
            }
    
            function VSacb_LimitChars(textbox, counter, climit) {
                field = document.getElementById(textbox);
                if (field && field.value.length >= climit) {
                    field.value = field.value.substring(0, climit);
                }
                vsa_chleftarea = document.getElementById(counter);
                if (vsa_chleftarea)
                {
                    vsacb_lengthinfo = climit - field.value.length;
                    if (vsacb_lengthinfo<100 && vsacb_lengthinfo>9)
                    {
                        vsa_chleft = "0"+vsacb_lengthinfo;
                    }
                    else if (vsacb_lengthinfo<10)
                    {
                        vsa_chleft = "00"+vsacb_lengthinfo;
                    }
                    else
                    {
                        vsa_chleft = vsacb_lengthinfo;
                    }
                    vsa_chleftarea.innerHTML = vsa_chleft;
                }
            }
    
            function VSacb_postMessage(formObj)
            {
                fetch_object('vsacb_infoarea').innerHTML = 'Posting Message';
                vsacb_Message = new vB_AJAX_Handler(true);
                vsacb_Message.onreadystatechange(VSacb_postedMessage);
                if (VSacb_nowPosting)
                {
                    VSacb_nowPosting = false;
                    VSacb_getMessages();
                    return false;
                }
                vsacb_NewMessage = formObj.vsacb_entermessage.value;
                if (vsacb_NewMessage.replace(/ /g, '') == '')
                {
                    alert('You must enter a message!');
                    return false;
                }
                vsacb_Message.send('misc.php', 'do=cb_postnew&vsacb_newmessage=' + PHP.urlencode(vsacb_NewMessage) + VSacb_getMValues(document.forms['vsacb_post_form']));
                fetch_object('vsacb_entermessage').value = '';
                fetch_object('vsacb_entermessage').focus();
                fetch_object('vsacb_counter').innerHTML = '255';
                VSacb_nowPosting = true;
                return false;
            }
    
            function VSacb_postedMessage()
            {
                if (vsacb_Message.handler.readyState == 4 && vsacb_Message.handler.status == 200)
                {
                    VSacb_nowPosting = false;
                    clearTimeout(VSacb_KickInactive);
                    VSacb_getMessages();
                }
            }
    
            function VSacb_getMValues(sbForm)
            {
                rString = '';
                inputObjs = sbForm.getElementsByTagName('input');
                for (i = 0; i < inputObjs.length; i++)
                {
                    if (inputObjs[i].type == 'hidden' && inputObjs[i].value != '')
                    {
                        rString += '&' + inputObjs[i].name + '=' + PHP.urlencode(inputObjs[i].value);
                    }
                }
                return rString;
            }
    
            function VSacb_updateInput(sProperty, setting)
            {
                VSacb_saveCookie('vsachatbox_' + sProperty, setting);
                eval('document.forms["vsacb_post_form"].vsacb_entermessage.style.' + sProperty + ' = "' + setting + '"');
                eval('document.forms["vsacb_post_form"].' + sProperty + '.value = "' + setting + '"');
            }
    
            function VSacb_updateColor(color)
            {
                document.getElementById('color').value = color;
                document.getElementById('vsacb_entermessage').style.color = color;
                document.getElementById('vsacb_m_color').style.backgroundColor = color;
                document.getElementById('vsacb_colorlink').style.backgroundColor = color;
                VSacb_saveCookie('vsachatbox_color', color);
            }
    
            function VSacb_updateStyle(sProperty)
            {
                trueValue = ''
                switch (sProperty)
                {
                    case 'fontWeight':
                    falseValue = 'bold'
                    break;
                    case 'textDecoration':
                    falseValue = 'underline'
                    break;
                    case 'fontStyle':
                    falseValue = 'italic'
                    break;
                }
                VSacb_saveCookie('vsachatbox_' + sProperty, ((eval('document.forms["vsacb_post_form"].' + sProperty + '.value'))? trueValue : falseValue));
                return (eval('document.forms["vsacb_post_form"].' + sProperty + '.value'))? trueValue : falseValue;
            }
    
            function VSacb_updateSButton(cButton, sProperty)
            {
                if (cButton.value.match(/\+/))
                {
                    cButton.value = cButton.value.replace('+', '')
                }
                else
                {
                    cButton.value = '+' + cButton.value 
                }
                VSacb_updateInput(sProperty, VSacb_updateStyle(sProperty));
            }
    
            function VSacb_insertSmilie(smcode)
            {
                document.forms["vsacb_post_form"].vsacb_entermessage.value += ' ' + smcode;
                if (VSacb_nowLogged)
                {
                    document.getElementById('vsacb_entermessage').focus();
                }
                return false;
            }
    
            function VSacb_saveCookie(name, value)
            {
                expires = new Date();
                expires.setTime(expires.getTime() + (1000 * 86400 * 365));
                if (value != '')
                {
                    set_cookie(name, value, expires);
                }
                else
                {
                    delete_cookie(name);
                }
                if (name=="vsachatbox_txtsize")
                {
                    document.getElementById('vsacb_entermessage').style.fontSize = value +"px";
                    document.getElementById('vsacb_messagearea').style.fontSize = value +"px";
                }
            }
    
            function VSacb_readCookies()
            {
                
                memory_color = fetch_cookie('vsachatbox_color');
                if (memory_color != null && memory_color != '')
                {
                    VSacb_updateColor(memory_color);
                }
                else
                {
                    VSacb_updateColor('Black');
                }
                
                memory_bold = fetch_cookie('vsachatbox_fontWeight');
                memory_underline = fetch_cookie('vsachatbox_textDecoration');
                memory_italic = fetch_cookie('vsachatbox_fontStyle');
                if (memory_bold != null && memory_bold != '')
                {
                    VSacb_updateSButton(fetch_object('vsacb_m_bold'), "fontWeight");
                }
                if (memory_underline != null && memory_underline != '')
                {
                    VSacb_updateSButton(fetch_object('vsacb_m_underline'), "textDecoration");
                }
                if (memory_italic != null && memory_italic != '')
                {
                    VSacb_updateSButton(fetch_object('vsacb_m_italic'), "fontStyle");
                }
            }
    
            function VSacb_delCookies() {
                delete_cookie('vsachatbox_color');
                delete_cookie('vsachatbox_fontWeight');
                delete_cookie('vsachatbox_fontStyle');
                delete_cookie('vsachatbox_textDecoration');
    
                fetch_object('color').value = '';
                fetch_object('fontWeight').value = '';
                fetch_object('fontStyle').value = '';
                fetch_object('textDecoration').value = '';
    
                fetch_object('vsacb_entermessage').style.color = 'Black';
                fetch_object('vsacb_entermessage').style.fontWeight = 'normal';
                fetch_object('vsacb_entermessage').style.fontStyle = 'normal';
                fetch_object('vsacb_entermessage').style.textDecoration = 'none';
    
                
                fetch_object('vsacb_m_color').style.backgroundColor = 'Black';
                fetch_object('vsacb_colorlink').style.backgroundColor = 'Black';
                
                fetch_object('vsacb_m_bold').value = 'B';
                fetch_object('vsacb_m_italic').value = 'I';
                fetch_object('vsacb_m_underline').value = 'U';
            }
    
            function VSacb_selectAll(obj)
            {
                arrInput = document.getElementsByTagName("input");
                for (i=0; i<arrInput.length; i++) {
                    if (arrInput[i].type == 'checkbox') {
                        arrInput[i].checked = obj.checked;
                    }
                }
            }
    
            function VSacb_Confirm(what,who,name)
            {
                if (what=='delsel')
                {
                    if (confirm('Are you sure to want to delete ALL messages?'))
                    {
                        if (confirm('This can not be undone! Proceed with deletion?'))
                        {
                            location.href = "misc.php?do=vsacb_delall";
                        }
                    }
                }
    
                if (what=='deluser')
                {
                    if (confirm('Delete all messages posted by '+name+'?'))
                    {
                        location.href = 'misc.php?do=vsacb_deluser&u='+who;
                    }
                }
    
                if (what=='delmess')
                {
                    if (confirm('Delete This Message?'))
                    {
                        location.href = 'misc.php?do=vsacb_delmess&m='+who;
                    }
                }
    
                if (what=='banuser')
                {
                    if (confirm('Ban from ChatBox: '+name+'?'))
                    {
                        location.href = 'misc.php?do=vsacb_banuser&u='+who;
                    }
                }
    
                if (what=='unbanuser')
                {
                    if (confirm('Unban from ChatBox: '+name+'?'))
                    {
                        location.href = 'misc.php?do=vsacb_unbanuser&u='+who;
                    }
                }
            }
    
            function VSacb_controlArcMessage()
            {
                this.vsacb_msgid = -1;
                this.active = false;
            }
    
            VSacb_nowEditing = false;
            VSacb_controlArcMessage.prototype.Edit = function (vsacb_msgid)
            {
                if (vsacb_msgid != this.vsacb_msgid)
                {
                    if (this.active)
                    {
                        this.cancelActive(this.vsacb_msgid)
                    }
                    this.active = true;
                    this.vsacb_msgid = vsacb_msgid;
                    fetch_object('vsacb_message_edit_' + this.vsacb_msgid).style.display = 'block';
                    fetch_object('vsacb_message_' + this.vsacb_msgid).style.display = 'none';
                    fetch_object('vsacb_editlink_' + this.vsacb_msgid).style.display = 'none';
                    fetch_object('vsacb_editbutton_' + this.vsacb_msgid).style.display = 'block';
                    fetch_object('vsacb_message_editor_' + this.vsacb_msgid).focus();
                }
                return false;
            }
    
            VSacb_controlArcMessage.prototype.cancelActive = function (vsacb_msgid)
            {
                fetch_object('vsacb_message_edit_' + this.vsacb_msgid).style.display = 'none';
                fetch_object('vsacb_message_' + this.vsacb_msgid).style.display = 'block';
                fetch_object('vsacb_editlink_' + this.vsacb_msgid).style.display = 'block';
                fetch_object('vsacb_editbutton_' + this.vsacb_msgid).style.display = 'none';
                return false;
            }
    
            VSacb_controlArcMessage.prototype.Save = function ()
            {
                if (this.active)
                {
                    vsacb_Message = new vB_AJAX_Handler(true);
                    vsacb_Message.onreadystatechange(VSacb_savedMessage);
                    if (VSacb_nowEditing)
                    {
                        alert('Busy...');
                        return false;
                    }
                    CBMsg = fetch_object('vsacb_message_editor_' + this.vsacb_msgid).value;
                    if (CBMsg.replace(/ /g, '') == '')
                    {
                        alert('You must enter a message!');
                        return false;
                    }
                    vsacb_Message.send('misc.php?', 'do=vsacb_editmessage&id=' + this.vsacb_msgid + '&vsacb_editmessage=' + PHP.urlencode(CBMsg));
                    VSacb_nowEditing = true;
                }
                return false;
            }
    
            vsacb_MessageID = new VSacb_controlArcMessage;
    
            function VSacb_savedMessage()
            {
                if (vsacb_Message.handler.readyState == 4 && vsacb_Message.handler.status == 200)
                {
                    VSacb_nowEditing = false;
                    vsacb_MessageID.active = false;
                    fetch_object('vsacb_message_' + vsacb_MessageID.vsacb_msgid).innerHTML = vsacb_Message.handler.responseText;
                    vsacb_MessageID.cancelActive(vsacb_MessageID.vsacb_msgid);
                    vsacb_MessageID.vsacb_msgid = -1;
                }
            }
    
            function VSacb_updateSmiliePreview(smiliesource)
            {
                smiliearea = fetch_object("vsacb_smiliepreview");
                smiliearea.src=smiliesource;
            }
    
            
            VSacb_readCookies();
            VSacb_getMessages();
            
            
        -->
        </script>
    Attached Images
    Last edited by overboostaltima; 01-16-2011 at 11:03 PM.

  2. #2
    ItzNitro's Avatar
    ItzNitro is offline Advanced Hacker
    Array
    Join Date
    Dec 2010
    Location
    Durkadurkastan
    Posts
    419
    Rep Power
    4
    Reputation
    135
    Yes, there is a faster way.

    You do everything exactly how you did it BUT instead of using that block of code you used, simply use {vb:raw vsachatbox} if you are using the VSa Chatbox (I recommend it; it's the best one I've used).

    I have not tried my method but it should work in theory. If not, I will create a tutorial for a working method which is shorter than this.

    Cheers for this; useful for some.

  3. #3
    overboostaltima's Avatar
    overboostaltima is offline Advanced Hacker


    Array
    Join Date
    Oct 2010
    Location
    USA Boston / BRAZIL MG
    Posts
    419
    Rep Power
    5
    Reputation
    203
    Thx bro. yeah I was thinking about using a shorter way ...I will definitely try your way ...

    I was trying and trying and I couldn't get it... Then I was like screw it, let me open the page source and force the baby out... rofl.. IT WORKED !

    ... But, that code goes inside the widget, ... I should probably use your code on the heather section right?

  4. #4
    ItzNitro's Avatar
    ItzNitro is offline Advanced Hacker
    Array
    Join Date
    Dec 2010
    Location
    Durkadurkastan
    Posts
    419
    Rep Power
    4
    Reputation
    135
    Where exactly do you want to place it? On every page, on the forum home page (typically example.com/forum/forum.php) or on one specific page?

    Tell me which page you're looking for and I'll tell you which template to edit. (:

  5. #5
    overboostaltima's Avatar
    overboostaltima is offline Advanced Hacker


    Array
    Join Date
    Oct 2010
    Location
    USA Boston / BRAZIL MG
    Posts
    419
    Rep Power
    5
    Reputation
    203
    You know how, when you enable it, by default it shows on the very top of the forums? like a dedicated upper heather ? ...

    Thats how i really want it... Like, I deleted the index from the settings, and it worked for ALL forum pages, BUT...
    Not on the CMS...

    The only way I was able to make it work on cms, is by copying that BIG code you saw...

  6. #6
    ItzNitro's Avatar
    ItzNitro is offline Advanced Hacker
    Array
    Join Date
    Dec 2010
    Location
    Durkadurkastan
    Posts
    419
    Rep Power
    4
    Reputation
    135
    So you want it on ALL pages and the CMS or just on the CMS?

    I can do either if you let me know. (:

  7. #7
    overboostaltima's Avatar
    overboostaltima is offline Advanced Hacker


    Array
    Join Date
    Oct 2010
    Location
    USA Boston / BRAZIL MG
    Posts
    419
    Rep Power
    5
    Reputation
    203
    Just the CMS, with out using a widget

    I don't know the template's name lol ... ...
    I think if I search templates, and find the cms template, then maybe I can use " {vb:raw vsachatbox} " (like you taught me) right?

Similar Threads

  1. the new chatbox is annoying!
    By X-räi in forum D3scene related
    Replies: 2
    Last Post: 02-24-2010, 11:31 PM
  2. Chatbox for vB 4
    By Reinn in forum D3scene related
    Replies: 2
    Last Post: 02-07-2010, 01:08 AM
  3. Old or New ChatBox?
    By AlexanderTheGreat in forum General Chat
    Replies: 6
    Last Post: 09-29-2009, 01:25 PM
  4. Chatbox
    By Reinn in forum D3scene related
    Replies: 40
    Last Post: 05-23-2009, 04:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •