织梦dedecms会员中心想实现上传附件怎么处理

92建站   2021-05-07   收藏本文

本文介绍了织梦dedecms会员中心想实现上传附件怎么处理,解决思路:打开fckconfig.js、fckeditorcode_ie.js和fckeditorcode_gecko.js,这三个文件,根据教程的提示改为新的代码,就可以了。要改的地方很多,细心些哦。

织梦dedecms会员中心想实现上传附件怎么处理?大家都知道会员中心是没有上传附件的功能的,要是想在会员中心上传怎么办呢,今天就来说说这个方法。

处理办法:

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);

这样就可以了。

上面就是织梦上传附件的介绍,若有疑问可以找小编进一步探讨交流~

TAG标签: 织梦上传附件
展开