BlogCFC and GoogieSpell Intergration Explained

In the last post we created a package to install googiespell into your blogcfc and now we would like to explain how we did this.

install the attached zip file into your site root.

wwwroot/googiespell

and where you want to add the spell checking functionality include the following .js and css pages

<script type="text/javascript" src="/googiespell/AmiJS.js"></script>
<script type="text/javascript" src="/googiespell/googiespell.js"></script>
<script type="text/javascript" src="/googiespell/cookiesupport.js"></script>
<link href="/googiespell/googiespell.css" rel="stylesheet" type="text/css" />

In blogcfc there are two nice places to add the spell checking functionality

admin entry editor - /admin/entry.cfm
comments /addcomments.cfm

now in this example we will add it to /admin/entry.cfm look for the textarea that holds the body and add an ID="" to it so it looks like

<textarea name="body" class="txtArea" id="body">#form.body#</textarea>

and then add the javascript code needed to load the spell checker

<script>
var googie1 = new GoogieSpell("/googiespell/", "http://#cgi.HTTP_HOST#/googiespell/googleapi.cfm?");
googie1.decorateTextarea("body");
</script>

Now if the googiespell directory is in your root you should have no worries however if you have moved it then you will have to ensure you fix it up here. Also at the moment we have it pointing to cgi.http_host however this could be static like

This is all you have to do to getting it working with coldfusion we have just used this amazing blog as an example. There are, as explained in previous blog entries modifications to the release version of googiespell (3.78) and you should visit Orangoo Labs Licence for GoogieSpell to ensure you comply with the license agreement.

Hope you find this useful.

Comments
Doug's Gravatar Nice bit of integration, worked well for me on CF server. Not working so well on blue dragon for some reason though, it doesn't seem to like the googleapi.cfm file very much.

If I get a chance I'll let you know why if I can find it.

Thanks for the handy post.
# Posted By Doug | 7/7/06 7:16 PM
charlie arehart's Gravatar Doug, the issue could be the same as that found by Dave Quested in comments he made to Ray Camden's post pointing to this one (http://ray.camdenfamily.com/index.cfm/2006/7/4/Blo...).

Dave wrote, "Anyone stuck in the past and using MX6.1 will need to alter googiespell/googleapi.cfm slightly. Remove result="xmlresult" from the CFHTTP call on line 3, and change the CFOUTPUT to be cfhttp.filecontent. Enjoy."

I have to admit I haven't tried it myself, but those issues would certainly affect BD as well.
# Posted By charlie arehart | 7/8/06 12:19 AM
Doug's Gravatar That did the trick, nice one :)

Doug
# Posted By Doug | 7/8/06 10:37 PM
rob's Gravatar no worries people, thanks for reading our blog :)
# Posted By rob | 7/10/06 10:05 AM
Eugene's Gravatar I've read the documentation because I have a problem with implementing spell checker to my code for Firefox browser. My development is coding on PHP, so I've taken an example of local server, <a href=http://orangoo.com/labs/uploads/sendReq.php>Current working PHP version</a> on documentation page at orangoo.com/labs. But when I run checker and see the result on Ajax's function, it returns:

HTTP/1.1 302 Found
Location: http://www.google.com
Date: Fri, 22 Sep 2006 11:05:52 GMT
Content-Type: text/html
Server: GFE/1.3
Content-Length: 218
Connection: Close


<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com">here</A>.
</BODY></HTML>

Could you explain me, what does it mean?
May be Google's script has another address now?
# Posted By Eugene | 9/22/06 9:25 PM
Damian's Gravatar Tried to spell check feature when posting this and it doesn't work in IE7: An error was encountered on the server. Please try again later. Any ideas?
# Posted By Damian | 11/27/07 8:57 AM
Garth's Gravatar hi i tried to use the spell checker on the site but it does not work at all. it takes ages to check one word and has a javascript error on it. "Done but with errors"

Please help....
# Posted By Garth | 1/9/08 6:44 PM
laptop batteries's Gravatar We specialize in http://www.batterylaptoppower.com laptop batteries,laptop AC adapters. All our products are brand new, with the excellent service from our laptop battery of customer service team.
the most convenient and cheap replacement battery online shop in uk. We specialize in http://www.batteryfast.com laptop batteries,laptop AC adapters. All our products are brand new, with the excellent service from our customer service team.
the most convenient and http://www.batteryfast.co.uk cheap replacement battery online shop in uk. We specialize in laptop batteries,laptop AC adapters. All of batteries are brand new, with the excellent service from our customer service team, you can feel free to purchase on laptop battery!
Here is cheap laptop ac adapter online shop in uk. We specialize in http://www.adaperlist.com laptop AC adapters. All our products are brand new, with the excellent service from our customer service team.
# Posted By laptop batteries | 9/22/08 12:32 PM
HP part number 337607-001's Gravatar We specialize in laptop AC adapters. All our products are brand new, with the excellent service from our customer service team. HP part number 337607-001
http://www.notebookrepairmart.com/page_compaq-hp-p...
# Posted By HP part number 337607-001 | 10/4/08 12:56 AM