How to install CKEditor and CKFinder for Drupal

Submitted by admin on Tue, 01/04/2011 - 03:22

Hi Everyone,

As we all know there is no built-in rich text editor in default Drupal ike other CMS platforms, so what do we do? Well there is a solution in the form of Modules!!! those are CKEditor and CKFinder.

Today I'm going to show you how to setup CKEditor and CKFinder modules successfully.

[1] Download the Modules

First of all let's download all the necessary modules to our Computer. Open your web browser and type the URL http://drupal.org/project/ckeditor

and download the latest version of CKEditor module. Next open an another tab on your web browser and type the URL http://ckeditor.com/download and download the main files of CKEditor. the last module we need is file browser module so open one more tab on your web browser and type the URL http://ckfinder.com/download and download the PHP version of CKFinder. OK now we have all the necessary modules.

[2] Install the Modules

Now let's unzip (extract) the first downloaded CKEditor module from http://drupal.org/project/ckeditor and then open the unzipped  CKEditor folder
where you can see an another folder named same CKEditor which has only one text file in it (CKEditor/CKEditor/COPY_HERE.txt), if you open and read this text file you will understand that this the place where we have to put the CKEditor file which we have downloaded from http://ckeditor.com/download. So let's unzip the second CKEditor file and open the unzipped file then copy everything within this folder and paste into the CKEditor/CKEditor folder.

Now we have one more file to unzip which is CKFinder so let's unzip the CKFinder module and drag and drop or copy and paste to CKEditor folder (CKEditor/CKFinder). Now we have unzipped and arranged everything in order. Next we have to change some configurations to work CKFinder properly.

[3] CKFinder Configuration

So let's open config.php (CKEditor/CKFinder/config.php) and then comment or delete the line from 21 to 34.

function CheckAuthentication()
{
    // WARNING : DO NOT simply return "true". By doing so, you are allowing
    // "anyone" to upload and list the files in your server. You must implement
    // some kind of session validation here. Even something very simple as...

    // return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];

    // ... where $_SESSION['IsAuthorized'] is set to "true" as soon as the
    // user logs in your system.
    // To be able to use session variables don't forget to add session_start().

    return false;
}

Note: To comment these codes just add /* at the beginning and */ at the end.(same as CSS comment)

Next in the same config.php file on line 61 ($baseUrl = '/ckfinder/userfiles/';)define the path to CKFinder userfiles.

Something like this $baseUrl = '/public_html/yoursitename.com/sites/all/modules/ckeditor/ckfinder/userfiles/';

Next step is to add this code require_once '../../../../includes/filemanager.config.php'; below the line 78 ($baseDir = resolveUrl($baseUrl);)

OK that's all we have to do with CKFinder/config.php. 

[4] Settings.php Configuration

