Spelling Checker plugin for WordPress

IMPORTANT NOTE FOR WORDPRESS 2.0 USERS

This plugin doesn’t play well in WordPress 2.0. I’m well aware of this. Some day I may update it but it is nowhere near the top of my priority list. Support questions for 2.0 installations will not make it out of moderation.

UPDATED: 06/23/05, 10:00AM EST

What is it?

The Spelling Checker plug-in for WordPress provides a built-in facility for spelling checks on posts from within the administration pages as well as spelling checks on comments via simple calls added to your templates. It requires no changes to the WordPress code-base to use, you merely drop it in to the plug-ins folder and enable it in the interface. This version has been tested on WordPress 1.5.1.2.

Requirements

This plugin requires WordPress version 1.5 or later running on a Unix host with an appropriate aspell Unix executable available.

How do I install it?

Please note, these instructions have changed slightly! If you’re upgrading, make sure to read carefully.

  1. The easiest way to install the plugin is to use the One-Click Install option of the WordPress Plugin Manager
  2. Otherwise, download the zip file and follow the “README\_INSTALL.txt” direction, or the tarball, copy it to your “wp-content/” folder in your WordPress installation, then execute “tar xvzf spell-plugin.tar.gz”. Note that you should chmod the PHP files to 755.
  3. The plugin must be enabled from the plugins page, then you must visit the Spell Checker options page at least once before the plugin will be finally enabled. Follow the appropriate link in the Spell Checker entry of the Plugins page.

How do I use it?

On the “Write Post” page there should be a new button called “Check Spelling”. Click it. You will get a new window that performs the spelling checking. Note that you must have Javascript enabled for this to work. You must also have the “aspell” executable on your hosting machine for this to work as that is the spelling service provider used.

If I like it…

Please note, if you find this or any of my plugins useful and feel the need to express your appreciation, I accept donations with a difference. Click the banner below to learn more.

How do I enable people to spell check their comments?

Adding the ability for your readers to check the spelling of their comment text has never been easier, though it may reduce your enjoyment of their inadvertently incorrect spellings. Simply modify your comments template to call the following function somewhere within it (this inserts the necessary Javascript for opening the spelling checker window):

[code lang="php"][/code]

For default WordPress installations, you need no parameters. If for whatever reason your textarea is a different id than the default “comment” id, you can specify that id as a parameter to this call, for example:

[code lang="php"][/code]

Now, the only thing left to do is insert the following code where you want the “Check Spelling” button to appear:

[code lang="php"][/code]

For more flexibility you can specify the following parameters to this function:

[code lang="php"][/code]

For more flexibility you can add words to the dictionary so that they are not marked as misspelled. By default only people who are registered users of your blog and are logged in and have a user level greater than 8 can add words to the dictionary. This is a security feature so that people can’t add nonsense to your dictionary. People who do not meet these requirements will simply not have an “Add” button on the form. You can modify this behavior with the from the Spell Checker options administration page.

Special thanks

This code is merely a mild reworking of the Speller Pages project on Source Forge to work within the confines of the WordPress plug-in framework. All credit for the actual spelling checker goes to them. The method of getting the functionality into the interface without code changes was inspired by the RunPHP plugin. Options administration inspired by Spam Karma.

FAQ

Q. I get an error when try to check the spelling and it says something like “The required field ‘name’ is missing.” What do I do? A. That indicates that the language setting you have selected — it defaults to en_US — is not appropriate for your aspell installation. Just going by eyeballing statistics, my first suggestion would be to try setting the language to “english” (don’t copy the quotes, just the word) and if that still causes problems, cut it back to “en”. If neither work ask you hosting provider for the appropriate setting for their aspell installation.

Q. I get blank windows in the spelling checker box. Why? A. It’s likely you either don’t have the ‘aspell’ executable or the path to it is not correctly configured. To find out, get a shell to your host and perform a “which aspell”. If it tells you there is no such thing install it if possible. If it provides a path (something like ‘/usr/local/bin/aspell’) then open the Spell Checker options administration page and make sure the path matches. When you first install the plugin, this is precisely how the plugin determines the location of the aspell executable.

