Embedding SpellChecker Support into Web Crossing Bulletin Board
Revision 05-30-2000

 Download these instructions as PDF Document


The SpellChecker.net system provides powerful web based spell and grammar checking with easy set up and integration. Follow the steps to add the specified code into Ultimate Bulletin Board and you will begin reaping the benefits our SpellChecker offers!

To add SpellChecker support to your website, please follow four steps:

  1. Register and receive a Customer ID
  2. Download the customized JavaScript file
  3. Download the SPROXY.CGI script file
  4. Modify the Bulletin Board code


Register and receive a customerID

To register, please go to the
Sign Up page and fill out our short form. We will send you an e-mail containing your customerID. Please save this ID, as it will be required for the rest of the installation.
Top of page



Download the Customized JavaScript File

To download JavaScript file please login to "My Account" Section of the SpellChecker.net site using customerid and password sent to you in the registration email. Click on the "Download JavaScript file" link. In the page opened click "Download" button to download the spch.js JavaScript file (please select "save to Disk" if prompted). 
The JavaScript file contains information that is specific to each customer's web site, so it should not be used on or obtained from another site.

Top of page



Download the SPROXY.CGI Script File

The sproxy.cgi script file is used to return the data corrected by SpellChecker to the text-box on your web page.
Top of page


STEP 1
Download the file "sproxy.cgi". Please login to "My Account" Section of the SpellChecker.net site using customerid and password sent to you in the registration email. Please open "Download SPROXY.CGI script" page for currently supported versions of the file. Click on the "Download SPROXY script" link.
Top of page


STEP 2
Copy the file sproxy.cgi to the directory on your web site that has permissions for script execution (for example /cgi-bin or /scripts). If you downloaded Perl version of sproxy.cgi, open the file in edit mode and change its first line according to your perl interpreter location. This file is created to run on UNIX systems and the first line will be "#!/usr/bin/perl". Windows users should alter this line to reflect the perl location, for example "#!c:/perl/bin/perl.exe" (note the forward slashes).
Top of page



Can I use FTP to upload the sproxy.cgi file to my web site?
(If you have a perl script as the sproxy.cgi file then this information pertains to you.)
If you do choose this method, be sure the entire process is carried out and completed in ASCII Mode.
Top of page



What if my web site is hosted by Linux (Unix)?
No problem, just don't forget to set the files for the attributes of the sproxy.cgi to 755 (chmod 755 sproxy.cgi).

Top of page


Modify the Bulletin Board code

To embed SpellChecker support for the cgi file, please use the following steps:

Go to the /cgi-bin directory of your Web Crossing and find the file named "webx.tpl"

Please create a copy of webx.tpl file if it exists, before making any changes. If it does not exist than create it empty

1 - Make sure that webx.tpl contains all the following templates and if necessary copy missing templates from standard.tpl into webx.tpl:

discussion
addMessage
addDiscussion
editDiscussion
addFolder
editFolder
addLink
editLink
editMessage
replyToMessage

Additional Comment:
It is proposed that templates should be bordered by something like
<!------------------- ... <TEMPLATE_NAME> ... ---------------------------->
and a subsequent entry similar to it (or the end of file if this is the case)

2 - In the templates mentioned above find all entries of </HEAD> tag and insert the following line before it, replacing the your_url parameter with the actual url of the folder on your server where you uploaded the spch.js file

<script type="text/javascript" language="javascript" src=http://your_url/spch.js></script>

Additional Comment:
You may insert the above mentioned line between every pair of <HEAD> - </HEAD> tags (also known as simply HEAD tag) but we advice sticking to our recommendation and make inserting directly before </HEAD> in order to avoid possible misunderstandings.

3

- Every template that is being changed or updated has a <textarea> tag, which contains a name attribute (something like name="header" or name=description or name=folderemailstripsig where the left side is the value). Keep in mind the values of these attributes for the appropriate template. Then, before the following line

%% if imgButton %%

insert the next one:

<INPUT TYPE="BUTTON" VALUE="Spell Check" onclick="var f = document.forms[0]; doSpell ('LANGUAGE', f.TEXTAREA_NAME_ATTRIBUTE_VALUE, document.location.protocol + '//' + document.location.host + '/CGIBIN/sproxy.cgi', true);">

Replace the following parameters within the code.

LANGUAGE defines the language which will be used by SpellCheck engine. Change this parameter to one of the following values:
"en" - American English

"uk" - British English
"fr" - French
"ge" - German
"it" - Italian
"sp" - Spanish
"dk" - Danish
"br" - Brazilian Portuguese
"nl" -- Dutch
"no" -- Norwegian
"pt" - Portuguese
"se" - Swedish


CGIBIN is the name of your virtual directory that will contain the file sproxy.cgi. Replace this string with your virtual directory name.

TEXTAREA_NAME_ATTRIBUTE_VALUE substring should be substituted with 'the value kept in mind'. For example: if <textarea> tag has the name attribute equal to 'description' than the substituting string looks as follows:

<INPUT TYPE="BUTTON" VALUE="Spell Check" onclick="var f = document.forms[0]; doSpell( 'en', f.description, document.location.protocol + '//' + document.location.host + '/cgi-bin/sproxy.cgi', true);">

Additional Comment:
You can define the final location of a substituting string yourself. This description allows you to place SpellCheck button before other functional buttons in this same row. Also you may change the appearance of this button by yourself but remember that 'OnClick' action has to be left as is otherwise its functional purpose will be lost.

For example: <a href="javascript: var f=document.forms[0]; doSpell( 'en', f.header, document.location.protocol + '//' + document.location.host + '/sproxy.cgi', true);">SPELLCHECK</a>

4 - Use your administrative authority in order to run 'Reset file cache for HTML files and webx.tpl templates' process ( Control panel > Site Management > Reset file cache for HTML files and webx.tpl templates )



Top of page

SpellChecker.net, PO Box 641697, Los Angeles, CA 90064 USA, Tel +1(310) 287-2001 x801, Fax +1(310) 287-2347
© 1999-2007 SpellChecker.net, Inc. All Rights Reserved.