Welcome Guest, Not a member yet? Register   Sign In
FCKeditor Troubles
#1

[eluser]jbowens[/eluser]
I am attempting to setup FCKeditor using the instructions found in Wiki but have so far been unsuccessful. I am getting the following error:

Fatal error: Cannot instantiate non-existent class: fckeditor in /home/jbowen77/public_html/ci/system/libraries/Loader.php on line 774

I am running php4 with codeigniter 1.5x. All help would be much appreciated for I am feeling a bit crazy trying to figure this out.
#2

[eluser]coolfactor[/eluser]
Please provide exact details of your installation, regardless of whether you followed some instructions.

1) where did you put the folder that contains FCKeditor? what is it called?
2) how are you attempting to load FCKeditor? Please provide your code.
#3

[eluser]jbowens[/eluser]
1) where did you put the folder that contains FCKeditor? what is it called?

system/libraries/


2) how are you attempting to load FCKeditor? Please provide your code.
Code:
$this->load->library('fckeditor','FCKEDITOR1');


I am then calling the editor in the view:
Code:
$this->fckeditor->BasePath =  base_url() . 'system/libraries/FCKeditor/';
$this->fckeditor->ToolbarSet = 'Default';
echo $this->fckeditor->Create() ;
#4

[eluser]coolfactor[/eluser]
Where are the instructions that you're following? FCKEditor comes bundled as a folder of various support files, but CI doesn't support loading libraries inside subfolders of the /libraries/ folder. That means you would've had to change the layout of files slightly.

(Note: Generally not recommended to be putting anything into the /system/ folder. Too easy to lose those modifications when you upgrade. Try to keep them in your /application/ folder.)

Now:
Code:
$this->load->library('fckeditor', 'FCKEDITOR1');

I'm not entirely sure what you're trying to do with that "FCKEDITOR1" parameter. Following the flow of logic in the Loader class, it would become a parameter that is passed to the FCKeditor constructor. FCKeditor would end up creating an instance called $FCKEDITOR1.

Something is broken in your installation. I need to know what you put into /system/libraries/. Also, did you change the layout of your files from the default download?

Please be even more specific about your setup.
#5

[eluser]jbowens[/eluser]
The instructions came from http://codeigniter.com/wiki/FCKeditor/ under the "Update for CI 1.5" heading.

I didn't change the layout from the default download for codeignitor or FCKeditor.

Where would you recommend placing the FCKeditor directory that contains all of the files?

I placed the Fckeditor.php in the /system/application/libraries/ it then includes the fckeditor_php4.php or fckeditor_php5.php. The fckeditor_php4.php files were modified via the instructions that I found in Wiki page mentioned above.

Thanks for your help. Still new to codeigniter and MVC frameworks in general so bare with me.
#6

[eluser]coolfactor[/eluser]
Okay, those instructions are outdated, and it's not necessary to make those types of modifications.

My recommendation is to create a "wrapper" class, rather than modify FCKeditor directly. That will make upgrading to a new version easier, as well.

I'll work on a sample wrapper for you. I have one that I use for my own apps, but it would need to be modified before it would be any good for you. I'll get this done later tonight.

EDIT (a few days later) -- looks like I've been too busy to put this together. Keep the pressure on me to do it.
#7

[eluser]jbowens[/eluser]
That would be great! Thanks
#8

[eluser]matt2012[/eluser]
can anyone help with this im also looking into using fckeditor and came unstuck using the wiki
#9

[eluser]coolfactor[/eluser]
[quote author="matt2012" date="1186689358"]can anyone help with this im also looking into using fckeditor and came unstuck using the wiki[/quote]

What do you need help with?
#10

[eluser]matt2012[/eluser]
The problem was due to my base_url pointing to a different domain (im using an addon domain) and the same implementation of CI uploading FCK to the public folder of the domain in question solved it - not the cleanest solution but the easiest!




Theme © iAndrew 2016 - Forum software by © MyBB