Q. I get errors in Internet Explorer that say something like “Error: Object expected” on Line 44. A. This is another case of an aspell path problem. See the previous question for details.

Q. I don’t get a button. Instead it says something about “safe_mode”. A. Servers that run PHP in safe_mode sometimes do not allow execution of executables in certain ways. Unfortunately, this plugin requires the execution of the aspell executable to do its work. Until the author figures out a way around it, there is no support for hosts that run PHP in safe_mode. Sorry. The current version checks for safe_mode and refuses to even try to run, just to save some support questions.

Q. I don’t see an “Add” button on my checker! A. By default you must be logged in to your WordPress installation and the user you log in as must have a user level of 8 before you see an “Add” button. You can modify this behavior with the from the Spell Checker options administration page.

Q. My “Add” button grays out and changes to “Adding…” when I add a word and then never comes back. Q. I get a failure when adding a word to the dictionary. A. Something is probably not configured correctly for your particular “aspell” installation. I gave a best first approximation of the command to add words to dictionaries, but aspell has many versions and may have a different set of parameters for you. First, check in the “wp-content/spell-plugin/” directory for a file called “add_failed.out”. It should have some data for you. Try to determine what happened and perhaps experiment with your aspell installation and determine the correct parameters.

Q. It doesn’t work! I get the “Spell check in progress…” indication in the popup window, but then just a blank page. A. This is a permissions problem with the personal dictionary. Open the Spell Checker options administration page and change the location of the personal dictionary to be a place where the Apache web server can write. Note that to specify, for instance, your home directory, you must provide the full path to that directory, as the web server generally runs under a different user id.

Q. I get failures (of various kinds) when trying to add a word to the dictionary and I’m running WordPress 1.2.1. A. If you leave the options at the default — especially the security option that users must be logged in to the blog in order to add words — you will likely fail to add words in WordPress 1.2.1. This is a problem with a relative path in the wp-admin/auth.php file that the plugin uses to log you in. To fix, I highly recommend you upgrade to 1.2.2 as soon as possible.

If all else fails and you never wind up with an aspell personal dictionary (by default created at “wp-content/plugins/spell/aspell.personal”) or you determine that your version of aspell doesn’t support creation or merging of personal dictionaries — yes, this does happen — there’s one last thing to try. Open the Spell Checker options administration page and enable the “Enable manual personal dictionary handling for broken aspell installations” option. This will turn on some functionality that will circumvent the aspell personal dictionary creation and merging functions and handle that inside the plugin.

I have a problem!

Sorry. Please post any bug reports here. There are currently ##comments WHERE comment_post_ID = 544″; echo $wpdb->get_var($sql);?>## comments about this plugin.

Version History

Version 1.18 06/23/05

Beta 1.17 03/14/05

Beta 1.16 02/21/05

Beta 1.15 02/15/05

Beta 1.14 02/14/05

Beta 1.13 02/06/05

Beta 1.12 02/05/05

Beta 1.11 1/24/05

Beta 1.1 1/20/05

Alpha 0.9 12/16/04

Alpha 0.8 12/15/04

Alpha 0.7 12/15/04

Alpha 0.6 12/13/04

Alpha 0.5 12/11/04

Alpha 0.4 12/10/04

Alpha 0.3 12/10/04

Alpha 0.2 12/09/04

Alpha 0.1 12/08/04

