inSpell
inSpell is a pop-up spell checker gadget that you can add to any web form. It supports dozens of language dictionaries.
Current Version
2008-09-05 19:13:54 NEWNote that you can check the version of a web gadget by loading it directly in your browser with the "version" keyword. For example, loading "inspell.php?version" will display the current version and tell you if there is a newer version available.
Installation
To install this web gadget, simply place a copy of inspell.php in your web space. You can change the name to anything you'd like, as long as it ends with ".php". Note that this is an encoded and encrypted PHP file. It will look like gibberish to you, but the web server will know what to do with it. If you make any changes to this file it will cease to function, so be careful to upload it to your site in BINARY mode.
Configuration
When this web gadget runs it will expect to find a configuration file to load settings from. The filename depends on the name that you gave to the web gadget itself. If you named it "inspell.php" then the configuration file must be named "inspell_config.php" (that's an underscore in the middle). If you named it "spellchecker.php" then the configuration file must be named "spellchecker_config.php", and so on.The configuration file is a PHP script that contains a list of values in the "CONFIG" array. It will look something like this (but normally with many more settings):
<?php $CONFIG['Title'] = "Spell Checker"; $CONFIG['Language'] = "English (US)"; ?> |
Please note that this is a PHP file, and as such it must start with the <?php tag and end with the ?> tag and each setting must be terminated with a semicolon. String values need to be enclosed in quotes, numeric values do not need quotes. Putting any other PHP code in this file may cause the web gadget to function incorrectly.
Configuration Settings
The Form Itself
After installing the web gadget and creating the configuration file, you need to create the web form that will invoke the web gadget. This is a normal web form and we assume that you know how to create one. The only thing you really need to do to the form itself is make sure it has a name so that the web gadget can reference it. For example, if you wanted to name it "george" your form tag would begin like this:
<form name="george" method="post" action=....Somewhere on the form page you'll need to add a link, image, or button that opens a new window and calls the web gadget. You need to pass it the name of the form as well as a list of input fields that should be spell checked. For example, if your form is named "george" and it contains an input field named "message", you might add a button like this:
<input type=button value="Spellcheck" onclick="window.open( 'inspell.php?form=george&fields=message', 'spellcheck', 'height=450,width=600,resizable' ); return false;">The button opens a new window that is 600 pixels wide and 450 pixels high that loads the inspell.php gadget and passes it the form name of "george" and the field list of "message". if you named the web gadget something other than "inspell.php", make sure you change that here as well.
To spell check multiple input fields in a single go, list them all separated with commas.
Example:
To view a working example, click here.To view the HTML form used in this example, click here.
To view the configuration file used in this example, click here.