麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 網站 > 軟件應用 > 正文

FCKEditor 自定義用戶目錄的修改步驟 (附源碼)

2024-09-06 19:16:43
字體:
來源:轉載
供稿:網友

由于我這邊的網絡原因,沒用從FCK的官網下載到源碼...
這套源碼是FCK2.2版反編譯出來的
源碼:點此下載 源碼中主要修改的地方做了注釋
大致的修改如下 :
獲取用戶目錄的源碼: FileWorkerBase.cs
這里主要是做了一些注釋
在程序中可以直接在用戶登錄的時候指定
這個方案只是方便多用戶使用的時候為用戶指定不同的文件目錄
Session["FCKeditor:UserFilesPath"]="用戶文件相對目錄";

復制代碼 代碼如下:

/// <summary>
/// 用戶文件目錄
/// </summary>
protected string UserFilesPath
{
get
{
if (this.sUserFilesPath == null)
{
//從APPlictaion 讀取
this.sUserFilesPath = (string)base.Application["FCKeditor:UserFilesPath"];
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
//從Session讀取
this.sUserFilesPath = (string)this.Session["FCKeditor:UserFilesPath"];
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
//從站點配置文件讀取
this.sUserFilesPath = ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"];
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
this.sUserFilesPath = "/UpLoadFiles/";
}
if ((this.sUserFilesPath == null) || (this.sUserFilesPath.Length == 0))
{
//從URL讀取
this.sUserFilesPath = base.Request.QueryString["ServerPath"];
}
}
}
if (!this.sUserFilesPath.EndsWith("/"))
{
this.sUserFilesPath = this.sUserFilesPath + "/";
}
}
return this.sUserFilesPath;
}
}

這樣指定了之后會發現 FCK需要有Image,Files等文件夾
修改這個文件:Uploader .cs (下載地址)
修改過的上傳文件操作類在這里:(如果你要修改原版的不必去把這個類文件搞到你的Web程序目錄中來,我這里只是為了方便使用我項目中的APP_Code中的方法,下同不再贅述!)
Fckeditor/editor/filemanager/upload/aspx/upload.aspx.cs
修改的時候忘了做記錄..這里貌似沒改什么內容 只是做了點注釋
呃找到了在這里 FileBrowserConnector
Fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx.cs(修改后的地址)
復制代碼 代碼如下:

/// <summary>
/// 根據文件類型選擇文件夾
/// </summary>
/// <param name="resourceType"></param>
/// <param name="folderPath"></param>
/// <returns></returns>
private string ServerMapFolder(string resourceType, string folderPath)
{
//2010-3-29 14:00:56
//string path = Path.Combine(base.UserFilesDirectory, resourceType);
string path = base.UserFilesDirectory;
Util.CreateDirectory(path);
return Path.Combine(path, folderPath.TrimStart(new char[] { '/' }));
}

這里直接把那個resourceType給排除掉了(去掉判斷文件類型)
這個方法將影響選定圖片后的圖片路徑
復制代碼 代碼如下:

private string GetUrlFromPath(string resourceType, string folderPath)
{
if ((resourceType == null) || (resourceType.Length == 0))
{
return (base.UserFilesPath.TrimEnd(new char[] { '/' }) + folderPath);
}
//2010-3-29 14:00:20 HYZ
//return (base.UserFilesPath + resourceType + folderPath);
string p=base.UserFilesPath + folderPath;//新增
p=p.Replace("http://","/");//新增
return (p);//新增
}

然后在其他的HTML文件中也修改有部分代碼
1.翻譯了提示信息
這東西就不說了..很簡單你也可以根據提示信息全文搜索...
2.修改選定圖片后的示例文本為中文
文件位于: 第52行
Fckeditor/editor/dialog/fck_image/fck_image_preview.html
3.修改文件瀏覽器增加了文件預覽 (效果很粗糙)
高手們修改好看了還望能給小弟發一份兒..
文件位于:
Fckeditor/editor/filemanager/browser/default/frmresourceslist.html
我這里修改了第63行的js 顯示預覽效果
當然還有自定義表情之類的玩意兒..
但因為目前項目需要的就這么點兒東西.所以也懶得去搞了...
源碼:點此下載
轉載請注明出處:http://Qbit.cnblogs.com

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 久久久久久久99 | 黄色一级片免费观看 | 中文字幕精品在线视频 | www.48xx.com| 欧美片一区二区 | 成人网在线观看 | 国产成人综合在线观看 | 色婷婷久久久久久 | av影院在线| 男女隐私免费视频 | 免费国产不卡午夜福在线 | 中文字幕在线观看成人 | 免费a级观看 | 精品中文字幕在线播放 | 精品久久中文网址 | 成人国产高清 | 色综合视频网 | 国产免费传媒av片在线 | 日韩欧美电影在线观看 | 国产精品久久久久一区二区 | 免费观看一级欧美大 | 羞羞色在线观看 | 日韩电影一区二区 | 亚洲一区二区三区精品在线观看 | 毛片免费观看视频 | 钻石午夜影院 | 日韩三级伦理在线观看 | 黄色网址电影 | 久久精品日本一区 | 亚洲成人在线免费观看 | 久久久久亚洲a | 久草视频国产在线 | 毛片在哪看 | 国产精品久久久久久久hd | 在线免费观看麻豆 | 国产免费一区二区三区在线能观看 | 成人18免费观看 | 日本娇小videos高潮 | 在线日韩亚洲 | 亚洲一区二区三区91 | 国产精品久久久久久久久久大牛 |