.
演示 ↓
http://discuz30.lthung.net/viewthread.php?tid=7
以下 ↓ 是一種很實用的代碼 (附加按鈕使用)
http://www.alan888.com/Discuz/viewthread.php?tid=49007
用了這代碼 ↑ 發帖時便不需自己打出分隔線 ↓ 
===============================================
控制速度及方向 使用代碼方法:
left 及 right 是方向 之後的數值是速度 數字越大越快
[move=right,60]控制速度向右 60[/move]
[move=left,20]控制速度向左 20[/move]
後台升級數據庫 ( 升級後緊記 更新緩存 )
INSERT INTO `cdb_bbcodes` VALUES (0, 1, 'move', '<MARQUEE direction="{1}" SCROLLAMOUNT="{2}">{3}</MARQUEE>', '[move=left,30]控制速度[/move]', '控制方向及速度', 3, 1);
===============================================
偷龍轉鳳文字 滑鼠指向及滑鼠離開顯示不同文字
[fun=滑鼠指向顯示的文字]滑鼠未指向及滑鼠離開顯示的文字[/fun]
後台升級數據庫 ( 升級後緊記 更新緩存 )
INSERT INTO `cdb_bbcodes` VALUES (0, 1, 'fun', '<span onmouseover=this.innerHTML="{1}" onmouseout=this.innerHTML="{2}">{2}</span>', '[fun=變換文字]顯示文字[/fun]', '偷龍轉鳳文字', 2, 1);
===============================================
===============================================
偷龍轉鳳文字特效 - 按鈕製作
按鈕並有親切的提示訊息
===============================================
===============================================
修改檔案:
include/bbcode.js
templates/default/post_bbinsert.htm
templates/default/templates.lang.php
上傳圖檔 bb_fun.gif 到 images/default/ 之內
並送上一幅空白圖 您可自訂按鈕圖的文字
===============================================
include/bbcode.js 找:
之上加入 ( 緊記加在之上 )
function fun() {
if (helpmode) {
alert(fun_help);
} else if (getSelectedText()) {
var range = document.selection.createRange();
text2=prompt(fun_tips,fun_normal_input2);
range.text = "[fun="+range.text+"]"+text2+"[/fun]";
} else if (advmode) {
AddTxt="[fun="+fun_normal_input1+"]"+fun_normal_input3+"[/fun]\r";
AddText(AddTxt);
} else {
txt2=prompt(fun_normal_input2,fun_normal_input3);
if (txt2!=null) {
txt=prompt(fun_normal_input1,fun_normal_input1);
if (txt!=null) {
if (txt2=="") {
txt2=prompt(fun_normal_input2,fun_normal_input3);
txt1=prompt(fun_normal_input1,fun_normal_input1);
AddTxt="[fun="+txt1+"]"+txt2;
AddText(AddTxt);
AddText("[/fun]\r");
} else {
AddTxt="[fun="+txt+"]"+txt2;
AddText(AddTxt);
AddText("[/fun]\r");
}
}
}
}
}
===============================================
templates/default/templates.lang.php 找:
'post_discuzcode_hyperlink' => '插入超級鏈接',
之上加入 ( 緊記加在之上 )
'post_discuzcode_fun' => '偷龍轉鳳文字特效',
'post_discuzcode_fun_comment' => '在內容加入顯示文字及未顯示的內容。\n例如:[fun=未顯示的內容]顯示的文字[/fun]',
'post_discuzcode_fun_normal_input1' => '請輸入未顯示的內容。',
'post_discuzcode_fun_normal_input2' => '請輸入顯示的文字。',
'post_discuzcode_fun_normal_input3' => '這是未顯示的內容,需要滑鼠指向才可看見。',
'post_discuzcode_fun_tips' => '您已 highlight 了未顯示內容,請輸入要顯示的文字。',
'post_discuzcode_fun_normal_help' => '輸入顯示的文字及未顯示的內容,不支援隔行。\n需要滑鼠指向顯示文字,未顯示內容才會顯示出來。',
===============================================
templates/default/post_bbinsert.htm 找:
var link_normal_input = "{lang post_discuzcode_hyperlink_normal_input}";
之下加入
var fun_help = "{lang post_discuzcode_fun}\n\n{lang post_discuzcode_fun_normal_help}\n\n{lang post_discuzcode_fun_comment}";
var fun_normal_input1 = "{lang post_discuzcode_fun_normal_input1}";
var fun_normal_input2 = "{lang post_discuzcode_fun_normal_input2}";
var fun_normal_input3 = "{lang post_discuzcode_fun_normal_input3}";
var fun_tips = "{lang post_discuzcode_fun_tips}";
再找:
<a href="javascript:center()"><img src="{IMGDIR}/bb_center.gif" border="0" alt="{lang post_discuzcode_center}" align="absmiddle"></a>
之下加入
<a href="javascript:fun()"><img src="images/default/bb_fun.gif" border="0" alt="{lang post_discuzcode_fun}" align="absmiddle"></a>
====================== 完 成 =============================
[此帖最後由 別問我是誰 在 2005-12-8 於 20:21 修改]