⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Use kcfinder with ckeditor



cargonsan

cargonsan
  • profile picture
  • Member

Posted 12 November 2013 - 23:33 PM

Hi all, 

 

I'm trying to integrate kcfinder with ckeditor. I configured the path in my config.js

config.filebrowserBrowseUrl = '/assets/grocery_crud/texteditor/kcfinder/browse.php?type=files';                      
config.filebrowserImageBrowseUrl = '/assets/grocery_crud/texteditor/kcfinder/browse.php?type=images';                
config.filebrowserFlashBrowseUrl = '/assets/grocery_crud/texteditor/kcfinder/browse.php?type=flash';
config.filebrowserUploadUrl = '/assets/grocery_crud/texteditor/kcfinder/upload.php?type=files';';                    
config.filebrowserImageUploadUrl = '/assets/grocery_crud/texteditor/kcfinder/upload.php?type=images';                
config.filebrowserFlashUploadUrl = '/assets/grocery_crud/texteditor/kcfinder/upload.php?type=flash';

And copied all the files.

 

My problem is I can not see upload tab, or browse button when I click in ckeditor image button

 

Thanks in advance


briggers

briggers
  • profile picture
  • Member

Posted 13 November 2013 - 08:50 AM

Hi cargonsan

 

There may be other problems but as a start you have a syntax error in the code above

 

upload.php?type=files';';
config.filebrowserImageUploadUrl = '/assets/grocery_crud/texteditor/kcfinder/upload.php?type=images';

 

You have ';'; at the end of the line

 

Try that as see if it works


cargonsan

cargonsan
  • profile picture
  • Member

Posted 15 November 2013 - 19:42 PM

Sorry for the delay, I fixed this and it continues not appearing the browse button.

 

Could be a security issue?

 

thanks


briggers

briggers
  • profile picture
  • Member

Posted 17 November 2013 - 09:44 AM

Hi,

 

I found I had to define the path to kcfinder relative to where I was working so ended up with

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
	// config.height = '600px';
	config.filebrowserBrowseUrl = 		'../../../assets/kcfinder/browse.php?type=files';
	config.filebrowserImageBrowseUrl = 	'../../../assets/kcfinder/browse.php?type=images';
	config.filebrowserFlashBrowseUrl = 	'../../../assets/kcfinder/browse.php?type=flash';
	config.filebrowserUploadUrl = 		'../../../assets/kcfinder/upload.php?type=files';
	config.filebrowserImageUploadUrl = 	'../../../assets/kcfinder/upload.php?type=images';
	config.filebrowserFlashUploadUrl = 	'../../../assets/kcfinder/upload.php?type=flash';
};

note the ../../../ to get you to the right place. Depending on your directory structure you might need fewer or less ../

 

Try that and see if it make a difference.


cargonsan

cargonsan
  • profile picture
  • Member

Posted 17 November 2013 - 20:00 PM

Thanks, works fine!!!