Ajax Spell Checks

Now even though that having QuickTag toggled FCKeditor (ChenPress) allows wp-spellcheck to work, I have some recent findings on the net that make DHTML/XMLHttpRequest/AJAX spellcheck thats makes me excited.

At first, Purely dhtml spell check would be ispell (for IE) and those integration of spellcheck plugins for WYSIWYG Editors (MudBomb, HTMLArea, FCKeditor…), but now…

1. See this very cool DHTML spellcheck which check your spelling while u type (like word, something i wanted in the first few posts in my blog)

http://me.eae.net/archive/2005/05/27/dhtml-spell-checker/ and its demo

Its code is implemented via js and cgi perl and aspell. (shouldnt be a problem if you want to port it to php)

2. This implementation done using some ajax library (CPAINT or SAJAX) and php (and pspell [with aspell wrappers])
http://www.broken-notebook.com/spell_checker/index.php

Usage: click spell check to start the spelling check (like gmail’s)

3. Of this AJAX SpellChecker mention in 2, a wordpress plugin was then packaged by m0n5t3r (http://exotic4.nipne.ro/~iacobs/work/wordpress-plugins/ajax-spell-checker/)

4. A nice working implementation of a Ajax spell check that should not be forgotten is the Spell check included in Gmail.

5. I modified the ajax spellcheck mentioned in 3 and 2 and then packaged and place it here. Download it here. :)
Current features

  • Just copy, activate and you get your spell check activated for writing posts and comments

More info here.

Asides

  1. The nick m0n5t3r is a form of 1337(leet) jargon
  2. Using eAccelerator (improved of mmCache) and free/better alternative to Zend Accelerator does seems to speed up my php pages alot (each page is served ~1s compared to 4s) by caching compiled php.

Note: Click on Check Spelling to do the spell check.

