[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
hshiggins
Registered User
Posts: 18
Joined: Wed Mar 18, 2009 10:57 pm

Re: [REQUEST] Spell Check Feature

Post by hshiggins » Mon Sep 21, 2009 8:18 pm

For those that care, to get this working I had to make the following changes:

Code: Select all

  // -----------------------------------------------
  // This function is used by the Admin Module
  // Create the Table
  // -----------------------------------------------
  function DB_Create_Table()
  {
    global $dbms, $db, $DB_TableName;
Replace with:

Code: Select all

  // -----------------------------------------------
  // This function is used by the Admin Module
  // Create the Table
  // -----------------------------------------------
  function DB_Create_Table()
  {
    global $dbms, $db, $DB_TableName, $Word_To_Add, $Word_Sound, $Query;

Code: Select all

case 'mssql':
        $Query[0] = 'CREATE TABLE ['.$DB_TableName.'] ([id] [int] primary key identity (1,1) NOT NULL , [word] [varchar] (30) NOT NULL, [sound] [varchar] (10) NOT NULL) ON [PRIMARY]';
//        $Query[0] = 'CREATE TABLE ['.$DB_TableName.'] ([id] [int] NOT NULL , [word] [varchar] (30) NOT NULL, [sound] [varchar] (10) NOT NULL) ON [PRIMARY]';
        $Query[1] = 'CREATE INDEX [IX_'.$DB_TableName.'_WORD] on ['.$DB_TableName.'](word) ON [PRIMARY]';
        $Query[2] = 'CREATE INDEX [IX_'.$DB_TableName.'_SOUND] on ['.$DB_TableName.'](sound) ON [PRIMARY]';
        break;
      default:
       message_die(CRITICAL_ERROR,'No valid SQL to create your database type.');
Replace with:

Code: Select all

case 'mssql':
        $Query[0] = 'CREATE TABLE ['.$DB_TableName.'] ([id] [int] primary key identity (1,1) NOT NULL , [word] [varchar] (40) NOT NULL, [sound] [varchar] (40) NOT NULL) ON [PRIMARY]';
//        $Query[0] = 'CREATE TABLE ['.$DB_TableName.'] ([id] [int] NOT NULL , [word] [varchar] (40) NOT NULL, [sound] [varchar] (40) NOT NULL) ON [PRIMARY]';
        $Query[1] = 'CREATE INDEX [IX_'.$DB_TableName.'_WORD] on ['.$DB_TableName.'](word) ON [PRIMARY]';
        $Query[2] = 'CREATE INDEX [IX_'.$DB_TableName.'_SOUND] on ['.$DB_TableName.'](sound) ON [PRIMARY]';
        break;
      default:
//        message_die(CRITICAL_ERROR,'No valid SQL to create your database type.');
It may also be necessary to inject the SQL code using this if the above fails to create the database:

Code: Select all

CREATE TABLE [phpbb_spelling_words] ([id] [int] primary key identity (1,1) NOT NULL , [word] [varchar] (40) NOT NULL, [sound] [varchar] (40) NOT NULL) ON [PRIMARY]
CREATE INDEX [IX_phpbb_spelling_words_WORD] on [phpbb_spelling_words](word) ON [PRIMARY]
CREATE INDEX [IX_phpbb_spelling_words__SOUND] on [phpbb_spelling_words](sound) ON [PRIMARY]

MordyT
Registered User
Posts: 5
Joined: Thu Sep 10, 2009 12:15 am

Re: [REQUEST] Spell Check Feature

Post by MordyT » Thu Oct 01, 2009 2:48 am

Awesome. I used the excellant instructions on page 2 and the instructions for subsilver and it works perfectly!

Peter77sx
Registered User
Posts: 3257
Joined: Wed Nov 09, 2005 2:51 pm

Re: [REQUEST] Spell Check Feature

Post by Peter77sx » Sat Oct 03, 2009 4:07 pm

You'd think he'd pretty it up and make it look interesting after all these years. but oh well. at least he worked it to run with phpbb3.

SloChild
Registered User
Posts: 3
Joined: Sun Oct 11, 2009 7:40 am

Re: [REQUEST] Spell Check Feature

Post by SloChild » Sun Oct 11, 2009 7:43 am

Hi Guys

Working with Phppb3/IE7/Firefox :

I have re-wrote sections of the javascript to make this work with firefox. I can also supply you with a complete package so then all you have to do is change 2 lines and some basic configuration settings to get it working.


Cheers.
I would surely appreciate knowing how to make this work with firefox. Please let us know.

mrebiteme
Registered User
Posts: 1
Joined: Tue Nov 10, 2009 1:58 am

Re: [REQUEST] Spell Check Feature

Post by mrebiteme » Tue Nov 10, 2009 2:02 am

SloChild could you post up the changes you made to get Firefox working>>>

mrsjprice
Registered User
Posts: 279
Joined: Wed Sep 23, 2009 8:46 pm

Re: [REQUEST] Spell Check Feature

Post by mrsjprice » Sat Nov 14, 2009 3:08 pm

SloChild wrote:
Hi Guys

Working with Phppb3/IE7/Firefox :

I have re-wrote sections of the javascript to make this work with firefox. I can also supply you with a complete package so then all you have to do is change 2 lines and some basic configuration settings to get it working.


Cheers.
I would surely appreciate knowing how to make this work with firefox. Please let us know.
I would aswell please!

mikey12561
Registered User
Posts: 46
Joined: Fri Sep 04, 2009 9:00 pm

Re: [REQUEST] Spell Check Feature

Post by mikey12561 » Wed Dec 16, 2009 5:52 am

I need to know if this has support for IE8. I have a user with IE7 and works fine but with IE8 which I have nothing pops up and the page will say done loading but with errors. I disabled my popup blocker as well.

David_uk
Registered User
Posts: 2
Joined: Tue Jan 26, 2010 11:02 pm

Re: [REQUEST] Spell Check Feature

Post by David_uk » Tue Jan 26, 2010 11:11 pm

Hi

I have got this mod working with IE8 by doing the following:-

in your styles templates folder, edit posting_body.html, and change

Code: Select all

<form action="{S_POST_ACTION}" method="post" name="postform" {S_FORM_ENCTYPE}>
to

Code: Select all

<form action="{S_POST_ACTION}" method="post" name="postform" id="postform"{S_FORM_ENCTYPE}>
for the spellmessage.js file, I used the phpbb3 version, the modded contents are below:-

Code: Select all

// --------------------------------------------------------------------
// phpSpell Javascript (For the PHPBB Message Document)
//
// This is (c)Copyright 2003, Team phpSpell.
// --------------------------------------------------------------------

        var ie4 = (document.all) ? 1:0;
		var ie8 = (navigator.userAgent.indexOf('MSIE 8.0') > -1) ? 1:0;
		var gecko=(navigator.userAgent.indexOf('Gecko') > -1) ? 1:0;
        var op6=(navigator.userAgent.indexOf('Opera/6') > -1) ? 1:0;
        var op7=(navigator.userAgent.indexOf('Opera/7') > -1) ? 1 : (navigator.userAgent.indexOf('Opera 7') > -1) ? 1:0;
        var ns4=(navigator.userAgent.indexOf('Mozilla/4.7') > -1) ? 1:0;
        var sf=(navigator.userAgent.indexOf('Safari') > -1) ? 1:0;
        if (op7) ie4 = 0;
        if (sf) {
          ie4 = 0;
          gecko = 1;
        }


        var LinkToField = "";

        function openspell(){
		 height = 391;
          width = 555;
		  
		  if (ie4) LinkToField =self.document.getElementById("postform").message;
		
		   if (ie8) LinkToField = parent.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;

          if (!(op6 || gecko || ie4 || op7 || ie8 )) {
            alert("phpSpell only supports one of the following browsers:\nOpera 6+, Netscape 6+, Mozilla 1+, Internet Explorer 4+, Safari");
          } else {
            if (LinkToField.value.length == 0) return;
            directory = "spelling/";
            k = openspell.arguments.length;
            if (k == 1) directory = "";
            win1=window.open(directory+"phpSpell.html","spellcheckwin",'resizable=no,width='+width+',height='+height);
            if (win1.opener == null) win1.opener = self;
          }
          return (false);
        }

        function Opera_Get_Link() {
          return (LinkToField);
        }
Do not forget to refresh your template data in the admin area afterwards.

David
Last edited by David_uk on Thu Jan 28, 2010 2:34 am, edited 1 time in total.

David_uk
Registered User
Posts: 2
Joined: Tue Jan 26, 2010 11:02 pm

Re: [REQUEST] Spell Check Feature

Post by David_uk » Wed Jan 27, 2010 3:19 am

Just spotted the following also needs modding:-
forum/styles/yourstyles/template/ucp_header.html
Change code from

Code: Select all

<form action="{S_POST_ACTION}" method="post" name="postform"{S_FORM_ENCTYPE}>
to

Code: Select all

<form action="{S_POST_ACTION}" method="post" name="postform" id="postform"{S_FORM_ENCTYPE}>
David

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Re: [REQUEST] Spell Check Feature

Post by Nathan_Anderson » Tue Feb 09, 2010 4:57 pm

David,

Thanks! Good work. I actually have it working on phpbb3 (use it on my own phpbb3 forums). I've emailed the changes to a couple people who took the time to ask me about it. But I never released it "officially". I probably should gather all the changes together and make another release. Thank you for your work on it, I know those who use it appreciate your work on it for them.

Peter77sx wrote:You'd think he'd pretty it up and make it look interesting after all these years. but oh well. at least he worked it to run with phpbb3.
Actually the thing is that I have "no" time. Its a totally "free" project. I have a ton of other projects that I don't even have time to finish, add to that I had to battle with the \"mod"erators over getting this mod into the "mod" system and when that failed, it became a lesser priority. At the point that the phpBB mod's started actively to lock all of the support threads -- I gave up on trying to support it "officially" on phpBB site -- I don't have time for that type of garbage.

So I don't really have the time to waste my time here; so I have basically dropped off of the official forums. (Btw, their was in development the ability to theme it from phpBB using your phpBB colors; but that entire development branch stopped at the point the phpBB mod's started locking my all my support threads here)

The only reason I'm here right now is to see what David has done to maybe combine everything into new release for those who want to continue to use it on phpBB v3.

Nathan.

essedarius
Registered User
Posts: 36
Joined: Wed Feb 17, 2010 7:10 pm

Re: [REQUEST] Spell Check Feature

Post by essedarius » Mon May 31, 2010 3:33 pm

How do you simply add suggestions to show up for mispelt forms of words?
For example, when it recognizes "attatchment" as a mispelt word it doesn't give "attachment" as a suggestion. "Attachment" is in the wordlist, but it doesn't give it as as suggestion for some reason.

User avatar
Berk888
Registered User
Posts: 27
Joined: Sun Sep 28, 2008 8:35 pm
Location: Kiev, Ukraine
Contact:

Re: [REQUEST] Spell Check Feature

Post by Berk888 » Thu Jun 24, 2010 9:10 am

hi gays!

how i can disable learn buttons?

because bad gays can adds wrong words to dictionary
Image

User avatar
rarmy
Registered User
Posts: 147
Joined: Tue Nov 13, 2007 5:26 am
Location: San Diego, CA
Name: Roy Army
Contact:

Re: [REQUEST] Spell Check Feature

Post by rarmy » Sat Jan 22, 2011 3:53 am

OK, been going over tyhis for hours, install both via manual mod and via developers phpbb3 instruction. Problem, no table being made in my db, either the phpbb's or the one I made just for spelling. what script do I use to make the table...I refuse to find this mod worked "Out of the Box" am NOT a php programer but can follow basic direction provided they are complete...what am I doing wrong???

Error from spell_diags


Fatal error: SQL ERROR [ mysqli ]

Table 'rarmy_phpb1.phpbb_spelling_words' doesn't exist [1146]


no kidding, where...never mind, just need help, been on this for 2 hrs straight, :?: :?: :?:
Host, Chief Geek and WebMaster
http://www.reenactorswire.net

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [REQUEST] Spell Check Feature

Post by D¡cky » Sat Jan 22, 2011 6:51 am

Did you read this post, http://www.phpbb.com/community/viewtopi ... #p10815535 and make the changes.
It is a good idea to read through the whole topic, particularly the last page, as there are other changes you may have to make.
Have you hugged someone today?

User avatar
rarmy
Registered User
Posts: 147
Joined: Tue Nov 13, 2007 5:26 am
Location: San Diego, CA
Name: Roy Army
Contact:

Re: [REQUEST] Spell Check Feature

Post by rarmy » Sat Jan 22, 2011 7:43 am

OK, code select from what file??? seems to be the missing info here...have read both side of this post an am unable to figure out... never mind, it's late....now have to see if I still have that mod installed or if I blew it out in frustration...
Host, Chief Geek and WebMaster
http://www.reenactorswire.net

Locked

Return to “[3.0.x] MOD Requests”