Spellcheck 0.4

Creating and modifying plugins.
Post Reply
prim8
Regular
Posts: 20
Joined: Wed Jun 08, 2005 12:48 am
Contact:

Spellcheck 0.4

Post by prim8 »

This plugin is based on the ajax-spell checker developed by Garrison Locke. The 0.4 plugin is based on version 2.2 of ajax-spell.

Download is available here. Just untar it in your plugins directory and then install the plugin from your s9y admin.

Known Issues:
* You must have PSPELL or ASPELL installed.
* Each time the spell check is run, the 'Entry Body' box seems to grow 1 pixel wider, for some reason not immediately apparent to me. Maybe someone with stronger css-foo will have an idea.

Feedback, comments and suggestions are welcome.
sweety
Regular
Posts: 42
Joined: Tue Jul 05, 2005 11:05 am

spellchecker

Post by sweety »

Dear Prim8,

I have untarred the serendipity_event_spellcheck 0.4 into my plugins folder and installed it from my s9y admin and also installed the aspell.
I got the checkspelling &preview link in my advanced options and when I click on it , I am getting 'checking...' and there is no further action.
Also in my status bar at the bottom, I got 3 errors:
1. spellchecker not defined
2. Object expected
3. Permission denied.......................
Please help me in rectifying this
Thanking you a lot.................and waiting for ur reply 8)
prim8
Regular
Posts: 20
Joined: Wed Jun 08, 2005 12:48 am
Contact:

Re: spellchecker

Post by prim8 »

sweety wrote:I got the checkspelling &preview link in my advanced options and when I click on it , I am getting 'checking...' and there is no further action.
Part of the problem seems to be IE didn't like the new update much. I'm getting some errors, but the spellcheck does run. Go to http://your.blog/plugins/serendipity_event_spellcheck/ and see if the spellcheck there works. If it does not, you may need to set the path to your aspell binary.

$ whereis aspell
aspell: /usr/bin/aspell

Then in your plugins/serendipity_event_spellcheck directory edit the file pspell_comp.php.

Change:
if(!defined('ASPELL_BIN')) define('ASPELL_BIN','aspell');

To:
if(!defined('ASPELL_BIN')) define('ASPELL_BIN','/your/path/to/aspell');

where '/your/path/to/aspell/' is replaced with the value you got from 'whereis'.

Please let me know what works and I'll try to simplify the process in the next version.
sweety
Regular
Posts: 42
Joined: Tue Jul 05, 2005 11:05 am

Post by sweety »

I have tried as u said.............I changed the path for aspell in pspell_comp.php as well as spell_checker.php.....
but i got the following error
Parse error: parse error, unexpected T_LNUMBER in C:\Program Files\Apache Group\Apache2\htdocs\espresso\plugins\serendipity_event_spellcheck\spell_checker.php on line 93
Then I added # infront of all the background colors in line 93...but then it showed parse error in all the commented lines which have ' symbol......I did'nt understand why it's not taking comments.
However, I removed all those commented lines and then I got an error saying unexpected $end;...................................not understanding what to do!!! :(
sweety
Regular
Posts: 42
Joined: Tue Jul 05, 2005 11:05 am

Post by sweety »

Prim8,
can u plz take the pain of sending the serendipity_event_spellcheck folder exactly as u used it with aspell in ur web log without any changes , along with ur next reply!! I just want to check with that also in case there is any error in my files.
I'll owe a lot to u if u can plz do that :)
kidgoo
Regular
Posts: 71
Joined: Thu May 12, 2005 6:53 am

Post by kidgoo »

Hi,

Did you maybe forget to close a ' or " when you changed the path? It might be easier to remove the whole dir, and start again from the original zip file...

Brett
prim8
Regular
Posts: 20
Joined: Wed Jun 08, 2005 12:48 am
Contact:

Post by prim8 »

sweety wrote:I have tried as u said.............I changed the path for aspell in pspell_comp.php as well as spell_checker.php.....
but i got the following error
Parse error: parse error, unexpected T_LNUMBER in C:\Program Files\Apache Group\Apache2\htdocs\espresso\plugins\serendipity_event_spellcheck\spell_checker.php on line 93
Then I added # infront of all the background colors in line 93...but then it showed parse error in all the commented lines which have ' symbol......I did'nt understand why it's not taking comments.
However, I removed all those commented lines and then I got an error saying unexpected $end;...................................not understanding what to do!!! :(
You don't want to make any changes to line 93 (don't need to make any changes to spell_check.php at all). The # are not present because those colors are in CSS format which doesn't require the #. I would suggest to restore your spell_check.php from the tarball.

If you are still getting errors, check your path string. Keep in mind backslash is the escape character, so on windows you would have to have your aspell path like this:

define('ASPELL_BIN','C:\\path\\to\\aspell.exe');

I should have a new version shortly where you can enter the path on your plugin config screen rather than having to dig in the php files.
sweety
Regular
Posts: 42
Joined: Tue Jul 05, 2005 11:05 am

Post by sweety »

hi ,
Thanks a lot 4 ur concern.
now we r able to run it in
http://ourwebsite/espresso/plugins/sere ... spellcheck...

The problem is with the installing of aspell........we installed it in C:/program files.......but its not taking the space btw program and files......now we directly installed it c:/ and its working............

but it is not working in the tool's text area........same old problem
it is showing 'checking...' and thats all

error on status bar is :permission denied.

Should I have to make any changes in the code???
prim8
Regular
Posts: 20
Joined: Wed Jun 08, 2005 12:48 am
Contact:

Post by prim8 »

sweety wrote:error on status bar is :permission denied.

Should I have to make any changes in the code???
Try the new version. It should require no code changes, only put your ASPELL path in the config settings for the spellcheck plugin.
matsch
Regular
Posts: 43
Joined: Wed Oct 26, 2005 7:59 pm

Encoding issues

Post by matsch »

Hi,

I installed this great plugin and I think it's a very good effort as there is still nothing compareable yet for s9y. (Which is a shame!)

After installing the plugin (the last version 0.5.1 from http://programmin.prim8.net/archives/20 ... 0.5.1.html) it won't run for me due to Encoding issues. It seems the plugin only runs in Western (ISO-8559-1) encoding but not like in my case UTF-8 (browser settings that is).

The file spell_checker_compressed.js as the name suggests is compressed and making the problems. Any idea how to solve this? Just resaving it as UTF-8 didn't do the trick...

I think serendipity definately needs native support for a spell checker. Hope someone is working on it. ;)

Thanks and best regards,
matsch
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Encoding issues

Post by garvinhicking »

Spellchecking is for whimps. :)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Re: Encoding issues

Post by d_cee »

garvinhicking wrote:Spellchecking is for whimps. :)
cudn't agrea morr

Dava :-)
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I just Googled "online spell check" and the first three responses could check an entire document. The second two were multilingual; I wonder if they'd support UTF-8?

Perhaps we could use one of them to do the spellchecking?
Judebert
---
Website | Wishlist | PayPal
matsch
Regular
Posts: 43
Joined: Wed Oct 26, 2005 7:59 pm

Re: Encoding issues

Post by matsch »

garvinhicking wrote:Spellchecking is for whimps. :)
For my personal blog I couldn't care less.
But there are other professional environments where someone might want to use serendipity ... or do u not suggest s9y here?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Encoding issues

Post by garvinhicking »

Hi!
But there are other professional environments where someone might want to use serendipity ... or do u not suggest s9y here?
Especially in professional environments people should already know how to spell ;-)

Nah, no kidding - spellchecking would be nice. But involves extra server power and a really large dictionary. It's a pain in the back to implement.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply