原帖:
http://www.discuz.net/viewthread.php?tid=908658&extra=&highlight=%B7%D6%D7%E9%BF%F2%B1%EA%C7%A9&page=1
| 插件名稱 | 分組框標籤(FBOX)+按扭 |
| 適用版本 | Discuz!6.1 |
| 語言編碼 | GBK |
| 插件作者 | Kannol(靖颯) |
| 版權所屬 | Kannol(靖颯) |
| 支持網站 | http://bbs.bizhs.com |
| 插件簡介 | 為發貼子增加分組框的標籤和按扭功能 |
1. templates\default\templates.lang.php
查找:
複製內容到剪貼簿
代碼:
'post_discuzcode_input_hide' => '請輸入要插入的隱藏內容',下面加
複製內容到剪貼簿
代碼:
'post_discuzcode_fbox' => '插入FBOX標籤',
'post_discuzcode_input_fbox' => '請輸入要插入的FBOX內容',2. templates\default\post_editor.htm
查找:
複製內容到剪貼簿
代碼:
lang['post_discuzcode_hide'] = '{lang post_discuzcode_input_hide}';下面加:
複製內容到剪貼簿
代碼:
lang['post_discuzcode_fbox'] = '{lang post_discuzcode_input_fbox}';查找:
複製內容到剪貼簿
代碼:
<!--{if $allowhidecode}--><a id="{$editorid}_cmd_hide" title="{lang post_discuzcode_hide}">Hide</a><!--{/if}-->下面加:
複製內容到剪貼簿
代碼:
<em></em>
<a id="{$editorid}_cmd_fbox" title="{lang post_discuzcode_fbox}">Fbox</a>3. templates\default\css_editor.htm
查找:
複製內容到剪貼簿
代碼:
#posteditor_popup_media { background-position: 0 -541px;}下面加:
複製內容到剪貼簿
代碼:
#posteditor_cmd_fbox { background-position: 0 -761px;}4. include\javascript\editor.js
查找:
複製內容到剪貼簿
代碼:
insertText(text, strlen(opentag), strlen(closetag), in_array(tagname, ['code', 'quote', 'free', 'hide']) ? true : false);替換為:
複製內容到剪貼簿
代碼:
insertText(text, strlen(opentag), strlen(closetag), in_array(tagname, ['code', 'quote', 'free', 'hide' ,'fbox']) ? true : false);查找:
複製內容到剪貼簿
代碼:
if(in_array(cmd, ['quote', 'code', 'free', 'hide'])) {替換為:
複製內容到剪貼簿
代碼:
if(in_array(cmd, ['quote', 'code', 'free', 'hide', 'fbox'])) {查找:
複製內容到剪貼簿
代碼:
var opentag = '[' + cmd + ']';替換為:
複製內容到剪貼簿
代碼:
var opentag = cmd == 'fbox' ? '[' + cmd + '=請在這裡輸入FBOX標題]' : '[' + cmd + ']';查找
複製內容到剪貼簿
代碼:
if(cmd != 'hide' || !selection) {上面加
複製內容到剪貼簿
代碼:
if(cmd == 'fbox') {
str += 'Fbox 標題: <input type="text" size="30" name="fboxsubject" id="fboxsubject"><br>';
}查找
複製內容到剪貼簿
代碼:
var text = selection ? selection : $(ctrlid + '_param_1').value;上面加
複製內容到剪貼簿
代碼:
if(cmd == 'fbox') {
var fboxsubject = $('fboxsubject').value;
opentag = '[fbox=' + fboxsubject + ']';
}5.include\discuzcode.func.php
查找:
複製內容到剪貼簿
代碼:
'
', '
', '', ''後面加:
複製內容到剪貼簿
代碼:
, '[/fbox]', '[/Fbox]', '[/FBOX]'再查:
複製內容到剪貼簿
代碼:
'<li>', '</ul>', '<blockquote>', '</blockquote>', '</span>'後面加:
複製內容到剪貼簿
代碼:
, '</fieldset>', '</fieldset>', '</fieldset>'查找
複製內容到剪貼簿
代碼:
"/\[font=([^\[\<]+?)\]/i",下面加
複製內容到剪貼簿
代碼:
"/\[fbox=([^\[\<]+?)\]/i",查找
複製內容到剪貼簿
代碼:
"<font face=\"\\1 \">",下面加
複製內容到剪貼簿
代碼:
"<fieldset style=\"padding: 1.5em\"><legend>\\1</legend>",引用:
最後一部,上傳附件中的圖片到
images\common
下面覆蓋原有的
editor.gif文件
附件

演示圖1

演示圖2
