mSpell - The Spell Checker add-on for miniBB.
Release date: Septempber 30, 2006.
Last update: June 6, 2007.
miniBB version: 2.0 RC5+
SQL server: [Not required]
Author: Sergei Larionov (minibb.net).


The Spell Checker add-on for miniBB enables spell checking capability
when posting and editing forum messages. The add-on is tested and works in the 
Internet Explorer 6.x, FireFox 1.x and Safari 1.x (and most likely later versions of these browsers).
It features a valid XHTML 1.0 Transitional code and can also be used for any external text forms.

The add-on requires Pspell/Aspell PHP library to be installed on your server (if you 
don't have it installed, check http://aspell.net/ (note: works without "www" in front only)
for installation packages and instructions). It can be used with any languages as long as
they're supported by Pspell/Aspell PHP library, any number of additional dictionaries can be
installed as explained in the Pspell/Aspell installation manual. Also in the Step 6 of this file
it's explained on how to add additional language support to the mSpell minBB Spell Checker add-on.
By default the mSpell add-on supports most common english dictionary.

If you need this add-on and have troubles configuring Pspell/Aspell library on your server
you can contact us through this form:
http://www.minibb.net/forums/index.php?action=tpl&tplName=contact_us_form
for additional paid support regarding Pspell/Aspell installation.


==SETUP==


1) Copy all files from the package to the respective forums folder on your server.
Basically you need to copy the whole "mspell_f" folder into your forums directory
(so in other words a new mspell_f folder should be created in the same folder, where
your forums are installed).


2) You need to edit one template file now - main_post_form.html in the
"templates" folder.

After the:

{$emailCheckBox}

or the:

</textarea>

or above <textarea...> tag add the code provided under main_post_form.code.txt.



3) Copy the default language pack mspell_eng.php to the miniBB "lang" directory on your server


4) Paste the code provided under bb_plugins.php.code.txt, to the bb_plugins.php file.


* Make sure to insert the code BEFORE(!) the Private Messages add-on code in the bb_plugins.php 
file, if you're using the Private Messages add-on.


5) A few words about configuring mSpell.. By default mSpell is configured for the Linux/Unix
environment ($sys='nix';) and if you're running some *nix OS and everything else is installed
properly, you most likely won't encounter any difficulties. But if you're running Windows, you
need to take an additional step and change config values on top of the mSpell.php file located
in the mspell_f folder. A typical Windows configuration will look like:

/* config */
$sys='win'; //OS: set 'win' for windows and 'nix' for Linux/Unix
$acceptLang=array('en'); // the array of accepted languages
$dict_path='C:/Program Files (x86)/aspell/dict/'; //Win 32 only! path to pspell/aspell dictionaries
$dictAr=array('en'=>'en-only.rws'); //Win 32 only! pspell/aspell dictionary filenames
$doNotCheck='/[0-9\W]/'; //regular expression: define all characters you don't want to check here
/* eof config */

where $sys='win' means you're running mSpell on Win32 platform and $dict_path is set to the folder
where you store dictionaries in your Win 32 sytem. Additionally, $dictAr array defines dictionary filenames.
For example for default english language it would be 'en-only.rws' .. You will see those dictionary files
after installing dictionaries for Aspell/Pspell in your dictionary folder. $dict_path and $dictAr options make
sense on Win 32 systems only, they won't affect anything on *nix systems. $doNotCheck variable may be useful
in case you're using mSpell for languages other than english and your server doesn't support the "setlocale()"
PHP function, which sets the range of the \W regexp pattern depending on characters present in the specified
language. You can manually define all characters you want to remove in this case.

6) As mentioned above the default language for the spellchecker is set to English.
If you want to add additional languages and have appropriate dictionaries installed on your server,
you need to edit the code from step 3 in the main_topics.html and the main_post_area.html templates
and add languages you're planning to use to the language drop down menu there:

<select class="selectTxt" name="spellLang"><option value="en">English</option></select>

If we were willing to add French language it would look like:

<select class="selectTxt" name="spellLang">
<option value="en">English</option>
<option value="fr">French</option>
</select>

We set option value to "fr", which is a common short name for French (like "en" is one for English)
these short names are also used by the PHP Aspell/Pspell libraries as dictionary names.

And one more thing.. Don't forget to edit the mSpell.php file also. On top of that file, where config
values are stored, for example:

/* config */
$sys='win'; //OS: set 'win' for windows and 'nix' for Linux/Unix
$acceptLang=array('en'); // the array of accepted languages
$dict_path='C:/Program Files (x86)/aspell/dict/'; //Win 32 only! path to pspell/aspell dictionaries
$dictAr=array('en'=>'en-only.rws'); //Win 32 only! pspell/aspell dictionary filenames
/* eof config */

you need to edit the $acceptLang array and add the french language to it, so it will look like:

$acceptLang=array('en','fr');

And in case you're using Windows like in the config example above you also to edit the $dictAr array and
add the filename for the french language dictionary into it, so in the result it will probably look like:

$dictAr=array('en'=>'en-only.rws','fr'=>'fr-60-only.rws');

Note that, in order for the mSpell to remove all non-alphabetical characters from your text properly in case of
non-English spell checking, your server needs to work the "setlocale()" function. In case it doesn't, you may
need to modify the $doNotCheck regular expression to meet your language character requirements.

7) And don't forget to set the $pathToFiles variable in the setup_options.php file to the full system path
leading to your forums folder, like for example: 

$pathToFiles='/var/www/html/anewsite/someniceforum/';


or else you can also set $pathToFiles variable anywhere on top of the mSpell.php file after the setup_options.php inclusion, like: 

include '../setup_options.php'; 
$pathToFiles='../'; 

if you don't know or don't want to set the full system path ($pathToFiles) to your miniBB forums in the setup_options.php folder for some reason.


==FINALLY==
We hope you'll enjoy the add-on. Please, feel free to post bugs and suggestions to our forums:
http://www.minibb.net/forums/11_4203_0.html