ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Integrating FCK editor in Code igniter.

August 27, 2007 2:47am

Subscribe [8]
  • #1 / Aug 27, 2007 2:47am

    indus

    2 posts

    Hi, everybody
    I just want to integrate the FCK editor in my project. I have gone through some topics already regarding this in the forum. But I can’t do it. Just help me giving a step by step tutorial or anything of that kind.

    Thanks..

    Indus

  • #2 / Aug 27, 2007 3:02am

    coolfactor's avatar

    coolfactor

    354 posts

    Show us some of your code that you’ve tried.

  • #3 / Aug 27, 2007 3:23am

    indus

    2 posts

    I have got your PM. So do please help me on that matter.

    Thanks
    Indus.

  • #4 / Aug 27, 2007 3:24am

    coolfactor's avatar

    coolfactor

    354 posts

    FCKeditor does not come packaged in a way that is directly compatible with CodeIgniter. I would suggest not trying to load it using CodeIgniter’s ->load->library method. Fall back to plain old, standard PHP.

    I usually place the fckeditor folder just inside the webroot.

    class Welcome extends Controller {
    
        function Welcome()
        {
            // include FCKeditor
            include_once($_SERVER['DOCUMENT_ROOT'].'/fckeditor/fckeditor.php');
            // manually assign an instance
            $this->fckeditor = new FCKeditor();
            // then work with it as you normally would
            $this->fckeditor->BasePath = '/fckeditor/';
            ...
        }
    
    }
  • #5 / Aug 27, 2007 4:05am

    indus

    2 posts

    Hi, coolfacotr
    I did what you told me but the following error has been thrown

    A PHP Error was encountered

    Severity: Warning

    Message: bdir(/var/www/html/fckeditor/fckeditor.php): failed to open stream: No such file or directory

    Filename: admin/welcome.php

    Line Number: 154


    A PHP Error was encountered

    Severity: Warning

    Message: bdir(): Failed opening ‘/var/www/html/fckeditor/fckeditor.php’ for inclusion (include_path=’.:/php/includes:/var/www/html/install/PEAR:/usr/include/php/ext/mbstring:/usr/local/lib/php’)

    Filename: admin/welcome.php

    Line Number: 154


    And also please tell me about the view page.

  • #6 / Aug 27, 2007 9:11am

    coolfactor's avatar

    coolfactor

    354 posts

    indus, the code example I gave you was just an example. You need to make sure things are named properly at your end. When you downloaded FCKeditor, you typically end up with a folder called “fckeditor”, which I suggested to put inside the web root. Is that the case?

    Let’s tackle one thing at a time.

  • #7 / Aug 29, 2007 1:32am

    esra

    485 posts

    Have you tried the approach discussed in the wiki article.

    http://codeigniter.com/wiki/FCKeditor/

  • #8 / Dec 11, 2007 10:58pm

    j0hn

    15 posts

    instruction in wiki about fckeditor integration for CI does not work for me.. im a newbie in
    CI.

  • #9 / Jan 30, 2008 8:08pm

    taewoo's avatar

    taewoo

    212 posts

    Have you tried the approach discussed in the wiki article.

    http://codeigniter.com/wiki/FCKeditor/

    esra… I am going through this and already I can tell this article is too old. It says

    Category:WYSIWYG
    
    The following explains how to incorporate FCKeditor using Code Igniter’s 1.4x Libraries.
  • #10 / Jan 31, 2008 5:17am

    Sawariya's avatar

    Sawariya

    89 posts

    put into ur controller function
                    require_once(APPPATH.‘libraries/Fckeditor’.EXT);
            $this->fcked = new FCKeditor(‘content’);
            $this->fcked->ToolbarSet = ‘Basic’;
            $this->fcked->Width = ‘520’;
            $this->fcked->BasePath = ‘../system/plugins/FCKeditor/’;
            $arr_data[‘fcked’] = $this->fcked;   

    in view

    <?=$fcked->create();?>

  • #11 / Jan 31, 2008 5:46am

    Sawariya's avatar

    Sawariya

    89 posts

    Mr indus
    Did you check it?? working??

  • #12 / Jan 31, 2008 7:34am

    adamp1's avatar

    adamp1

    772 posts

    Seems the best way is to put fck in the plugins folder. That what I do.

  • #13 / Jan 31, 2008 3:13pm

    taewoo's avatar

    taewoo

    212 posts

    People, use TinyMCE instead.
    SOOOOO much easier to integrate..

  • #14 / Feb 08, 2008 8:16am

    Sawariya's avatar

    Sawariya

    89 posts

    Hi friends

    Xinha editor also good..

  • #15 / Feb 08, 2008 9:10am

    Lone's avatar

    Lone

    350 posts

    Another vote for tinyMCE 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases