[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.
BuzzStPoint
Registered User
Posts: 80
Joined: Thu Jul 28, 2005 4:50 am

I get an error when I try to check the spelling

Post by BuzzStPoint »

Code: Select all

br /> Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198

Warning: aspell returned an error: sh: line 1: aspell: command not found in /home/www/computervitals.com/spell/pspell_comp.php on line 198
1Test speling for psot

if this went corectly then all shoud look ok
Any ideas?

This will appear in the Message field when I click on the check spelling
Rainbowlaces
Registered User
Posts: 36
Joined: Tue Aug 02, 2005 3:18 am

Post by Rainbowlaces »

I got the same thing...help?
Steve F
Registered User
Posts: 55
Joined: Sat Jul 30, 2005 8:51 pm
Location: USA

Post by Steve F »

I run the speller mod on Windows 2003. I had to play around with the PATH environment variable until php could see aspell. Also do you have extension=php_pspell.dll in your php.ini (or the equiv. for unix)? You should be able to run this script to test php access to aspell. Uncomment phpinfo() if you want to see the make configuration of your php.

Code: Select all

<?php
//phpinfo();

$pspell_config = pspell_config_create("en_us");
$pspell_link = pspell_new_config($pspell_config); 
$pspell_link = pspell_new("en");

if (pspell_check($pspell_link, "test")) 
{
   echo "This is a valid spelling";
} 
else 
{
   echo "Sorry, wrong spelling";
}
if (pspell_check($pspell_link, "testt")) 
{
   echo "This is a valid spelling";
} 
else 
{
   echo "Sorry, wrong spelling";
}

?>
If this script works you have a problem with how the mod was installed. If this script fails, getting the aspell and php configuration set up correctly may be all you need to do.
decodificationify
Registered User
Posts: 12
Joined: Tue Jun 14, 2005 6:04 pm

Post by decodificationify »

Swizec wrote: I also am using opera 8

everything else with AJAX works fine


Opera 8.0 only supported the GET method with the XMLHttpRequest object, and not the POST method. I just tested the AJAX spellchecker on Opera 8.5, and it seems to work. Supposedly this was fixed around 8.01.

Additionally, be aware that there is a security hole in the version of the CPAINT library that is used by the AJAX Spellchecker used in this mod. Read the security announcement for more information on the details. The fix is to upgrade the CPAINT files to those included in the 1.3-SP2 release of CPAINT. The author of the AJAX Spellchecker has not updated the software to include this patch, so you must do it manually.
lmf33
Registered User
Posts: 140
Joined: Thu Oct 02, 2003 3:15 pm
Location: Pa

Post by lmf33 »

Does this spell check run completely on your own server?
Or is it like spell cow where the words are on on a their server?
Steve F
Registered User
Posts: 55
Joined: Sat Jul 30, 2005 8:51 pm
Location: USA

Post by Steve F »

It runs on your own server. You have complete control of the spelling lists through the Aspell spell checker. Aspell installs with a dictionary of your choice. Adding words was confusing at first because Aspell is very flexible, but once I did a couple updates to the word list, I found it was actually very simple. And it's fast too.

Figuring out which version of aspell to install was a bit of trial and error. I got version Aspell-0-50-3-3-Setup.exe and the dictionary Aspell-en-0.50-2-3.exe to work on my w2k3, php4. I installed in d:\aspell . I added d:\aspell\bin to my PATH environment variable. For php I add extension=php_pspell.dll to php.ini . I ran this test script to make sure aspell and php were working together okay.

Code: Select all

<?php
//phpinfo();

$pspell_config = pspell_config_create("en_us");
$pspell_link = pspell_new_config($pspell_config); 
$pspell_link = pspell_new("en");

if (pspell_check($pspell_link, "test")) 
{
   echo "This is a valid spelling";
} 
else 
{
   echo "Sorry, wrong spelling";
}
if (pspell_check($pspell_link, "testt")) 
{
   echo "This is a valid spelling";
} 
else 
{
   echo "Sorry, wrong spelling";
}

?>
Originally I had to put the $pspell_link = pspell_new("en"); line in twice to avoid some initialization error. At some point is started working with just one line.

I made a subdirectory called wl_work for my own word list mgmt. In that directory I made a file called mywords.dic with one word per line. Then I run the aspell command on mywords.dic to create en_myw.rws .

aspell --lang=en create master ./en_myw.rws < mywords.dic

I copy en_myw.rws to d:\aspell\dict

Last I edit d:\aspell\dict\en.multi and put the line

add en_myw.rws

at the end of the file. This file is in unix format and I think it matters that the eol's remain unix.
lmf33
Registered User
Posts: 140
Joined: Thu Oct 02, 2003 3:15 pm
Location: Pa

Post by lmf33 »

Thankyou so much
hmartin
Registered User
Posts: 118
Joined: Mon Jun 06, 2005 2:49 am
Location: /home/
Contact:

Post by hmartin »

This isn't working for me. Not only can I not get any spell checking, but I also get the following error:

Code: Select all

A function name was passed that is not allowed to execute on this server.
Warning: Cannot modify header information - headers already sent by (output started at /<snip>/phpBB2/spell/cpaint2.inc.php:192) in /<snip>/phpBB2/includes/page_header.php on line 522
I'm using phpBB 2.0.19 and version 2.6 of the broken-notebook code.
Fisher42uk
Registered User
Posts: 7
Joined: Fri Jul 30, 2004 12:32 pm

Post by Fisher42uk »

hmartin wrote: This isn't working for me. Not only can I not get any spell checking, but I also get the following error:

Code: Select all

A function name was passed that is not allowed to execute on this server.
Warning: Cannot modify header information - headers already sent by (output started at /<snip>/phpBB2/spell/cpaint2.inc.php:192) in /<snip>/phpBB2/includes/page_header.php on line 522
I'm using phpBB 2.0.19 and version 2.6 of the broken-notebook code.


Same error here with 2.0.19 and 2.6 of broken notebook
User avatar
ewelin
Registered User
Posts: 262
Joined: Fri May 21, 2004 2:13 pm
Location: MA, USA
Contact:

Post by ewelin »

found a little bug... I think it has to do with the spell checker code and your not implimentation... but if you type in

Code: Select all

this is a test [b]wht do you think so far[/b]
in both the phpBB and org. iterface it doesn't find wht as a misspelling, but if you add in a space like

Code: Select all

this is a test [b] wht do you think so far[/b]
it does find the error. Just thought i'd report that back ;-)

Outside of that this is a great MOD and i think one of the best spell checker interfaces yet :-D
thehovel
Registered User
Posts: 2
Joined: Thu Jan 26, 2006 9:00 pm

Post by thehovel »

Got this mod installed on phpbb 2.0.19 with the CH mod, and although all looks fine, nothing happens when I click the Check Spelling link.

Any ideas?


I did test that the PHP and pspell work ok with your test script.
FreakOnALeash
Registered User
Posts: 7
Joined: Tue Jul 20, 2004 10:01 am

Post by FreakOnALeash »

ok, I get a weird problem when I install this.

When creating a new post, if you click the "view more emoticons" link it opens another window as normal for the emoticons, however it also resizes the original window (the one your making the new post in) and loads the emoticons window in there too!
This only seems to happen in Internet explorer tho as both mozilla/firefox and safari work fine.

If I remove the code for the spell check it goes back to working normally :?

Any ideas?

:edit: I believe it is somehow linked with the smiley management mod I have installed, will see what I can figure out
thehovel
Registered User
Posts: 2
Joined: Thu Jan 26, 2006 9:00 pm

Post by thehovel »

Well, I got this working in a fashion in the end with a few tweaks, but with the latest 2.7 version of the spell checker from broken notebook.

If anyone is interested, I can post the steps I used to get it working with CH mod 2.1.4 and phpbb 2.0.19.

The ONLY issue I have now, is that I cant get the emoticons or bbcode selection to work in IE, although it works perfectly well in Firefox.

Oh, also got the spell checker working on PM's, not just posts. :)
hmartin
Registered User
Posts: 118
Joined: Mon Jun 06, 2005 2:49 am
Location: /home/
Contact:

Post by hmartin »

I would be very interested :D
intelliot
Registered User
Posts: 17
Joined: Sat Feb 11, 2006 9:24 pm

Post by intelliot »

Is this the latest version of the AJAX spellchecker? Does it work perfectly yet?
Post Reply

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