[BETA] Spell Checker (Ajax) [0.0.2]

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

[BETA] Spell Checker (Ajax) [0.0.2]

Post by niekas »

This mod is phpBB adaptation of Garrison Locke's very simple and elegant ajax spell checker
Link and demo :
http://www.broken-notebook.com/spell_checker/index.php

Adapted to phpBB:
http://www.freedomlist.com/forum/postin ... wtopic&f=5

All credits go to Garrison Locke for this excellent spell checker.

Code: Select all

##############################################################
## MOD Title: spell checker (ajax)
## MOD Author: niekas <> () http://www.freedomlist.com/
## MOD Description: phpbb adaptation of http://www.broken-notebook.com/spell_checker/  spell checker
## MOD Version: 0.0.2
##
## Installation Level: (Easy)
## Installation Time: 5 Minutes
## Files To Edit: 	posting.php
##					templates/subSilver/overall_header.tpl
##					templates/subSilver/posting_body.tpl
## Included Files: (n/a)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## It will work in most modern browsers IE, FF, Safari, latest beta Opera
## 
## Requirements:your php has to be compiled with '--with-pspell' (check your phpinfo())
## 
##
##    1)download spell_checker-1.8.zip from http://www.broken-notebook.com/spell_checker/index.php
##    2)create new /spell/ directory in your phpbb root folder 
##    3)extract all files from spell_checker-1.8.zip into /spell/ directory
##    4) proceed with the mod:
##############################################################
## MOD History:
##   2005-06-25
##      -adapted to current version of spell checker(2.2)
##
##   2005-06-16 - Version 0.0.1
##      - initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#

posting.php

#
#-----[ FIND ]------------------------------------------
#

// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
	require_once("spell/spell_checker.php");
	$template->assign_block_vars('switch_spelling', array());

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#
<!-- END switch_enable_pm_popup -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_spelling -->
<link rel="stylesheet" type="text/css" href="spell/spell_checker.css">

<script src="spell/spell_checker_compressed.js" type="text/javascript"></script>
<script src="spell/cpaint.inc.js" type="text/javascript"></script>
<!-- END switch_spelling -->

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/posting_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<td colspan="9"><span class="gen">
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_spelling -->
			<span class="action" id="action"><a class="check_spelling" onClick="setObjToCheck('text'); spellCheck();">Check Spelling</a></span>&nbsp;&nbsp;&nbsp;<span class="status" id="status"></span>
			<br>
<!-- END switch_spelling -->
#
#-----[ FIND ]------------------------------------------
#
			  <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
			  </span></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
			  <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"
<!-- BEGIN switch_spelling -->
 id="text" onFocus="setObjToCheck('text'); resetAction();"
<!-- END switch_spelling -->

>{MESSAGE}</textarea>
			  </span>

			  </td>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM 
Last edited by niekas on Sat Jun 25, 2005 10:30 pm, edited 2 times in total.
Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

ahem
hllo re yuo here
produced: No Misspellings Found

and a JS error, soemthing about my browser not supporting POST but only GET which is quite simply not true
niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

Swizec wrote: ahem
hllo re yuo here
produced: No Misspellings Found

and a JS error, soemthing about my browser not supporting POST but only GET which is quite simply not true


Where do you get that error? On original site, on my site or on your site?

Do you have aspell installed?
Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

I get that on the demo you provided
errr... the first link in the post


edit: both links you provided
niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

Swizec wrote: I get that on the demo you provided
errr... the first link in the post


edit: both links you provided


What is your browser? Do you have activeX disabled?
DKing
Registered User
Posts: 751
Joined: Sat Jul 03, 2004 8:38 pm

Post by DKing »

Worked for me on both links.
-DKing
Latest phpBB Version: 2.0.21
Search For a MOD: MOD Search
Trigun-
Registered User
Posts: 85
Joined: Tue Feb 22, 2005 7:26 pm

Post by Trigun- »

both links didnt work for me either ... i get the same error message as swizec.

using opera 8.01
niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

Trigun- wrote: both links didnt work for me either ... i get the same error message as swizec.

using opera 8.01


Can you use Gmail or maps.google.com with your Opera (you should be able with 8.01?
Trigun-
Registered User
Posts: 85
Joined: Tue Feb 22, 2005 7:26 pm

Post by Trigun- »

yes i can ... afaik even opera 7.54 could show me maps.google.com
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3504
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

Very nice mod.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .
Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

I also am using opera 8

everything else with AJAX works fine
User avatar
jh0nny
Registered User
Posts: 123
Joined: Thu Apr 01, 2004 1:53 am

Post by jh0nny »

Sounds like a great mod, but the only problem is the fact that my board in dutch and the posts to. :lol:
Is it possible to make (like ai bot mod) a translation of this mod with dutch words or not? .. I think the mod itselve gets the words from another server or isn't that the fact, anyway a good mod! 8)
:: Sex is just like software, it's better when it's free ::
User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

After correcting "misspellings" (on your demo-site), the preview reply option removes all the corrections already made.

If you attempt to REDO spell-check (from preview screen)it reads: "produced: No Misspellings Found " (even though everything still is misspelled).
Always Under Construction !
niekas
Registered User
Posts: 562
Joined: Sun Sep 23, 2001 7:34 am

Post by niekas »

jh0nny wrote: Sounds like a great mod, but the only problem is the fact that my board in dutch and the posts to. :lol:
Is it possible to make (like ai bot mod) a translation of this mod with dutch words or not? .. I think the mod itselve gets the words from another server or isn't that the fact, anyway a good mod! 8)


I guess you have to have dutch dictionary installed - is your host dutch?.

In your spell_checker.php you would configure "en" with your own language:

Code: Select all

$pspell_config = pspell_config_create("en");
vrflyer wrote: After correcting "misspellings" (on your demo-site), the preview reply option removes all the corrections already made.

If you attempt to REDO spell-check (from preview screen)it reads: "produced: No Misspellings Found " (even though everything still is misspelled).


You need to press "resume editing" in order for changes to take effect in the form
Last edited by niekas on Sat Jun 18, 2005 1:10 am, edited 1 time in total.
User avatar
jh0nny
Registered User
Posts: 123
Joined: Thu Apr 01, 2004 1:53 am

Post by jh0nny »

I guess you have to have dutch dictionary installed - is your host dutch?.

In your spell_checker.php you would configure "en" with your own language:

The language files are on another server or don't they?
So how can I change them into another language (dutch so nl?) because it cannot load that, is there a possibility to link it to another page on my server with words on it?
:: Sex is just like software, it's better when it's free ::
Post Reply

Return to “[2.0.x] MODs in Development”