View Full Version : Làm sao có code ẩn hiện chatbox Changuondyu này!
hoangduykt7990
21-06-2011, 11:19 AM
Minh thấy đây là cách rất hay
Demo: http://forum.ninhbinhvip.vn/
a (http://forum.ninhbinhvip.vn/)i bik xin chỉ giao nhé! :MatCuoi (41):
PhucSD
21-06-2011, 11:23 AM
Minh thấy đây là cách rất hay
Demo: http://forum.ninhbinhvip.vn/
a (http://forum.ninhbinhvip.vn/)i bik xin chỉ giao nhé! :MatCuoi (41):
Theo mình thấy thì đây không phải là chatbox của Chang, mình vẫn chưa xác định đc chatbox này là gì, nhưng nhìn nó khá hay đấy
Dunglx
21-06-2011, 01:35 PM
Theo mình đây cũng chính là một hình thức mới của Chang được các bác ấy chế cho thôi :MatCuoi (49):
hoangduykt7990
21-06-2011, 05:28 PM
Có ng gợi ý ở bên này nhưng mình ko bik chèn vào đâu, ng ta dung simple infernal chatbox, còn mình mún dùng Chang
http://www.dhtmlgoodies.com/?whichScript=show_hide_content_slide
quocduyze
21-06-2011, 05:54 PM
Minh thấy đây là cách rất hay
Demo: http://forum.ninhbinhvip.vn/
a (http://forum.ninhbinhvip.vn/)i bik xin chỉ giao nhé! :MatCuoi (41):
Chưa cài nhưng nó giống Shoutbox Pro
mrb00mb00m
21-06-2011, 08:19 PM
Tình hình là lấy đc đoạn này! về ngâm cứu xem sao đã!
<!--SHOUTBOX-->
<script type="text/javascript">
/************************************************** ************************************************** ********
(C) www.dhtmlgoodies.com, November 2005
This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.
Thank you!
www.dhtmlgoodies.com
Alf Magne Kalleland
************************************************** ************************************************** ********/
var dhtmlgoodies_slideSpeed = 15; // Higher value = faster
var dhtmlgoodies_timer = 10; // Lower value = faster
var objectIdToSlideDown = false;
var dhtmlgoodies_activeId = false;
var dhtmlgoodies_slideInProgress = false;
var dhtmlgoodies_expandMultiple = true;
function showHideContent(e,inputId)
{
if(dhtmlgoodies_slideInProgress)return;
dhtmlgoodies_slideInProgress = true;
if(!inputId)inputId = this.id;
inputId = inputId + '';
var numericId = inputId.replace(/[^0-9]/g,'');
var answerDiv = document.getElementById('dhtmlgoodies_a' + numericId);
objectIdToSlideDown = false;
if(!answerDiv.style.display || answerDiv.style.display=='none'){
if(dhtmlgoodies_activeId && dhtmlgoodies_activeId!=numericId && !dhtmlgoodies_expandMultiple){
objectIdToSlideDown = numericId;
slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_s lideSpeed*-1));
}else{
answerDiv.style.display='block';
answerDiv.style.visibility = 'visible';
slideContent(numericId,dhtmlgoodies_slideSpeed);
}
}else{
slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
dhtmlgoodies_activeId = false;
}
}
function slideContent(inputId,direction)
{
var obj =document.getElementById('dhtmlgoodies_a' + inputId);
var contentObj = document.getElementById('dhtmlgoodies_ac' + inputId);
height = obj.clientHeight;
if(height==0)height = obj.offsetHeight;
height = height + direction;
rerunFunction = true;
if(height>contentObj.offsetHeight){
height = contentObj.offsetHeight;
rerunFunction = false;
}
if(height<=1){
height = 1;
rerunFunction = false;
}
obj.style.height = height + 'px';
var topPos = height - contentObj.offsetHeight;
if(topPos>0)topPos=0;
contentObj.style.top = topPos + 'px';
if(rerunFunction){
setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
}else{
if(height<=1){
obj.style.display='none';
if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.display='block';
document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.visibility='visible';
slideContent(objectIdToSlideDown,dhtmlgoodies_slid eSpeed);
}else{
dhtmlgoodies_slideInProgress = false;
}
}else{
dhtmlgoodies_activeId = inputId;
dhtmlgoodies_slideInProgress = false;
}
}
}
function initShowHideDivs()
{
var divs = document.getElementsByTagName('DIV');
var divCounter = 1;
for(var no=0;no<divs.length;no++){
if(divs[no].className=='divQuestion'){
divs[no].onclick = showHideContent;
divs[no].id = 'dhtmlgoodies_q'+divCounter;
var answer = divs[no].nextSibling;
while(answer && answer.tagName!='DIV'){
answer = answer.nextSibling;
}
answer.id = 'dhtmlgoodies_a'+divCounter;
contentDiv = answer.getElementsByTagName('DIV')[0];
contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px';
contentDiv.className='divAnswer_content';
contentDiv.id = 'dhtmlgoodies_ac' + divCounter;
answer.style.display='none';
answer.style.height='1px';
divCounter++;
}
}
}
</script>
<style type="text/css">
.divQuestion { /* Styling question */
/* Start layout CSS */
float: left;
margin: 8px 0 -1px 0;
width: 150px;
}
.chatbox {
background: #6d9a1d;
color: white;
border-left: 12px solid #D32028;
padding: 2px 0 0 21px;
width: 104px;
float: left;
line-height: 24px;
cursor: pointer;
font-size: 14px;
font-weight: bold;
text-shadow: 0 1px 0 #555;
font-variant:small-caps;
}
.arrow-right {
border-color: transparent transparent transparent #6d9a1d;
border-style: solid;
border-width: 13px 0 13px 13px;
height: 0;
left: 0;
position: relative;
top: 0;
width: 0;
float: right;
}
.dhtmlgoodies_answer { /* Parent box of slide down content */
/* Start layout CSS */
border:1px solid #C4C4C4;
width:100%;
clear: left;
/* End layout CSS */
visibility:hidden;
height:0px;
overflow:hidden;
position:relative;
}
.dhtmlgoodies_answer_content{ /* Content that is slided down */
padding:1px;
font-size:0.9em;
position:relative;
}
.sb_pro_box .button {padding: 2.5px 5px;}
</style>
<div class="divQuestion"><span class="chatbox">Phố "tám"</span><span class="arrow-right"></span></div>
<div class="dhtmlgoodies_answer">
<div class="forumbit_nopost L1" style="height:350px;" id="sb_pro">
<ol id="c_sb_pro">
<li id="sb_pro_box" class="forumbit_post L2">
<div class="forumrow" style="width:100%;">
<div id="sb_smilies" class="forumdata" style="padding-left:4px;padding-right:4px;display:none;">
<div id="sb_smilies_content"></div>
</div>
<div class="forumdata" style="padding-left:4px;padding-right:4px;">
<form name="sb_pro" action="javascript://" onsubmit="javascript:postShout();" method="post">
<div><input name="message" id="message" style="width:70%;color:#000000;" class="textbox" type="text" disabled="disabled" />
<input type="button" value="Đăng" style="background-color:#6D9A1D;color:#fff;padding: 2.5px 10px;background-image:none;" class="button" disabled="disabled" />
<input type="button" value="Viết lại" class="button" onclick="this.form.message.value=''" disabled="disabled" />
</div>
<div style="margin-top: 2px;">
<input type="button" value="Biểu tượng" class="button" onclick="javascript:show_smilies();" disabled="disabled" />
<input type="button" value="Làm mới" class="button" onclick="javascript:sb_f5();" />
<input id="sb_bold" type="button" value="B" style="font-weight:bold" class="button" disabled="disabled" />
<input type="button" value="U" style="text-decoration:underline;" class="button" disabled="disabled" />
<input type="button" value="I" style="font-style:italic" class="button" disabled="disabled" />
<select name="color" disabled="disabled">
<option value="default" selected>Default</option>
<option value="Blue" style="background-color:Blue" >Blue</option>
<option value="Green" style="background-color:Green" >Green</option>
<option value="Orange" style="background-color:Orange" >Orange</option>
<option value="Brown" style="background-color:Brown" >Brown</option>
<option value="Black" style="background-color:Black" >Black</option>
<option value="Yellow" style="background-color:Yellow" >Yellow</option>
<option value="Purple" style="background-color:Purple" >Purple</option>
<option value="Pink" style="background-color:Pink" >Pink</option>
<option value="Silver" style="background-color:Silver" >Silver</option>
</select>
<select name="ff" disabled="disabled">
<option value="default" selected>Default</option>
<option value="Arial" style="" >Arial</option>
<option value="Arial Black" style="" >Arial Black</option>
<option value="Arial Narrow" style="" >Arial Narrow</option>
<option value="Book Antiqua" style="" >Book Antiqua</option>
<option value="Century Gothic" style="" >Century Gothic</option>
<option value="Comic Sans MS" style="" >Comic Sans MS</option>
<option value="Courier New" style="" >Courier New</option>
<option value="Fixedsys" style="" >Fixedsys</option>
<option value="Garamond" style="" >Garamond</option>
<option value="Georgia" style="" >Georgia</option>
<option value="Impact" style="" >Impact</option>
<option value="Lucida Console" style="" >Lucida Console</option>
<option value="Palatino Linotype" style="" >Palatino Linotype</option>
<option value="System" style="" >System</option>
<option value="Tahoma" style="" >Tahoma</option>
<option value="Times New Roman" style="" >Times New Roman</option>
<option value="Trebuchet MS" style="" >Trebuchet MS</option>
<option value="Verdana" style="" >Verdana</option>
</select>
<input type="button" value="Lưu trữ" class="button" onclick="javascript:sb_archive();" />
<input type="button" value="Bộ gõ" class="button" />
<input style="height:20px;" id="avim_auto" name="AVIMMethod" onclick="AVIMObj.setMethod(0);" type="radio" checked="checked"> Auto
<input style="height:20px;" id="avim_telex" name="AVIMMethod" onclick="AVIMObj.setMethod(1);" type="radio"> Telex
<input style="height:20px;" id="avim_vni" name="AVIMMethod" onclick="AVIMObj.setMethod(2);" type="radio"> Vni
<input style="height:20px;" id="avim_off" name="AVIMMethod" onclick="AVIMObj.setMethod(-1);" type="radio"> Off
</div>
<div id="sb_window" style="border: 0px !important;margin:4px 0px;">
<iframe name="sb_frame" src="http://data.ninhbinhvip.vn/sbox/index.php?info=0,1,7" frameborder="0" style="width: 99%; height: 277px;"></iframe>
</div>
</form>
</div>
</div>
</li>
</ol>
</div>
</div>
<script type="text/javascript">
initShowHideDivs();
showHideContent(false,1);
</script>
<script type="text/javascript">
function clear()
{
fetch_object('message').value = '';
}
function sb_archive()
{
window.open("http://data.ninhbinhvip.vn/sbox/archive.php?info=0,1,7", "", "location=no,scrollbars=yes,width=500,height=450");
}
function sb_f5()
{
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?info=0,1,7';
}
function postShout()
{
message = fetch_object('message').value;
username = 'Kh%C3%A1ch';
if(PHP.trim(message)=='') alert('Enter a message first!');
else
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?do=shout&message=' + encodeURIComponent(message) + '&username=' + encodeURIComponent(username) + '&info=0,1,7&antihack=eb1a67464f1e9dc36281d77d34d5fa0a';
clear();
}
function show_smilies()
{
AjaxSB = new vB_AJAX_Handler(true);
AjaxSB.onreadystatechange(fetchSmilies);
AjaxSB.send('ajax.php?do=smilies');
}
function fetchSmilies()
{
if(fetch_object('sb_smilies').style.display != '')
{
if (AjaxSB.handler.readyState == 4 && AjaxSB.handler.status == 200)
{
fetch_object('sb_smilies').style.display = '';
fetch_object('sb_smilies_content').innerHTML = AjaxSB.handler.responseText;
}
}
else fetch_object('sb_smilies').style.display = 'none';
}
function insert_smilie(text)
{
fetch_object('message').value += text;
}
function update_style(type,obj)
{
switch(type)
{
case 'fontWeight':
if(obj.value=='B') {
b=1;
obj.value = 'B*';
fetch_object('message').style.fontWeight = 'bold';
}
else {
b=-1;
obj.value = 'B';
fetch_object('message').style.fontWeight = 'normal';
}
setCookie('sb_b',b,7);
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?do=update_style&info=0,1,7&b='+b;
break;
case 'textDecoration':
if(obj.value=='U') {
u=1;
obj.value = 'U*';
fetch_object('message').style.textDecoration = 'underline';
}
else {
u=-1;
obj.value = 'U';
fetch_object('message').style.textDecoration = 'none';
}
setCookie('sb_u',u,7);
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?do=update_style&info=0,1,7&u='+u;
break;
case 'fontStyle':
if(obj.value=='I') {
i=1;
obj.value = 'I*';
fetch_object('message').style.fontStyle = 'italic';
}
else {
i=-1;
obj.value = 'I';
fetch_object('message').style.fontStyle = 'normal';
}
setCookie('sb_i',i,7);
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?do=update_style&info=0,1,7&i='+i;
break;
case 'color':
if(obj.value=='default') color='black';
else color = obj.value;
fetch_object('message').style.color = color;
setCookie('sb_color',obj.value,7);
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?do=update_style&info=0,1,7&color='+obj.value;
break;
case 'ff':
setCookie('sb_ff',obj.value,7);
sb_frame.location = 'http://data.ninhbinhvip.vn/sbox/index.php?do=update_style&info=0,1,7&ff='+obj.value;
break;
}
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
</script>
hoangduykt7990
21-06-2011, 09:15 PM
Ng ta dùng mod này Simple Inferno Shoutbox for vB4
code của sb_main
<script type="text/javascript">
/************************************************** ************************************************** ********
(C) www.dhtmlgoodies.com, November 2005
This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.
Thank you!
www.dhtmlgoodies.com
Alf Magne Kalleland
************************************************** ************************************************** ********/
var dhtmlgoodies_slideSpeed = 15; // Higher value = faster
var dhtmlgoodies_timer = 10; // Lower value = faster
var objectIdToSlideDown = false;
var dhtmlgoodies_activeId = false;
var dhtmlgoodies_slideInProgress = false;
var dhtmlgoodies_expandMultiple = true;
function showHideContent(e,inputId)
{
if(dhtmlgoodies_slideInProgress)return;
dhtmlgoodies_slideInProgress = true;
if(!inputId)inputId = this.id;
inputId = inputId + '';
var numericId = inputId.replace(/[^0-9]/g,'');
var answerDiv = document.getElementById('dhtmlgoodies_a' + numericId);
objectIdToSlideDown = false;
if(!answerDiv.style.display || answerDiv.style.display=='none'){
if(dhtmlgoodies_activeId && dhtmlgoodies_activeId!=numericId && !dhtmlgoodies_expandMultiple){
objectIdToSlideDown = numericId;
slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_s lideSpeed*-1));
}else{
answerDiv.style.display='block';
answerDiv.style.visibility = 'visible';
slideContent(numericId,dhtmlgoodies_slideSpeed);
}
}else{
slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
dhtmlgoodies_activeId = false;
}
}
function slideContent(inputId,direction)
{
var obj =document.getElementById('dhtmlgoodies_a' + inputId);
var contentObj = document.getElementById('dhtmlgoodies_ac' + inputId);
height = obj.clientHeight;
if(height==0)height = obj.offsetHeight;
height = height + direction;
rerunFunction = true;
if(height>contentObj.offsetHeight){
height = contentObj.offsetHeight;
rerunFunction = false;
}
if(height<=1){
height = 1;
rerunFunction = false;
}
obj.style.height = height + 'px';
var topPos = height - contentObj.offsetHeight;
if(topPos>0)topPos=0;
contentObj.style.top = topPos + 'px';
if(rerunFunction){
setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
}else{
if(height<=1){
obj.style.display='none';
if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.display='block';
document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.visibility='visible';
slideContent(objectIdToSlideDown,dhtmlgoodies_slid eSpeed);
}else{
dhtmlgoodies_slideInProgress = false;
}
}else{
dhtmlgoodies_activeId = inputId;
dhtmlgoodies_slideInProgress = false;
}
}
}
function initShowHideDivs()
{
var divs = document.getElementsByTagName('DIV');
var divCounter = 1;
for(var no=0;no<divs.length;no++){
if(divs[no].className=='divQuestion'){
divs[no].onclick = showHideContent;
divs[no].id = 'dhtmlgoodies_q'+divCounter;
var answer = divs[no].nextSibling;
while(answer && answer.tagName!='DIV'){
answer = answer.nextSibling;
}
answer.id = 'dhtmlgoodies_a'+divCounter;
contentDiv = answer.getElementsByTagName('DIV')[0];
contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px';
contentDiv.className='divAnswer_content';
contentDiv.id = 'dhtmlgoodies_ac' + divCounter;
answer.style.display='none';
answer.style.height='1px';
divCounter++;
}
}
}
</script>
<style type="text/css">
.divQuestion { /* Styling question */
/* Start layout CSS */
float: left;
margin: 8px 0 -1px 0;
width: 150px;
}
.chatbox {
background: #6d9a1d;
color: white;
border-left: 12px solid #D32028;
padding: 2px 0 0 21px;
width: 104px;
float: left;
line-height: 24px;
cursor: pointer;
font-size: 14px;
font-weight: bold;
text-shadow: 0 1px 0 #555;
font-variant:small-caps;
}
.arrow-right {
border-color: transparent transparent transparent #6d9a1d;
border-style: solid;
border-width: 13px 0 13px 13px;
height: 0;
left: 0;
position: relative;
top: 0;
width: 0;
float: right;
}
.dhtmlgoodies_answer { /* Parent box of slide down content */
/* Start layout CSS */
border:1px solid #C4C4C4;
width:100%;
clear: left;
/* End layout CSS */
visibility:hidden;
height:0px;
overflow:hidden;
position:relative;
}
.dhtmlgoodies_answer_content{ /* Content that is slided down */
padding:1px;
font-size:0.9em;
position:relative;
}
.sb_pro_box .button {padding: 2.5px 5px;}
</style>
<div class="divQuestion"><span class="chatbox">Phố "tám"</span><span class="arrow-right"></span></div>
<div class="dhtmlgoodies_answer">
<div class="forumbit_nopost L1" style="height:350px;" id="sb_pro">
<ol id="c_sb_pro">
<li id="sb_pro_box" class="forumbit_post L2">
<div class="forumrow" style="width:100%;">
<div id="sb_smilies" class="forumdata" style="padding-left:4px;padding-right:4px;display:none;">
<div id="sb_smilies_content"></div>
</div>
<div class="forumdata" style="padding-left:4px;padding-right:4px;">
<form name="sb_pro" action="javascript://" onsubmit="javascript:postShout();" method="post">
<div><input name="message" id="message" style="width:70%;{vb:raw sb_style}" class="textbox" type="text"<vb:if condition="$show['guest']"> disabled="disabled"</vb:if> />
<input type="button" value="Đăng" style="background-color:#6D9A1D;color:#fff;padding: 2.5px 10px;background-image:none;" class="button"<vb:if condition="$show['guest']"> disabled="disabled"<vb:else /> onclick="javascript:postShout();"</vb:if> />
<input type="button" value="Viết lại" class="button" onclick="this.form.message.value=''"<vb:if condition="$show['guest']"> disabled="disabled"</vb:if> />
</div>
<div style="margin-top: 2px;">
<input type="button" value="Biểu tượng" class="button" onclick="javascript:show_smilies();"<vb:if condition="$show['guest']"> disabled="disabled"</vb:if> />
<input type="button" value="Làm mới" class="button" onclick="javascript:sb_f5();" />
<input id="sb_bold" type="button" value="<vb:if condition="$_COOKIE['sb_b'] > 0 AND $show['member']">B*<vb:else />B</vb:if>" style="font-weight:bold" class="button"<vb:if condition="$show['guest']"> disabled="disabled"<vb:else /> onclick="javascript:update_style('fontWeight', this);"</vb:if> />
<input type="button" value="<vb:if condition="$_COOKIE['sb_u'] > 0 AND $show['member']">U*<vb:else />U</vb:if>" style="text-decoration:underline;" class="button"<vb:if condition="$show['guest']"> disabled="disabled"<vb:else /> onclick="javascript:update_style('textDecoration',this);"</vb:if> />
<input type="button" value="<vb:if condition="$_COOKIE['sb_i'] > 0 AND $show['member']">I*<vb:else />I</vb:if>" style="font-style:italic" class="button"<vb:if condition="$show['guest']"> disabled="disabled"<vb:else /> onclick="javascript:update_style('fontStyle',this);"</vb:if> />
<select name="color"<vb:if condition="$show['guest']"> disabled="disabled"<vb:else /> onchange="javascript:update_style('color',this);"</vb:if>>
{vb:raw s_color_menu}
</select>
<select name="ff"<vb:if condition="$show['guest']"> disabled="disabled"<vb:else /> onchange="update_style('ff',this);"</vb:if>>
{vb:raw s_ff_menu}
</select>
<input type="button" value="Lưu trữ" class="button" onclick="javascript:sb_archive();" />
<input type="button" value="Bộ gõ" class="button" />
<input style="height:20px;" id="avim_auto" name="AVIMMethod" onclick="AVIMObj.setMethod(0);" type="radio" checked="checked"> Auto
<input style="height:20px;" id="avim_telex" name="AVIMMethod" onclick="AVIMObj.setMethod(1);" type="radio"> Telex
<input style="height:20px;" id="avim_vni" name="AVIMMethod" onclick="AVIMObj.setMethod(2);" type="radio"> Vni
<input style="height:20px;" id="avim_off" name="AVIMMethod" onclick="AVIMObj.setMethod(-1);" type="radio"> Off
</div>
<div id="sb_window" style="border: 0px !important;margin:4px 0px;">
<iframe name="sb_frame" src="{vb:raw sb_url}/index.php?info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}" frameborder="0" style="width: 99%; height: {vb:raw sb_height};"></iframe>
</div>
</form>
</div>
</div>
</li>
</ol>
</div>
</div>
<script type="text/javascript">
initShowHideDivs();
showHideContent(false,1);
</script>
<script type="text/javascript">
function clear()
{
fetch_object('message').value = '';
}
function sb_archive()
{
window.open("{vb:raw sb_url}/archive.php?info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}", "", "location=no,scrollbars=yes,width=500,height=450");
}
function sb_f5()
{
sb_frame.location = '{vb:raw sb_url}/index.php?info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}';
}
function postShout()
{
message = fetch_object('message').value;
username = '{vb:raw sbusername}';
if(PHP.trim(message)=='') alert('Enter a message first!');
else
sb_frame.location = '{vb:raw sb_url}/index.php?do=shout&message=' + encodeURIComponent(message) + '&username=' + encodeURIComponent(username) + '&info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}&antihack={vb:raw antihack}';
clear();
}
function show_smilies()
{
AjaxSB = new vB_AJAX_Handler(true);
AjaxSB.onreadystatechange(fetchSmilies);
AjaxSB.send('ajax.php?do=smilies');
}
function fetchSmilies()
{
if(fetch_object('sb_smilies').style.display != '')
{
if (AjaxSB.handler.readyState == 4 && AjaxSB.handler.status == 200)
{
fetch_object('sb_smilies').style.display = '';
fetch_object('sb_smilies_content').innerHTML = AjaxSB.handler.responseText;
}
}
else fetch_object('sb_smilies').style.display = 'none';
}
function insert_smilie(text)
{
fetch_object('message').value += text;
}
function update_style(type,obj)
{
switch(type)
{
case 'fontWeight':
if(obj.value=='B') {
b=1;
obj.value = 'B*';
fetch_object('message').style.fontWeight = 'bold';
}
else {
b=-1;
obj.value = 'B';
fetch_object('message').style.fontWeight = 'normal';
}
setCookie('sb_b',b,7);
sb_frame.location = '{vb:raw sb_url}/index.php?do=update_style&info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}&b='+b;
break;
case 'textDecoration':
if(obj.value=='U') {
u=1;
obj.value = 'U*';
fetch_object('message').style.textDecoration = 'underline';
}
else {
u=-1;
obj.value = 'U';
fetch_object('message').style.textDecoration = 'none';
}
setCookie('sb_u',u,7);
sb_frame.location = '{vb:raw sb_url}/index.php?do=update_style&info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}&u='+u;
break;
case 'fontStyle':
if(obj.value=='I') {
i=1;
obj.value = 'I*';
fetch_object('message').style.fontStyle = 'italic';
}
else {
i=-1;
obj.value = 'I';
fetch_object('message').style.fontStyle = 'normal';
}
setCookie('sb_i',i,7);
sb_frame.location = '{vb:raw sb_url}/index.php?do=update_style&info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}&i='+i;
break;
case 'color':
if(obj.value=='default') color='black';
else color = obj.value;
fetch_object('message').style.color = color;
setCookie('sb_color',obj.value,7);
sb_frame.location = '{vb:raw sb_url}/index.php?do=update_style&info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}&color='+obj.value;
break;
case 'ff':
setCookie('sb_ff',obj.value,7);
sb_frame.location = '{vb:raw sb_url}/index.php?do=update_style&info={vb:raw bbuserinfo.userid},{vb:raw bbuserinfo.usergroupid},{vb:raw sb_tz}&ff='+obj.value;
break;
}
}
<vb:literal>
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
</vb:literal>
</script>
Mình thử trên cái chang thì ko dc :)) :MatCuoi (23):
PhucSD
21-06-2011, 09:20 PM
Ng ta dùng mod này Simple Inferno Shoutbox for vB4
Mình thử trên cái chang thì ko dc :)) :MatCuoi (23):
Bạn chơi shock thật đấy, đây là hàng của DBTech chỉ dùng cho [DBTech] Shoutbox hay Shoutbox Pro thôi bạn à, trong forum có đấy
hoangduykt7990
21-06-2011, 09:47 PM
Bạn chơi shock thật đấy, đây là hàng của DBTech chỉ dùng cho [DBTech] Shoutbox hay Shoutbox Pro thôi bạn à, trong forum có đấy
Chắc bạn hiểu nhầm :)), ý là thêm cái code bên này http://www.dhtmlgoodies.com/?whichScript=show_hide_content_slide
(http://www.dhtmlgoodies.com/?whichScript=show_hide_content_slide)
vào trong changuon main như cái đó để nó đổ lên đô xuống :))
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.