2011-02-27, 02:49:34
Greetings, I present to you a simple solution for inserting links and images to pages from CKEditor. It is modified upload.php script and features file and image selection modes, browsing subdirectories. It was tested and works on latest GetSimple 3.0 development versions (r325).
I was unable to make a plugin (problems with overriding CKEditor settings after it is initialized), so you'll need to modify one system file.
Installation instructions:
1. Extract and upload filebrowser.php to your GetSimple installation /admin/ directory.
2. Modify edit.php and replace following settings (on line 325):
Usage instructions:
In CKEditor select "Link" or "Image" and "Browse Server". After clicking on file name or image thumbnail link will be inserted.
I think simple file browser is more than enough in CKEditor. Let's leave all the heavy lifting (file upload, copy, paste, delete, new directory etc. file management tasks) for "Files" page.
I was unable to make a plugin (problems with overriding CKEditor settings after it is initialized), so you'll need to modify one system file.
Installation instructions:
1. Extract and upload filebrowser.php to your GetSimple installation /admin/ directory.
2. Modify edit.php and replace following settings (on line 325):
Code:
filebrowserBrowseUrl : 'filebrowser.php',
filebrowserImageBrowseUrl : 'filebrowser.php?type=images',
filebrowserWindowWidth : '640', //optional
filebrowserWindowHeight : '480' // optional
Usage instructions:
In CKEditor select "Link" or "Image" and "Browse Server". After clicking on file name or image thumbnail link will be inserted.
I think simple file browser is more than enough in CKEditor. Let's leave all the heavy lifting (file upload, copy, paste, delete, new directory etc. file management tasks) for "Files" page.