Uncategorized
ckeditor to upload images
by Adrian on Sep.19, 2011, under Programming, Uncategorized
A few posts on how to do this, and a lot of frustrated people so here is how:
Download both ckeditor and ckfinder.
Decompress them into the root directory.
Include them in your php
include_once ‘ckeditor/ckeditor.php’;
include_once ‘ckfinder/ckfinder.php’;
hopefully no error messages? ok cool…. now simply
1 2 3 4 5 6 7 8 9 10 11 12 13 | <?php $ckeditor = new CKEditor(); $ckeditor->basePath = '/ckeditor/'; $ckeditor->config['filebrowserBrowseUrl'] = '/ckfinder/ckfinder.html'; $ckeditor->config['filebrowserImageBrowseUrl'] = '/ckfinder/ckfinder.html?type=Images'; $ckeditor->config['filebrowserFlashBrowseUrl'] = '/ckfinder/ckfinder.html?type=Flash'; $ckeditor->config['filebrowserUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; $ckeditor->config['filebrowserImageUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'; $ckeditor->config['filebrowserFlashUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'; $ckeditor->editor('CKEditor1'); ?> |
To add the field to the form.
Ensure that in ckfinder/userfiles is writable
You also need to alter in ckfinder/userfiles/config.php the function CheckAuthentication(), to return true, take note of the warning!!
ive put it all together in one zip file displaying the submission here
General discussion RSS Feed