Hi Rafael
Ive done something similar with corefive's open source filemanager.
http://www.asecondsystem.com/2009/09/14/integrating-ck-editor-with-cakephp/
http://www.asecondsystem.com/2010/01/19/integrating-a-file-browser-into-ckeditor-cakephp/
It all worked out quite simple once the pieces have been put
together.
Will
On Mar 23, 2:54 pm, Rafael Gomes rafaelgomes@gmail.com wrote:
Well guys,
I was trying many hours how to configure this two apps on cake.
Let's my explanation.
If don't you know about then go to
:http://ckeditor.com/andhttp://ckfinder.com/
Let's go.
1 - First you have to download the ckeditor and ckfinder.
2 - Unzip then on webroot
like this:
webroot
= js
= ckfinder
= ckeditor
3 - go to your controller that you wanna activate and write on the
class, out of the method.
var $helpers = array('Html', 'Form', 'Javascript'); - this enables
the helpers
4 - If you put on the webroot, just past this on your view and you
have to name an id of a textare to 'editor';
?php $javascript-codeBlock(window.onload = function()
{
CKEDITOR.replace( 'editor',
{
filebrowserBrowseUrl :
'.$html-url('/ckfinder/ckfinder.html').',
filebrowserImageBrowseUrl :
'.$html-url('/ckfinder/ckfinder.html?
type=Images').',
filebrowserFlashBrowseUrl :
'.$html-url('/ckfinder/ckfinder.html?
type=Flash').',
filebrowserUploadUrl :
'.$html-url('/ckfinder/core/connector/php/
connector.php?command=QuickUploadtype=FilescurrentFolder=/upload/
image/').',
filebrowserImageUploadUrl :
'.$html-url('/ckfinder/core/connector/
php/connector.php?command=QuickUploadtype=ImagescurrentFolder=/
upload/flash/').',
filebrowserFlashUploadUrl :
'.$html-url('/ckfinder/core/connector/
php/connector.php?command=QuickUploadtype=Flash').',
filebrowserWindowWidth : '1000',
filebrowserWindowHeight : '700'
}
);
}, array('inline' = false)); ?
This will activate you ckeditor and almost ckfinder.
but you have to put the textare like I said. something like this.
?php echo $form-input('Model.field', array('type' = 'textarea',
'id' = 'editor', 'label' = 'Tex:br /', 'value' = '')); ?
5 - put this on your config.php inside the ckdinder directory ---
this break the security
function CheckAuthentication()
{
return true;
}
If anyone have the right way to do that, please send. But this works.
6 - modify your urlBase on your config.php on your ckfinder directory
$baseUrl = '/website/app/webroot/upload/';
This set the directory of upload to webroot
Make sure that you have permission on the directory.
That's it ... any doubts just ask :)
I'm learning too...and this was hard to me..
Ahhh.. sorry about my english :)
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
REMOVE ME as the subject.