1. Open the admin/editor/fckconfig. js file in the website background editor.
Find the FCKConfig. ImageUpload = false sentence and change false to true.
FCKConfig. ImageBrowser = false; here, change false to true.
2. Check whether the filemanager folder in the admin/editor directory exists. If not, download a fck editor of Version 2.6.3 or later and copy the filemanager folder. Of course, this is ASP, so folders in other languages such as PHP can be deleted.
3. Next, set the file upload path. Open the config. asp file in the admin/editor/filemanager/connectors/asp folder and perform the following settings.
ConfigIsEnabled = True: whether to enable the upload function
ConfigUserFilesPath = "../uploads/" file Upload Directory, relative to this folder
ConfigUserFilesPath = "../uploads/". If this is the case, I found two problems at last.
A. configUserFilesPath = ".. /.. /.. /.. /.. /uploads/". Although images can be uploaded, there is a problem with inserting the image path in the editor, so I tried it many times and finally changed it to ConfigUserFilesPath = "/uploads. If your website is stored in a lower-level folder, you can set ConfigUserFilesPath = "folder name/uploads /".
B. As for the second question, it seems strange to me that two slashes may appear in the image path of the FCKeditor. Although the image can also be displayed, it seems uncomfortable. Open the io. asp file in the admin/editor/filemanager/connectors/asp folder:
Function CombinePaths (sBasePath, sFolder)
CombinePaths = RemoveFromEnd (sBasePath, "/") & "/" & RemoveFromStart (sFolder ,"/")
End function
Change
Function CombinePaths (sBasePath, sFolder)
SFolder = replace (sFolder ,"","/")
CombinePaths = RemoveFromEnd (sBasePath, "/") & "/" & RemoveFromStart (sFolder ,"/")
End function
4. Set the automatic rename of the uploaded image. Open the commands. asp file in the admin/editor/filemanager/connectors/asp folder.
Add the following statement to the file:
Dim rannum
Dim dtnow
Dim getnewfilename
Dtnow = now ()
Randomize
Rannum = int (90 * rnd) + 10
Getnewfilename = year (dtnow) & right ("0" & month (dtnow), 2) & right ("0" & day (dtnow), 2) & right ("0" & hour (dtnow), 2) & right ("0" "& minute (dtnow), 2) & right ("0" & second (dtnow), 2) & rannum
And set
SFileName = ouploader. file ("newfile") name
Change
SFileName = getnewfilename & "." & split (ouploader. file ("newfile"). name, ".") (1)
Effect .:
OK is the information returned by the server. It is not included in ckeditor.
Finally, it would be perfect to call the onChange method of Info directly after the upload is successful. But I cannot call this method all the time...
After that, you can test it yourself. You can also modify some methods in image. js, for example, onOK --> indicates the method that will be triggered when you click OK.