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

[eluser]umefarooq[/eluser]
Hi
im trying to integrate FCKeditor in my project but facing some problem i use to the following way to integrate the editor

FckEditor

it gives me the following error

Fatal error: Call to undefined method Fckeditor::Create()

another thing in above way to integrate editor i have to follow CI 1.5 or have to keep 1.4 also with that.
#2

[eluser]umefarooq[/eluser]
is there anybody who can help me to sort this problem.
#3

[eluser]amw_drizz[/eluser]
I am having a problem with this editior as well, I put it in according to the user guide for the latest version and all it does is display my page again where the editor should be.
#4

[eluser]garrettheel[/eluser]
Post the code that's giving you that error.
#5

[eluser]amw_drizz[/eluser]
the code that calls it
Code:
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = fckeditor_path.'/fckeditor/' ;
$oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
$oFCKeditor->Create() ;
?&gt;

and this is at the top of my file
Code:
&lt;?php
define('fckeditor_path',$_SERVER['DOCUMENT_ROOT'].'/subs/static');
?&gt;
&lt;?php
include_once(fckeditor_path."/fckeditor/fckeditor.php") ;
?&gt;

I load it up and I am not using mod_rewrite, and when it is on my production server it is going to be divided up into sub domains and the folder subs is were the sub domains will be pointing to ie, static.example.com will point to public_html/subs/static and so on. And I will adjust the code accordingly. Idealy I want to be able to use

Code:
static_path

Witch points to the subdomains and I have an if statment in the config to determine if it is localhost or not.
#6

[eluser]garrettheel[/eluser]
Why do you not load the library in the controller instead of initializing a new class?

$this->load->library('fckeditor');

And also, what error message is returned?
#7

[eluser]amw_drizz[/eluser]
there is a library included with CI 1.7.0 now??? I'll go look. I did it that way since all the instructions were for the older 1.5 or should I put the FCKEditor files in the library folder?
#8

[eluser]garrettheel[/eluser]
No, the library isn't included by default. But, glancing over that wiki article, you are meant to set it up as a custom library so that you can load it through $this->load->library(); instead of the way you're doing it.
#9

[eluser]amw_drizz[/eluser]
I am going to try the wiki, as long as I can understand it again. I may have to try getting it to work in the morning after I have had some sleep.
#10

[eluser]garrettheel[/eluser]
Good idea, probably best just to start over again and follow the wiki




Theme © iAndrew 2016 - Forum software by © MyBB