The last step is to edit some sttings in settings.php, so go to drupal/sites/default/settings.php and on line 169 (# $cookie_domain = 'example.com';)

un-comment this line by removing # mark and change example.com to your domain name. Like this $cookie_domain = 'yourdomainname.com';

(Note: if you are on local computer add localhost $cookie_domain = 'localhost';).

Now everything is configured and it's time to put the CKditor module to drupal/sites/all/modules

(Note: There is no default directory named modules, you have to create a new folder called modules)

Let's open our Drupal site and go to /admin/build/modules and enable the CKEditor module.

Next go to /admin/user/permissions and set CKEditor access permission to authenticated user and CKFinder file upload permission.

Now go to /admin/settings/ckeditor and edit the advanced profile and set the file browser as type as CKFinder and save the configurations.

Now lets go and create a page or story and you can see instead of default plain text editor we have CKEditor and click on image button and you an see thast now you can browse for images and uploaded images and files to server from the site. Great!!!

I hope I could help all those who had problem for setting up CKEditor and CKFinder on Drupal.

If anybody got error while doing this please feel free to contact me I love to help you because I LOVE DRUPAL.

42 comments

There are some

Submitted by arlenebwg (not verified) on Fri, 11/11/2011 - 20:53.

There are some attention-grabbing time limits in this article but I don’t know if I see all of them heart to heart. There is some validity but I will take hold opinion until I look into it further. Good article , thanks

Nice post. I be taught

Submitted by paulhorzi (not verified) on Wed, 11/09/2011 - 11:13.

Nice post. I be taught something tougher on completely different blogs everyday. It will all the time be stimulating to read content from other writers and apply a bit something from their store. I’d choose to use some with the content on my blog whether or not you don’t mind. Natually I’ll offer you a link on your net blog. Thanks for sharing.

WONDERFUL Post.thanks for

Submitted by philipbxn (not verified) on Thu, 10/20/2011 - 05:07.

WONDERFUL Post.thanks for share..

very good put up, i actually

Submitted by paulhorzi (not verified) on Wed, 10/19/2011 - 21:07.

very good put up, i actually love this web site, carry on it

You must take part in a

Submitted by paulhorzi (not verified) on Wed, 10/19/2011 - 02:24.

You must take part in a contest for one of the best blogs on the web. I will advocate this site!

There are some

Submitted by Anonymous on Tue, 10/18/2011 - 03:44.

There are some attention-grabbing closing dates on this article but I don’t know if I see all of them center to heart. There's some validity however I'll take maintain opinion until I look into it further. Good article , thanks

Good post. I learn something

Submitted by philipbxn (not verified) on Mon, 10/17/2011 - 00:22.

Good post. I learn something more difficult on completely different blogs everyday. It would always be stimulating to learn content material from other writers and practice slightly something from their store. I’d favor to use some with the content material on my weblog whether you don’t mind. Natually I’ll provide you with a hyperlink in your net blog. Thanks for sharing.

you may have an incredible

Submitted by philipbxn (not verified) on Sun, 10/16/2011 - 11:36.

you may have an incredible blog right here!

Would you be excited about

Submitted by arlenebwg (not verified) on Sun, 10/16/2011 - 02:04.

Would you be excited about exchanging links?

I discovered your blog web

Submitted by arlenebwg (not verified) on Sat, 10/15/2011 - 18:58.

I discovered your blog web site on google and check a few of your early posts. Proceed to keep up the superb operate. I simply further up your RSS feed to my MSN Information Reader. Looking for forward to reading extra from you in a while!

This web site is really a

Submitted by paulhorzi (not verified) on Fri, 10/14/2011 - 07:14.

This web site is really a stroll-via for the entire information you wished about this and didn’t know who to ask. Glimpse right here, and you’ll undoubtedly discover it.

I was very pleased to find

Submitted by arlenebwg (not verified) on Sat, 10/08/2011 - 12:29.

I was very pleased to find this web-site.I needed to thanks on your time for this wonderful read!! I positively enjoying each little bit of it and I have you bookmarked to take a look at new stuff you weblog post.

Aw, this was a really nice

Submitted by arlenebwg (not verified) on Fri, 10/07/2011 - 02:16.

Aw, this was a really nice post. In idea I wish to put in writing like this moreover – taking time and precise effort to make an excellent article… however what can I say… I procrastinate alot and by no means seem to get something done.

Your house is valueble for

Submitted by philipbxn (not verified) on Thu, 10/06/2011 - 04:58.

Your house is valueble for me. Thanks!…

I am typically to running a

Submitted by philipbxn (not verified) on Tue, 10/04/2011 - 13:40.

I am typically to running a blog and i actually respect your content. The article has really peaks my interest. I'm going to bookmark your website and hold checking for brand spanking new information.

Oh my goodness! an incredible

Submitted by lisabenlh (not verified) on Sat, 10/01/2011 - 02:04.

Oh my goodness! an incredible article dude. Thanks Nonetheless I'm experiencing subject with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting similar rss downside? Anybody who is aware of kindly respond. Thnkx

You should take part in a

Submitted by paulhorzi (not verified) on Wed, 09/28/2011 - 18:54.

You should take part in a contest for probably the greatest blogs on the web. I will advocate this web site!

This website is mostly a

Submitted by paulhorzi (not verified) on Sat, 09/24/2011 - 16:49.

This website is mostly a stroll-via for all of the information you needed about this and didn’t know who to ask. Glimpse right here, and you’ll definitely discover it.

Youre so cool! I dont suppose

Submitted by billiedkv (not verified) on Tue, 09/20/2011 - 12:19.

Youre so cool! I dont suppose Ive learn anything like this before. So good to search out any person with some unique thoughts on this subject. realy thank you for beginning this up. this web site is one thing that's wanted on the web, somebody with slightly originality. useful job for bringing something new to the internet!

The following time I learn a

Submitted by kristin18 (not verified) on Tue, 09/20/2011 - 11:33.

The following time I learn a blog, I hope that it doesnt disappoint me as a lot as this one. I mean, I do know it was my choice to learn, however I really thought youd have one thing interesting to say. All I hear is a bunch of whining about one thing that you might repair if you werent too busy in search of attention.

Aw, this was a really nice

Submitted by billiedkv (not verified) on Tue, 09/20/2011 - 09:17.

Aw, this was a really nice post. In idea I would like to put in writing like this moreover – taking time and precise effort to make a very good article… however what can I say… I procrastinate alot and on no account seem to get one thing done.

I discovered your blog web

Submitted by billiedkv (not verified) on Tue, 09/20/2011 - 07:46.

I discovered your blog web site on google and examine a couple of of your early posts. Proceed to keep up the excellent operate. I simply extra up your RSS feed to my MSN News Reader. Seeking forward to studying extra from you later on!…

It’s exhausting to seek out

Submitted by kristin18 (not verified) on Tue, 09/20/2011 - 07:19.

It’s exhausting to seek out knowledgeable individuals on this topic, however you sound like you know what you’re talking about! Thanks

You made some respectable

Submitted by billiedkv (not verified) on Mon, 09/19/2011 - 05:33.

You made some respectable factors there. I regarded on the internet for the problem and found most people will go along with along with your website.

Oh my goodness! an incredible

Submitted by kristin18 (not verified) on Thu, 09/15/2011 - 12:54.

Oh my goodness! an incredible article dude. Thanks However I'm experiencing problem with ur rss . Don’t know why Unable to subscribe to it. Is there anybody getting identical rss problem? Anyone who knows kindly respond. Thnkx

you've got an ideal blog

Submitted by kristin18 (not verified) on Thu, 09/15/2011 - 04:16.

you've got an ideal blog here! would you wish to make some invite posts on my blog?

There is noticeably a bundle

Submitted by kristin18 (not verified) on Thu, 09/15/2011 - 03:34.

There is noticeably a bundle to find out about this. I assume you made certain good factors in options also.

Youre so cool! I dont suppose

Submitted by billiedkv (not verified) on Thu, 09/15/2011 - 03:19.

Youre so cool! I dont suppose Ive learn anything like this before. So good to find anyone with some authentic ideas on this subject. realy thank you for starting this up. this website is something that's needed on the web, somebody with just a little originality. helpful job for bringing one thing new to the internet!

Oh my goodness! an amazing

Submitted by kristin18 (not verified) on Mon, 09/12/2011 - 02:39.

Oh my goodness! an amazing article dude. Thank you However I am experiencing challenge with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting similar rss downside? Anyone who knows kindly respond. Thnkx

An fascinating discussion is

Submitted by billiedkv (not verified) on Mon, 09/12/2011 - 00:54.

An fascinating discussion is price comment. I believe that you must write more on this topic, it might not be a taboo subject however typically people are not enough to speak on such topics. To the next. Cheers

A powerful share, I simply

Submitted by billiedkv (not verified) on Sun, 09/11/2011 - 23:20.

A powerful share, I simply given this onto a colleague who was doing a little bit analysis on this. And he in fact bought me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the deal with! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If doable, as you grow to be expertise, would you thoughts updating your weblog with extra details? It's extremely helpful for me. Massive thumb up for this blog publish!

I’m impressed, I have to say.

Submitted by kristin18 (not verified) on Fri, 09/09/2011 - 17:27.

I’m impressed, I have to say. Really hardly ever do I encounter a weblog that’s both educative and entertaining, and let me tell you, you have got hit the nail on the head. Your idea is outstanding; the problem is one thing that not sufficient people are speaking intelligently about. I'm very pleased that I stumbled throughout this in my search for one thing relating to this.

Good day! I simply wish to

Submitted by kristin18 (not verified) on Thu, 09/08/2011 - 15:06.

Good day! I simply wish to give a huge thumbs up for the nice information you will have right here on this post. I will likely be coming again to your blog for more soon.

you have an important weblog

Submitted by billiedkv (not verified) on Thu, 09/08/2011 - 14:54.

you have an important weblog right here! would you prefer to make some invite posts on my weblog?

WONDERFUL Post.thanks for

Submitted by kristin18 (not verified) on Thu, 09/08/2011 - 13:40.

WONDERFUL Post.thanks for share..

I’m impressed, I have to say.

Submitted by kristin18 (not verified) on Thu, 09/08/2011 - 12:38.

I’m impressed, I have to say. Really hardly ever do I encounter a blog that’s each educative and entertaining, and let me inform you, you have hit the nail on the head. Your thought is excellent; the problem is one thing that not enough individuals are talking intelligently about. I'm very completely happy that I stumbled throughout this in my seek for one thing referring to this.

I found your blog website on

Submitted by billiedkv (not verified) on Wed, 08/31/2011 - 09:37.

I found your blog website on google and check just a few of your early posts. Proceed to maintain up the very good operate. I simply further up your RSS feed to my MSN News Reader. Searching for ahead to reading extra from you in a while!…
hyperendemicity shiver neocortices overhaul

Good post. I study one thing

Submitted by kristin18 (not verified) on Wed, 08/31/2011 - 08:57.

Good post. I study one thing tougher on completely different blogs everyday. It will always be stimulating to learn content material from different writers and follow just a little one thing from their store. I’d favor to use some with the content material on my weblog whether you don’t mind. Natually I’ll give you a hyperlink in your internet blog. Thanks for sharing.
glycogen kinesiology phosphate Entrench

very good submit, i actually

Submitted by annelitqj on Sun, 08/07/2011 - 04:27.

very good submit, i actually love this website, keep on it

After examine a couple of of

Submitted by pambowmus (not verified) on Thu, 06/30/2011 - 20:07.

After examine a couple of of the weblog posts on your website now, and I really like your way of blogging. I bookmarked it to my bookmark web site checklist and will be checking again soon. Pls take a look at my web site as effectively and let me know what you think.

Your place is valueble for

Submitted by alicenapd (not verified) on Tue, 05/24/2011 - 21:39.

Your place is valueble for me. Thanks!

You made some decent factors

Submitted by jessegeq0 on Tue, 02/08/2011 - 06:03.

You made some decent factors there. I seemed on the web for the difficulty and found most people will associate with with your website.

Drupal theme by Kiwi Themes.