If successful, it retrieves the name of the uploaded file and moves it to a directory named “ uploads.” It then constructs the URL to the uploaded file and uses a JavaScript call to communicate with CKEditor. This PHP script checks if the file upload was successful. '") ' Įcho "File upload failed with error code: ". Upload.php: This script handles the image upload and communicates back to CKEditor after the upload is complete. Step 2: Create upload.php File.Ĭreate an upload.php file and paste the following code into it. The configuration options are set in the script, including the filebrowserUploadUrl which points to the “upload.php” script for handling image uploads. The “ ” element with the ID “ editor” is used to create the CKEditor instance. Here, you’ve included the CKEditor library using a script tag. IN /filemanager/browser/default/connectors/php/: This is the main HTML file where you include CKEditor and set up the textarea element for the editor to work with. ***to get "YourServerDocumentRoot", look at your phpinfo() variables Return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) */ $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) IN /filemanager/browser/default/connectors/php/util.phpĬOMMENT OUT ALL LINES IN function GetRootPath() IN /filemanager/browser/default/connectors/php/io.php STYLE OPTION WOULD NOT LET THE AREA SHOW IN FIREFOXĬHANGES I HAD TO MAKE TO GET THE IMAGE BROWSER AND UPLOAD TO WORK: First, the Firefox problem, then, the fix for the PHP problem of viewing and uploading images: Please forgive the uppercase, this was copied from my comments so that when I update, I'll know what to change again. Here are the problems I've had and how I've fixed them, after searching this site for an entire day. I'm gonna try it when I'm back home and I'll post the results. I gues that changing this will make the whole thing work. I think that the adjustment of jsw_nz will fix that by changing:įile: editor/filemanager/browser/default/frmresourcelist.html But when tryin to select an file, it looked like the javascript was crashing. Then you change the browse connector link toįrom now I was able to browse, upload en create maps on. You place the entire browser dir on the domain you wan't to browse. And I now think how to fix this since I already am able to browse content on the other domain. $sCurrentFolder =GetSecurePath($sCurrentFolder) In connector.php to check $GLOBALS and $sCurrentFolder. (There is an error in the PHP script that alows everyone to write everything, everywhere to your Webserver if not restrikted by webservers-access-rights!) This is the best text editor i have used, will be test driving the new release soon. I can easily manually type in the URL to the file i want to link, but the site is also updated by other users with very little technical skills. When i use FCKeditor on and insert a link, i want to be able to browse the media file which is located at. I am running FCK rc3, how do i change this path to an absolute path? Or is this not possible? Or do i have to modify the connector.php file? If so, how do i change the Serverpath?Īn example: My main site runs on and all my media files is on. SECURITY TIP: Uncomment the following line to set a fixed path. Path to user files relative to the document root. The relative path i have currently works fine but i can't seem to change it to an absolute path in the config.php for my connector (using PHP). I wanted to keep my media files separately from my main website but i want to be able to upload and link the media files from this domain (where the media files are kept) by using the file manager (and not have to specify the URL) which means i need to specify an absolute path in my file manager script (filemanager/browser/default/connectors/php). I have searched this forum and i haven't been able to find an anwser to this question.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |