need help with template edit (VBulletin)

Discussion in 'HTML & Website Design' started by Realware, Feb 8, 2010.

  1. #1
    Hi guys,hope someone here can help me (and i am posting in the correct forum :crosses_fingers: )

    i am using a modified cyb-chatbox on my forum,the template edit was not all mine,it was one i found elsewhere that someone had shared,but there is something i want to change on it.

    what i want to do is replace the 'Expand' button,with the color changing menu (see screenshot)

    [​IMG]

    Now i have managed to add the color changer,BUT its not remembering the choice after refresh,which to me says is a cookie issue,but i have no clue about cookies

    Here is my cyb-chatbox template:

    <script language="JavaScript" type="text/javascript">
    
    <script language="JavaScript" type="text/javascript"> 
        <!-- 
            window.onload = function() { 
                if(fetch_cookie('cybcb_extended_c') == 'expanded') { 
                    document.getElementById('cybcb_messagearea').style.height = '200px'; 
                    document.getElementById('cybcb_expanded').value = 'Contract'; 
                    document.getElementById('cybcb_expanded').style.width = '62px'; 
                } 
            } 
        --> 
        </script>
    	<if condition="(($_REQUEST['do']=='cchatbox') OR ($_REQUEST['do']=='ccarc'))">
    
    		$stylevar[htmldoctype]
    
    		<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
    
    			<head>
    
    			<title>$vboptions[bbtitle] - $vbphrase[cybcb_chatbox]</title>
    
    			$headinclude
    
    			</head>
    
    		<body onload="Ccb_getUsers();">
    
    		$header
    
    		$navbar
    
    	</if>
    
    
    
    	<if condition="((($_REQUEST['do']=='cchatbox') OR in_array(THIS_SCRIPT, array($cybcb_locs))) AND ($_REQUEST['do']!='ccarc'))">
    
    		<form name="cybcb_post_form" action="misc.php?$session[sessionurl]&securitytoken=$cybcb_sectok" method="post" onsubmit="return Ccb_postMessage(this);">
    
    			<input type="hidden" name="do" value="cb_postnew" />
    
    			<input type="hidden" name="color" />
    
    			<input type="hidden" name="fontWeight" />
    
    			<input type="hidden" name="fontStyle" />
    
    			<input type="hidden" name="textDecoration" />
    
    
    
    
    
    
    
    <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
    
    <thead>
    
    <tr>
    
    <td class="tcat" align="center"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('cybcb_boxswitch')">
    
            <img id="collapseimg_cybcb_boxswitch" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_cybcb_boxswitch].gif" alt="" border="0" /></a>
    
    							<span id="cybchatmenuccbox"><if condition="($_REQUEST['do']!='cchatbox')">$vbphrase[cybcb_chatbox]<else />$vbphrase[cybcb_chatbox] (Full)</if></span>&nbsp;<span class="smallfont">[<a href="/misc.php?do=ccarc">Archive</a>]</span>
    
    	</td>
    
    </tr>
    
    </thead>
    
    				<tbody id="collapseobj_cybcb_boxswitch" style="<if condition="$vboptions[cybchatbox_collapsed_always]"><if condition="(THIS_SCRIPT!='misc')">display:none</if><else />$vbcollapse[collapseobj_cybcb_boxswitch]</if>">
    
    					<tr valign="top">
    
    						<td class="alt2" width="1%">
    
    									<table border="0" cellpadding="0" cellspacing="0" width="100%">
    
    <if condition="$cybcb_cantpost">
    
    You must register to use the chatbox!
    
    </if>
    
    				<if condition="!$cybcb_cantpost">
    
    	<tbody>
    
    	<tr>
    
    	<td width="100%">
    
    <input type="text" name="ccb_entermessage" id="ccb_entermessage" style="width:100%;" class="bginput" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;"<if condition="$cybcb_cantpost"> disabled="disabled"</if>>
    
    	</td>
    
    	<td style="white-space: nowrap;" width="1%">
    
    &nbsp;&nbsp;<span class="smallfont"><img class="inlineimg" src="$stylevar[imgdir_editor]/separator.gif" alt="" border="0" />
    
    								<input type="submit" id="cybcb_submitbutton" value="Shout" class="button" style="width:50px;" /></span>
    
    								<input type="reset" id="cybcb_resetbutton" value="Clear" class="button" style="width:50px;" onclick="ccb_entermessage.focus()" /></span>
    
    								<input id="ccb_m_bold" type="button" class="button" style="width:30px;font-weight:bold;" value="B" onclick='Ccb_updateSButton(this, "fontWeight")' <if condition="$cybcb_cantpost">disabled="disabled"</if> />
    
    								<input id="ccb_m_italic" type="button" class="button" style="width:30px;font-style:italic;" value="I" onclick='Ccb_updateSButton(this, "fontStyle")' <if condition="$cybcb_cantpost">disabled="disabled"</if> />
    
    								<input id="ccb_m_underline" type="button" class="button" style="width:30px;text-decoration:underline;" value="U" onclick='Ccb_updateSButton(this, "textDecoration")' <if condition="$cybcb_cantpost">disabled="disabled"</if> />
    
    </if>
    
    								<if condition="(($vboptions[cybchatbox_smiliestotal]!=0) AND !$cybcb_cantpost AND $cybcb_smilies_init)">
    
    									<span id="cybchatmenusmilies"><img class="inlineimg" src="$stylevar[imgdir_editor]/smilie.gif" alt="$vbphrase[smilies]" border="0" onclick="document.getElementById('ccb_entermessage').focus();" /><script language="Javascript" type="text/javascript">vbmenu_register("cybchatmenusmilies", true); </script></span>
    
    								<if condition="($_REQUEST['do']!='cchatbox')"><img class="inlineimg" src="$stylevar[imgdir_editor]/separator.gif" alt="" border="0" />
    
    <select id="ccb_m_color" name="ccb_m_color" style="width:40px;background-color:black;" onchange='Ccb_updateColor(this, "color");Ccb_Init();' >
                                        <option style="background-color:#EEEEEE;color:#EEEEEE;" value="#EEEEEE" selected="selected">&nbsp;</option>
                                        <option style="background-color:Gold;color:Gold;" value="Gold">&nbsp;</option>
    <option style="background-color:Khaki;color:Khaki;" value="Khaki">&nbsp;</option>
    <option style="background-color:Orange;color:Orange;" value="Orange">&nbsp;</option>
    <option style="background-color:LightPink;color:LightPink;" value="LightPink">&nbsp;</option>
    <option style="background-color:Salmon;color:Salmon;" value="Salmon">&nbsp;</option>
    <option style="background-color:Tomato;color:Tomato;" value="Tomato">&nbsp;</option>
    <option style="background-color:Red;color:Red;" value="Red">&nbsp;</option>
    <option style="background-color:Brown;color:Brown;" value="Brown">&nbsp;</option>
    <option style="background-color:Maroon;color:Maroon;" value="Maroon">&nbsp;</option>
    <option style="background-color:DarkGreen;color:DarkGreen;" value="DarkGreen">&nbsp;</option>
    <option style="background-color:DarkCyan;color:DarkCyan;" value="DarkCyan">&nbsp;</option>
    <option style="background-color:LightSeaGreen;color:LightSeaGreen;" value="LightSeaGreen">&nbsp;</option>
    <option style="background-color:LawnGreen;color:LawnGreen;" value="LawnGreen">&nbsp;</option>
    <option style="background-color:MediumSeaGreen;color:MediumSeaGreen;" value="MediumSeaGreen">&nbsp;</option>
    <option style="background-color:BlueViolet;color:BlueViolet;" value="BlueViolet">&nbsp;</option>
    <option style="background-color:Cyan;color:Cyan;" value="Cyan">&nbsp;</option>
    <option style="background-color:DodgerBlue;color:DodgerBlue;" value="DodgerBlue">&nbsp;</option>
    <option style="background-color:LightSkyBlue;color:LightSkyBlue;" value="LightSkyBlue">&nbsp;</option>
    <option style="background-color:White;color:White;" value="White">&nbsp;</option>
    <option style="background-color:DimGray;color:DimGray;" value="DimGray">&nbsp;</option>
    <option style="background-color:DarkGray;color:DarkGray;" value="DarkGray">&nbsp;</option>
    
                                    </select>
    PHP:
    wasnt able to post whole template w post charactor limit here



    much thanks to anyone that can help me with this issue
     
    Realware, Feb 8, 2010 IP