程序员人生 网站导航

DedeCMS 会员前台发布文章时上传附件类型的问题

栏目:DedeCMS时间:2013-12-08 17:19:47

网(LieHuo.Net)教程 DedeCMS会员发布文章时,有时需要发布一些doc,xsl,ppt等之的附件类型,下面就来解决这个问题,注:适用于dedecms5.3和5.5版本,对于会员要求上传doc,xsl,ppt技术文档的行业站非常重要。

修改以下几个文件

1.
includeFCKeditorfckconfig.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.
includeFCKeditoreditorjsfckeditorcode_ie.js 和includeFCKeditoreditorjsfckeditorcode_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做

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