使用 hide 功能便要回覆才可看到內容
原設定只有版主已上才能使用
按下修改可令一般會員也能使用
修改
post.php
找
if(!$ismoderator && preg_match("/\[hide=?\d*\].+?\[\/hide\]/is", $message)) {
showmessage('post_hide_nopermission');
}
更換為
if(!$discuz_user && preg_match("/\[hide=?\d*\].+?\[\/hide\]/is", $message)) {
showmessage('post_hide_nopermission');
}
修改
templates.lang.php
找
'post_discuzcode_quote_normal' => '請輸入要作為引用顯示的文字。',
在下面加上
'post_discuzcode_hide' => '插入隱藏',
'post_discuzcode_hide_comment' => '將標籤所包圍的文本作為隱藏範圍。\n例如:[hide]這是秘密[/hide]',
'post_discuzcode_hide_normal' => '請輸入要隱藏的文字。',
修改
post_bbinsert.htm
找
var quote_help = "{lang post_discuzcode_quote}\n\n{lang post_discuzcode_quote_comment}";
在下面加上
var hide_help = "{lang post_discuzcode_hide}\n\n{lang post_discuzcode_hide_comment}";
找
var quote_normal = "{lang post_discuzcode_quote_normal}";
在下面加上
var hide_normal = "{lang post_discuzcode_hide_normal}";
找
<a href="javascript:quote()"><img src="{IMGDIR}/bb_quote.gif" border="0" width="23" height="22" alt="{lang post_discuzcode_quote}"></a>
在下面加上
<a href="javascript:hide()"><img src="{IMGDIR}/bb_hide.gif" border="0" width="23" height="22" alt="{lang post_discuzcode_hide}"></a>
修改
\include\\bbcode.js
找
function quote() {
if (helpmode){
alert(quote_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[quote]" + range.text + "[/quote]";
} else if (advmode) {
AddTxt="\r[quote]\r[/quote]";
AddText(AddTxt);
} else {
txt=prompt(quote_normal,text_input);
if(txt!=null) {
AddTxt="\r[quote]\r"+txt;
AddText(AddTxt);
AddText("\r[/quote]");
}
}
}
在下面加上
function hide() {
if (helpmode){
alert(hide_help);
} else if (document.selection && document.selection.type == "Text") {
var range = document.selection.createRange();
range.text = "[hide]" + range.text + "[/hide]";
} else if (advmode) {
AddTxt="\r[hide]\r[/hide]";
AddText(AddTxt);
} else {
txt=prompt(hide_normal,text_input);
if(txt!=null) {
AddTxt="\r[hide]\r"+txt;
AddText(AddTxt);
AddText("\r[/hide]");
}
}
}
將下圖存放在
/images/風格/ 下
如希望進一步漢字化
修改
\include\discuzcode.php
找
Hidden to Non-Reply Visitors
更換為
找
Below Message for Credits Higher Than $creditsrequire
更換為
這標題要積分 $creditsrequire 分以上才可閱讀\r
找
Below Message for Repliers
更換為
找
Hidden to Credits Lower Than $creditsrequire
更換為
隱藏對積分少於 $creditsrequire 分的會員
找
Hidden to Non-Reply Visitors
更換為
完成