CarTest Software Spell Checker Installation Instructions ========================================================= Product Description: -------------------- The Spell Checker is a utility plug-in that interfaces with any html script that uses a 'textarea' tag to enter text. The entered text is checked for spelling through an interactive window that guides the user word by word through the misspellings and the list of suggested corrections. To successfully install the spell checker you should have some knowledge of administrating a web site including knowledge of using an FTP (File Transfer Protocol) program or your user control panel to upload files to your web site. You will also need to initialize a MySQL database. Some knowledge of HTML is necessary to insert the few lines of required spellchecker html code into your own to interface with the spellchecker. No knowledge of php or MySQL coding is required. Features: --------- - Written in PHP on the server side and HTML/Javascript on the Client Side. - Spelling checked with a single server call then all text selection and correction done locally. - Dictionary contains over 265,000 words. - Use a MySQL database for fast dictionary lookup. - Utilities provided to add words to the dictionary at any time. - Spellcheck is resizeable to facilitate viewing of large text areas. - Uses a combination of metaphone, soundex, and near-miss strategy algorithms for excellent spelling correction suggestions. - ignores html, message board tags, and URL's. - Text field in correction window accepts entered text should suggestions list not contain the desired word. - Spellcheck window is color configurable. Requirements: ------------- You host server must support the PHP language. In addition, you must dedicate one MySQL database for the spell checker dictionary which will require about 18 MB of disk space when loaded with all the dictionary words. Check with your server host to make sure these requirements are met. The spell checker may not work for users with older Netscape browsers. Zip File Contents: ------------------ The delivered file, spellchecker.zip, contains the following files: 1. This text file, installationsinstructions.txt - the installation instructions you are reading. The php programs: 2. spellcheck.php - the main file invoked when using the spellchecker. 3. spellcheck_config.php - the configuration file you must edit (see Configuration below). 4. spellcheck_functions.php - used by spellcheck.php, don't do anything with this file. 5. spellcheck_install_words.php - the primary database installation program. 6. spellcheck_install_words_1.php - the first alternative database installation program (see Installation Step 7 below). 7. spellcheck_install_words_2.php - the second alternative database installation program (see Installation Step 7 below). 8. spellcheck_install_words_3.php - the third alternative database installation program (see Installation Step 7 below). 9. spellcheck_install_words_4.php - the fourth alternative database installation program (see Installation Step 7 below). 10. spellcheck_add_words.php - used to add words to the dictionary from file 'spellcheck_additional_words.dct' (see installation step 9 below). The html files: 11. spellcheck_window.html - used by spellcheck.php, don't do anything with this file. 12. spellcheck_test.html - a test file that you can use to test the operation of the spellchecker. 13. index.html - A message only file that prevents users from listing the directory. Delete this file to allow users to list your directory. The javascript file: 14. spellcheck_script.js - used by spellcheck.php, don't do anything with this file. The dictionary files: 15. spellcheck_words.dct - the large dictionary of over 265,000 words. 16. spellcheck_words_1.dct - the above dictionary 17. spellcheck_words_2.dct - file broken 18. spellcheck_words_3.dct - up into 19. spellcheck_words_4.dct - four parts (see installation step 7 below). 20. spellcheck_additional_words.dct - file containing words to be added to the dictionary at any time (see installation step 9 below). Installation Steps: ------------------- 1. Extract the spellcheck.zip file into it's /spellchecker/ directory. 2. Edit the spellcheck_config.php file (see below). 3. Insert these lines of html into your own html code to make the spellchecker accessible. If this is the form containing the Insert this anywhere it won't cause any trouble, like just below the tag.
Then insert this form containing the button that invokes the spell checker wherever you want the button to appear.
Here is an example of installing the spell checker in the html template entitled 'newreply' in example message board software. Inserted just after the tag is this: (the form is called 'vbform' and the text is named 'message'.
Then, after this code:
Insert the spell check button: This existing code then follows: Note that this is all encompassed within
and
tags.
Note the class, tabindex, and accesskey values used to make the button appear like the others on the message board page. 4. Upload the spellchecker files to your web host site. Make sure you upload these files in ascii (and NOT, repeat NOT, binary mode). 5. Set file and directory permissions. Use the Unix CHMOD command from your FTP program or control panel to set the following permissions (owner group world, r=read, w=write, x=execute): Directory with the spell checker software, /spellchecker/: rwx r-x r-x or 755 All other files: rw- r-- r-- or 644 6. Create the MySQL database. You do this from the control panel you use to administrate the web site. This is a three step process. a. The first step is to create a 'UserName'. This is just nomenclature for some named entity that will access a database. Assign a password to that 'UserName'. Then 'Add' that user. Note that the actual name of the user will include a computer assigned prefix to the name you entered. Typically this will be related to your account with the server host. b. Enter a name for the spell checker database then 'Add' the database. The actual name of the database will get a prefix added to it as well. d. Lastly, 'Add' that 'UserName' as a user of that database you just created. This is done with pull-down menus using the complete names of the 'user' and 'database'. The complete names are the ones entered into the spellcheck_config.php configuration file for the variables: $dbusername, $dbpassword, and $dbname (see Configuration below). 7. Fill the MySQL database with the dictionary by running the php program spellcheck_install_words.php. Use your browser to run it by entering it's URL in the browser's text field: http://www.yourdomainname/spellchecker/spellcheck_install_words.php If your server imposes a time limitation on the execution of php scripts then this installation step may time out before it concludes. The installation lists the words as they are added to the database. Please check the bottom of the window for the final message displayed. If this indicates a successful conclusion then you are done. If it displays a time out message then you must use the four step process as a substitute. In this case, simply execute these four installation programs IN THIS ORDER: http://www.yourdomainname/spellchecker/spellcheck_install_words1.php http://www.yourdomainname/spellchecker/spellcheck_install_words2.php http://www.yourdomainname/spellchecker/spellcheck_install_words3.php http://www.yourdomainname/spellchecker/spellcheck_install_words4.php 8. Use the spellchecker. 9. You may add words to the dictionary at any time. Certain custom or colloquial terms are not included in the dictionary. Here you may add words contained in the text file, spellcheck_additional_words.dct, that you edit. Then, upload that file to your web host site directory containing the spellchecker. Make sure you upload this file in ascii (and NOT binary mode). Then, execute the add words program using your browser. http://www.yourdomainname/spellchecker/spellcheck_add_words.php Configuration: -------------- You will need to edit the image_config.php file. This is actually an 'include' file used by the uploader and viewer. It consists of names of php variables followed by an equal sign followed by the values of those variables. The names of the variables are each preceded by a dollar sign ,'$'. Do NOT alter the dollar sign or those names. You will be editing the text on the right hand side of the equal signs for each variable value that you need to change. Shown below are the variables as supplied and used in the demo on the cartestsoftware web site. Some you must edit to use with your web site and host, others control image uploader options and you can set them or leave them as you want. The lines commencing with a '//' are comment lines in the php program. // host name or ip of MySQL server $servername="localhost"; If the MySQL server is the same as your host server (almost always) then "localhost" is correct. If not, then enter the IP address of the MySQL server. // username and password to log onto MySQL server $dbusername="spellcheckusername"; $dbpassword="spellcheckpassword"; Replace the above with the correct names for your MySQL user and password. (See installation step 6 above.) // name of MySQL database $dbname="spellcheck_name"; Replace the above with the name you assigned to the MySQL spellchecker database. (See installation step 6 above.) // spellcheck window title $spellcheckwindowtitle="CarTest Software Spellchecker"; Enter the name you want to appear in the spellchecker window title bar. // colors of top frame of spellcheck window $topframetextcolor="#000000"; $topframebackgroundcolor="#FAFAFA"; Normal html hex color codes. // colors of bottom frame of spellcheck window $bottomframetextcolor="#000000"; $bottomframebackgroundcolor="#EAEAEA"; Other Notes: ------------ Spellchecker response speed will depend on many factors, the speed and load on your host server, the length of the text to be checked, the number of misspelled words, and the number of possible suggestions found for each word.