[REQUEST] Spell Check Feature

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
User avatar
Bob in Iowa
Registered User
Posts: 70
Joined: Tue Jan 17, 2006 6:40 pm
Location: Iowa
Contact:

Re: [REQUEST] Spell Check Feature

Post by Bob in Iowa »

MattJG77 wrote:i use phpspell on my phpBB2 forum. its been fantastic.

can some one convert this for phpBB3 please?
I too have used that mod on my phpBB2 board. I have figured out how to make it work on my phpBB3 test board. If you are interested, here is a link to a description that I posted on that board. Spell Check adaptation
User avatar
Andrew Clarkson
Registered User
Posts: 244
Joined: Wed Dec 10, 2003 6:05 pm
Location: Morecambe, England, UK
Contact:

Re: [REQUEST] Spell Check Feature

Post by Andrew Clarkson »

Bob in Iowa wrote:
MattJG77 wrote:i use phpspell on my phpBB2 forum. its been fantastic.

can some one convert this for phpBB3 please?
I too have used that mod on my phpBB2 board. I have figured out how to make it work on my phpBB3 test board. If you are interested, here is a link to a description that I posted on that board. Spell Check adaptation
Page not found.
Andrew Clarkson

Titanic Titanic
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Muad''Dib »

Yep, page not found.. it would be nice to see the modifications to make it work.

EDIT:

Nevermind, check the next post!
Last edited by Muad''Dib on Mon Mar 03, 2008 4:35 pm, edited 2 times in total.
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Muad''Dib »

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:

Code: Select all

</head>
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.
Last edited by Muad''Dib on Mon Jul 27, 2009 3:40 pm, edited 1 time in total.
rEd86
Registered User
Posts: 22
Joined: Mon Jan 07, 2008 2:35 am
Contact:

Re: [REQUEST] Spell Check Feature

Post by rEd86 »

Nathan released phpSpell v1.0.6r which supports phpBB 3.0 right out of the box! I have integrated it into our 3.0 board without any problems. Check out his site for the latest version:

http://www.master-technology.com/demos/ ... wnload.php

Good luck!

--Ed
Webmaster for http://www.cincyreef.com & phpBB fan
advchristian
Registered User
Posts: 8
Joined: Thu Feb 07, 2008 2:35 pm

Re: [REQUEST] Spell Check Feature

Post by advchristian »

I downloaded the program and it works great right out of the box once the included edits are done on Prosilvers templates. :D
Above Muad''Dib included in the post a set of edits for the subsilver2 based templates and these also work well, it places the spell check button at the top along with the BB Code buttons. If anyone would rather the spell check be located along side the preview and submit buttons below the post here is the edits I have placed on both my subsilver2 and VistaFull themes:

Open /styles/prosilver/template/overall_header.html. Find:

Code: Select all

</head>
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_body.html. Find:

Code: Select all

&nbsp; <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="{L_CANCEL}" />
Replace with:

Code: Select all

&nbsp; <input type="button" class="button2" value="Spell Check" name="button" onclick="openspell();" title="Run Spell Checker" />
Save and Close posting_buttons.html.

I hope this will help
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [REQUEST] Spell Check Feature

Post by KellyBean »

I was wondering if someone could help me with the phpSpell... I downloaded and installed it "right out of the box" per the instructions for phpBB3 that were included. Checked and re-checked that I had uploaded all the common files and the two files from the phpBB3 folder... checked and re-checked my edits to posting_editor.html, and well, I can't get it to work.

First off, when I run spell_admin.php, I get the following sql error:

Code: Select all

Installing ENGLISH.DIC (English)...
Processed: 476... (0%)

Fatal error: SQL ERROR [ mysql4 ]

Data too long for column 'sound' at row 1 [1406]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists. in /var/www/html/mo/mommy-zone.com/phpBB3/includes/db/dbal.php on line 593
Okay, so I kind of ignored that, :oops: and went on to install the rest, per the instructions and the button shows up in between "Preview" and "Submit" on the posting page, but when it's clicked, nothing happens.

Thoughts? Thanks in advance!!
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Muad''Dib »

KellyBean wrote:I was wondering if someone could help me with the phpSpell... I downloaded and installed it "right out of the box" per the instructions for phpBB3 that were included. Checked and re-checked that I had uploaded all the common files and the two files from the phpBB3 folder... checked and re-checked my edits to posting_editor.html, and well, I can't get it to work.

First off, when I run spell_admin.php, I get the following sql error:

Code: Select all

Installing ENGLISH.DIC (English)...
Processed: 476... (0%)

Fatal error: SQL ERROR [ mysql4 ]

Data too long for column 'sound' at row 1 [1406]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists. in /var/www/html/mo/mommy-zone.com/phpBB3/includes/db/dbal.php on line 593
Okay, so I kind of ignored that, :oops: and went on to install the rest, per the instructions and the button shows up in between "Preview" and "Submit" on the posting page, but when it's clicked, nothing happens.

