Google Spell Checker

30th Mar 2006 Danny
Introduction

Spel rite uzing "Google Spell"

Pre-Phoenix users of b2evolution may remember using the built-in spell-checker, based on www.spellchecker.com. A spell check window popped open, the utility often took its sweet time to load, it often terminated or hung when it encountered certain XHTML tags and it had a clunky interface. It's not surprising that the spell check button has disappeared in the publicly available, alpha version of Phoenix. In addition, the simple (English-only) spell checker plug-in that ships with v1.6 and CVS versions of Phoenix, doesn't work. This prompted us to write our own and make some improvements.

Google Spell

Introducing the Astonish Me! "Google Spell" plug-in. It provides an easy-to-use, multilingual spell checker for the Back Office write/edit pane and (optionally) for comment forms.

It's called "Google Spell" because it uses the Google Spell Check API and functions similarly to the spell checker in Gmail. If you have a Gmail account, then you may already be familiar with the interface.

The API call is made using AJAX, which allows spell checking right in the Back Office edit window (and/or comment form). No more annoying pop-ups or page refreshes. It utilizes a word-frequency algorithm, which means that it will recognize commonly used proper nouns. This reduces the number of words it 'thinks' are incorrect. It also skips over many XHTML tags, attributes and CSS class names, further speeding up the process. Because Google handles the dictionary end of things, technology words are covered. If that weren't enough, Google Spell is multi-lingual, currently supporting eight different languages: Dansk, Deutsch, English, Español, Français, Italiano, Nederlands, Polski, Português, Suomi and Svenska.

Google Spell was inspired by and is based upon GoogieSpell, written by Amir Salihefendic and released under the GPL. It's been tested in the PC versions of MSIE 6(sp2), FireFox 1.5 & Opera 8.5. JavaScript must be enabled for Google Spell to function. If JavaScript is disabled, the controls never show up, so it degrades nicely. We believe that JavaScript should only add functionality to a page.

Summary of Benefits

  • No annoying pop-up windows.
  • No flicker or waits from page refreshes.
  • Multilingual (8 languages currently supported).
  • Three east steps to get it installed.
  • Intuitive, Gmail-like interface is easy to use.
  • Recognition of many XHTML tags, attributes and CSS class names.
  • Recognition of commonly used proper nouns.
  • Up-to-date checking of technology words.
  • Fewer 'false positives' means less time spent spell checking.
  • Quickly spell-check: scan entry for highlighted, suspect words.
  • Check any length post (no length limit).

Google Spell Demonstration

<-- Controls Show Up Here (JavaScript required)

Don't take our word for it. Go on, give it a test drive. Spell check the text in the box, or be creative and type your own. (Keep in mind that we log everything that gets typed into the window, so no cussing, credit card numbers or passwords. On second thought, credit card numbers are OKAY, just be sure to enter the expiry date and the 3-number security code off the back. ;) )

Like it? Get your copy today, courtesy of AstonishMe!

(Next: Installation for your version of Phoenix.).



Contents
  1. Introduction
  2. Installation (v1.6)
  3. Installation (v1.8)
  4. Usage & Styling
  5. FAQS & Enhancements
 
 
 
 

36 comments

finally ... the blog works :|
 
05/31/06 @ 21:22
lol, born a comedian huh? :P

¥
 
05/31/06 @ 22:07
Here's a bug report for the 1.8-cvs version (0.3):

