The cuteeditor has powerful functions and rich functions, but there are also disadvantages to the best of things.
This editor uploads images to put all the images in the upload folder under the root directory, and the editor does not automatically name the images. At this time, the images may be renamed and searched online for a long time, there are not many people to use, and the method is not found. I wrote it myself!
Under cutesoft_client \ cuteeditor \ dialogs \
Gecko_insertimage.frame.aspx
Insertimage. Frame. aspx
Selectimage. Frame. aspx
Insert 3 folders of images
Add reference to the header
<% @ Import namespace = "system. Io" %>
Find
Protected override void initoftype ()
{
FS. virtualroot = cuteeditor. editorutility. processwebpath (context, null, secset. imagegallerypath). trimend ('/') + "/";
}
Replace
Protected bool mycreatedirectory (string path)
{
Try
{
If (directory. exists (PATH ))
{
Response. Write ("the directory already exists! ");
Return true;
}
Else
{
Directoryinfo di = directory. createdirectory (PATH );
Response. Write ("directory should be created successfully! ");
Return true;
}
}
Catch
{
Response. Write ("exception! ");
Return false;
}
Finally {}
}
Protected override void initoftype ()
{
String username = request. Cookies ["hnusername"]. value;
String filename = server. mappath (secset. imagegallerypath + "/" + username );
If (mycreatedirectory (filename ))
{
FS. virtualroot = cuteeditor. editorutility. processwebpath (context, null, filename). trimend ('/') + "/";
}
Else
{
FS. virtualroot = cuteeditor. editorutility. processwebpath (context, null, secset. imagegallerypath). trimend ('/') + "/";
}
}
The three files are OK, and each user has their own folders.
The editor has two buttons for uploading images. You can only insert images and cannot upload images.
If you do not want to change a lot, you only need to hide the upload function. In this way, the previous upload button is changed to insert only images, and all images uploaded by users can be inserted.
OK