Welcome Guest [Log In] [Register]
Chào mừng bạn đến với »»--(¯`°ZetaFamily°´¯)--»» - nơi chia sẽ những thủ thuật cho forum Zetaboards

-‘๑’- Bạn hiện đang xem diễn đàn của chúng tôi với tư cách là Khách.Điều này có nghĩa là bạn sẽ không thấy được hệ thống các code được chia sẽ trên diễn đàn.

-‘๑’- Đăng Ký rất đơn giản, nhanh chóng, và hoàn toàn miễn phí. Nhấp chuột vào ĐÂY

-‘๑’- Sử dụng Firefox để đăng nhập Forum dễ dàng hơn !

-‘๑’- Nếu đã có tài khoản hãy đăng nhập dưới đây :

-‘๑’- Chúc bạn một ngày tốt lành -‘๑’-

Username:   Password:
Add Reply
[ZB code] Tiền tố cho diễn đàn
Topic Started: Apr 26 2011, 09:40 AM (455 Views)
ZetaFamily
Member Avatar
Tôi yêu Zetaboards

Originally posted by: .Scott

Đặt tại Board Template -> Below the board:

Code:
 

<script type="text/javascript">
//Written by slayer766

var prefixes = [];
prefixes['FORUM_ID'] = new Array ("Tiền tố 1","Tiền tố 2","and ...");
prefixes['FORUM_ID'] = new Array ("Tiền tố 1","Tiền tố 2","and ....");

if(location.href.match(/&f=(.*)/i)){
var forum = RegExp.$1;
var num = 0;
if($("input[name*='title']")){
var info = "<form name='slayer'><select name='rawr'><option value='none'>Select";
for(c in prefixes){
if(forum == c){
for(j=0;j<prefixes[c].length;j++){
info+="<option value='"+num+"'>"+prefixes[c][j];
num++;
}
}
}
}
info+="</select></form> Topic Prefix";
$("input[name*='title']").after(info);
document.forms['posting'].onsubmit=function(){
var a = document.slayer.rawr.selectedIndex;
var dropdownText = document.slayer.rawr.options[a];
if(dropdownText.value != "none"){
document.forms['posting'].title.value="["+dropdownText.text+"] "+document.forms['posting'].title.value;
}
}
}
</script>


Chú ý:
FORUM_ID: Chuyên mục muốn thể hiện tiền tố
Tiền tố 1: tên ví dụ zbcode,...
Offline Profile Quote Post TOP
 
tangbangnho
No Avatar


không hiểu lắm, có hình chụp công dụng của nó không bạn ?
Offline Profile Quote Post TOP
 
ZetaFamily
Member Avatar
Tôi yêu Zetaboards

Nó tương tự như forum mình đang dùng vậy, [Hỏi - Đáp]. [ZB code],...
Offline Profile Quote Post TOP
 
tangbangnho
No Avatar


à, thế thì mình hiểu. thanks bạn hihi ^^
Offline Profile Quote Post TOP
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Code Forum · Next Topic »
Add Reply

Liên Kết Forum

Copyright©2011,ZetaFamily™.All rights reserved
Xem tốt nhất trên các trình duyệt FireFox hoặc Google Chrome
Diễn đàn là một hệ thống mở,chúng tôi sẽ không chịu trách nhiệm về nội dung đăng tải do người dùng đưa lên.
ZetaFamily Theme designed by ZetaFamily.Co.Cc