.
¾A¦X¨Ï¥Îª©¥»¡@Discuz! 3.0F £]3 ¤Î Discuz! 4.0.0¡@-¡@
Discuz! ¥N½X¡@meun ¥\¯à (¤£¬O«á¥x¼W¥[)
==============================================
2005-12-10 03:22 AM ¤§«e×§ï¹Lªº½Ð¦A¦¸×§ï
¦]¬°¥Î «á¥x Discuz! ¥N½X ¼W¥[ªº¤èªk¡@¤£¦p²z·Q
¸g¹L¦aº»¦¡´ú¸Õ«á¡@¨Ï¥Î¤F¥t¤@¤èªk
±N«á¥x¡@Discuz! ¥N½X¡@¼W¥[ªº meun ¥N½X §R°£
¦A¸ò¡@«ö¶s»s§@¤§¤Wªº±Ð¾Ç×§ï´N¥i¥H¡@( «Ü²³æ )
¦aº»¦¡´ú¸Õºô§} ¡õ Åwªï¸Õª±¡@½Ð¤Å¬µªO¡@
http://discuz30.lthung.net/viewthread.php?tid=13
http://discuz30.lthung.net/viewthread.php?tid=16
==============================================
¨Ï¥Î¤èªk¡G¡@³Ì©³¦³¹Ï¨Ò¡@«ö¶s¨Ï¥Î¤w¦³´£¨Ñ¡@
¿é¤J¤º®e¡@¡×¡@«ö¶}ÃöÅã¥Üªº¤º®e¡A¥i¤ä´©¹j¦æ¡D¹j¦ì¡D¤Î Discuz! ¥N½X
pink¡@¡@¡@¡×¡@¦ÛqÃ䮨ÃC¦â¡@¨Ï¥ÎÃC¦â¥N½X¥ç¥i¤£¥[¡@#¡@(·íµM¥i¿ï¾Ü¥[)
name¡@¡@¡×¡@¦Ûq¦W¦r¡A¥i¥Î¤¤©Î^¤å¡A°£¤F©³½u¡@_¡@¸T¤î¥Î¥ô¦ó²Å¸¹¤Î¹j¦ì
¡@¡@¡@¡@¡@¡@¡@¦P¤@½g¥DÃD¤Î¦^À³©«¤º¡A¨C¨Ï¥Î¤@¦¸¡Dn¦³¤£¦P¦W¦r¡Dµ´¤£¥i¬Û¦P¡D§_«h·|¥¢®Ä
¡@¡@¡@¡@¡@¡@¡@´Nºâ¬O¦^À³©«¤l¡D¥ç¤£¥i¦³¥DÃD©«¤Î¨ä¥¦¦^À³©«¨Ï¥Î¤Fªº¬Û¦P¦W¦r
[ ¶}Ãö¤º®e name ]¡@¶ñ¤Jªº name ´N¬O¦b³oùØÅã¥Ü ( ©Ò¥H¥i¥Î¤¤¤å¦W¦rªí¥Ü¥[ª`¸Ñ )[meun=name,pink]¿é¤J¤º®e[/meun]
[meun=¤¤¤å»¡©ú,blue]¿é¤J¤º®e[/meun]
[meun=name,pink]¿é¤J¤º®e[/meun]
==============================================
¥[¤J¤èªk
include/
discuzcode.func.php¡@§ä¡G
if(stristr($message, '[/hide]')) {
¤§¤W¥[¤J¡@(
ºò°O¥[¦b¤W± )
//------------------ meun ¥\¯à --------------------------
if(stristr($message, '[meun=') && stristr($message, '[/meun]')) {
$message = preg_replace("/\[meun=(.+?)[x|\,](.+?)\]\s*(.+?)\s*\[\/meun\]/is", "<a style=\"cursor:hand\" onclick=\"meun_\\1.style.display=meun_\\1.style.display=='none'?'':'none'\">[ ¤º®e¶}Ãö \\1 ]</a><div id=meun_\\1 style=\"display:none;width:99%;padding: 6px;border: 1px dashed ;border-color:\\2; word-break: break-all\">\\3</div>", $message);
}
//------------------ meun ¥\¯à --------------------------
==============================================
ª`¡GYı¼W¥[«ö¶s×§ï³Â·Ð¡@¥i¥H¤£¥i¤J
¥u¬O¦Û¤v¥´¥X¥H¤U¥N½X¨Ï¥Î«K¥i¥H[meun=name,pink]¿é¤J¤º®e[/meun]
==============================================
«ö¶s»s¥ó¡@×§ïÀɮסG
include/
bbcode.js
templates/default/
templates.lang.php
templates/default/
post_bbinsert.htm
¤U¸ü¹Ï¤ù¡@©ñ¨ì¡@images/default/
bb_meun.gif¡@¤§¤º
==============================================
include/bbcode.js¡@§ä
function alipay() {
¤§¤W¥[¤J¡@( ºò°O¥[¦b¤W± )
function meun() {
if (helpmode) {
alert(meun_help_mode);
} else if (getSelectedText()) {
var range = document.selection.createRange();
text2=prompt(meun_tip_highlight,"name");
range.text = "[meun="+text2+",purple]"+range.text+"\r[/meun]\r";
} else if (advmode) {
AddTxt="[meun=open_close,purple]"+meun_tip3+"\r[/meun]\r";
AddText(AddTxt);
} else {
txt=prompt(meun_tip1,"name");
if (txt!=null) {
txt2=prompt(meun_tip2,"purple");
txt3=prompt(meun_tip3,meun_tip3);
if (txt2=="") {
AddTxt="[meun=" + range.text + ","+txt2+"]"+txt3;
AddText(AddTxt);
AddText("\r[/meun]\r");
txt3=prompt(meun_tip3,meun_tip3);
} else if (txt3=="") {
AddTxt="[meun="+txt+","+txt2+"]"+range.text;
AddText(AddTxt);
AddText("\r[/meun]\r");
} else {
AddTxt="[meun="+txt+","+txt2+"]"+txt3;
AddText(AddTxt);
AddText("\r[/meun]\r");
}
}
}
}
==============================================
templates/default/templates.lang.php¡@§ä
'post_discuzcode_hyperlink_normal_input' => '½Ð¿é¤J URL¡C',
¤§¤U¥[¤J
'post_discuzcode_meun_tip' => '¶}ÃöÅã¥Ü¤º®e¯S®Ä',
'post_discuzcode_meun_tip1' => '½Ð¿é¤J¤@Ó¦WºÙ¡A¦WºÙ¥i¥H¬O¤¤^©Î¼Æ¦r¡A¦ý¤£¥i¨Ï¥Î¥ô¦ó²Å¸¹©Î¹j¦ì',
'post_discuzcode_meun_tip2' => '½Ð¿é¤JÃ䮨ÃC¦â¡AÃC¦â¥i¦Ûq¶}±Ò«á¤º®eÃ䮨ªºÃC¦â',
'post_discuzcode_meun_tip3' => '½Ð¿é¤Jn¶}±Ò«áÅã¥Üªº¤º®e',
'post_discuzcode_meun_tip_highlight' => '±z¤w highlight ¤F¶}±Ò«áÅã¥Üªº¤º®e¡C½Ð¿é¤J¤@Ó¦WºÙ\n¦WºÙ¥i¥H¬O¤¤^©Î¼Æ¦r¡A¦ý¤£¥i¨Ï¥Î¥ô¦ó²Å¸¹©Î¹j¦ì',
'post_discuzcode_meun_help_mode' => '±Nn«ö¤U¦W¦r¡A¤º®e¤~¥i¶}±Ò¥X¨ÓÅã¥Ü¡C\n\n¨Ò¦p¡G[meun=¦W¦r,ÃC¦â] ¶}±Ò«á©ÒÅã¥Üªº¤º®e [/meun]\n\n¦W¦r - ¥i¥H¬O¤¤^©Î¼Æ¦r¡A¦ý¤£¥i¨Ï¥Î¥ô¦ó²Å¸¹©Î¹j¦ì\n\nÃC¦â - ¥i¦Ûq¶}±Ò«á¤º®eÃ䮨ªºÃC¦â\n\n¤º®e - »Ýn¶}±Ò«á¤º®e¤~·|Åã¥Ü¥X¨Ó',
==============================================
templates/default/post_bbinsert.htm¡@§ä
var list_normal_input = "{lang post_discuzcode_list_normal_input}";
¤§¤U¥[¤J
var meun_tip = "{lang post_discuzcode_meun_tip}";
var meun_tip1 = "{lang post_discuzcode_meun_tip1}";
var meun_tip2 = "{lang post_discuzcode_meun_tip2}";
var meun_tip3 = "{lang post_discuzcode_meun_tip3}";
var meun_tip_highlight = "{lang post_discuzcode_meun_tip_highlight}";
var meun_help_mode = "{lang post_discuzcode_meun_tip}\n\n{lang post_discuzcode_meun_help_mode}";
¦A§ä
<a href="javascript:code()"><img src="{IMGDIR}/bb_code.gif" border="0" alt="{lang post_discuzcode_code}"></a>
¤§¤U¥[¤J
<a href="javascript:meun()"><img src="images/default/bb_meun.gif" border="0" alt="{lang post_discuzcode_meun_tip}"></a>
=================== §¹ ¦¨ ======================
[¦¹©«³Ì«á¥Ñ §O°Ý§Ú¬O½Ö ¦b 2005-12-13 ©ó 01:07 ×§ï]