|
Embedding SpellChecker Support into WebBBS
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 WebBBS and you will begin reaping the benefits our SpellChecker offers!
To add SpellChecker support to your website, please follow
four steps:
- Register and receive a Customer ID
- Download the customized JavaScript
file
- Download the SPROXY.CGI script
file
- 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:
1. Locate the file named "webbbs_index.pl". It should reside in cgi-bin directory of your WebBBS installation. Create a copy of this file BEFORE making any changes!
Once the copy is in place, open the file for editing.
Find the lines:
sub SetupFrames {
print "<HTML><HEAD><TITLE>$boardname</TITLE>\n";
Insert the following line after this,
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>
2. Locate the file named "webbbs_basic.pl". It should reside in the same directory. Create a copy of this file BEFORE making any changes!
Once the copy is in place, open the file for editing.
Find the lines:
sub Header {
local ($header_title, $header_file,$refresh) = @_;
print "\n<HTML><HEAD>";
Insert the following line after this,
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>
3. Locate the file named "webbbs_form.pl". It should reside in the same directory. Create a copy of this file BEFORE making any changes!
Once the copy is in place, open the file for editing.
At the end of the file find the lines:
print "<INPUT TYPE=SUBMIT NAME=\"Post\" ";
Insert the following button code BEFORE the previous lines:
print "<INPUT TYPE=\"BUTTON\"
VALUE=\"Spell Check\" onclick=\"var
f= document.forms[0]; doSpell( 'LANGUAGE',
f.body, 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.
Top of page
|