Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Spell Checker 2002 for 3.4 - 3.4.02
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

@tomic
Senior Member

USA
1790 Posts

Posted - 11 September 2002 :  22:25:33  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
<% if (strDBType = "mysql") then
on error resume next

if (my_Conn.State = 0) Then
my_Conn.Open strConnString
end If

strSql = "DROP TABLE IF EXISTS dictionary"

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
ChkDBInstall()

strSql = "CREATE TABLE dictionary ( "
strSql = strSql & "word TEXT DEFAULT '' NOT NULL "
strSql = strSql & " )"

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
ChkDBInstall()

on error goto 0

end if

sub ChkDBInstall()
for counter = 0 to my_Conn.Errors.Count -1
ConnErrorNumber = my_Conn.Errors(counter).Number
ConnErrorDescription = my_Conn.Errors(counter).Description

if ConnErrorNumber <> 0 or Err.Number <> 0 then
Err_Msg = "<tr><td bgColor=""red"" align=""left"" width=""30%""><font face=""Verdana, Arial, Helvetica"" size=""2""><b>Error: " & ConnErrorNumber & "</b></font></td>"
Err_Msg = Err_Msg & "<td bgColor=""lightsteelblue"" align=""left""><font face=""Verdana, Arial, Helvetica"" size=""2"">" & ConnErrorDescription & "</font></td></tr>"
Err_Msg = Err_Msg & "<tr><td bgColor=""red"" align=""left"" width=""30%""><font face=""Verdana, Arial, Helvetica"" size=""2""><b>strSql: </b></font></td>"
Err_Msg = Err_Msg & "<td bgColor=""lightsteelblue"" align=""left""><font face=""Verdana, Arial, Helvetica"" size=""2"">" & strSql & "</font></td></tr>"

Response.Write(Err_Msg)
intCriticalErrors = intCriticalErrors + 1
end if
next
my_Conn.Errors.Clear

%>

I think you could just link to that on your admin_home.asp....call it dictionary_mysql_setup.asp

Should do the setup. Someone please correct me if I'm wrong. I am just taking this from the Snitz mySQL setup script. I'm not sure what code creates an index and this MOD really needs one as it speeds up word searches by a very noticable amount.

And how do you get the words out of the Access database and into mySQL?

There are other changes too but I would get to this point with the table and it's one field created and get the words imported. The rest is super easy after that.

@tomic

SportsBettingAcumen.com

Edited by - @tomic on 11 September 2002 22:26:18
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 11 September 2002 :  22:45:49  Show Profile  Send bobbart an ICQ Message
So thats just to create the table and the 1 field?
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 11 September 2002 :  22:49:17  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Correct.

@tomic

SportsBettingAcumen.com
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 11 September 2002 :  23:13:04  Show Profile  Send bobbart an ICQ Message
ok thats the easy part I can do that. I think I can also import the words.

What I will need help with is using the forum connect sring and what ever else will need to change.
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 11 September 2002 :  23:40:59  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
You will need to take a look at line 93 of pop_spellcheck.asp:


           set SpellConn = Server.CreateObject("adodb.connection")
		SpellConn.open spellConnStr
		set rs = SpellConn.execute(sql)


Lose what's in red. You already have an open connection to this database. Make it look like this:

set rs = my_Conn.execute(sql)


Then around line 102:


           SpellConn.close
		set SpellConn = nothing
		set rs = nothing


Once again lose the red part. Sitz will close the connection when it is time.

That should do it.

@tomic

SportsBettingAcumen.com

Edited by - @tomic on 11 September 2002 23:41:46
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 12 September 2002 :  00:38:20  Show Profile  Send bobbart an ICQ Message
Ok I did all that and seems to be good. But when I try to spellcheck I get this.


ADODB.Recordset.1 error '80004005' 
SQLState: S1000
Native Error Code: 1146
[TCX][MyODBC]Table 'ewo_us.dictionary' doesn't exist


/~gsuru/pop_spellcheck.asp, line 58

I understand the error. And need to change dictionary to GSURU_DICTIONARY I thought it would get the GSURU_ from the config.asp

So what I did was find this line

sql = "select word from dictionary where word in ("

and changed it to this

sql = "select word from GSURU_DICTIONARY where word in ("


Now I get no errors but the window states " There are no words to spell check. "
This is not true I typed a few bad spellings.

Edited by - bobbart on 12 September 2002 01:30:03
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 12 September 2002 :  01:54:15  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
OK, good catch on the table name. Have you filled the dictionary table with words and do you see what you typed in the spellcheck/preview window? If the table has no words in it there is no way of checking anything. It is BOF and we all know how painful that can be.

@tomic

SportsBettingAcumen.com
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 12 September 2002 :  02:01:52  Show Profile  Send bobbart an ICQ Message
I have the table created and the words in it.
The test does not show in the preview window of the spellcheck popup. All it says is There are no words to spell check.
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 12 September 2002 :  03:25:24  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Does the normal preview work? What it's saying is that id did not receive anything from post.asp. If you look at the very top of pop_spellcheck.asp you can see why that text is displayed

@tomic

SportsBettingAcumen.com
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 12 September 2002 :  10:44:37  Show Profile  Send bobbart an ICQ Message
Yes normal preview works.
Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 12 September 2002 :  19:42:36  Show Profile  Visit crash's Homepage
has anyone tried hitting the spell check button with just a smilie in the message field? it returns a nice little error...

cHosting.nl
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 14 September 2002 :  13:57:27  Show Profile  Send bobbart an ICQ Message
So any idea why the pop_spellcheck is not getting the test? It is different than what pop_preview is doing. But I am not an ASP expert so I am not going to try to much without help.
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 14 September 2002 :  14:09:02  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Shoot sorry bobbart. I haven't had a chance to look at it but it's requesting the text you typed from your cookie. Are you using Chilisoft or anything like that?

@tomic

SportsBettingAcumen.com
Go to Top of Page

bobbart
Junior Member

USA
163 Posts

Posted - 14 September 2002 :  15:10:24  Show Profile  Send bobbart an ICQ Message
Saddly yes. I normaly used win2000 but I am now tring to host on Chilisoft.
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 14 September 2002 :  15:19:14  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Yikes. I am 100% unfamiliar with Chilisoft. Perhaps there is some cookie code specific to that in there? I don't recall seeing that but the problem is either getting the text into the cookie on post.asp or out of the cookie on pop_spellcheck.asp or both. Yeah that's a great help I know, but the code in the zip has worked fine for everyone so far at least as far as the cookie goes.

@tomic

SportsBettingAcumen.com
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07