PDA

View Full Version : Xin code "chọn tất cả"



vanminh
31-03-2011, 03:17 PM
mình vô diễn đàn của thpt xuân lọc thấy có phần trích dẫn code hiện thị chon tất cả đơn giản mà tiện lợi cho mem nên mình muốn có nó. Ai có cho mình xin nhé:MatCuoi (56):

xuanmao87
31-03-2011, 04:11 PM
Cài Đặt:
B1: Bạn Download về và giải nén ra và upload lên host
http://www.mediafire.com/?muj89bjl3uls856

B2: Vào Admincp ==> Styles & Templates ==> Edit Templates ==> headinclude và chèn dưới cùng:
B3: Vào Admincp ==> Styles & Templates ==> Edit Templates ==> BB Code Layout Templates

B4: Làm theo bên dưới (lưu ý là thay đổi width: cho phù hợp với Skin VBB của bạn):
-Ở bbcode_code thay toàn bộ bằng:


<!-- $Id: NNT $ --> <div style="margin:0px 0px 0px 0px"> <div class="smallfont" style="margin-bottom:0px"> <input type="button" value="Hiện CODE" style="width:80px;font-size:11px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Ẩn CODE'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Hiện CODE'; }"> <div style="margin: 0px; padding: 0px; border: 0px inset;"> <div style="display: none;"> <center> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="565" style="border: 1px dashed #ae42fa; margin: 10px; width: 565px;"> <tr> <td style="background: #f8eaff url(images/layout/code.gif) no-repeat top left; height: 29px;"> <div class="bbcode_container" > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" onclick="selectCode(this); return false;"><input type="button" value="Chọn Tất Cả" /></a> &nbsp;<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="width: 565px; height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><p>{vb:raw code}</p></pre> </div> </td> </tr> </table> </center> </div></div></div></div> <!-- $Id: NNT $ -->
Ở bbcode_html thay toàn bộ bằng:

<!-- $Id: NNT $ --> <div style="margin:0px 0px 0px 0px"> <div class="smallfont" style="margin-bottom:0px"> <input type="button" value="Hiện HTML" style="width:80px;font-size:11px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Ẩn HTML'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Hiện HTML'; }"> <div style="margin: 0px; padding: 0px; border: 0px inset;"> <div style="display: none;"> <center> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="565" style="border: 1px dashed #578fd7; margin: 10px; width: 565px;"> <tr> <td style="background: #dfedff url(images/layout/html.gif) no-repeat top left; height: 29px;"> <div class="bbcode_container" > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" onclick="selectCode(this); return false;"><input type="button" value="Chọn Tất Cả" /></a> &nbsp;<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="width: 565px; height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><p>{vb:raw code}</p></pre> </div> </td> </tr> </table> </center> </div></div></div></div> <!-- $Id: NNT $ -->
-Ở bbcode_php thay toàn bộ bằng:

<!-- $Id: NNT $ -->
<div style="margin:0px 0px 0px 0px">
<div class="smallfont" style="margin-bottom:0px">
<input type="button" value="Hiện PHP" style="width:80px;font-size:11px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Ẩn PHP'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Hiện PHP'; }">
<div style="margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">

<center>
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="565" style="border: 1px dashed #499c00; margin: 10px; width: 565px;">
<tr>
<td style="background: #e7ffd9 url(images/layout/php.gif) no-repeat top left; height: 29px;">
<div class="bbcode_container" >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#" onclick="selectCode(this); return false;"><input type="button" value="Chọn Tất Cả" /></a>
&nbsp;<pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="width: 565px; height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>><p>{vb:raw code}</p></pre>
</div>
</td>
</tr>
</table>
</center>

</div></div></div></div>
<!-- $Id: NNT $ -->

done!

vanminh
31-03-2011, 08:44 PM
Trang trí khung CODE, HTML, PHP (Đẹp + Có nút Select All + Nút Ẩn/Hiện) cái này thì vbb của mình đang xài đó. Ý của mình là muốn loại bỏ cái khung thô kệch đó, chỉ giữ lại cái khung mặc định của vbb nhưng them nút "chọn tất cả" bạn ạ