it does googie1.decorateTextarea("itemform_post_content",..., but that does not work for the "Edit Comment" textarea, which has another ID. You could now use $params['target_type'] in AdminDisplayEditorButton (which is "Comment" or "Item"), but the easiest and cleanest solution is to use the JS var b2evoCanvas instead, which holds the name of the textarea ID for the item's and comment's form.
 
06/10/06 @ 17:23
Thanks for the heads up Blueyed, I'll hopefully implement all the changes you've suggested later on today. :D

¥

*edit*
I've implemented your suggestions and the 1.8 zip has now been updated.

Blueyed : I couldn't use b2evoCanvas for comments though as it's not available.
 
06/12/06 @ 11:02
Comment from: Dave
Looks like Google has killed the ability to use their toolbar for spell check. Next!
 
06/14/06 @ 19:25
Comment from: stk
Just notced tht the plugn is reprting: "no splling erors" acrss teh board??
 
06/16/06 @ 18:18
Google, in it's infinite wisdon, has moved the api url to an https url. Unfortunately ssl is unavailable on this server which kind of makes it a smidge tough to connect to the new url.

Looks like we need to find another source.

¥
 
06/17/06 @ 09:33
Comment from: stk
Okay ... we need to get SSL support on the AM server, then the demo will work again.

The plugin still works for anyone whose host provides SSL support. (Works on my blog). Yay!

If you haven't done it already, people just need to change line 19 of the "xmlproxy.php" file, replacing the "http" with a "https". (The file is in /plugins/googlespell_plugin/rsc folder).

Why does Google do stuff like this? Odd.

-stk
 
06/22/06 @ 18:01
The zip files have both had the amendment made to them.

I also implemented the js changes sent to us by John McKnight (I don't have a url for him so I can't provide any linkage).

¥
 
06/26/06 @ 09:36
Instead of adding [?php $Plugins->call_by_code( 'goospel', array() ); ?] to your _main skin file, why not use the SkinBeginHtmlHead event, and use that to contain that code, with a plugin setting to determine wether or not it should be used...
 
07/11/06 @ 09:09
Hi Balupton,
At the time the 1.8 version was written that hook wasn't in the cvs. We've slowly been upgrading our plugins to work with the release version of 1.8.

The 1.8 version of the plugin has now been updated, so grab the latest version of the zip file ;)

¥
 
07/14/06 @ 08:24
Comment from: Kyle
In order to fix the https problem, I use a php proxy script from the original site. For anyone interested, you can check it out here:

http://orangoo.com/labs/uploads/sendReq.php

My thought is that instead of me pointing to this script for my installation, maybe the necessary code can be integrated into the plugin? It seems like this method will work for any server, but I haven't tested it. All I know is that with your default install, it failed, but after pointing it to that script, it worked perfectly.

This is just a suggestion/thought I had.
 
07/14/06 @ 20:16
Hi Kyle,
Yeah I made a cockup and forgot the ssl bit when I changed the xmlproxy, this has now been rectified and both zips updated.

Thanks for catching that :D

¥
 
07/15/06 @ 07:55
Comment from: fulcrum
I am using Opera 9 and the Spell Checker controls don't show up. OK, let me be more specific: the controls don't show up on my site and they don't show up on this page (at the top in the 'Google Spell Demostration') however, they show up at the top of this comment text area. JavaScript is enabled so I am not sure what is going on? Any ideas?
 
07/25/06 @ 02:46
Comment from: stk
Fulcrum,

Why Demo Controls are Gone

We're in the process of upgrading this blog from CVS v1.8 to the newly-released v1.8 "Summer Beta". The fact that there was even a demo inside a blog post was a tad special and it used a plugin, which injected some javascript, to allow the demo). I'm not sure if it's the plugin or the JS code that's not functioning at the moment, but that's probably why the demo controls don't show up.

Comment Controls

The comment controls do, which is testimony that the plugin code functions and properly inserts the spell-check controls into the comments section (they're showing up in the backoffice too).

However ... neither work at the moment and this we blame (ultimately) on Google ...

Some time ago, they changed the spell check API to a secure server location (for some strange reason). Hey, they're Google, I guess they can do what they want. In any case, though the script has been modified to take the HTTPS URL change into account, THIS windows-based server that hosts our site, does not currently have SSL support. So, while the controls are there, the spell checking never happens (and we have to be very careful about our spelling).

So ... what version of b2evolution are you trying to use this with?



 
07/25/06 @ 04:30
Hi Fulcrum,

I've updated the 1.8 zip, it should cure all your problems. If it doesn't then send me a link to your blog and I'll see if I can work out why.

¥
 
07/25/06 @ 10:52
Comment from: fulcrum
I downloaded the latest version of the plugin and everything seem to be working. Thank you for the quick turn-around!
 
07/26/06 @ 02:11

it should cure ALL your problems.



LMAO ... that's a mighty big claim there, cowboy ¥! :p
 
07/26/06 @ 03:40
It would be really nice if when the spellchecker failed, that it would notify the user instead of just saying "No errors found". Particulary for errors like failure to connect to google, or no SSL support in PHP, an error message would help get things fixed.
 
08/07/06 @ 22:01
Hi Jeremy,
That's a really cool idea, but I figure it would be a tad tough to incorporate into this version of the plugin.

I'll have a root around in the code and see what I can do. If not then I'm sure it'll make it into the next version of the code ;)

¥
 
08/10/06 @ 08:35
Comment from: MrDav
I installed the plugin on my site, and I get an undefined error when trying to check a comment. So I thought I'd come here and whine. I tried your demo and all I get to see is the little wheel going round and round and not stopping. Is this a known issue? Oops, I just tried to check this comment and got the undefined error message again.

Meanwhile I am going to see if firefox produces the same error. :)
 
