Wednesday, March 10, 2010

Step by step tutorial for IMCE integration with CKEDITOR in Drupal6

Following are the steps for IMCE Integration with CK Editor in Drupal 6

1. Download the CKeditor module from http://drupal.org/project/ckeditor and imce module from http://drupal.org/project/imce .
2. Unzip the files in the sites/all/modules directory .
3. Download CKEditor from http://ckeditor.com/download. Unzip the contents of the ckeditor directory in the sites/all/modules/ckeditor/ckeditor directory.
4. Enable the modules as usual from Drupal's admin pages.
5. Grant permissions for use of CKEditor in "Administer > User Management > Permissions"
6. Under "Administer > Site configuration > CKEditor", adjust the ckeditor profiles. In each profile you can choose which textareas will be replaced by CKEditor, select default toolbar and configure some more advanced settings.
7. Go to http://ckfinder.com/download and download CKfinder.
8. Extract the downloaded file ckfinder and put it in Ckeditor folder (sites/all/modules/ckeditor/ckfinder) .
9. Open config.php in the ckfinder folder and comment out the CheckAuthentication() function.

/*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;
}*/

10. Add this code :
require_once '../../../../includes/filemanager.config.php';

straight below the following line:
$baseUrl = '/ckfinder/userfiles/';

11. Locate file named settings.php inside your drupal directory (usually sites/default/settings.php) and set $cookie_domain variable to your domain name.

$cookie_domain = $_SERVER['HTTP_HOST'];

12. In the administer->site configuration ->ckeditor, edit the profile you are using.
In the file browser setting,
Select CKFinder from the dropdown in File browser type (Link dialog).
Select IMCE from the dropdown in File browser type (Image dialog).
Select IMCE from the dropdown in File browser type (Flash dialog).
Save the configuration.

13. Go to create content ->page, try to upload a image using the ckeditor, it should work.

Thanks,

Ashraf

Friday, November 20, 2009

Relocation to Pune for my new job from Guwahati

It was 13th September. Sunday. I was sitting at my room. Last night, my new company director called me and told me to join latest by 24th September. My previous company wasn't willing to release me nor giving me any definite date on when I would be released. I had to take a decision.
It was a tough call. How do I go without having the release letter in my hand? I was going nuts thinking about that. After lot of thinking,came to the conclusion that come what may, I am going. "Jo hoga dekha jayega". Just decided not staying in Zaloni after 18th. Its my life and its my wish.
I had to go home once before shifting to Pune.
I wasn't surprised when they didn't release me on 18th. Due to this uncertainty, didn't even buy tickets also.The next day, on 19th, went to the airlines office, went crazy when I heard about the fares. Due to ensuing Durga Puja, there was heavy rush. I knew if I avoid going home, I could save some money. But I also wanted to be at home for Eid even if for only 2 days. So, I purchased the tickets for Silchar-Ghy and Ghy-Mum.Sometimes, money is not that important.
The next morning,I left for my hometown by bus.I reached home at 7:30 in the evening. It was so nice being at home after 4 months. "Home is where the heart is". Next day was Eid. I really enjoyed those two days. Even went to Devdoot talkies to watch "Wanted". Hey, cant miss Salman Khan's film.
Sept 23. I had never been to Mumbai or Pune. Had no idea where I was going to stay in Pune. Just had the tickets in hand. Was feeling sad to leave home again. But what to do, have to do it for my career and my dreams. I boarded the flight to Guwahati in the morning. I was really tensed if my new company asked for the release letter. I had to stay in the Guwahati airport for 2 hours for boarding the Mumbai flight. As I sat in the airport, my mind kept going back to the 1 and half years I spent at Zaloni. It was five hour flight from Guwahati to Mumbai as it halted in Kolkatta for 50 mins. I reached Mumbai at 9:30 in the night. Hired an Indica outside the airport to go to Pune I reached Pune at 3:30 in the morning. Somehow, got one auto who took me to a hotel.
Next day, I joined my new company. And thankully, didn't need to produce the release letter. My bank statements were enough to prove my employment status. I finally heaved a sigh of relief as I sat in my new desk. Oh, those 10 days were really eventful for me. And the journey continues in pursuit of happiness and peace...

Ashraf

Thursday, November 19, 2009