2010-12-30, 01:16 PM
(This post was last modified: 2011-01-02, 10:13 AM by TheGodFather.)
This user has been denied support.
I see that when we activate the bold, font family or font size in the chatbox, the size of the inputbox is resizing automatically.How can we make it fixed?
<table class="tborder" cellpadding="$theme[tablespace]" cellspacing="$theme[borderwidth]" border="0" width="100%">
<thead>
<tr><td class="thead" colspan="2">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['chatbox']}.gif" id="chatbox_img" class="expander" alt="[-]" title="[-]" /></div>
{$lang->fcb_title}</td></tr>
</thead>
<tbody style="{$collapsed['chatbox_e']}" id="chatbox_e">
<tr>
<td class="trow1">
<iframe name="fcb_frame" src="$fcb_setting[changfcb_url]/index.php" frameborder="0" style="width: 100%; height: $fcb_setting[changfcb_height];"></iframe>
</td>
</tr>
<!-- EDITOR -->
<tr><td class="trow2" style="width: 100%; padding: 7px 0px 10px 0px; text-align: center;">
<div id="fcb_smilieboxmain" style="display: none;">
<table width="100%">
<tr>
<td style="width: 70%; height: 10%; text-align: right; padding: 0px 20px 3px 0px;"><span id="fcb_smiliebox"></span></td>
<td style="width: 30%; text-align: left; padding: 0px 0px 5px 0px; vertical-align: middle;"><input type="button" class="button" value="$lang->fcb_moresm" onclick="fcb_showsmilies();" />
<input type="button" class="button" value="$lang->fcb_allsm" onclick="smiliepopup();" />
<input type="button" class="button" value="$lang->fcb_close" onclick="fcb_hideshowsmiliebox();" /></td>
</tr>
</table>
</div>
<form name="fcb_form" method="post" action="javascript:fcb_postshout();">
<input id="hmess" type="text" size="50" class="textbox" name="hmess" $fcb_disable />
<span style="padding: 0px 5px 0px 0px;"><input type="submit" class="button" value="$lang->fcb_shout" $fcb_disable /></span>
<input type="button" value="$lang->fcb_smilies" onclick="fcb_showsmiliebox();" class="button" $fcb_disable />
<input style="font-weight: bold;" type="button" name="hbold" value="B" class="button" onclick="fcb_upstyle('b');" $fcb_disable />
<input style="font-style: italic;" type="button" name="hitalic" value="I" class="button" onclick="fcb_upstyle('i');" $fcb_disable />
<span style="padding: 0px 5px 0px 0px;"><input style="text-decoration: underline;" type="button" name="hunderline" value="U" class="button" onclick="fcb_upstyle('u');" $fcb_disable /></span>
<select onchange="fcb_upstyle('font');" name="hfont" $fcb_disable>
<option value="">$lang->fcb_font</option>
$fcb_fontlist
</select>
<select onchange="fcb_upstyle('color');" name="hcolor" $fcb_disable>
<option value="">$lang->fcb_color</option>
$fcb_colorlist
</select>
<span style="padding: 0px 0px 0px 5px;"><input type="button" value="$lang->fcb_refresh" class="button" onclick="fcb_refresh();"></span>
<if !in_array($GLOBALS['mybb']->user['usergroup'], array(1,2,5,7)) then>
<input type="button" value="$lang->fcb_archive" class="button" onclick="archivepage();">
</if>
</form>
</td></tr>
<!-- END EDITOR -->
</tbody>
</table>
<br />
<script language="JavaScript" type="text/javascript">
var textstyle = document.getElementById('hmess');
if (fcb_getCookie('fcb_b_userid{$mybb->user['uid']}').length > 0)
{
document.fcb_form.hbold.value = fcb_getCookie('fcb_b_userid{$mybb->user['uid']}');
}
if (fcb_getCookie('fcb_i_userid{$mybb->user['uid']}').length > 0)
{
document.fcb_form.hitalic.value = fcb_getCookie('fcb_i_userid{$mybb->user['uid']}');
}
if (fcb_getCookie('fcb_u_userid{$mybb->user['uid']}').length > 0)
{
document.fcb_form.hunderline.value = fcb_getCookie('fcb_u_userid{$mybb->user['uid']}');
}
if (fcb_getCookie('fcb_font_userid{$mybb->user['uid']}').length > 0)
{
document.fcb_form.hfont.value = fcb_getCookie('fcb_font_userid{$mybb->user['uid']}');
}
if (fcb_getCookie('fcb_color_userid{$mybb->user['uid']}').length > 0)
{
document.fcb_form.hcolor.value = fcb_getCookie('fcb_color_userid{$mybb->user['uid']}');
}
fcb_upstyle_cookie();
function fcb_upstyle_cookie()
{
if (document.fcb_form.hbold.value == 'B*')
{
textstyle.style.fontWeight = 'bold';
}
else
{
textstyle.style.fontWeight = 'normal';
}
if (document.fcb_form.hitalic.value == 'I*')
{
textstyle.style.fontStyle = 'italic';
}
else
{
textstyle.style.fontStyle = 'normal';
}
if (document.fcb_form.hunderline.value == 'U*')
{
textstyle.style.textDecoration = 'underline';
}
else
{
textstyle.style.textDecoration = 'none';
}
textstyle.style.fontFamily = document.fcb_form.hfont.value;
textstyle.style.color = document.fcb_form.hcolor.value;
}
function fcb_upstyle(element)
{
if (element == 'b')
{
if (document.fcb_form.hbold.value == 'B')
{
document.fcb_form.hbold.value = 'B*';
textstyle.style.fontWeight = 'bold';
}
else
{
document.fcb_form.hbold.value = 'B';
textstyle.style.fontWeight = 'normal';
}
}
else if (element == 'i')
{
if (document.fcb_form.hitalic.value == 'I')
{
document.fcb_form.hitalic.value = 'I*';
textstyle.style.fontStyle = 'italic';
}
else
{
document.fcb_form.hitalic.value = 'I';
textstyle.style.fontStyle = 'normal';
}
}
else if (element == 'u')
{
if (document.fcb_form.hunderline.value == 'U')
{
document.fcb_form.hunderline.value = 'U*';
textstyle.style.textDecoration = 'underline';
}
else
{
document.fcb_form.hunderline.value = 'U';
textstyle.style.textDecoration = 'none';
}
}
else if (element == 'font')
{
textstyle.style.fontFamily = document.fcb_form.hfont.value;
}
else if (element == 'color')
{
textstyle.style.color = document.fcb_form.hcolor.value;
}
fcb_setCookie('fcb_b_userid{$mybb->user['uid']}', document.fcb_form.hbold.value);
fcb_setCookie('fcb_i_userid{$mybb->user['uid']}', document.fcb_form.hitalic.value);
fcb_setCookie('fcb_u_userid{$mybb->user['uid']}', document.fcb_form.hunderline.value);
fcb_setCookie('fcb_font_userid{$mybb->user['uid']}', document.fcb_form.hfont.value);
fcb_setCookie('fcb_color_userid{$mybb->user['uid']}', document.fcb_form.hcolor.value);
}
function fcb_setCookie(c_name,value)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+365);
document.cookie=c_name+ "=" +escape(value)+ ";expires="+exdate.toGMTString() + "path=$mybb->settings[cookiepath]";
}
function fcb_getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
else { return ""; }
}
}
var chatboxkey = '$fcb_chatboxkey';
var huid = '{$mybb->user['uid']}';
var hgroupid = '{$mybb->user['usergroup']}';
var huser = "$fcb_musername";
function fcb_postshout()
{
hmess = document.fcb_form.hmess.value;
hcolor = document.fcb_form.hcolor.value;
hfont = document.fcb_form.hfont.value;
hbold = document.fcb_form.hbold.value;
hitalic = document.fcb_form.hitalic.value;
hunderline = document.fcb_form.hunderline.value;
document.fcb_form.hmess.value = '';
if (hmess == '')
{
alert('$lang->fcb_typemess');
}
else
{
fcb_frame.location = '$fcb_setting[changfcb_url]/index.php?do=postshout&key=' + chatboxkey + '&userid=' + huid + '&groupid=' + hgroupid + '&username=' + huser + '&message=' + encodeURIComponent(hmess) + '&color=' + hcolor + '&font=' + hfont + '&bold=' + hbold + '&italic=' + hitalic + '&underline=' + hunderline;
}
}
function archivepage()
{
window.open("$fcb_setting[changfcb_url]/archive.php", "fcbarchive", "location=no,scrollbars=yes,width=640,height=480");
}
function addsmilie(code)
{
document.fcb_form.hmess.value = document.fcb_form.hmess.value + code;
}
function smiliepopup()
{
window.open("misc.php?do=fcb_allsmilies", "fcballsmilies", "location=no,scrollbars=yes,width=500,height=500");
}
function smshow(request)
{
if (request.readyState == 4 && request.status == 200)
{
document.getElementById('fcb_smiliebox').innerHTML = request.responseText;
}
}
function fcb_showsmilies()
{
document.getElementById('fcb_smiliebox').innerHTML = '$lang->fcb_wait';
new Ajax.Request('misc.php?do=fcb_randomsmilies', {method: 'GET', postBody: null, onComplete: function(request) { smshow(request); }});
}
function fcb_showsmiliebox()
{
if (document.getElementById('fcb_smilieboxmain').style.display == 'none')
{
document.getElementById('fcb_smilieboxmain').style.display = 'inline';
fcb_showsmilies();
}
else
{
document.getElementById('fcb_smilieboxmain').style.display = 'none';
}
}
function fcb_hideshowsmiliebox()
{
document.getElementById('fcb_smilieboxmain').style.display = 'none';
}
function fcb_refresh()
{
fcb_frame.location = '$fcb_setting[changfcb_url]/index.php';
}
</script>
This is the code regulating the shouts and reason for the fluid input box.
Dont know which function is responsible for this.
Anyone can suggest?