08/17/06 @ 18:07
Comment from: MrDav
It seems to work fine in firefox, but not in IE beta3. I guess I will have to turn it off till M$ or AM has a fix.

;)
 
08/17/06 @ 23:44
Hi MrDav,
I should get chance over the next few days to play with the plugin so I'll see if I can cure your errors at the same time.

It doesn't work on this server because SSL isn't enabled which is needed to connect to google, but that's one of the other things I'm hoping to cure ;)

¥
 
08/18/06 @ 07:53
Comment from: Chim Bon
Excellent plugin!

I have it working in one blog but not in another. Both blogs are at different servers.
How can I tell wether the server with the blog that has the GoogieSpelling not working, has SSL enabled or not?
How do you enable it?

Thank you!
 
10/22/06 @ 14:47
Comment from: Chim Bon
How can I tell wether the server with the blog that has the GoogleSpelling not working, has SSL enabled or not?
How do you enable it?

Can you please answer.
 
11/12/06 @ 17:04
Comment from: Guillermo Casanova
¿Is there a way to establish a language by default? My blogs are in spanish and spanish are the people that comment on them. I want the Default language to be Spanish instead of english. Possible?
 
12/02/06 @ 01:18
Hi,
If you read page 3 Usage and styling, there's a section all about changing the default language.

Chim Bon : You should be able to chack if you have ssl support by looking at your php_info();

¥
 
12/05/06 @ 06:33
Comment from: Guillermo Casanova
¥åßßå: Thank you! Problem solved.

 
12/07/06 @ 22:41
Comment from: khalid
I'm using b2ev 1.9.1 and install this plug-in but no check spelling button does not appear in either Write/Edit in the backoffice.

Where should this button be?
 
01/17/07 @ 07:12
Comment from: Khalid
Sorry, I forget to mention that I can't find a checkbox for spellcheck comments on the backoffice blogsetting for this pluhin even though I inserted the code in Step-4 in my skin _main.php.
 
01/21/07 @ 03:36
Hi Kahlid,
Sorry, we don't do email support for our plugins as it defeats the purpose of having this blog where everyman and his dog can see the solutions to any problems that people may have.

Some of your problems are caused by the fact that this plugin was written a fair tad ago and has never been updated to 1.9.x as FF (the only browser to use ;) ) now has a built-in spell checker.

When I get a chance I'll install this on a 1.9.x blog and see if I can get it working, but it's a tad tough to check as this server doesn't (currently) have SSL support for php

¥
 
01/21/07 @ 13:16
Comment from: Nelson
I am using 1.9 and it works, nice work :)
 
02/17/07 @ 13:50
I'm using 1.9.2 and the spell checker doesn't work. It was fine when I was using 1.8+. The error is as simple as "error Encountered undefined". Now this could be as a result of IE7, but I'm not sure. But when I pushed "Check Spelling" on this commentm it's doing the same thing without the error message. The spiral just keeps spinning, so it may have something to do with IE7.
 
04/07/07 @ 02:47
Comment from: stk
Stephan,

Hmmm. I'm using 1.9.3 (minor difference) with IE7 and the spell checker works for me?

It does rely on a 3rd-party server (google) and a relatively undocumented API and (of course) Google changes the rules and access on a whim. We're not big on the plugin, for those reasons.

You might be interested to know that FireFox 2.0 has a built in spell checker, which you can use natively (no plugin required).

Hope this helps.

stk
 
05/02/07 @ 16:09
Great. I'm using 1.9 and it works =)
 
10/10/07 @ 20:32
I'm using b2evo with the latest version of this plugin and it works great in Firefox. But when I use IE, I can't get it to work - live checking doesn't work, the above mentioned error message comes up when I click the "check now" link, and the popup menu for the language switch appears halfway outside the window to the right. Any chances of a fix for this? Too many people using IE out there :-)

Thanks - great plugin!
Oliver
 
05/23/08 @ 23:16

Comments are closed for this post.

 

B.O.P.I.T