With the help of Bob in Iowa, and Nathan Anderson, i was able to get phpspell to work with phpbb3:
I hope this helps you guys.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
How to make phpspell work with phpbb3 gold.
This describes how to make phpspell 1.0.6r using MySQL work with the prosilver theme of phpbb3 with English as the checked language.
Im sure you can use any language available, i just have not tested it that way.
Download phpspell and the english (or whatever language you need to use) word list from here: (Special thanks to Nathan Anderson for his fine work)
http://www.master-technology.com/demos/ ... wnload.php
Extract the contents of these files to whatever directory you want to, and then follow these steps:
1.) Copy the contents of the "native_mysql" folder into the "common" folder.
2.) Delete all the files and folders in the phpspell download except for the "common" folder.
3.) Rename the "common" folder to "spelling".
4.) Copy ENGLISH.DIC (or the .DIC from the word list that you downloaded above) to the "spelling" folder
5.) Make a new MySQL database via cpanel for the dictionary. Call this new database whatever you want to, and add a new or existing user to it. This step should be fairly straight forward since you have done this already to install phpbb3. You may be able to use the existing database for phpbb3, but i did not try it that way.
6.) Open spell_config.php and set $Spell_Config["DB_Type"] = "MySQL"; (line 33) by removing the proceding foward slashes. You will also want to add two forward slashes (//) to $Spell_Config['DB_Type'] = 'PHPBB'; (line 31). That line should now look like the proceding lines except for line 33 that we made active in the first part of this step.
7.) Again in spell_config.php (that is probably still open), change $Spell_Config["DB_Username"] = ""; $Spell_Config["DB_Password"] = ""; and $Spell_Config["DB_Database"] = ""; (lines 47-49) to be whatever you specified as a user name, password, and database in step 5. Save and close spell_config.php.
8.) Open spellmessage.js, and find:
Code: Select all
function openspell()
{
height = 391;
width = 555;
if (ie4) LinkToField = self.post.message;
if (gecko) {
LinkToField = parent.document.post.message;
height = height + 6;
}
if (op6) {
LinkToField = document.forms[0].message;
height = height + 10;
width = width + 10;
}
if (op7) LinkToField = document.forms[0].message;
Replace it with:
Code: Select all
function openspell()
{
height = 391;
width = 555;
if (ie4) LinkToField = self.document.getElementById("postform").message;
if (gecko) {
LinkToField = parent.document.getElementById("postform").message;
height = height + 6;
}
if (op6) {
LinkToField = document.getElementById("postform").message;
height = height + 10;
width = width + 10;
}
if (op7) LinkToField = document.getElementById("postform").message;
Save and close spellmessage.js.
9.) Upload the whole "spelling" directory to the root directory of your phpbb3 forum.
9.5) Note from Bob in Iowa the original finder of this method:
This can also be adapted to subsilver2 in a very similar manner. Note that the class definition of buttons in posting_buttons.html is different than prosilver, so you will need to use the same class definition in the input tag for the spellcheck button in order to make it match.
According to him the changes below can be made to subsilver2 with a little modification. I dont use subsilver2, so i have not tested this, nor do i know if it even works correctly. Common since tells me it should...
10.) Open /styles/prosilver/template/overall_header.html. Find:
and add before:
Code: Select all
<script type="text/javascript" src="spelling/spellmessage.js"></script>
Save and close overall_header.html.
11.) Open /styles/prosilver/template/posting_buttons.html. Find:
Code: Select all
<div id="format-buttons">
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
Replace with:
Code: Select all
<div id="format-buttons">
<input type="button" class="button2" value="Spell Check" name="button" onclick="openspell();" title="Run Spell Checker" />
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
Save and Close posting_buttons.html.
12.) Go to yourwebsite.com/<forum directory>/spelling/spell_admin.php. Use the web page to install the ENGLISH dictionary / word list (or whatever language your using).
13.) Delete any file ending with .DIC on the server (to free up disk space)
14.) Delete the spell_admin.php file off the server. (keep it somewhere where you can upload it again fast if you want to add words to the dictionary at a later time)
15.) Purge your template cache, and enjoy your new spell check mod! Testing and working with the latest versions of IE7, Safari, Firefox, and Opera.