DedeCMS會員發(fā)布文章時,有時需要發(fā)布一些doc,xsl,ppt等之的附件類型,下面就來解決這個問題,注:適用于dedecms5.3和5.5版本,對于會員要求上傳doc,xsl,ppt技術文檔的行業(yè)站非常重要。
修改以下幾個文件
1.
\include\FCKeditor\fckconfig.js
把
FCKConfig.ToolbarSets["Member"] = [
['Source','Preview','-','PasteText','PasteWord','-','Bold','Italic','Underline','StrikeThrough'],
['ImageUser','FlashUser','-','Link','Unlink','-','Table','Rule','Codes','Quote','Br','-','TextColor','FontSize']
] ;
替換成
FCKConfig.ToolbarSets["Member"] = [
['Source','Preview','-','PasteText','PasteWord','-','Bold','Italic','Underline','StrikeThrough'],
['ImageUser','FlashUser','AddonUser','-','Link','Unlink','-','Table','Rule','Codes','Quote','Br','-','TextColor','FontSize']
] ;
把
FCKConfig.ToolbarSets["MemberLit"] = [
['Source','Preview','-','PasteText','PasteWord','-','Bold','Italic','Underline','StrikeThrough'],
['ImageUser','FlashUser','-','Link','Unlink','-','Table','Rule','Codes','Quote','Br','-','TextColor','FontSize']
] ;
替換成
FCKConfig.ToolbarSets["MemberLit"] = [
['Source','Preview','-','PasteText','PasteWord','-','Bold','Italic','Underline','StrikeThrough'],
['ImageUser','FlashUser','AddonUser','-','Link','Unlink','-','Table','Rule','Codes','Quote','Br','-','TextColor','FontSize']
] ;
2.
\include\FCKeditor\editor\js\fckeditorcode_ie.js 和\include\FCKeditor\editor\js\fckeditorcode_gecko.js
編輯fckeditorcode_ie.js
在
case 'Addon':B=new FCKDialogCommand('Addon',FCKLang.InsertAddon,'dialog/dede_addon.php',480,250);break;
下面添加
case 'AddonUser':B=new FCKDialogCommand('AddonUser',FCKLang.InsertAddon,'dialog/dede_addonuser.php',480,250);break;
在
case 'Addon':B=new FCKToolbarButton('Addon',FCKLang.InsertAddon,FCKLang.InsertAddon,null,false,true,76);break;
下面添加
case 'AddonUser':B=new FCKToolbarButton('AddonUser',FCKLang.InsertAddon,FCKLang.InsertAddon,null,false,true,76);break;
同理fckeditorcode_gecko.js做類似的修改
3.
在\include\FCKeditor\editor\dialog里,復制一份dede_addon.php,重命名為dede_addonuser.php。
編輯dede_addonuser.php
把
require_once(dirname(__FILE__)."/../../../common.inc.php");
替換成
require_once(dirname(__FILE__)."/../../../../member/config.php");
CheckRank(0,0);
把
window.open("../../../dialog/select_soft.php?f="+fname, "popUpSoftWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left="+posLeft+", top="+posTop);
替換成
window.open("../../../../member/uploads_select.php?mediatype=4&f="+fname, "popUpSoftWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left="+posLeft+", top="+posTop);
4. 登錄管理后臺,在會員系統(tǒng)開啟了會員可以上傳圖片以外的附件.
5.完成,測試去.
下一篇: