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

首頁 > 開發 > 綜合 > 正文

FCKEditor v2.6 網頁編輯器配置圖解教程

2024-07-21 02:53:26
字體:
來源:轉載
供稿:網友
fckeditor的配置教程,看了下面的文章應該就差不多了
 
集成 FCKEditor v2.6(當前為最新版本)的基本步驟如下:
1. 下載FCKeditor 2.6 基本文件(Main Code)。將解壓縮的文件復制到項目的editors/FCKEditorV2 目錄下。  
2. 下載 FCKeditor.Net / ASP.NET 控件,復制FredCK.FCKeditorV2.dll 文件到項目的bin目錄。 

這樣就基本可以FCKEditor v2.6 超強的編輯器了,當然還需要在Host Settings中設置默認的編輯器。 
關于 FCKEditor 的一些基本配置信息,請參考如下的文章: 

如需要使用文件上傳功能,還需要修改代碼FCKEditorV2/editor/filemanager/connectors/config.ascx(以ASPX代碼為例)。這里限制只有登錄的用戶才可以使用文件上傳功能,并且上傳的文件只能上傳到用戶自己的目錄。根據每個用戶名自動創建對應的文件上傳目錄。
FCKEditor v2.6 網頁編輯器配置圖解教程
FCKEditor v2.6 網頁編輯器配置圖解教程
connectors/config.ascx 更新后的代碼如下:
復制代碼代碼如下:

/** 
* This function must check the user session to be sure that he/she is 
* authorized to upload and access files in the File Browser. 
*/ 
private string m_userName; 
private int m_userID; 
private int m_boardID; 
private bool m_isAuthenticated; 

private bool CheckAuthentication() 

// WARNING : DO NOT simply return "true". By doing so, you are allowing 
// "anyone" to upload and list the files in your server. You must implement 
// some kind of session validation here. Even something very simple as... 
// 
// return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true ); 
// 
// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the 
// user logs in your system. 

string userName = HttpContext.Current.User.Identity.Name; 

try 

if (HttpContext.Current.User.Identity.IsAuthenticated) 

string[] parts = userName.Split(';'); 
if (parts.Length == 3) 

m_userID = int.Parse(parts[0]); 
m_boardID = int.Parse(parts[1]); 
m_userName = parts[2]; 
m_isAuthenticated = true; 



catch (Exception) 

m_userName = ""; 
m_userID = 0; 
m_boardID = 0; 
m_isAuthenticated = false; 


return m_isAuthenticated; 


public override void SetConfig() 

// SECURITY: You must explicitly enable this "connector". (Set it to "true"). 
Enabled = CheckAuthentication(); 

// URL path to user files. 
UserFilesPath = "/userfiles/"; 

// The connector tries to resolve the above UserFilesPath automatically. 
// Use the following setting it you prefer to explicitely specify the 
// absolute path. Examples: 'C://MySite//userfiles//' or '/root/mysite/userfiles/'. 
// Attention: The above 'UserFilesPath' URL must point to the same directory. 
UserFilesAbsolutePath = ""; 

// Due to security issues with Apache modules, it is recommended to leave the 
// following setting enabled. 
ForceSingleExtension = true; 

// Allowed Resource Types 
AllowedTypes = new string[] { "File", "Image", "Flash", "Media" }; 

// For security, HTML is allowed in the first Kb of data for files having the 
// following extensions only. 
HtmlExtensions = new string[] { "html", "htm", "xml", "xsd", "txt", "js" }; 

TypeConfig[ "File" ].AllowedExtensions = new string[] { "7z", "aiff", "asf", "avi", "bmp", "csv", "doc", "fla", "flv", "gif", "gz", "gzip", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "ods", "odt", "pdf", "png", "ppt", "pxd", "qt", "ram", "rar", "rm", "rmi", "rmvb", "rtf", "sdc", "sitd", "swf", "sxc", "sxw", "tar", "tgz", "tif", "tiff", "txt", "vsd", "wav", "wma", "wmv", "xls", "xml", "zip" }; 
TypeConfig[ "File" ].DeniedExtensions = new string[] { }; 
string filepath = "%UserFilesPath%" + m_userName + "/file/"; 
TypeConfig["File"].FilesPath = filepath; 
TypeConfig["File"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%file/"); 
TypeConfig["File"].QuickUploadPath = filepath; // "%UserFilesPath%" + m_userName + "/"; 
TypeConfig["File"].QuickUploadAbsolutePath = filepath; // (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%"); 

TypeConfig[ "Image" ].AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" }; 
TypeConfig[ "Image" ].DeniedExtensions = new string[] { }; 
string imagepath = "%UserFilesPath%" + m_userName + "/image/"; 
TypeConfig["Image"].FilesPath = imagepath; 
TypeConfig["Image"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%image/"); 
TypeConfig["Image"].QuickUploadPath = imagepath; // "%UserFilesPath%" + m_userName + "/"; 
TypeConfig["Image"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%"); 

TypeConfig[ "Flash" ].AllowedExtensions = new string[] { "swf", "flv" }; 
TypeConfig[ "Flash" ].DeniedExtensions = new string[] { }; 
TypeConfig[ "Flash" ].FilesPath = "%UserFilesPath%flash/"; 
TypeConfig[ "Flash" ].FilesAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%flash/" ); 
TypeConfig[ "Flash" ].QuickUploadPath = "%UserFilesPath%"; 
TypeConfig[ "Flash" ].QuickUploadAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" ); 

TypeConfig[ "Media" ].AllowedExtensions = new string[] { "aiff", "asf", "avi", "bmp", "fla", "flv", "gif", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "png", "qt", "ram", "rm", "rmi", "rmvb", "swf", "tif", "tiff", "wav", "wma", "wmv" }; 
TypeConfig[ "Media" ].DeniedExtensions = new string[] { }; 
TypeConfig[ "Media" ].FilesPath = "%UserFilesPath%media/"; 
TypeConfig[ "Media" ].FilesAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%media/" ); 
TypeConfig[ "Media" ].QuickUploadPath = "%UserFilesPath%"; 
TypeConfig[ "Media" ].QuickUploadAbsolutePath = ( UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" ); 
}
 


注:相關教程知識閱讀請移步到編輯器頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 日韩黄色一区 | 日韩中文字幕三区 | 欧美精品久久久久久久多人混战 | jizzyouxxxx| 国产成人精品网站 | 精品一区二区电影 | 久久最新网址 | xp123精品视频 | 久久久综合视频 | 久久精品国产亚洲7777小说 | 线观看免费完整aaa 一二区成人影院电影网 | 久久艹一区 | 国产免费专区 | 羞羞视频免费网站 | 操毛片| 色操网 | 一区二区三区视频在线播放 | 精品在线免费播放 | 色人阁五月天 | 日本成人午夜 | 亚洲午夜视频在线 | 国产精品久久久久久久久久大牛 | 55夜色66夜色国产精品视频 | 天天曰夜夜操 | 羞羞视频免费视频欧美 | 亚洲狠狠入 | 他也色在线视频 | 国产91小视频在线观看 | 国产精品剧情一区二区在线观看 | 伊人成人免费视频 | 久久国产精品久久精品国产演员表 | 污视频在线免费播放 | 热久久91| 九一国产精品 | 黄色成人av在线 | 新久草视频 | 日韩激情 | 九九热久久免费视频 | 欧美成人精品一区二区男人小说 | 56av国产精品久久久久久久 | 国产精品成人免费一区久久羞羞 |