Author |
Topic |
@tomic
Senior Member
USA
1790 Posts |
Posted - 24 August 2002 : 23:13:37
|
Spell Checker for Snitz 3.4 - 3.4.02 by @tomic 8/24/02 Original MOD by Huwr and Da_Stimulator
http://www.skepticfriends.org/download/privatemessages3_4_02.zip
Demo available at: http://www.skepticfriends.org/forum2/
User Name: demo Password: demo
This is how it looks in action:
How to install the Spell Checker
Upload the following files to your forum directory"
pop_spellcheck.asp icon_editor_spell.gif
Upload the following to the directory you keep your dabases in. No writing uccurs so read rights should be enough. Before going for help do make sure that the database permissions are set to read. This database was saved in OfficeXP so if you have any difficulties opening it this could be the cause.
dictionary2000.mdb
The following files will need to be edited: inc_post_buttons.asp inc_header_short.asp inc_header.asp
On a difficulty scale of 1 - 10 where 10 is most difficult I give this a 2
---------------------------------------------------------------------
inc_post_buttons.asp Look for this at line 68:
Response.Write " <a href=""Javascript:showcode();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorCode,"Insert Code","align=""top""") & "</a>" & _ "<a href=""Javascript:quote();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorQuote,"Insert Quote","align=""top""") & "</a>" & _ "<a href=""Javascript:list();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorList,"Insert List","align=""top""") & "</a>" & vbNewLine
Replace it with:
Response.Write " <a href=""Javascript:showcode();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorCode,"Insert Code","align=""top""") & "</a>" & _ "<a href=""Javascript:quote();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorQuote,"Insert Quote","align=""top""") & "</a>" & _ "<a href=""Javascript:list();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorList,"Insert List","align=""top""") & "</a>" & vbNewLine & _ " <a href=""JavaScript:OpenSpellCheck('pop_spellcheck.asp')"">" & getCurrentIcon(strIconEditorSpell,"Spell Checker","align=""top""") & "</a>" & vbNewLine
---------------------------------------------------------------------
inc_header
Look for this on line 277:
"function openWindowHelp(url) {" & vbNewLine & _ " popupWin = window.open(url,'new_page','width=470,height=200,scrollbars=yes')" & vbNewLine & _ "}" & vbNewLine &
Immediately under it add:
"function OpenSpellCheck()" & vbNewLine & _ "{" & vbNewLine & _ "var curCookie = ""strMessagePreview="" + escape(document.PostTopic.Message.value);" & vbNewLine & _ "document.cookie = curCookie;" & vbNewLine & _ "popupWin = window.open('pop_spellcheck.asp', 'preview_page', 'scrollbars=yes,width=650,height=400')" & vbNewLine & _ "}" & vbNewLine & _
---------------------------------------------------------------------
inc_header_short.asp
Look for line 79:
".spnMessageText a:active {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
Immediately under it add:
".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _
--------------------------------------------------------------------
Download it here: http://www.skepticfriends.org/download/spellcheck2002.zip
Please direct questions to the Snitz forum but if you feel a need to or just want to say "hi" you may email me at atomic@skepticfriends.org
@tomic |
SportsBettingAcumen.com |
Edited by - @tomic on 11 September 2002 11:57:16 |
|
NOTONEOFUS
Starting Member
12 Posts |
Posted - 25 August 2002 : 00:55:13
|
You've forgotten to add this to the inc_iconfiles.asp file:
Around line 61:
Const strIconEditorStrike = "icon_editor_strike.gif|23|22"
Underneath that:
Const strIconEditorSpell = "icon_editor_spell.gif|23|22"
|
Edited by - NOTONEOFUS on 25 August 2002 01:08:26 |
|
|
@tomic
Senior Member
USA
1790 Posts |
|
NOTONEOFUS
Starting Member
12 Posts |
Posted - 25 August 2002 : 01:12:05
|
You've also forgotten to tell us that you should change the database path in the pop_spellcheck.asp to where our database is located. |
|
|
festerhead
Starting Member
USA
30 Posts |
Posted - 25 August 2002 : 04:50:03
|
Super mod! |
FesterHead Radio - Rush, King Crimson, and more !!! |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 25 August 2002 : 05:35:09
|
This has been updated for the database path in pop_spellcheck.asp and for the reference to the image in inc_iconfiles.asp
@tomic |
SportsBettingAcumen.com |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 25 August 2002 : 10:02:30
|
Atomic does this do suggestions? I've been slowly workin on some code that might be able to suggest alternate spellings
|
Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 August 2002 : 10:22:22
|
no it doesn't.
but thanks for the update @tomic, saved me doing it |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 25 August 2002 : 10:23:32
|
okies I'll still keep bashing away on the suggestive code.. dont' hold your breath though... |
Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 25 August 2002 : 14:06:08
|
quote: okies I'll still keep bashing away on the suggestive code.. dont' hold your breath though...
Suggestive code? How risque will it get? But seriously...no I haven't done anything in this direction but would love to see it!
@tomic |
SportsBettingAcumen.com |
Edited by - @tomic on 25 August 2002 14:06:39 |
|
|
Darthsteven
Starting Member
United Kingdom
38 Posts |
Posted - 26 August 2002 : 14:41:23
|
Spell checking words is very quick, but if you start suggesting words the execution time will rocket. A. Any suggestion code will have to be very neat B. I expect you'll need to stop spell checking halfway through, show whats been checked and offer up some suggestions in addition to 'Ignore' 'Replace' buttons.
I say this from my own experience, mine can check a word from a list of 105,000 words in less than one second (binary search + JS array), but suggesting can take from four seconds to ten (six average) on a Althlon XP 1700 |
Regards Darthsteven |
Edited by - Darthsteven on 26 August 2002 14:42:41 |
|
|
alex042
Average Member
USA
631 Posts |
Posted - 05 September 2002 : 00:36:40
|
quote: pop_spellcheck.asp icon_editor_spell.gif
How about adding an admin page to add custom words to the dictionary? You might add another field in the table so these custom additions can be used with or excluded from the main dictionary. This could actually be used to create custom libraries for specific applications. This should be a fairly easy addition, but if you REALLY wanted to go all out, you could add definitions and a thesaurus along with suggestions.
|
|
|
bobbart
Junior Member
USA
163 Posts |
Posted - 05 September 2002 : 01:38:30
|
will this work with mysql? |
|
|
goldfish
New Member
82 Posts |
Posted - 05 September 2002 : 05:17:30
|
quote: Originally posted by bobbart
will this work with mysql?
I was just going to ask the same about SQL server... colour me dumb, but I don't get involved in the sharp end of databases, so it tends to go over my head... :)
Simon |
|
|
davemaxwell
Access 2000 Support Moderator
USA
3020 Posts |
Posted - 11 September 2002 : 13:05:52
|
If this is the same spellchecker I remember, it uses an access database which contains all the correctly spelled words. It could probably be ported to SQL Server or MySQL but doesn't go right out of the box. It's not something that is used very often (only when posting/replying IF chosen to be used), so leaving it as access should not be a big deal. |
Dave Maxwell Barbershop Harmony Freak |
|
|
bobbart
Junior Member
USA
163 Posts |
Posted - 11 September 2002 : 21:23:58
|
My host only supports mysql so I will have to change this. How hard will it be to get it to use the same connection string as the forum and just add a new table to hold the words?
Could someone help me do this or is it going to be a pain? |
|
|
Topic |
|