53 thoughts on “Ajax Spell Checks

  1. Hi Joe, I’m also using Firefox on Windows. Can you let me know whats your Firefox version?

    Try clicking “Activate Spell Check while Typing” then type into this blank area.. Words will be underlined if spell incorrectly.:razz:

  2. How the integration going? Want some help?
    Tried to make a wp plugin myself but php is not my cup of tea so I won’t be able to help there, but on the clide side of things and by explaining the perl code, if needed.

    Keep me posted, please.

  3. Hi Emil! Well you can check the latest development by testing in this comment box. One problem could be that by activating the spell check, the textarea loses its “id” and quicktags or the Live Preview below would fail to work.. And if you try out here, the new textarea(or iframe) seems to beomce invisble, what style should I use? As for the server side implmentation its working quite well. :mrgreen:

  4. Still nothing happens when I do that. My firefox version is 1.0.4 and I have javascript and everything enabled. Gmail spell checker is working fine, too.

    Thanks for the help!!!

  5. Hi there, been trying to implement the actual plugin and have run into a couple of problems so I’d really love it if you could clear them up for me. I’m currently using WP1.5.1 viewing this in FF 1.04 and I’m actually using the tiger admin css.

    In order to not break my site, I had to modify the ajax-spell-checker.php file with the following code:

    $spellchecker_path =
    get_settings("siteurl")."/wp-content/plugins/spell_checker/";

    ...add the following...

    $my_path =
    ABSPATH."wp-content/plugins/spell_checker/";

    2. Find the following line...

    require_once $spellchecker_path."spell_checker.php";

    ...replace with the following...

    require_once $my_path."spell_checker.php" ;

    This was done by my buddy alphaoide btw. The problems now are as follows:

    1. The link in the comments doesn’t come up. Is there a hook I need to put in the comment side that might actually make it appear that I’ve taken out?

    2. In the admin section while the links appear, unfortunately they don’t actually work. It checks and high lights the actual word but doesn’t give me a list of options when I click on them. It just says searching and that it.

    Thanks for the work you’re doing btw.

  6. hi khaled, thanks for your feed back.
    sorry I didnt see your feedback for so many days.

    I have made some changes to the plugin, but I have not released it, the “Activate Spell Check while Typing” is compatible with quicktags and there are other issues.

    One thing, I changed the line to
    require_once “spell_checker/spell_checker.php” ;

    1. Nope, but editing the main plugin file, you can define for id of your comment area which it will attempt to intercept. But it seems fine on your site.

    2. Perhaps its something wrong with the styling. For example the suggestions could have run all the way to the bottom. But for now it seems to work for me (I’m trying Tiger too, thanks!).

    Do tell me if you want to try my latest version, but i’m afriad its buggy and I havnt been working on it sometime…

  7. I get these errors “br /> Notice: Use of undefined constant PSPELL_FAST – assumed ‘PSPELL_FAST’ in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 47

    Notice: Use of undefined constant PSPELL_NORMAL – assumed ‘PSPELL_NORMAL’ in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 48

    Notice: Use of undefined constant PSPELL_BAD_SPELLERS – assumed ‘PSPELL_BAD_SPELLERS’ in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 49

    Notice: Undefined variable: language in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 123

    Notice: Undefined property: in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 123

    Notice: Undefined variable: language in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 123

    Notice: Undefined property: in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php on line 123

    Warning: Cannot modify header information – headers already sent by (output started at c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php:47) in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\cpaint.inc.php on line 7

    Warning: Cannot modify header information – headers already sent by (output started at c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php:47) in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\cpaint.inc.php on line 8

    Warning: Cannot modify header information – headers already sent by (output started at c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php:47) in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\cpaint.inc.php on line 9

    Warning: Cannot modify header information – headers already sent by (output started at c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\pspell_comp.php:47) in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\cpaint.inc.php on line 10

    Fatal error: Call to undefined function: curl_init() in c:\sites\single12\dallasfreeman\webroot\blog\wp-content\plugins\spell_checker\google_spell.php on line 35″ can you help please

  8. I installed and activated the plugin, when i clickk check spelling nothing happens, theres no link to anything, just plane text. I’m using WP 1.5.2, FireFox 1.0.7 (Mac) v06 of your plugin. Later.

  9. I’m having the same problem as Kenny above, with the same usage (WP 1.5.2, FireFox 1.0.7, except I’m on WinXP). I get plain text, no links for spell checking. Ideas??

  10. Hi, I think it could be because of the template you are using. Open ajax-spell-checker.php

    Near the bottom of the page, you see the method spellcheck_ui(‘comment’); being used. Change the name comment to the id of the comment box you might be using.

  11. Thanks for the reply, I got that working now (it was actually a “d’oh” moment on my part, placing the plugin in a folder so that the spell_checker folder wasn’t where the plugin expected it to be. I put everything in it’s proper place and it works). Now, the comments work great but the posts don’t. I get the links but when using “Check Spelling” it just says checking for a long while and then the entire post disappears (!!!). I also had a problem with using “Spell Check While Typing”, it stopped responding after a while during a very long post, but I’m not sure if that was the plugin or something else (my hosting company was doing maintenace on the server last night).

    This seems like such a great plugin, wish I could get it to work right!

  12. ummm…huge apolgies. Blank line after the last line of the .php file, should have checked that off the bat. Sorry for wasting your time and thank you for putting this out there!

    Going back to bed now…

  13. i got this error message when i try using it

    rror setting certificate verify locations: CAfile: /usr/share/ssl/certs/ca-bundle.crt CApath: none 0

    can you help ?

    thanks

  14. Hi Zz85,

    I have downloaded and installed/activated the plugin (v.0.6). I have tested it in IE 6 and FF1.5

    In FF1.5 it works great, but in IE6 it seems to be having an issue when “Check Spelling” is clicked. I get the error message at the bottom part of the IE window. It says the following:
    Error on page.
    Line: 150
    Char: 2
    Error: Unknown Runtime Error
    Code 0
    URL: http://anypage… either page with comment or post editing area.

    I am using WP 1.5.2…
    If you have any pointers I would appreciate it. Thanks

  15. Hi There,
    I’ve activated your plugin, however when I try to use it in the comment area, I get the following error message:

    br /> Fatal error: Call to undefined function: curl_init() in /usr/local/www/vhosts/imho.bm/htdocs/wp-content/plugins/spell_checker/google_spell.php on line 35

    Do you have any idea how to fix this?

    Thanks in advance,

  16. Big problem – ran your spell checker on one of my posts – after I hit ‘resume’ 2/3rds of the post were cut off. Lucky I have a backup. Ideas?? (the post was formatted with tags if that helps)

  17. When I try it with live spell checking on, each character is deleted as I type it. Doesn’t happen here, just on my brand new install of WP, default templates, under both FFox and IE.

  18. Hello, I wondered if you had any plans to upgrade this plugin for compatability with WP 2.0? Or are you or is anyone interested in helping me out?

  19. No, not currently. Myself have not even make the upgrade the wordpress 2. Perhaps when I decided its time to move on to the next bandwagon. Sorry. But if you need help, I try to answer as much as I can help up.

  20. I love it thanks. I’m running wp2 (after upgrade), ffox, and xp media and am having no problems – well, I don’t know how to implement it into comments thought, but in my posting it works like a charm! thanks so much – I’m dyslexic and this will make reading my posts less comical (or frustrating).

  21. This does not work in either mode. I spelled metaphore wroong and severel other words and it caught none of them. Plus when I told it to check spelling it told me I had no misspellings.

  22. ibcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!libcurl was built with SSL disabled, https: not supported!0This iss a speling test. A teest of the speeling is wat it iss.

    I typed “This iss a speling test. A teest of the speeling is wat it iss.” and got the above. Back to searching for an online spell checker I guess. Page bookmarked though.

  23. I get the same error message as described above!
    “ibcurl was built with SSL disabled, https: not supported!libcurl was
    built with SSL disabled, https: not supported!libcurl was built with
    SSL disabled, https: not supported!libcurl was built with SSL disabled,
    https: not supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!libcurl was built with SSL disabled, https: not
    supported!0This one seems to work ok but lkjsd uikdi eik ok than no.

  24. Fantastic spell checker. I’m using it with my wordpress blog here:
    http://my2cents.gawaher.com

    I have a question: can we somehow use this spell checker with IPB (invision board software)? It would be much helpful in forums. If anyone can shed some light on this, it would be great!

  25. Ezcellent plugin. However with check as you type turned on (my site) ALL words are underlined and I am finding here on your site using the same browser (firefox 1.5 for Mac) that NONE of the wordz are underlined even those spelt wroong.
    Bue – the actual Check Spelling works great

  26. hi, this what I typed “hi” and it threw this wried text at the front. “ibcurl was built with SSL disabled, https: not supported!0″ in this site OR “SL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)0″ in my site.

    What’s wrong? It seems I am not alone. Plz fix this wonderful plugin. :)

  27. I have the same problem as above. seems to install fine but the ‘check spelling’ links arent links at all, just words and of course spelling isnt being checked.
    I am using an odd theme but the comment box id seems to be ‘comment’
    i have the ajaxspellchecker.php and spell_checker folder  in the  /plugins folder separetely which seems to be the way you want it even though there are no instructions for this whatsoever in the readme.txt please advise.in fact as i am writing this in your reply box i am intentionally missspelling werds and itz knot werkin and when i click check spellin above this box below goes allibcurl was built with ssl disabled, https: not supoo and goes on and on. so i assume this code is buggy as i am using the popular winxp with IE6.0.am i wasting my time trying to get something to work that never will?

  28. I think its a problem with this webserver. I have not touch the codings for ages but some others have seem be using it without problems.

  29. For some reason wp plugin for spell checker crashed Apache server many times over(and my host had to face the trouble of restarting it) and I had to disable it…I understand this might not be correct place to put this and I will be asking the plugin author too.

  30. Sorry, in my above comment, I had to delete
    >>I understand this might not be correct place to put this and I will be asking the plugin author too.
    I guess this is the correct place to ask…I had posted the comment somewhere else too(Confessions of a Scotman) which I copied and pasted !!

    Btw, reply to “this” comment is a cool feature…is there a plugin to do that ?

  31. Ok i have wordpress installed and have been using it for awhile. I tried to install your spell check and its not working for me . I downloaded from your site, unzipped it, and installed it as in in the plugins folder. I went to wordpress and activated it I get the 2 links: “activate spellcheck while typing”, and “check spelling” On the write a post page but niether one of them do anything. once I click on them I get in the bottom left of the ie7 in hte status bar a “error on page” message. I am using wordpress 2.0.5 and ie7 with win xp pro

Comments are closed.