Welcome Guest, Not a member yet? Register   Sign In
Loading FCKEditor2.6.3 produce two problems
#1

[eluser]sexy22[/eluser]
Fckeditor pathConfusedystem\application\libraries\fckeditor.php
system\application\plugins\fckeditor\

Code:
1.
A PHP Error was encountered

Severity: Warning

Message: Missing argument 1 for Fckeditor::__construct(), called in system\libraries\Loader.php on line 931 and defined

Filename: libraries/fckeditor.php

Line Number: 130

2.

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: instanceName

Filename: libraries/fckeditor.php

Line Number: 132

my code:

Code:
function index() {
        $this->load->library('fckeditor','content');
        $this->fckeditor->ToolbarSet = 'Default';
        $data['fckeditor']=$this->fckeditor->CreateHtml();
        
        $this->load->view('ad_release.html',$data);
    }

Can any help me with that?
I use CI 1.7.0 and FCKEditor2.6.3
Cheers and thanks in advance!
#2

[eluser]christophe2[/eluser]
Hi zhuyaopeng,

I encountered the same bug. I use this workaround:
1) I load the library and pass the post parameter using an array:
Code:
$this->load->library('fckeditor',array('instanceName' => 'post'));
2) In the constructor of the Fckeditor class, I get the array back this way:
Code:
function __construct( $array )
     {
        $this->InstanceName    = $array['instanceName'] ;

Hope this help,

Christophe
#3

[eluser]sexy22[/eluser]
very good! it working!

Thank you very much!

but why use array('instanceName' => 'post')?

how can i get the content in Controllor when i submit the form?
#4

[eluser]christophe2[/eluser]
If your parameter is named 'content':
Code:
$this->load->library('fckeditor',array('instanceName' => 'content'));
You get it back in your controller as any other parameter:
Code:
$content = $this->input->post('content');
#5

[eluser]sexy22[/eluser]
I understand that.
Thanks again!Cheers and Happy new year! ;-)
#6

[eluser]charlie spider[/eluser]
anybody care to post their complete

- controller
- library
- view

???

please please ???

at least all of the pieces concerning FCK
i'ld also be curious as to where you have all of the FCK files

i have all of my system files stored outside of the web root ( $system_folder = '../CodeIgniter_1.7.0'; ) for added security reasons, so i'm wondering whether FCK will work there as well.

i'm running on 3 hours sleep here, so don't be afraid to dumb your answers down

thanks for any help in advance.




Theme © iAndrew 2016 - Forum software by © MyBB