17 Responses to “Spelling Checker plugin for WordPress”

  1. 1

    hsuyo BLOG » Blog Archive » [WP] 近期實用外掛整理 (20041210) - February 23rd, 2005

    [...] (WP Themes.info) 閱讀文章時,於 sidebar 顯示前幾篇文章標題的外掛。 Spelling Checker (coldforged.org) 英文拼字檢查器。 [...]

  2. 2

    unspoken creations » Blog Archive » More site improvements… - March 1st, 2005

    [...] 7;t ask. Any who I also added a spell checking feature to the comments using a plugin from coldforged. I had to install the aspell binaries in my home [...]

  3. 3

    kepo-ing Zz85 » Blog Archive » PHP Permissions - May 10th, 2005

    [...] ath/dir/ -R”, as suggested by Teddy Blue. To test I could really install plugins, I tried spell-check first, an important feature for me I think. Prob [...]

  4. 4

    kepo-ing Zz85 » Blog Archive » PHP Permissions - May 11th, 2005

    [...] ath/dir/ -R”, as suggested by Teddy Blue. To test I could really install plugins, I tried spell-check first, an important feature for me I think. Prob [...]

  5. 5

    coldforged.org » Blog Archive » Paged comment display - May 13th, 2005

    [...] 7;ve gone ahead and implemented paging for my comment displays here on cf.org since I have several posts where there are a couple hundred comm [...]

  6. 6

    Make You Go Hmm: » [site news] added spellchecker (for comments) and stats page - May 22nd, 2005

    [...] There are tons of spell checkers out there these days. Yesterday I decided to add the Spelling Checker Plug-in to the comments area here at MakeYo [...]

  7. 7

    davidbisset.com » WordPress Plugin: Spell Checker - May 23rd, 2005

    [...]

            davidbisset.com     
    

    WordPress Plugin: Spell Checker With this plugin a new button appears alongside the rest to pop- [...]

  8. 8

    thought cruft » Blog Archive » Add Spell Checking To Wordpress - May 28th, 2005

    [...] “apt-get install aspell” command away from being available and set up. Get it here. This entry was posted on Saturday, [...]

  9. 9

    nmyworld » Miniblog Plugin for WordPress 1.5 - June 7th, 2005

    [...] ors and sloppy things in the code and documentation. Added support for Coldforged’s Spelling Checker. (March 28, 2005) 0.2.9 RSS feed pages can now show a c [...]

  10. 11

    SynapticSatellite » Blog Archive » The Consumable Blog: Keeping it Clean - June 9th, 2005

    [...] up your posts in a text editor that will check your spelling for you. On WordPress, I use Spelling Checker. The Emoticon Emoticons have become much more useful in commun [...]

  11. 12

    thehtmlartist.com » Blog Archive » Site Update Part II - June 20th, 2005

    [...] 17;t get to sleep so I decided to mess around with the site a bit more. I found this neat spell checker plugin for WordPress. It was easy to install and seems to work pr [...]

  12. 13

    thehtmlartist.com » Blog Archive » Spell Checker for WordPress - June 20th, 2005

    [...] mess around with the site a bit more. While still laying in bed it occurred to me that a spell checking plugin for WordPress probably existed somewhere out there. After [...]

  13. 14

    coldforged.org » Blog Archive » Spelling Checker plugin for WordPress - June 23rd, 2005

    [...] king, so I figured I’d create one myself. The fruits of those labors are now here! The Spelling Checker plugin for WordPress With this plugin a new button appears [...]

  14. 15

    ::creepi.gurl.(dot).com:: » Blog Archive » …and back again. - February 14th, 2006

    [...] While not having Live+Press is proving to be a major inconvenience for me, at least I’ve managed to disable the WYSIWYG editor and the Spelling Checker plugin now functions. I did accidentally copy over my hacked version of quicktags, so I’ll need to recreate my changes fixed. Seamagic still works with 2.0, but to be honest I rarely use it to update my WordPress install. [...]

  15. 16

    blog.andybellonline.com » Blog Archive » House keeping - February 15th, 2006

    [...] Since I’m such a terrible speller I also make a great deal of use of this Spelling Checker. Counterize is excellent plugin which saves IP, timestamp, visited URL, referring URL and browser information in a database, and can display total hits, unique hits and other statistics in WordPress webpages. Finally in this day of spam I’ve added a nice contact form so that users can contact me without having to publish my e-mail address. « 3 little words [...]

  16. 17

    zero-blog » New Plugins - March 2nd, 2006

    [...] Second, I just installed a spell checking plugin for the Write admin page. I chose not to make this available for comment posts because it accesses system resources and I want to limit who can access this feature. So far, it appears to be working fine. It did however point out a glaring problem: you can install aspell without installing a dictionary. To do so in gentoo, for English speaking users, emerge the aspell-en package. [...]

Leave a Reply

Comments links could be nofollow free.