Thoughts? Thanks in advance!!
Did you add the line to overall_header?
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [REQUEST] Spell Check Feature

Post by KellyBean »

The phpBB3 install instructions included in the download only have us making changes to posting_editor.html:

Code: Select all

#-----[ OPEN ]------------------------------------------
#
 /styes/<name>/template/posting_editor.tpl
#
#-----[ FIND ]------------------------------------------
#
<fieldset class="fields1">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<script language='javascript' src='spelling/spellmessage.js'></script>
#
#-----[ FIND ]------------------------------------------
#
<input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1"<!-- IF not S_PRIVMSGS --> onclick="document.getElementById('postform').action += '#preview';"<!-- ENDIF --> />&nbsp;
#
#-----[ AFTER, ADD ]------------------------------------------
#
  <input type="button" accesskey="c" value="Spell Check" class="button1" onclick="openspell();">&nbsp;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
I haven't tried using your version of the install using the native_mysql folder included in the download... is that what you'd recommend?
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Muad''Dib »

KellyBean wrote:The phpBB3 install instructions included in the download only have us making changes to posting_editor.html:

Code: Select all

#-----[ OPEN ]------------------------------------------
#
 /styes/<name>/template/posting_editor.tpl
#
#-----[ FIND ]------------------------------------------
#
<fieldset class="fields1">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<script language='javascript' src='spelling/spellmessage.js'></script>
#
#-----[ FIND ]------------------------------------------
#
<input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1"<!-- IF not S_PRIVMSGS --> onclick="document.getElementById('postform').action += '#preview';"<!-- ENDIF --> />&nbsp;
#
#-----[ AFTER, ADD ]------------------------------------------
#
  <input type="button" accesskey="c" value="Spell Check" class="button1" onclick="openspell();">&nbsp;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
I haven't tried using your version of the install using the native_mysql folder included in the download... is that what you'd recommend?
Not necessarily... its just the only way i have tested and confirmed to work.
ttuu
Registered User
Posts: 224
Joined: Wed Feb 13, 2008 6:28 pm

Re: [REQUEST] Spell Check Feature

Post by ttuu »

advchristian wrote: 11.) Open /styles/prosilver/template/posting_body.html. Find:

Code: Select all

&nbsp; <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="{L_CANCEL}" />
Replace with:

Code: Select all

&nbsp; <input type="button" class="button2" value="Spell Check" name="button" onclick="openspell();" title="Run Spell Checker" />
Save and Close posting_buttons.html.
1. on my "posting_body.html" i can see only this:

Code: Select all

<!-- IF S_PRIVMSGS -->
	<!-- INCLUDE posting_pm_layout.html -->
<!-- ELSE -->
	<!-- INCLUDE posting_layout.html -->
<!-- ENDIF -->
i can't find this:

Code: Select all

&nbsp; <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="{L_CANCEL}" />
2. you have a mistake. one time you to write "Open /styles/prosilver/template/posting_body.html" and one time you to write "Save and Close posting_buttons.html".

what going on?
bikespot
Registered User
Posts: 54
Joined: Sat Feb 10, 2007 1:58 am

Re: [REQUEST] Spell Check Feature

Post by bikespot »

Using the ACP, click on the styles tab, click on templates, for your favorite style click edit.

Scroll down and select overall header...

FIND
<script type="text/javascript">

BEFORE ADD
<script type="text/javascript" src="http://www.jacuba.com/service/checker/-/-/" defer="defer"></script>

For prosilver
FIND
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">

REPLACE WITH
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}" onload="if (window.Jacuba) Jacuba.applyTo('element: TEXTAREA')">

For subsilver2
FIND
<body class="{S_CONTENT_DIRECTION}">

REPLACE WITH
<body class="{S_CONTENT_DIRECTION}" onload="if (window.Jacuba) Jacuba.applyTo('element: TEXTAREA')">

Works for prosilver , now my problem is i need to get it to work for provista. I did the same thing , i found

For prosilver
FIND
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">

And replaced it , but the spell check is not popping up. What am i missing?
malinko
Registered User
Posts: 1
Joined: Mon Jun 19, 2006 7:21 am

Re: [REQUEST] Spell Check Feature

Post by malinko »

KellyBean,

I have the same error you were getting. Not sure if you resolved it yet but I tried the native_mysql method it seems to work nicely.
pavilion1250
Registered User
Posts: 13
Joined: Thu Mar 20, 2008 6:16 pm

Re: [REQUEST] Spell Check Feature--No spell check button???

Post by pavilion1250 »

I did everything right and double checked it still no spell check button. Any suggestions? I'm using phpBB3.0 Prosilver.
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Muad''Dib »

Which method did you use to install? Did you flush the forum cache when you were done making edits?
Locked

Return to “[3.0.x] MOD Requests”