Friday, December 19, 2008

Creating Coldfsuion search application using VERITY

Coldfusion Application server comes with VERITY enterprise search. If you have installed coldfsuion server, and go to your services you will see COLFUSION SEARCH server also running. This is the search server we are going to use to create the Verity search application.

Here is what we need to do

1. Create a COLLECTION of the content you want to search, you can create a collection in 2 ways a) through COLDFUSION ADMINISTRATOR b) by <cfcollection> tag.

2. After creating a collection you index it, this is done by <cfindex> tag. This index can be added as a coldfusion schedule tag, so that it indexes the collection every day or week, just as any other spider indexes your website.

3. Use <cfsearch> tag to search the indexed collection.

that's all what you need to do. This is really simple and a fast way of search, when you search you will not be running queries against database and you can even get RANKS, PREVIEW, etc

Wednesday, September 3, 2008

Integrating FCKEditor with COLDFUSION MX on LINUX server

A few days back I got an project which required integration of FCKEditor. They are using Coldfusion MX, First I thought that the integration would be pretty straight forward, but I landed in a few issues, like sharing variables, custom upload directories etc. Below are things that I came across

Server Details - Linux OS, ColdfusionMX on JBOSS, FCKEditor v 2.6.3.

FCKEditor integration is simple, download FCKEditor form extract the zip file to your webroot directory, say under fckeditor and that's all. If you don't extract it to webroot, then you can map it in coldfusion administrator, In my installation I have placed it under webroot, by the name of 'fckeditor'.

Then within your form where you want the editor, you just have to put the code

<cfmodule template="/fckeditor/fckeditor.cfm" height="400" width="750" basepath="/fckeditor/" instancename="FckTest">

Great, I was so happy to see the new editor and working on all the browsers, including safari :-), Now comes the tough part.. which was IMAGE uploading. The problem with the server was that they were uploading images to different folders. Fck is not configured to do this, it can only by default upload all images to a single folder. Then they were getting the folder details dynamically through a configuration file. Fck will NOT get any variables that are defined in your application, it is a separate stand alone application.

So my first task was to make the variables available to Fck and then work on changing the image upload.

To get the variables of your application available to Fck, just create an Application.cfm file in your fckeditor directory and just have in it include your application config file and make session management true, so that the session variables are also available for it, below is the example of Application.cfm file(NOTE the capital 'A' as the server is LINUX).

<cfinclude template="/conf/systemconf.cfm">
<cfapplication sessionmanagement="true" name="webcentral">
<cfset dsn=" session.dsn">

That's ALL so now you have the session variables and the config variables available to FCKEditor, great. Now you need to make some changes for configuring the FCKEditor so that it can upload images to different directories.

1. Change the following in fckconfig.js file

var _FileBrowserLanguage = 'cfm' ;

var _QuickUploadLanguage = 'cfm' ;

2. Open /fckeditor/editor/filemanager/connectors/cfm/config.cfm, add the following in the config file, just below

Config.UserFilePath = 'http://path to the images folder'

Config.UserFilesAbsolutePath = 'Relative path to the directory where the images are to be uploaded'...... THIS is NOT there in the file by default and you have to add it

Then Change the following

Config.FileTypesPath["Image"] = Config.UserFilesPath';
Config.FileTypesAbsolutePath["Image"] = Config.UserFilesAbsolutePath ;

Now you are done !!!!!!!!! Reload the page, it is very important to clear the cache of the browser otherwise you will not see the changes.

In Linux you will also have to change the SPELL CHECK, as it is configured for windows, I will post the steps for that in my next blog.

Tuesday, July 22, 2008

Avyukth -- 3 months old !!!!!!!

Avyukth turned 3 months old yesterday and is doing great, now he is trying to speak and is so excited about it that he keeps screaming. You can keep on playing with him, talking to him and he will not stop replying back :-).
Posting some of his pictures.

Tuesday, April 22, 2008

A ladder up in life....

Me and Radhi became parents today, we are blessed with a BABY BOY !!!!! We have decided to name him AVYUKTH(which is another name for lord krishna) :-)).

I am uploading couple of pics of baby that are taken from cell phone... these are first picks, taken just couple of hours after he is born...

AVYUKTH with his granny !!!!!!

Friday, January 11, 2008

Retrieving and Resetting coldfusion administrator password

Lost Coldfusion Administrator passwords? you can reset them easily, there are different ways of doing it on CF 4.5 and CF 5, and on later versions of Coldfusion MX 6,7 and CF 8.

How to reset password for CF 4.5, 5 - The password information is stored in REGISTRY for this version of coldfuison, You can't get the password as it is encripted. But you can reset them, 2 ways to do it

1. Go to Run -> Regedit
2. HKEY_LOCAL_MACHINE -> SOFTWARE -> Allaire -> Coldfusion -> Currentversion
3. Right click on Currentversin and FIND -> useadminpassword.
4. Change the key value from 1 to 0.

The above will allow you to login to coldfusion administrator without any password, you can reset it again.

second method is to use <cfregistery action="set">, use the following
entry="UseAdminPassword" branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\Coldfusion\Currentversion\server">

that will allow you to login to the coldfusion administrator without using any password.

Now, you can also reset the password for Coldfusion MX6, 7 and CF 8. In these version of coldfusion the password is NOT stored in registry, but in XML config files, you just need to know where they are located. Use the following steps

1. Go to your coldfusion server root -> lib
2. search for the file "neo-security.xml"
3. Search for "<var name="''"><boolean value="'true'/"></var>" , change boolean value ='false'.

that's ALL, it will allow you to login without any password to coldfusion administrator, simple :-)