Log in

View Full Version : Spell Checker: PungoSpell for vBulletin3 Standard and WYSIWYG modes


Pages : [1] 2

tamarian
06-01-2004, 10:00 PM
There's also a vB 3.5 version: https://vborg.vbsupport.ru/showthread.php?s=&threadid=83258

PungoSpell for vBulletin3 WYSIWYG and Standard mode

Intro: PungoSpell supports WYSIWYG mode disply using DHTML on the spell check popup window. It uses PHP's buitin PSPELL module. Many have this already compiled in, but if not, it's easy to add.

What this hack does This hack modifies the PungoSpell software package from PungoSpell (http://sourceforge.net/projects/pungo-spell/) to allow spell checking on vBulletin for both modes, WYSIWYG and standard mode.

Change Log:

v1.6 December 25, 2005: Security fix for cases where you allow HTML posts and they contain malicious code (Credit goes to Brendan Donahue for finding the issue and alerting TechGuy, and to TechGuy for alerting me to it)

v1.5. Minor bug fixes

v1.4
1. Fixed scrolling, so the spelling window will scroll to the next mis-spelled word.
2. Changed config defaults to allow the most common configuration. The "Learn" function is turned of by default. Make sure you test it before tunrning it on.
3. Re-worded comments on config options, hopefully they will now make sense.

v1.3
1. Created a new config file (pungo-spell-config.php) to avoid the need to edit checkspelling.php, which is a bit tricky with end of line characters.
2. Added an option to disable the learn feature. This may be needed if your aspell setup does not allow, or not properly setup, for personal wordlists.
3. The language is now defined in the config file as well.

v1.1:
1. Added a "Learn" button. This allows users to add words into the dictionary.
2. Restricted access to members only, with allowed usergroups definable in config file
3. Restrict user groups allowed to use the "Learn" feature. Configurable option.
3. Options to ignore quote blocks, code bloacks, and PHP blocks
4. Added buttons (Thesarus and Lookup) with links to Merriam Webster's online thesarus and dictionary links with the suggestion for misspelled words.
5. Added Quit and Done buttons. One to quite without saving, and one to save without going through the whole post for suggestions.
6. Fixed extra lines added for WYSIWYG paragraphs
7. Made it skip vBCode tags, so it won't spell check URL's :)

v1.0:
Initial version, . Identical to PungoSpell functionality, but adapted to handle vBulletins's WYSIWYG and standard mode.


Note: There's another hack for spell checker for vBulletin3 using PHPSpell. You might want to compare both to decide which one you like best.
https://vborg.vbsupport.ru/showthread.php?&threadid=65723

PHPSpell has a "learn" button, to allow adding new words to the dictionary, PungoSpell does not. PungoSpell has a better WYSIWYG display, while PHPSpell does not hide HTML and vBCode tags. So each one has it's advantages and disadvantages.

In a future release, I'll try to add a "learn" functionality to PungoSpell. (done)

Credit PungoSpell (http://sourceforge.net/projects/pungo-spell/) Is a free software using the MIT license. By default, it will work fine in standard mode. This hack will allow it to work for both standard and WYSIWYG.

Requirements: You will need to have PSPELL compiled into your PHP setup. Many have this by default. To find out if you already have it, check your PHP info from the vBulletin Admin Panel: Import & Maintenance > View PHP Info. Search for "pspell". If it's there, you're fine. If not, you can recompile PHP with the "--with-pspell" paramater.

From the readme file:


What does it require?
---------------------

PHP 4.3.1 (http://www.php.net) or greater with Pspell support enabled.
If your system doesn't have pspell/aspell installed, see the pspell source page at
http://pspell.sourceforge.net to download it.

What browsers does it work with?
-------------------------------

Only "modern" browsers that support DOM level 2 (http://www.w3.org/TR/DOM-Level-2-Core/) are supported. MSIE 5.5+, Opera 7.2+, NS 6+ should work fine for you. Your milage may vary. Demo: http://frigate.clemson.edu/local/pungo-spell/example.html

Bugs: Scrolling down to the misspelled word is not yet working.

Instructions

1. Download the attached file, and unpack into your main forum directory. Make sure the file "custom.pws" is writable by apache, otherwise the "Learn" function will not work.

2. It has English setup by default. If you want it to use any other language, it's easy. Just edit the config file "pungo-spell-config.php".

Change this line:

$my_lang = "en";

"en" stands for English. Change it to the code of the language you want. Like "fr" for French, for example. Make sure your system has the required dictionary. You see the dictionary config by typing "aspell config" at the command line, to see which dictionaries you have.

Also, in the file custom.pws, the first line reads something like:

personal_ws-1.1 en 0

You will need to change en to the language you use, like fr

3. Edit the config section in checkspelling.php to suit your needs:

// Config section
$my_lang = "en"; // set the language you want, make sure you have the correct aspell dictionary on your system

// Access restriction options
$allow_guests = 0; // Change to 1 if you allow guests to post and use the spell checker
$restrict_groups = 0; // Change to 1 to enable access restriction by group id
$allowd_groups = array (2, 5, 6); // usergroups who can access the spell checker

// Learn function options
$customwordlist = "custom.pws"; // make sure this file is readable by your apache user
$learn_enabled = 0; // set to 1 to enable the learn feature. Make sure you test first, to ensure your server setup allows this.
$restrict_learn_function = 0; // set to 1 if you want to restrict which usergroup id may add words to your dictionary.
$word_list_maintainers = array (2, 5, 6); // usergroups that are allowed to use the "Learn" feature
//

// Ignore options
$ignore_quotes = 1; // 1 means ignore the [QUOTE] block, 0 means spell check within quotes
$ignore_code = 1; // Same but for the [CODE] tag
$ignore_php = 1; // Same, but for the [PHP] tag

// end config section


4. Edit each template where you'd like to have the spell checker. For example:

newreply template

A. Find

</head>

Add above

<script src="spellcheck.js"></script>

B. Add somewhere the followin (below $navbar for example)g:
<form name="spell_form" id="spell_form" method="POST" target="spellWindow"
action="checkspelling.php">
<input type="hidden" name="spell_formname" value="">
<input type="hidden" name="spell_fieldname" value="">
<input type="hidden" name="spellstring" value="">
</form>

C. Find the submit and preview buttons:

<input type="submit" class="button" name="sbutton" value="$vbphrase[submit_reply]" accesskey="s" tabindex="1" />
<input type="submit" class="button" name="preview" value="$vbphrase[preview_post]" accesskey="p" tabindex="1" />

Add below:

<if condition="DOTOOLBAR!=2">
<input type="hidden" name="toolbar" value="1" />
<input type="button" class="button" value="Spell Check" onClick="spellCheck( 'vbform', 'message', '1');">
<else />
<input type="hidden" name="toolbar" value="2" />
<input type="button" class="button" value="Spell Check" onClick="spellCheck( 'vbform', 'WYSIWYG_HTML', '2');">
</if>


And repeat the same steps for other templates like newthread etc.

Optional: Other Templates that contain edit boxes are:
USERCP_SHELL just add the first change (A) here in above the </head section. Required for pm_newpm and modifysignature.
editpost
Calendar Templates: calendar_edit
New Posting Templates: newreply, newthread
Modify User Options Templates: modifysignature (add the the first change (A) in USERCP_SHELL) and the rest (B and C) here.


Quick reply

1. Show Thread Templates: Put change (A) in showthread, and the rest (B and C) in showthread_quickreply

2. Contributed by Boofo:

change:

<if condition="DOTOOLBAR!=2">

to:

<if condition="$WYSIWYG!=2">

I may have missed a few templates, so let me know.


Private Messages

To install in Private Messaging, check Chris's post here:
https://vborg.vbsupport.ru/showpost.php?p=523756&postcount=84

------

Trouble shooting:

1. If you get a spell check window that says "This is a test". This is most likely due to end of line characters caused by an editor. To resolve this, re-upload the original files with FTP in binary mode. When editing the config file, make sure you use an editor that does not add any end of line characters, such as "vi" or others.

2. Learn doesn't work: Try this: Change the first line from custom.pws:

personal_ws-1.1 en 0

To:

personal_ws-1.1 english 0

en worked fine for me on Fedora and Gentoo, but I had to change to english on RHE.

-----

Enjoy

P.S. The two screenshots below show the spell check popup menu. One for standard mode, and one for WYSIWYG mode.

pjdaley
06-02-2004, 02:42 AM
your a genious :devious: **installed**

pjdaley
06-02-2004, 02:43 AM
which one do you prefer? or recommend?

Erwin
06-02-2004, 02:44 AM
Very cool, mate. :)

tamarian
06-02-2004, 03:10 AM
which one do you prefer? or recommend?

I'm not sure, so I'll think aloud for a bit :)

I initially preferred the look and feel of PungoSpell, but then I went for PHPSpell for the "learn" feature.

My forum currently uses PHPSpell, and they never saw PungoSpell. I might switch to PungoSpell for a few days, and then ask my members which one they prefer.

But they are both great spell checkers. Several of our members said they prefer PHPSpell over the IE pligin spell checker.

You can make it available to a small group of members, like moderators, and then have them test each one for a week or so, and then see what they think.

I was thinking of making both available, and set up a profile option for the members to choose their preferred spell checker, and even a third option for external spell checkers, like spellcheck.net but this seems like an overkill, and one interface may be best.

Another idea is to track the "installs" on both hacks, and see which one is preferred by other webmasters.

But, if PungoSpell has a "learn" feature, then Pungo would be my favourite. I'll see if I can hack that feature into it.

Another issue is performance. PHPSpell uses MySQL queries, while PungoSpell uses PHP built-in spell checker. I have not tested the performance yet, but I think Pungo would perform better, especially on big forums. But that's just a guess.

Another excellent Spell checker is the plugin for HTMLArea. But that one would require a total revamp of vB's WYSIWYG.

Another issue is browser support. PungoSpell relies on iframe DOM objects, which require new(er) browsers than PHPSpell, so PHPSpell supports older browsers better, and can accomodate more members. But, IMHO, people should not stick to very old browsers, and they'll have to upgrade eventually.

boydekort
06-02-2004, 07:59 AM
I installed this but i get the following error on newreply and newthread.

runtime error: 'spell_formname' is empty or is not an object

and points to

h_spellform.spell_formname.value = formName;

what could be the problem ?

djohn
06-02-2004, 09:47 AM
imho, the other one looked much cooler ;)

tamarian
06-02-2004, 11:49 AM
I installed this but i get the following error on newreply and newthread.

runtime error: 'spell_formname' is empty or is not an object

and points to

h_spellform.spell_formname.value = formName;

what could be the problem ?

Try the instructions again (updated), I missed an important part, this bit is also needed in the template:

<form name="spell_form" id="spell_form" method="POST" target="spellWindow"
action="checkspelling.php">
<input type="hidden" name="spell_formname" value="">
<input type="hidden" name="spell_fieldname" value="">
<input type="hidden" name="spellstring" value="">
</form>

boydekort
06-02-2004, 12:57 PM
K I added it and now I get a popup with a box below but in top says requested url not found. For what file is it looking then ? I guess it looks for checkspelling.php but when I view source that link points correct.

see below :

http://www.justpron.org/spell.jpg

tamarian
06-02-2004, 01:16 PM
K I added it and now I get a popup with a box below but in top says requested url not found. For what file is it looking then ? I guess it looks for checkspelling.php but when I view source that link points correct.


It needs the 4 files: (iframedoc.html checkspelling.php spellcheck.js spellwin.php) to be in the same directory as vB files.

My bad! I didn't include iframedoc.html in the zip file. It's now included.

If it doesn't work, pm me with a guest account and I'll check it for you.

boydekort
06-02-2004, 03:01 PM
thanks for your quick help m8.

Working perfect

installed!

it was the missing Iframe.html

and ooh yeah for templates I think editpoll would also be usefull.

RickFla
06-02-2004, 03:28 PM
*installed*

Thanks for the hack, I am the world's worse speller, so I think it will help me more than my users :)

msimplay
06-02-2004, 03:38 PM
i wish i had pspell

MindTrix
06-02-2004, 04:20 PM
Am i missing something? i uploaded the files to the root directory and made the template changes, but everytime i do spell check, it says its complete etc, but it wont correct the spelling mistakes or even notice them.

tamarian
06-02-2004, 04:59 PM
Am i missing something? i uploaded the files to the root directory and made the template changes, but everytime i do spell check, it says its complete etc, but it wont correct the spelling mistakes or even notice them.

Does your server have aspell dictionaries? Check your aspell config by typeing "aspel config" at the command prompt. And verify the dictionary existed at that path. If that doesn't help, PM a guest account if you want, and I'll check it out.

MindTrix
06-02-2004, 05:09 PM
yeah teh pspell thing is there and enabled, so the config says.

tamarian
06-02-2004, 05:21 PM
yeah teh pspell thing is there and enabled, so the config says.

That's not what I wanted to check :)

Does your server have aspell dictionaries? Check your aspell config by typeing "aspel config" at the command prompt. And verify the dictionary existed at that path.

MindTrix
06-02-2004, 05:28 PM
what command prompt? :s

tamarian
06-02-2004, 05:33 PM
what command prompt? :s

If you SSH to your server, you just type:

aspell config

MindTrix
06-02-2004, 06:07 PM
Well its not my host etc, im helpin runnin it for someone else, the control panel is PLESK and its CRAP!!! well Assassingod was lost with it aswell so i give up :) Im putting it down to a crap host.

It says in the readme.txt u need a php version etc, and this host only has 4.0.1 installed. Old huh

tamarian
06-02-2004, 06:15 PM
It says in the readme.txt u need a php version etc, and this host only has 4.0.1 installed. Old huh

Good point. I've added this info to the first post, so others don't have go through what you went through :)

msimplay
06-02-2004, 07:05 PM
Well its not my host etc, im helpin runnin it for someone else, the control panel is PLESK and its CRAP!!! well Assassingod was lost with it aswell so i give up :) Im putting it down to a crap host.

It says in the readme.txt u need a php version etc, and this host only has 4.0.1 installed. Old huh
wow i just checked the demo's for plesk its really poop i'd never use that
infact i'm very accustomed to cpanel i doubt i'd move from linux hosting

Bad Bunny
06-03-2004, 04:41 PM
wow i just checked the demo's for plesk its really poop i'd never use that
infact i'm very accustomed to cpanel i doubt i'd move from linux hosting
I believe plesk and cpanel are simply competing products that you use on *nix servers. Both cost money, but cpanel costs a bit more for the person actually running the server.
I could be wrong though.

tamarian
06-04-2004, 12:52 AM
Updated :)

v1.1:
1. Added a "Learn" button. This allows users to add words into the dictionary.
2. Restricted access to members only, with allowed usergroups definable in config file
3. Restrict user groups allowed to use the "Learn" feature. Configurable option.
3. Options to ignore quote blocks, code bloacks, and PHP blocks
4. Added buttons (Thesarus and Lookup) with links to Merriam Webster's online thesarus and dictionary links with the suggestion for misspelled words.
5. Added Quit and Done buttons. One to quite without saving, and one to save without going through the whole post for suggestions.
6. Fixed extra lines added for WYSIWYG paragraphs
7. Made it skip vBCode tags, so it won't spell check URL's

tamarian
06-04-2004, 01:04 AM
If anyone downloaded the zip file in the last 10 minutes (prior to this post), please re-download. There was a parse error.

pjdaley
06-04-2004, 03:25 AM
doesn't this mean that Pungo is better then phpspell?

msimplay
06-04-2004, 05:54 AM
I believe plesk and cpanel are simply competing products that you use on *nix servers. Both cost money, but cpanel costs a bit more for the person actually running the server.
I could be wrong though.
lol plesk and cpanel may well be competing products but Plesk is very rubbish for an end user like myself

pjdaley
06-04-2004, 09:35 AM
yes cpanel does actually cost more. i tried out both... =/ cpanel pwns plesk anyday

tamarian
06-04-2004, 10:48 AM
doesn't this mean that Pungo is better then phpspell? Well, they're now equal, feature-wise, as far as the end user is concerned..

If I can get the auto-scrolling (ScrollIntoView) thing working, I think I'll switch to Pungo..

tamarian
06-04-2004, 11:53 AM
and ooh yeah for templates I think editpoll would also be usefull.
editpoll has not text box, just editing of poll options.

sketch42
06-04-2004, 01:13 PM
Updated :)

v1.1:
1. Added a "Learn" button. This allows users to add words into the dictionary.
2. Restricted access to members only, with allowed usergroups definable in config file
3. Restrict user groups allowed to use the "Learn" feature. Configurable option.
3. Options to ignore quote blocks, code bloacks, and PHP blocks
4. Added buttons (Thesarus and Lookup) with links to Merriam Webster's online thesarus and dictionary links with the suggestion for misspelled words.
5. Added Quit and Done buttons. One to quite without saving, and one to save without going through the whole post for suggestions.
6. Fixed extra lines added for WYSIWYG paragraphs
7. Made it skip vBCode tags, so it won't spell check URL's
i will be installing this in a few ... i was about to stick with phpspell... but than u post this infor , i hope this works :classic:

NuclioN
06-04-2004, 01:29 PM
I've chmod 777 the custom.pws but it not adds new words. Maybe i'm doing something wrong?

sketch42
06-04-2004, 02:14 PM
I've chmod 777 the custom.pws but it not adds new words. Maybe i'm doing something wrong?
same here its not learning.... also i wanted to add this to quick reply how would i do that

sketch42
06-04-2004, 02:28 PM
not checking spelling in pm's... get this is a test

tamarian
06-04-2004, 03:55 PM
For those who don't have the "learn" function working, try this:

Edit the checkspelling.php file and

Change this:

$customwordlist = "custom.pws";

To this:

$customwordlist = "/path/to/file/custom.pws";

i.e., enter the path to the custom.pws file.

Sketch: It will not show in your pm template, until you edit the USERCP_SHELL and pm_newpm as mentioned in the template section.

sketch42
06-04-2004, 03:57 PM
For those who don't have the "learn" function working, try this:

Edit the checkspelling.php file and

Change this:

$customwordlist = "custom.pws";

To this:

$customwordlist = "/path/to/file/custom.pws";

i.e., enter the path to the custom.pws file.

Sketch: It will not show in your pm template, until you edit the USERCP_SHELL and pm_newpm as mentioned in the template section.
i have edited it... and i kept getting the test page when i clicked spell check... the button was there it just didnt work... can u post what to edit for this to show in quick reply...

ill test these changes when i get bak to work lol...

tamarian
06-04-2004, 06:25 PM
i have edited it... and i kept getting the test page when i clicked spell check... the button was there it just didnt work...
If you get the test page, this means youhave an error in the javascript. This is most likely due to your editor inserting extra characters into the file. To fix this, re-upload checkspelling.php.

can u post what to edit for this to show in quick reply...
I think you will need to put the <head> change (A) in showthread template, and the other changes (B and C) in the showthread_quickreply template.

tamarian
06-04-2004, 06:27 PM
Note to those of you using this in other languages:

In the file custom.pws, the first line reads something like:

personal_ws-1.1 en 2

You will need to change en to the language you use, like fr

sketch42
06-04-2004, 07:05 PM
Originally Posted by tamarian
For those who don't have the "learn" function working, try this:

Edit the checkspelling.php file and

Change this:

$customwordlist = "custom.pws";

To this:

$customwordlist = "/path/to/file/custom.pws";

i.e., enter the path to the custom.pws file.

its in my root path so its /custom.pws

i did that and still the learn mode isnt working

im using WinSyntax for my php editor

sketch42
06-04-2004, 07:23 PM
ok also i noticed that when i have the quote options set to 1 and try using the spell check i get "this is a test"

tamarian
06-04-2004, 07:43 PM
ok also i noticed that when i have the quote options set to 1 and try using the spell check i get "this is a test"
It may sound unlikely, but I'm 90% sure it's due to saving the file in a non *nix editor. You may want to try editing it on the server using vi

In the next version, I will make a seperate file for all the configuration options. This should prevent any end of line errors.

sketch42
06-04-2004, 07:46 PM
It may sound unlikely, but I'm 90% sure it's due to saving the file in a non *nix editor. You may want to try editing it on the server using vi

In the next version, I will make a seperate file for all the configuration options. This should prevent any end of line errors.
vi??

any text editor u recommend?

tamarian
06-04-2004, 08:34 PM
Updated:

v1.3
1. Created a new config file (pungo-spell-config.php) to avoid the need to edit checkspelling.php, which is a bit tricky with end of line characters.
2. Added an option to disable the learn feature. This may be needed if your aspell setup does not allow, or not properly setup, for personal wordlists.
3. The language is now defined in the config file as well.

tamarian
06-04-2004, 08:40 PM
vi??

any text editor u recommend?
vi is a small command line editor, great for editing files on the server, like config files. But it's for old farts, like me. New Linux distors now days use Pico or Nano.

However, check the new update, it will eliminate the need to edit checkspelling.php That file is sensitive to end of line characters.

sketch42
06-04-2004, 09:00 PM
Updated:

v1.3
1. Created a new config file (pungo-spell-config.php) to avoid the need to edit checkspelling.php, which is a bit tricky with end of line characters.
2. Added an option to disable the learn feature. This may be needed if your aspell setup does not allow, or not properly setup, for personal wordlists.
3. The language is now defined in the config file as well.
ok everything's working now except the learn... is there anyway to get the learn feature working???

i take this back ... well not really... just that the values are backwards... apparently 0 checks within the quotes and 1 doesnt

maybe that can help fix the learn feature... can it be something like that?

tamarian
06-04-2004, 09:23 PM
ok everything's working now except the learn... is there anyway to get the learn feature working???

i take this back ... well not really... just that the values are backwards... apparently 0 checks within the quotes and 1 doesnt

maybe that can help fix the learn feature... can it be something like that?
Yes, the 0 and 1 in the ignore options is confusing and reversed to what it actually means. I'll update the first post.

As for the learn problem, if it's enabled, and you you belong to a user group allowed to use it (i.e., you see the "Learn" button, then it should work, unless there's a language mismatch between the language you use, and the language listed in the first line of "custom.pws, assuming it's writable.

sketch42
06-04-2004, 09:35 PM
is there any possible way to maybe get the learn feature working in future versions?

sketch42
06-04-2004, 10:03 PM
even without the learn function im keeping this just for the usergroups...

clickity click click.... Install

anyway to make the pop up box a drop bigger...it doesnt maximize to where you can see the buttons...

also can we manually add words?

tamarian
06-04-2004, 10:14 PM
is there any possible way to maybe get the learn feature working in future versions?
It's working correctly right now. As I explained in my earlier post, if it's not working, it's an issue with language and the system's aspell software setup.

tamarian
06-04-2004, 10:19 PM
anyway to make the pop up box a drop bigger...it doesnt maximize to where you can see the buttons...
In the spellcheck.js file, the popup is opened with:

openSpellWin(640, 480);

You can fine-tune the size there.

What browser are you using?

also can we manually add words?
I can add an admin interface to add words but it will have to use the same PSPELL PHP code, which means if there's a problem with the server's setup for that language in word lists, it won't work.

sketch42
06-04-2004, 10:27 PM
In the spellcheck.js file, the popup is opened with:

openSpellWin(640, 480);

You can fine-tune the size there.

What browser are you using?
IE6

I can add an admin interface to add words but it will have to use the same PSPELL PHP code, which means if there's a problem with the server's setup for that language in word lists, it won't work.
wheres it currently grabbing the wordlist from currently??

teksigns
06-05-2004, 02:30 AM
when i type a misspelled word and click the spellcheck button with learn enabled i get


Warning: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 22

Warning: 0 is not a PSPELL result index in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 79

Warning: 0 is not a PSPELL result index in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 82

Warning: Invalid argument supplied for foreach() in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 84



however when i disable learn it works fine .....

im on a windows machine

tamarian
06-05-2004, 03:01 AM
wheres it currently grabbing the wordlist from currently??
From the wordlist "custom.pws". The problem is when there's a conflict in the config for ASPELL dictionaries and PSPELL. I'm not yet familiar with all the details, but I used it on several setups, and some work great, and some don't like it. Some use softlinks to english.multi, so use en.multi.

I'll try to find out how to properly diagnose it, and maybe setup a diagnosstic script...

tamarian
06-05-2004, 03:07 AM
when i type a misspelled word and click the spellcheck button with learn enabled i get


Warning: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 22

Warning: 0 is not a PSPELL result index in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 79

Warning: 0 is not a PSPELL result index in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 82

Warning: Invalid argument supplied for foreach() in C:\xxxxx\xxxxxxxx\xxxxxxxx\xxxxxxxx\forum\checkspe lling.php on line 84



however when i disable learn it works fine .....

im on a windows machine
Yes, this is the same problem I mentioned above posts about dictionary conflicts.

Try this: Change the first line from custom.pws:

personal_ws-1.1 en 0

To:

personal_ws-1.1 english 0

en worked fine for me on Fedora and Gentoo, but I had to change to english on RHE.

Sketch, try that change too, and let me knwo if this solves the problem.

sketch42
06-05-2004, 03:28 AM
Yes, this is the same problem I mentioned above posts about dictionary conflicts.

Try this: Change the first line from custom.pws:

personal_ws-1.1 en 0

To:

personal_ws-1.1 english 0

en worked fine for me on Fedora and Gentoo, but I had to change to english on RHE.

Sketch, try that change too, and let me knwo if this solves the problem.
nope... learn still doesnt work

but honestly... i really dont need learn ... as long as i can add words manually ...

teksigns
06-05-2004, 12:44 PM
Yes, this is the same problem I mentioned above posts about dictionary conflicts.

Try this: Change the first line from custom.pws:

personal_ws-1.1 en 0

To:

personal_ws-1.1 english 0

en worked fine for me on Fedora and Gentoo, but I had to change to english on RHE.

Sketch, try that change too, and let me knwo if this solves the problem.


i still get same exact error .

i notice it still says "en" in the error even though i changed to "english".

SteveK
06-05-2004, 06:27 PM
I get this error when attempting to spell check:


Fatal error: Call to undefined function: pspell_new() in /home/profit/public_html/forums/checkspelling.php on line 26

Line 26 is:

$pspell_link = pspell_new ("$my_lang", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER);

Tried changing custom.pws from "en" to "english", no luck
I do have pspell installed, but unsure of dictionary location the aspell.conf file. How do I edit the aspell.conf file using SSH so that it points to the right dictionary file?

Thanks

tamarian
06-05-2004, 09:13 PM
I get this error when attempting to spell check:


Fatal error: Call to undefined function: pspell_new() in /home/profit/public_html/forums/checkspelling.php on line 26

Line 26 is:

$pspell_link = pspell_new ("$my_lang", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER);

Tried changing custom.pws from "en" to "english", no luck
I do have pspell installed, but unsure of dictionary location the aspell.conf file. How do I edit the aspell.conf file using SSH so that it points to the right dictionary file?

Thanks
I think this is not a wordlist problem, so let's see if you have and en dictionary installed.

What are the contents of these directories on your server?

/usr/lib/aspell
/usr/share/aspell

You may be missing the en english dictionaries

dbroomjr
06-05-2004, 10:53 PM
I too am getting the error:

Fatal error: Call to undefined function: pspell_new() in /home/profit/public_html/forums/checkspelling.php on line 26

At your request, here is the contents of my directories. I would sure like to get this going. :D

Any tips?

[/usr/lib/aspell]# ls
./ american.multi@ english-med-only english-variant-2
../ canadian-med.multi english.multi@
american-med.multi canadian-med-only english-variant-0
american-med-only canadian.multi@ english-variant-1

[/usr/share/aspell]# ls
./ iso8859-10.map iso8859-4.dat iso8859-7.map koi8-r.dat
../ iso8859-1.dat iso8859-4.map iso8859-8.dat SGML.map
ASCII.dat iso8859-1.map iso8859-5.dat iso8859-8.map spell*
ASCII.map iso8859-2.dat iso8859-5.map iso8859-9.dat standard.kbd
english.dat iso8859-2.map iso8859-6.dat iso8859-9.map unicode.dat
english_phonet.dat iso8859-3.dat iso8859-6.map ispell* viscii.dat
iso8859-10.dat iso8859-3.map iso8859-7.dat koi8-f.dat viscii.map

Thanks,

David

tamarian
06-05-2004, 11:04 PM
I too am getting the error:

Fatal error: Call to undefined function: pspell_new() in /home/profit/public_html/forums/checkspelling.php on line 26

At your request, here is the contents of my directories. I would sure like to get this going. :D

Any tips? Here's a tip:

In /usr/share/aspell

copy english.dat to en.dat
copy english_phonet.dat to en_phonet.dat

dbroomjr
06-05-2004, 11:20 PM
[/usr/share/aspell]# ls
./ iso8859-10.dat iso8859-4.dat iso8859-8.dat spell*
../ iso8859-10.map iso8859-4.map iso8859-8.map standard.kbd
ASCII.dat iso8859-1.dat iso8859-5.dat iso8859-9.dat unicode.dat
ASCII.map iso8859-1.map iso8859-5.map iso8859-9.map viscii.dat
en.dat iso8859-2.dat iso8859-6.dat ispell* viscii.map
english.dat iso8859-2.map iso8859-6.map koi8-f.dat
english_phonet.dat iso8859-3.dat iso8859-7.dat koi8-r.dat
en_phonet.dat iso8859-3.map iso8859-7.map SGML.map

Fatal error: Call to undefined function: pspell_new() in /home/share/public_html/Forum/checkspelling.php on line 26

Still get the same error. :( As you can see, I now have english and en both in that directory. I have tried changing custom.pws to english and back to en and neither work. Any other idea's?

Also, thanks for the help.

David

tamarian
06-05-2004, 11:35 PM
Still get the same error. :( As you can see, I now have english and en both in that directory. I have tried changing custom.pws to english and back to en and neither work. Any other idea's?
I'm out of ideas..... Does it work when you disable the learn function?

dbroomjr
06-05-2004, 11:41 PM
I'm out of ideas..... Does it work when you disable the learn function?
No, Learn is not enabled and never has been. I just tried enabling it and it errors out on it also. So, I guess I will just uninstall this one until someone can come up with the solution to the problem. I have tried everything I know.

I know its not your script, its bound to be something different in versions, OS's, etc. Just can't track down what it is.

Thanks for the help.

David

tamarian
06-06-2004, 01:49 PM
No, Learn is not enabled and never has been. I just tried enabling it and it errors out on it also. So, I guess I will just uninstall this one until someone can come up with the solution to the problem. I have tried everything I know.

I know its not your script, its bound to be something different in versions, OS's, etc. Just can't track down what it is.

Thanks for the help.

David
No problem. I found that there isn't much information out there in the web regarding the combination of aspell and PHP's PSPELL + dictionary and wordlist setup, which indicate it's not used much.

You might want to try the PHPSpell hack.

Brad
06-06-2004, 01:57 PM
Very good hack my friend, one of the best I have seen. This will defentaly be installed on my board, I don't try to hack much but you can't pass this one up :)

teksigns
06-06-2004, 02:48 PM
mine works fine with learn disabled ......

buts errors with it enabled

wdarton
06-08-2004, 04:04 AM
Ok I have a new error that I didn't see anywhere in this thread. When I hit the spellcheck button, the spellcheck window opens with all of the correct information, but another window pops up on top that says Spell Check complete "ok" then it exits out when you hit ok.

I'm kinda confused.... Help?

tamarian
06-08-2004, 09:44 AM
Ok I have a new error that I didn't see anywhere in this thread. When I hit the spellcheck button, the spellcheck window opens with all of the correct information, but another window pops up on top that says Spell Check complete "ok" then it exits out when you hit ok.

I'm kinda confused.... Help?
This is the default behaviour for PungoSpell, when the text contains not spelling mistakes.

wdarton
06-08-2004, 10:54 AM
Well except that the text does contain spelling errors. But I think I found the problem. Aspell doesn't have a default dictionary assigned to it. When I do a "aspell dump dicts" I get an "invalid dump" specification, so I'm guesssing that aspell isn't configured properly. I started working on it last night, but didn't get it solved. Still hacking away at it. I'll let you ya know

floridaideal
06-09-2004, 01:18 PM
Hello

I also have the same problem as Wdarton, see attached image. I installed it fine and get no errors but soon as I open Spell Check I get "Spell Checking Complete" pop up , it just won't spell check!

Got Pspell and Aspell installed.

Anyone please help!

Thank you

Stuart

Chris Blount
06-13-2004, 03:29 AM
I got mine installed and it works good so far. Having one problem though.

I setup the config file so all usergroups can access the spell checker (1,2,3,4 etc.) but unregistered users are getting a blank spell check window when they try to use it.

Any ideas? I'm pretty sure the config file is correct.

sketch42
06-13-2004, 03:31 AM
I got mine installed and it works good so far. Having one problem though.

I setup the config file so all usergroups can access the spell checker (1,2,3,4 etc.) but unregistered users are getting a blank spell check window when they try to use it.

Any ideas? I'm pretty sure the config file is correct.
unregistered shouldnt be able to post by default unless you changed that

Chris Blount
06-13-2004, 03:54 AM
unregistered shouldnt be able to post by default unless you changed that

Yes, I want unregs to be able to use the spell check which is why I changed the config file to list all usergroups.

pie
06-13-2004, 10:41 AM
Fatal error: Call to undefined function: pspell_new() in /home/colicab/public_html/community/checkspelling.php on line 26

The error i receive.

tamarian
06-13-2004, 12:15 PM
I got mine installed and it works good so far. Having one problem though.

I setup the config file so all usergroups can access the spell checker (1,2,3,4 etc.) but unregistered users are getting a blank spell check window when they try to use it.

Any ideas? I'm pretty sure the config file is correct.
I have not thought about unregistered users, so I might make room for that in a future update.

If you want to enable it now, add 0 to the allowed usergroups (if it's not there) and comment out this line from checkspelling.php (line 14)

Chenge from:

if ($bbuserinfo['userid'] == 0) exit;

To this:

//if ($bbuserinfo['userid'] == 0) exit;

Be caureful that your editor should not add any end of line characters.

tamarian
06-13-2004, 12:17 PM
Fatal error: Call to undefined function: pspell_new() in /home/colicab/public_html/community/checkspelling.php on line 26

The error i receive.
You probably don't have pspell compiled into your PHP, and missing the aspell package.

Try PHPSpell instead.

Chris Blount
06-13-2004, 06:48 PM
I have not thought about unregistered users, so I might make room for that in a future update.

If you want to enable it now, add 0 to the allowed usergroups (if it's not there) and comment out this line from checkspelling.php (line 14)

Chenge from:

if ($bbuserinfo['userid'] == 0) exit;

To this:

//if ($bbuserinfo['userid'] == 0) exit;

Be caureful that your editor should not add any end of line characters.

Works great! Thanks so much for your support. We ended up leaving the learning feature off for now because we don't want our users to accidently place certain words in their custom dictionary.

I do have one question though. I run a satellite forum and we have a lot of terms that only pertain to the satellite industry. Is there a place where I can put universally ignored words? I looked in the files but couldn't find a place to put them except for where you have the code to ignore the QUOTE tags.

tamarian
06-13-2004, 09:41 PM
I do have one question though. I run a satellite forum and we have a lot of terms that only pertain to the satellite industry. Is there a place where I can put universally ignored words? I looked in the files but couldn't find a place to put them except for where you have the code to ignore the QUOTE tags.
PHP's pspell functions do not have a real ignore feature. There is an ignore options, but it's only by length, i.e. ignore any word with less than X characters.

I can think of two options, enable learning, but restrict it to admins or a group that can enter those abbriviations.

Or, check out the PHPSpell hack, as it has the ignore feature.

Chris Blount
06-15-2004, 11:23 AM
I just found something weird that's happening. When using the spell check in standard mode (not WYSIWYG). All paragraph breaks are getting taken out so when the spell check is done, the post ends up being one long paragraph.

Gary King
06-16-2004, 06:21 PM
If aspell is not installed, I'm sure there's a way to define the functions required (just a thought.)

Anyone know the correct function declaration for, say, pspell_new()?

joanne862
06-17-2004, 04:43 PM
Great hack!

Amazed myself by getting it installed without any major hitches.

Just one problem- it doesn't work in writing a new PM. Clicking the spell check box has no effect, nothing happens.
I've changed the USERCP_SHELL template as instructed. In the pm_newpm template, there was no $navbar to put the code in (B) under. I've tried putting it in a couple of different places, but it still doesn't work. Any ideas what I've done wrong?

thanks

Gary King
06-17-2004, 04:58 PM
Everything working fine for me, great hack, but one thing though - spell checking a quick reply in Internet Explorer does not work. When clicking on that, it immediately goes to 'Spell checking complete' but it works fine in Opera and other browsers.

Ideas? Also the correct template changes were made, etc.

Kihon Kata
06-17-2004, 05:00 PM
Clicks to install here (http://www.makeuptalk.com/forums/) Thanks PEOPLE!

Gary (the post above me) installed it for me!

Chris Blount
06-17-2004, 05:45 PM
Great hack!

Amazed myself by getting it installed without any major hitches.

Just one problem- it doesn't work in writing a new PM. Clicking the spell check box has no effect, nothing happens.
I've changed the USERCP_SHELL template as instructed. In the pm_newpm template, there was no $navbar to put the code in (B) under. I've tried putting it in a couple of different places, but it still doesn't work. Any ideas what I've done wrong?

thanks

I didn't even bother with the USERCP_SHELL. In the PM_NEWPM template, I did the following:

Find:

return validatePost(formname, formname.title.value, 0, $vboptions[pmmaxchars]);
}
</script>

Below it add:

<script src="spellcheck.js"></script>

<form name="spell_form" id="spell_form" method="POST" target="spellWindow"
action="checkspelling.php">
<input type="hidden" name="spell_formname" value="">
<input type="hidden" name="spell_fieldname" value="">
<input type="hidden" name="spellstring" value="">
</form>




Find:

[preview_message]" accesskey="p" name="preview" tabindex="1" onclick="this.form.dopreview = true; return true;" />

Below it add:

<CENTER>

<if condition="DOTOOLBAR!=2">
<input type="hidden" name="toolbar" value="1" />
<input type="button" class="button" value="Spell Check" onClick="spellCheck( 'vbform', 'message', '1');">
<else />
<input type="hidden" name="toolbar" value="2" />
<input type="button" class="button" value="Spell Check" onClick="spellCheck( 'vbform', 'WYSIWYG_HTML', '2');">
</if>

</CENTER>

joanne862
06-17-2004, 05:52 PM
Thanks so much Chris, that works perfectly now :D

vprp
06-17-2004, 09:09 PM
You probably don't have pspell compiled into your PHP, and missing the aspell package.

Try PHPSpell instead.

I get the same message.

Fatal error: Call to undefined function: pspell_new() in /hsphere/local/home/vrhee/golfrewind.com/checkspelling.php on line 26

I just talked to my Web host and they installed aspell. Now how do I compile pspell in my php?

vprp
06-19-2004, 09:03 AM
anyone?

tamarian
06-23-2004, 01:15 AM
Now how do I compile pspell in my php?
PSPELL can be compiled into PHP by adding the "--with-pspell" option in the ./configure command used to compile PHP.

Boofo
06-23-2004, 03:33 AM
It works great for me in pms but when I use it for a new reply, it opens up, finds the wrongly spelled words, says ok and when it closes, the words are not changed to the correct spelling. Any ideas? ;)

EDIT: Got it working. It seems you can't have the button in both places on the newreply. Only the top one. ;)

How do we make sure apache can write to the pws file? I have it chmodded to 777 and it still doesn't write to the file.

vprp
06-23-2004, 05:42 AM
I compiled pspell and have the spell check working on my site now. Thanks! The problem is I noticed that on long posts, it will show "this is a test." If it's a relatively short message, the spell check works fine. Does anyone know what may be causing this problem?

rsuplido
06-23-2004, 07:05 AM
It seems like it happens when there is a carriage return on your message.

Any fix to this?

Boofo
06-23-2004, 08:36 AM
I ran into an interesting problem with the config file for this hack. the following doesn't work for me unless I chnage it to 0.

$ignore_quotes = 1; // 0 means ignore the [QUOTE] code, 1 means spell check within quotes
If I leave it as is, it doesn't check between the quote tags. If I change it to 0, it checks between the tags just fine. ;)

scottct1
06-23-2004, 02:47 PM
I am having a problem with this with multi line posts.

If I type a short message (ie this is a test) it works fine.

However if I type in a longer message I get an error.

A box pops up
Error Line 59 - Unterminated String Constant

If I clear that error another box pops up ERROR Line 298 - 'MISPS' is undefined.

This happens to ALL my editors

Any ideas?

scottct1
06-23-2004, 05:29 PM
Ok I figured out something but I have not fixed it yet.

It appears my problem is with iframedoc.html

If I check spelling on a 1 line message it works fine.

However if the message is long or is formatted at all I get the above (last message) error message.

What leads me to believe it is something with iframedoc.html is that when I get the error the text "this is a test" appears in the spell check box.

"this is a test" is also in iframedoc.html

Also if I just open iframedoc.html in my browser I get the same two error messages.

So what am I doing wrong?

tamarian
06-25-2004, 05:53 PM
Ok I figured out something but I have not fixed it yet.

It appears my problem is with iframedoc.html

If I check spelling on a 1 line message it works fine.

However if the message is long or is formatted at all I get the above (last message) error message.

What leads me to believe it is something with iframedoc.html is that when I get the error the text "this is a test" appears in the spell check box.

"this is a test" is also in iframedoc.html

Also if I just open iframedoc.html in my browser I get the same two error messages.

So what am I doing wrong?
This sounds like an end of line error. Try re-uploading the files again with ftp in binary mode, and see if this still keeps happening.

Boofo
06-25-2004, 06:07 PM
This sounds like an end of line error. Try re-uploading the files again with ftp in binary mode, and see if this still keeps happening.
tamarian, any fix for the learn feature yet?

tamarian
06-25-2004, 06:27 PM
tamarian, any fix for the learn feature yet?
I'm not sure yet that it can be fixed through the script, and it's more likely a server setup issue with aspell config.

tamarian
06-25-2004, 06:29 PM
I compiled pspell and have the spell check working on my site now. Thanks! The problem is I noticed that on long posts, it will show "this is a test." If it's a relatively short message, the spell check works fine. Does anyone know what may be causing this problem?
I'd suggest re-uploading the original files, with FTP in binary mode. Test first as admin, without editing the config files. Most of the problems I had turned out to be due to the editor useds.

Boofo
06-25-2004, 06:36 PM
I'm not sure yet that it can be fixed through the script, and it's more likely a server setup issue with aspell config.
What do I need to do with the aspell config? How do I make sure apache can write to the pws file? I chmodded it. Is that all we do for that part of it?

has anyone gotten this to work with the quick reply yet? I get the button and the window pops up, but there is no text in it.

Boofo
06-25-2004, 06:51 PM
I got the learn function working finally. I looked through the thread here and when I changed this:

personal_ws-1.1 eng 0to this:

personal_ws-1.1 english 0It started working. Thank you! ;)

Now if I can just get the quick reply box working with this I will be all set. ;)

Any one have that working yet?

tamarian
06-26-2004, 01:32 AM
Now if I can just get the quick reply box working with this I will be all set. ;)

Any one have that working yet?
Have you tried to put the code in the showthread template?

Snippet A goes into the header of showthread template

Snippet B goes somewhere in showthread_quickreply template (for example, just below the java script.

Snippet C goes below the preview button code in showthread_quickreply.

I just tested it, and it it worked on my test forum

Boofo
06-26-2004, 02:17 AM
Have you tried to put the code in the showthread template?

Snippet A goes into the header of showthread template

Snippet B goes somewhere in showthread_quickreply template (for example, just below the java script.

Snippet C goes below the preview button code in showthread_quickreply.

I just tested it, and it it worked on my test forum
I just double checked it and I have it the way to say here and nothing shows up in the spell check box. It works everywhere else flawlessly, just not the quick reply box. Any ideas what to do to make it work there, too? ;)

I do have it set to where you must click the icon in a message to be able to use the QR box. Would that have anything to do with it?

Boofo
06-26-2004, 03:19 AM
Ok, FINALLY! I got it working with the quick reply box. It works with the code the way it is if you don't use WYSIWYG in it. To make it work with the WYSIWYG part of it, I had to change:

<if condition="DOTOOLBAR!=2">
to:

<if condition="$WYSIWYG!=2">
Now it works as it should. ;)

Thank you, sir, for an excellent hack. ;)

Chris Blount
06-26-2004, 03:22 AM
I just found something weird that's happening. When using the spell check in standard mode (not WYSIWYG). All paragraph breaks are getting taken out so when the spell check is done, the post ends up being one long paragraph.


Any word on how to fix this yet?

Boofo
06-26-2004, 03:40 AM
Any word on how to fix this yet?
I just tested this on my site and it works like it should in the Enhanced Standard editor. It left the message exactly as it found it except for correcting the spelling mistakes. Could another hack be messing with it, maybe? ;)

tamarian
06-26-2004, 02:52 PM
Ok, FINALLY! I got it working with the quick reply box. It works with the code the way it is if you don't use WYSIWYG in it. To make it work with the WYSIWYG part of it, I had to change:
Nice catch. I'll add it to the fist post for quick reply, so others can find it easily.

Boofo
06-27-2004, 12:50 AM
Now all we have to do it get it working so it scrolls to each word it finds and you will have the perfect and ultimate vB3 spell checker. ;)

tamarian
06-27-2004, 01:06 AM
Now all we have to do it get it working so it scrolls to each word it finds and you will have the perfect and ultimate vB3 spell checker. ;)
I have the scrolling working, but for some reason it only works with IE.....

Boofo
06-27-2004, 01:07 AM
I have the scrolling working, but for some reason it only works with IE.....
I use IE and it doesn't work for me. ;)

tamarian
06-27-2004, 01:10 AM
I use IE and it doesn't work for me. ;)
I meant the upcoming release :)

Boofo
06-27-2004, 01:15 AM
I meant the upcoming release :)
hehe When will that be? I could use the scrolling feature now, buddy!!!! ;)

tamarian
06-27-2004, 01:32 AM
hehe When will that be? I could use the scrolling feature now, buddy!!!! ;)
Well, I was planning to fix the scrolling for Mozilla/Firefox, but since it's going no where, I'll release it as is, maybe tomorrow.

Boofo
06-27-2004, 01:44 AM
Well, I was planning to fix the scrolling for Mozilla/Firefox, but since it's going no where, I'll release it as is, maybe tomorrow.
Send me what you have with whatever comments you have on it and let me take a lokl at it before you release it. We should be able to get that working for Mozilla/Firefox fairly easily.

tamarian
06-27-2004, 01:56 AM
Send me what you have with whatever comments you have on it and let me take a lokl at it before you release it. We should be able to get that working for Mozilla/Firefox fairly easily. Check it out. I posted the code change from spellcheck.js at vbulletin.com's html forum:

http://www.vbulletin.com/forum/showthread.php?t=106802

Edit: This code is added it just after the call to highlight() in the current version.

Boofo
06-27-2004, 02:10 AM
Check it out. I posted the code change from spellcheck.js at vbulletin.com's html forum:

http://www.vbulletin.com/forum/showthread.php?t=106802

Edit: This code is added it just after the call to highlight() in the current version.
Did you try:

parent.spellbox.document.getElementById("h1").scrollIntoView(is_moz);

Boofo
06-27-2004, 02:40 AM
I just tried your code for scrolling in IE and it doesn't scroll for me.

tamarian
06-27-2004, 02:42 AM
Did you try:

parent.spellbox.document.getElementById("h1").scrollIntoView(is_moz);
I could have sworn I tried that without success, but now it works! Thanks for the help. :)

I'll clean up the rest of the code and release it asap.

tamarian
06-27-2004, 02:46 AM
I just tried your code for scrolling in IE and it doesn't scroll for me.
Hmm, let's see how it goes with the full release, it might have been missing other parts, like the "hl" element or something.

Boofo
06-27-2004, 02:55 AM
I could have sworn I tried that without success, but now it works! Thanks for the help. :)

I'll clean up the rest of the code and release it asap.
According to the lines you posted that you tried on the com, you had false in all of them. ;)

All I did was try what Scott suggested you try. ;)

tamarian
06-27-2004, 03:03 AM
According to the lines you posted that you tried on the com, you had false in all of them. ;)

All I did was try what Scott suggested you try. ;)
I actually changed them all to true and still had no luck. But I probably did it in haste, and didn't bother refreshing the browser when testing it.

Boofo
06-27-2004, 03:07 AM
I actually changed them all to true and still had no luck. But I probably did it in haste, and didn't bother refreshing the browser when testing it.Ahhhh, the infamous "didn't do a browser refresh". That'll get you every time. I run into the same thing all the time. ;)

Looking forward to the new version.

And I misspoke. You had them all set to true. But not is_moz. Sorry about that. ;)

Boofo
06-27-2004, 09:28 AM
Where's the big update? I thought you were going to post it last night? ;)

tamarian
06-27-2004, 03:49 PM
Version 1.4 is released, it has some cleanup and config options. The main new addition is that it will now scroll the window down to the next mis-spelled word. Browser-side tested with IE6 on XP Pro, and on Mozilla 1.7 and Firefox 0.9 on Linux and XP-Pro.

Enjoy

Boofo
06-27-2004, 06:14 PM
Excellent upgrade, sir! The scrolling works great now! I don't know what more you could add to it to make it any better. The only thing I would like to see is maybe the suggestions box have the words in alphabetical order but I think that must be a php thing. ;)

tamarian
06-27-2004, 06:30 PM
Excellent upgrade, sir! The scrolling works great now! I don't know what more you could add to it to make it any better. The only thing I would like to see is maybe the suggestions box have the words in alphabetical order but I think that must be a php thing. ;)
What I would love to do, but currently don't have the time yet, is to combine PungoSpell with PhpSpell into a single solution. What I mean is to have the WYSIWYG features of PungoSpell, and add to it the MySQL dictionary of PhpSpell. This, I think, would make it more efficient, and eliminate all the aspell/pspell setup for the learn function, and no need to recompile or mess with PHP and/or aspell settings.

Boofo
06-27-2004, 09:04 PM
What I would love to do, but currently don't have the time yet, is to combine PungoSpell with PhpSpell into a single solution. What I mean is to have the WYSIWYG features of PungoSpell, and add to it the MySQL dictionary of PhpSpell. This, I think, would make it more efficient, and eliminate all the aspell/pspell setup for the learn function, and no need to recompile or mess with PHP and/or aspell settings.
Could you do the suggestions listing alphabetically that way?

tamarian
06-27-2004, 10:16 PM
Could you do the suggestions listing alphabetically that way?
Sorting the suggestions alphabetically wouldn't be hard, but it may be considered a bug by many, as it would alter the high/low score of the results :)

Boofo
06-27-2004, 10:46 PM
Sorting the suggestions alphabetically wouldn't be hard, but it may be considered a bug by many, as it would alter the high/low score of the results :)
How about this then? Have it where we can make a list of auto-changes to be made? Like chnage=change? That would help out a lot on words we always make a mistake on.

tamarian
06-28-2004, 02:45 AM
How about this then? Have it where we can make a list of auto-changes to be made? Like chnage=change? That would help out a lot on words we always make a mistake on.
If I understood your suggestion correctly (and I'm not sure I have, so please feel free to elaborate with examples:) ) this sounds like word pairs, which PSPELL can handle, I think.

Boofo
06-28-2004, 02:46 AM
If I understood your suggestion correctly (and I'm not sure I have, so please feel free to elaborate with examples:) ) this sounds like word pairs, which PSPELL can handle, I think.
How would you set it up to automatically do it?

tamarian
06-28-2004, 03:24 AM
How would you set it up to automatically do it?
It would basically require another file, similar to (or instead of) the custom.pws file:

http://ca2.php.net/manual/en/function.pspell-config-repl.php

Boofo
06-28-2004, 03:35 AM
It would basically require another file, similar to (or instead of) the custom.pws file:

http://ca2.php.net/manual/en/function.pspell-config-repl.php
Ok, how would we set the format of the custom.repl file?

tamarian
06-28-2004, 02:58 PM
Ok, how would we set the format of the custom.repl file?
It will be created by the function php_save_wordlist() when called after php_spell_replacement(). That's according to the manual, but I haven't used it yet.

Boofo
06-28-2004, 03:09 PM
It will be created by the function php_save_wordlist() when called after php_spell_replacement(). That's according to the manual, but I haven't used it yet.
How do we set it up? I'll test it out if you can help me set it up.

teksigns
06-28-2004, 03:45 PM
Using 1.4
Everything works except the learn feature .....


im running XP-pro on the server .....


i have went to my aspell directory and typed :

aspell config


i get this for lang:


# lang descrip: language code
# lang default: <language-tag>
# lang current: en_US


# language-tag descrip: deprecated, use lang instead
# language-tag default: !lang
# language-tag current: en_US


# local-data-dir descrip: location of local language data files
# local-data-dir default: <actual-dict-dir>
# local-data-dir current: C:/Aspell/dict/


# master descrip: base name of the main dictionary to use
# master default:
# master current:




i have tried adding :

en_US to my config and to custom.pws

i have also tried:
en
english

i have also tried changing :
$customwordlist = "custom.pws";

$customwordlist = "c:/htdocs/forum/custom.pws";


however im still getting :


Warning: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en_US". in C:\htdocs\forum\checkspelling.php on line 28

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 85

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 88

Warning: Invalid argument supplied for foreach() in C:\htdocs\forum\checkspelling.php on line 90

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 85

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 88

Warning: Invalid argument supplied for foreach() in C:\htdocs\forum\checkspelling.php on line 90

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 85

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 88

Warning: Invalid argument supplied for foreach() in C:\htdocs\forum\checkspelling.php on line 90

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 85

Warning: 0 is not a PSPELL result index in C:\htdocs\forum\checkspelling.php on line 88

Warning: Invalid argument supplied for foreach() in C:\htdocs\forum\checkspelling.php on line 90




with lean disabled it works fine with no errors ......


how can i get learn to work ?

help !!!!!!!!

Boofo
06-28-2004, 05:05 PM
Have you tried english_US?

teksigns
06-28-2004, 05:13 PM
Have you tried english_US?


just tried :

english_US


got same error but this time shows "en" in the error
even though i have english_US in both places ......


Warning: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". in C:\htdocs\forum\checkspelling.php on line 28

tamarian
06-28-2004, 07:50 PM
Teksigns, I'm not sure if this will work, but try using en only in the config file, and en_US in the custom.pws.

The custom.pws and the learn function of psell as it relates to using aspell is very confusing, and not well documented. So my best advice is trial and error, and if all fails, disable learning, or use PHPSpell.

tamarian
06-28-2004, 07:52 PM
How do we set it up? I'll test it out if you can help me set it up.
I casnnot test before I code it, and I currently don't have the time to try that.

But if you're interested, you can try hacking it usding the functions listed in the PHP manual.

Boofo
07-01-2004, 07:34 PM
In this new version, the learn window does not close until you close the spell check window. Any fix for this?

Chris Blount
07-01-2004, 07:48 PM
Is there a way to manually populate the "custom.pws" file if we can't get the learning feature to work?

tamarian
07-01-2004, 07:53 PM
In this new version, the learn window does not close until you close the spell check window. Any fix for this?
It's working fine for me.... Are you talking about the little popup when you press the "learn" button? That one closes automaticaaly, unless there's a browser restriction...

tamarian
07-01-2004, 07:56 PM
Is there a way to manually populate the "custom.pws" file if we can't get the learning feature to work?
I don't think so. You can add words by typing the file directly, one word per line, and only alpha characters, no dashes or apostrophes, etc. but for PSPELL to use it, it will need to initialize with it...

Boofo
07-01-2004, 08:19 PM
It's working fine for me.... Are you talking about the little popup when you press the "learn" button? That one closes automaticaaly, unless there's a browser restriction...
Yes, that's the one. It worked fine in the last version. This version, it stays open.

tamarian
07-02-2004, 12:32 PM
Yes, that's the one. It worked fine in the last version. This version, it stays open.
I've just tested it in IE6 and FireFox, and it's working fine for me. The code for closing it has not changed, so it may be a browser setting. Can you try it on another system/browser?

Boofo
07-02-2004, 01:07 PM
I am using the same browser as I always have and it worked fine under version 1.3. Somehow something has changed somewhere because it no longer closes the learn window under 1.4. And I have tried IE AND firefox and I get the same result. I have not touced any settings in IE or Firefox since way before I ever installed version 1.3. Something has changed somewhere in the new version.

tamarian
07-03-2004, 12:26 AM
I am using the same browser as I always have and it worked fine under version 1.3. Somehow something has changed somewhere because it no longer closes the learn window under 1.4. And I have tried IE AND firefox and I get the same result. I have not touced any settings in IE or Firefox since way before I ever installed version 1.3. Something has changed somewhere in the new version.
I was not able to duplicate this on my test environment. It always closes properly.

Post your config file, and I'll try to test with it.

Boofo
07-03-2004, 02:54 AM
I was not able to duplicate this on my test environment. It always closes properly.

Post your config file, and I'll try to test with it.<?
include('global.php');
// Config section
$my_lang = "en"; // set the language you want, make sure you have the correct aspell dictionary on your system
// Access restriction options
$allow_guests = 0; // Change to 1 if you allow guests to post and use the spell checker
$restrict_groups = 0; // Change to 1 to enable access restriction by group id
$allowd_groups = array (2, 5, 6, 7); // usergroups who can access the spell checker
// Learn function options
$customwordlist = "custom.pws"; // make sure this file is readable by your apache user
$learn_enabled = 1; // set to 1 to enable the learn feature. Make sure you test first, to ensure your server setup allows this.
$restrict_learn_function = 0; // set to 1 if you want to restrict which usergroup id may add words to your dictionary.
$word_list_maintainers = array (2, 5, 6, 7); // usergroups that are allowed to use the "Learn" feature
//
// Ignore options
$ignore_quotes = 1; // 1 means ignore the [QUOTE] block, 0 means spell check within quotes
$ignore_code = 1; // Same but for the [CODE] tag
$ignore_php = 1; // Same, but for the [PHP] tag
// end config section
?>

Delirion
07-03-2004, 12:30 PM
I'm probably missing something.... when I try to spellcheck something, I get the popup window with the following error message:

Fatal error: Call to undefined function: pspell_config_create() in /home/swurp3c/public_html/testforum/checkspelling.php on line 49

Line 49 is $pspell_config = pspell_config_create("$my_lang");

tamarian
07-03-2004, 02:55 PM
[QUOTE]<?
include('global.php');
// Config section

..... snip

It's still working fine on bothe IE and FireFox on my environment.

tamarian
07-03-2004, 02:57 PM
I'm probably missing something.... when I try to spellcheck something, I get the popup window with the following error message:


Fatal error: Call to undefined function: pspell_config_create() in /home/swurp3c/public_html/testforum/checkspelling.php on line 49

Line 49 is $pspell_config = pspell_config_create("$my_lang");
Do you have PSPELL and aspell installed? PSPELL needs to be compiled into your php.

Boofo
07-03-2004, 03:13 PM
It's still working fine on bothe IE and FireFox on my environment.
Can you pm me your files and I will try those?

Delirion
07-03-2004, 05:52 PM
Pspell has been compiled into my PHP.

I PMed you about the other thing...

tamarian
07-03-2004, 06:37 PM
Can you pm me your files and I will try those?
The attached zip for 1.4 is identical to my current files.

Baptizer
07-05-2004, 02:15 PM
v1.4
1. Fixed scrolling, so the spelling window will scroll to the next mis-spelled word.
2. Changed config defaults to allow the most common configuration. The "Learn" function is turned of by default. Make sure you test it before tunrning it on.
3. Re-worded comments on config options, hopefully they will now make sense.

Tamarian,
Everything works perfectly on my site except for the learn function. I tried changing the language as you (and a few others) suggested throughout this thread. I am wondering if the problem is because of something else. In your original thread, you mention to 'test' the learn function before turning it on. Exactly how do you do that? Any help would be great.

tamarian
07-05-2004, 03:37 PM
In your original thread, you mention to 'test' the learn function before turning it on. Exactly how do you do that? Any help would be great. There are several ways of testing. The way I did it was through template conditionals so only admins can see the spell check buttons. This way you can test and fine tune all the options, and when done, remove the template conditionals, which in effect "releases" the option to the members.

Another way is to test it on a test forum on the same server, or better yet, on a home server, so you can remove/reinstall aspell and can change things until they work :)

Boofo
07-05-2004, 03:57 PM
The attached zip for 1.4 is identical to my current files.
Then I guess it is just me. Figures.

Baptizer
07-05-2004, 04:27 PM
Thanks Tamarian. That clears things up. Any other ideas as to why the learn function won't work? Anything else I should check? Again the spellchecking part works perfectly (once in a BLUE MOON I'll see the 'contact administrator' error, but that is rare), it is just that darn learning feature that I want to work sooo bad :(


EDIT: Tamarian, any idea how I can get the learn pop-up not to close? THe only reason I am asking is because on one occasion the thing did not close SUPER FAST and I was able to get a glimpse of the text in it. It said 'WARNING' and some other stuff, but it closed so quickly I didnt get the rest. ANy idea?

EDIT 2: Ugh, got it to work!! Forgot to set file permissions :(

corvettecrew
07-13-2004, 02:14 AM
On Boofo's site the Spell Check Button looks just like the other buttons.

https://vborg.vbsupport.ru/

Mine looks like this.

https://vborg.vbsupport.ru/

How do I get the buttons to look the same?

tamarian
07-13-2004, 02:28 AM
On Boofo's site the Spell Check Button looks just like the other buttons.

http://www.corvettecrew.com/forums/images/pictures/spell_check_boofo.gif

Mine looks like this.

http://www.corvettecrew.com/forums/images/pictures/spell_check_corvettecrew.gif

How do I get the buttons to look the same? What do you have in your template for the spell check button?

I think using "class ="button"" should do it...

corvettecrew
07-13-2004, 04:05 AM
That did it. Thanks

Boofo
07-13-2004, 04:34 AM
That did it. Thanks
You could have pm'd me there and I would have told you this. ;)

Wifey
07-13-2004, 07:38 PM
Installed and working perfectly!

/me clicks install

rsuplido
07-28-2004, 01:27 AM
When I click on Spell Check, it opens a window with just nothing in it -- just plain white. There must be a conflict somewhere. Can anyone help out? Thanks.

pixelpunk
08-09-2004, 12:59 PM
Is there a way to limit this function for only one usergroup? Say... my donating usergroup?

tamarian
08-09-2004, 01:21 PM
Is there a way to limit this function for only one usergroup? Say... my donating usergroup? You can use template conditionals, like:

<if condition="$bbuserinfo[usergroupid] == 2 OR $bbuserinfo[usergroupid] == 26">
.....spellcheck template code....
</if>

kall
08-13-2004, 07:36 PM
Will the lack of aspell cause 404 errors?

I'm getting those when I click the button.

Upon checking phpinfo, pspell is indeed enabled, but I see no mention of aspell.

psehgal
08-20-2004, 04:23 PM
Could somebody please help me - I am not the root on the host machine, and so, I cannot go in and make changes to the pspell data/dictionary files. The phpinfo() output shows that pspell is indeed enabled, but I keep getting all kind of errors!

If I set the language to "en", then the spell check page in the small window just times out after trying to reload for a few minutes. If I set the language to anything else, then the page displays correctly, get the error saying -

Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any suitable word lists for the language-tag "english".

Is there any way to install the dictionary files to my local directory, and make pspell read it from there?

Code Monkey
08-22-2004, 08:41 PM
This worked for me in every way except it doesn't update the post. It corrects the words in the pop up and when it closes on completion the original post remains the same. :(

paul41598
08-28-2004, 03:07 PM
How do I "recompile PHP with the "--with-pspell" paramater" My site is hosted by ace-host.net do they have to install aspell or do I. I can't figure this out.

Thanks in advance,
Paul

tamarian
08-29-2004, 02:17 PM
How do I "recompile PHP with the "--with-pspell" paramater" My site is hosted by ace-host.net do they have to install aspell or do I. I can't figure this out.

Thanks in advance,
Paul
It really depends on the hosting setup. Some hosts give you root access and let you do your own thing, some are anal and require they do things their way. If you have a dedicated server, you should be able to install whatever you want, if it's a shared server, they will probably have to install it.

m0h2
09-11-2004, 06:20 PM
just installed it & I'm getting this error
An error occured, please notify your administrator.

m0h2
09-11-2004, 07:09 PM
I get this error when checking a PM every thing else is working fine!

Jing
10-06-2004, 11:51 AM
I get this error when attempting to spell check:


Fatal error: Call to undefined function: pspell_new() in /home/profit/public_html/forums/checkspelling.php on line 26

Line 26 is:

$pspell_link = pspell_new ("$my_lang", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER);

Tried changing custom.pws from "en" to "english", no luck
I do have pspell installed, but unsure of dictionary location the aspell.conf file. How do I edit the aspell.conf file using SSH so that it points to the right dictionary file?

Thanks

I had got the same error. After some checkings, I noticed that PSpell was not compiled correctly with php. I did a re-compilation, and it got rid of the error after that. I compiled it initially with --enable-pspell, while it should have been --with-pspell instead. Check if you compiled it wrongly too.

I couldn't fix this problem here though, which was mentioned by Chris on Page 8 I think. The spellcheck ignores all the spacings and just inserts the text as a long paragraph when spellchecking, then outputs them as one long paragraph too. I tried re-uploading in Binary, or even saving it with VI, it just doesn't work. I am quite sure that it has to do with the codes of pulling the text from the text area.

Jing
10-11-2004, 07:30 AM
no one is going reply?

Arsenik
12-05-2004, 01:42 AM
It doesnt change the text when wysiwyg is used... =/ it does work for the standard/basic editor. Any idea on how to make it work correctly with the wysiwyg? (vb 3.0.3)

docvader
12-05-2004, 05:51 AM
I noticed that PSpell was not compiled correctly with php. I did a re-compilation, and it got rid of the error after that. I compiled it initially with --enable-pspell, while it should have been --with-pspell instead. Check if you compiled it wrongly too.

I've "installed" aspell and pspell, as directed, but it's not showing up on my PHP page. I didn't compile it, I don't think. Don't know how, lol.

Can anyone just write down some directions to compile pspell with php? I have root access, on an OS X server, running PHP 4.34

Thanks!
rich

peterska2
12-09-2004, 11:15 PM
Little help please.

<br />
<b>Warning</b>: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any suitable word lists for the language-tag "en". in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>32</b><br />
<br />
<b>Warning</b>: 0 is not a PSPELL result index in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>85</b><br />
<br />

<b>Warning</b>: 0 is not a PSPELL result index in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>90</b><br />
<br />
<b>Warning</b>: 0 is not a PSPELL result index in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>85</b><br />

<br />
<b>Warning</b>: 0 is not a PSPELL result index in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>90</b><br />
<br />

<b>Warning</b>: 0 is not a PSPELL result index in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>85</b><br />
<br />
<b>Warning</b>: 0 is not a PSPELL result index in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>88</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/virtual/site3/fst/var/www/html/forum/checkspelling.php</b> on line <b>90</b><br />


this is taken from the source of my spell window when it opens.

I've tried renaming 'en' to 'english' in custom.pws and that has had no effect. pspell is enabled. PHP version 4.3.3

tamarian
12-13-2004, 03:45 PM
Little help please.



this is taken from the source of my spell window when it opens.

I've tried renaming 'en' to 'english' in custom.pws and that has had no effect. pspell is enabled. PHP version 4.3.3 It appears that the dictionary is screwed up.

I can't help with this, as I'm encountering the same problem. I've upgraded my PHP and aspell/pspell packages. Only to find out PHP no longer supports newer versions of aspell/pspell. So Instead of downgrading my PHP version and recompiling, I've switched to PHPSpell.

If I do find a way to make it work, I'll post the details, but for now, it's in the hands of pspell developers, as their name changes caused the PHP folks to not support newer version, from what I've read.

Boofo
12-13-2004, 04:46 PM
It appears that the dictionary is screwed up.

I can't help with this, as I'm encountering the same problem. I've upgraded my PHP and aspell/pspell packages. Only to find out PHP no longer supports newer versions of aspell/pspell. So Instead of downgrading my PHP version and recompiling, I've switched to PHPSpell.

If I do find a way to make it work, I'll post the details, but for now, it's in the hands of pspell developers, as their name changes caused the PHP folks to not support newer version, from what I've read.
I'm using PHP v4.3.9 and it works fine for me.

tamarian
12-13-2004, 04:51 PM
I'm using PHP v4.3.9 and it works fine for me. What versions are you using for

aspell,
pspell
and dictionary?

Are they installed from source, or from RPM's?

Boofo
12-13-2004, 05:15 PM
What versions are you using for

aspell,
pspell
and dictionary?

Are they installed from source, or from RPM's?All I know for sure is when he compiles Apache to update it or change anything, he recompiles PSPELL with it and it is still working fine. Always has. I can't get to it to check the versions, sorry. ;)

But here is what I am running if it helps at all:

Apache v1.3.33
PHP v4.3.9
MySQL v4.0.22-standard

GraphicW
12-17-2004, 05:18 AM
It doesnt change the text when wysiwyg is used... =/ it does work for the standard/basic editor. Any idea on how to make it work correctly with the wysiwyg? (vb 3.0.3)

I have noticed this same problem. I have a feeling this spell checker will not work with VB 3.03 the way it is supposed to. Let me know if you should discover something. I will so the same should I discover a way to get it working.

T3MEDIA
12-17-2004, 09:04 PM
What happens if you the phpspell installed and want to use this. any ideas on a smooth exit?

GraphicW
12-18-2004, 01:19 PM
You would simply undo the steps you took to install PHP Spell and then install this hack. If you have a PHP Spell that is working now though, I would suggest leaving well enough alone because this hack does not work with the WYSIWYG mode of Vbulletin 3.03. It only works with standard mode correctly.

JohnBee
12-19-2004, 12:56 PM
Fatal error: Call to undefined function: pspell_new()
in /home/server/www/forum/checkspelling.php on line 32

Any ideas?

Boofo
12-20-2004, 08:08 AM
What versions are you using for

aspell,
pspell
and dictionary?

Are they installed from source, or from RPM's?
I switched servers and we were using PHP 4.3.9 on the new server and PungoSpell was broken. We upgraded to version 4.3.10 of PHP and it is now working fine again. All we did was compile Apache with PSPELL when we rebuilt it. I'm not sure what version it uses doing it that way.

Mark.B
01-01-2005, 10:27 AM
Little help please.



this is taken from the source of my spell window when it opens.

I've tried renaming 'en' to 'english' in custom.pws and that has had no effect. pspell is enabled. PHP version 4.3.3
I am suddenly getting these errors too, it wasn't doing it yesterday and the hosts have not changed anything. Odd.

Stranger still, the spellchecker still actually works, it just spews all those errors out.

DTC
01-01-2005, 12:17 PM
Same here...was working great for months then wack, getting errors. Tried all that was listed here, no go, even after an update to 4.3.10 :(
All files are good and intact...


Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any suitable word lists for the language-tag "en". in /home/dctdg/public_html/forums/checkspelling.php on line 32

Warning: 0 is not a PSPELL result index in /home/dctdg/public_html/forums/checkspelling.php on line 85

Warning: 0 is not a PSPELL result index in /home/dctdg/public_html/forums/checkspelling.php on line 88

Warning: Invalid argument supplied for foreach() in /home/dctdg/public_html/forums/checkspelling.php on line 90

DTC
01-03-2005, 05:02 PM
Just an FYI, aspell is working correctly..tried it at the comand line and it had no problems using aspell -c "filename"....found the dictionary NP...

Using Aspell .33.7.1 and Pspell .12.2 (standard Cpanel rpm versions).

Was working NP with PHP 4.3.9, then crapped out...went to 4.3.10 and still the same errors...

DTC
01-03-2005, 06:04 PM
OK, figured it out! We were missing the .pwli file in the pspell data directory. Cpanel had to wack it at one point...go figure...

Here's what ya need to do:

Check the pspell data directory. If you don't know where that is type:

pspell-config pkgdatadir

That should tell you where to look. In my case it was /usr/share/pspell/

You need to create a file in that directory called en-aspell.pwli (I use english) and the only thing that is in the file is the path to your dictionary. In my case the file contains one line as below:

/usr/lib/aspell/english

Bingo, it works again...

Good 'ole CPanel....

Hope that helps anyone else that has the problem...

Mark.B
01-06-2005, 11:18 PM
My hosts upgraded to php 4.3.10 tonight and it fixed the error.

Dio
01-08-2005, 08:44 PM
If I am posting a new thread or replying to a thread life is good, but when I try to respond to a thread that has "quoting" in it I get an error message - it tells me to talk with my administrator. Any ideas how to correct it so that it is available when spell checking is used during a reply with quoting in it?

Wifey
01-10-2005, 03:36 AM
All of a sudden my spell check isn't working. I'm not sure if it was from a query I ran a few days ago and I have no idea why. It's at least not getting an error anymore when I try to use it since I had my hosting move me to a newer server, but I just reinstalled this hack and I don't understand why it's not working.

I hit spell check and a blank window pops up saying its done. Any ideas?

Dio
01-13-2005, 01:29 AM
Is there anybody out there supporting this hack?

LunaTech
01-13-2005, 04:52 AM
I've solved the "An error has occured, ....your administrator" error in my case. I noticed it only happend when the text had a carrige return. If it was only one line of text no problems. So, not surprisingly, it turns out the problem stems from a carrige return being imbedded in the checkspelling.php. If you edit that file, you must not do it in DOS mode. If you edit the file in DOS mode, it'll break the carrige return and mess up your code. Try uploading a fresh copy of checkspelling.php (in binary mode) if you have any trouble.

Dio
01-13-2005, 10:00 AM
I've solved the "An error has occured, ....your administrator" error in my case. I noticed it only happend when the text had a carrige return. If it was only one line of text no problems. So, not surprisingly, it turns out the problem stems from a carrige return being imbedded in the checkspelling.php. If you edit that file, you must not do it in DOS mode. If you edit the file in DOS mode, it'll break the carrige return and mess up your code. Try uploading a fresh copy of checkspelling.php (in binary mode) if you have any trouble.
Thank you for the response!

Where is the carrige return in the checkspelling.php file, is this something that I can delete? I've uploaded a fresh copy of checkspelling.php and it did not correct the problem. :ermm:

LunaTech
01-13-2005, 04:56 PM
Line 47, 48, and 49 should look like (note, I've replaced the HEX 0D character, the line break, in with a space so it displays right on this page):

// can't have newlines or carriage returns in javascript string
$mystr = str_replace(" ", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

Not:
// can't have newlines or carriage returns in javascript string
$mystr = str_replace("
", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

The problem is most editors won't read it right. I had to use UltraEdit32, in UNIX mode. To see if you're having the same problem as I did, try spell checking a single line of text with no line breaks. Just like 3 words. If that works fine but more text doesn't - that's probably the problem.

Dio
01-14-2005, 07:58 PM
Line 47, 48, and 49 should look like (note, I've replaced the HEX 0D character, the line break, in with a space so it displays right on this page):

// can't have newlines or carriage returns in javascript string
$mystr = str_replace(" ", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

Not:
// can't have newlines or carriage returns in javascript string
$mystr = str_replace("
", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

The problem is most editors won't read it right. I had to use UltraEdit32, in UNIX mode. To see if you're having the same problem as I did, try spell checking a single line of text with no line breaks. Just like 3 words. If that works fine but more text doesn't - that's probably the problem.
Hmmm....I made the changes that you suggested but they did not correct the problem. :ermm:

Wifey
01-15-2005, 05:41 PM
Alrighty I made those changes and I uploaded a fresh install and I'm still having issues.

It was working LIKE A CHARM before then all of a sudden decided not to anymore.

When I hit check spelling the windo pops up, loads, and it's blank and says it's done.

AlexanderT
01-16-2005, 09:37 PM
Hmmm....I made the changes that you suggested but they did not correct the problem. :ermm:
Ditto. Just sometimes this "notify the admin" message appears again; other times it doesn't.

T3MEDIA
01-28-2005, 11:55 PM
Guys... Please be straight up with me. Should I uninstall phpspell and go with this?

From what I see its a your on your own kind of thing.

Please... just be honest and tell me what sup.

thanks.

AlexanderT
01-29-2005, 05:52 PM
I like it better. Works much better with WYSIWYG, and since learning mode is now also available.... plus I think pspell goes easier on your server than a database-based dictionary system... so go with this one!

T3MEDIA
01-29-2005, 09:16 PM
IF anyone is reading this due to a search LET ME BE THE FIRST TO TELL YOU... THIS is better than the "other" spell checking hack on here. (watch the date of this post) I am sorry. I had the other and now... wow... what a differnce... WOW.

INSTALL and a half... with a bag of chips.

Mechanical Mind
02-06-2005, 05:34 PM
I am having a problem that I didn't find anyone else in this thread having. I installed the hack as per the instructions, the most recent version, and I edited three templates. newthread, newreply, and editpost to add the button...

When I type in the editor on "standard" or "the enhanced editor" and click the spell check button, nothing happens? Nothing at all?

Any ideas?

T3MEDIA
02-10-2005, 01:45 PM
If your in the spellchecker and change a word to a word you want and continue checking (ie phat you wanted pat but the option isnt there)
if you run the spell checker again it will "act" like all words are spelled correctly. But if they are not it will say they are.

Just wanted to let you guys know that.

T3MEDIA
02-10-2005, 08:49 PM
Same problem I've realised in 3.0.6

This DID work when I installed it, but not anymore. I've checkedeverything is still where it should be/spelled correctly etc and it is.

Has anyone solved this?
Can you guys do a test please? Can you spell check this on your systems.

useage

"useage"

usage useage and different different different double

dubble dubale dublee

Tell me which words come back as spelling mistakes. AND is the proper answer in the box.

I am starting to see this spellchecker degrade and I do not have "learn" enabled.

Mechanical Mind
02-11-2005, 04:07 PM
Can you guys do a test please? Can you spell check this on your systems. I am starting to see this spellchecker degrade and I do not have "learn" enabled.

I'd be more than glad to try and report back the results. The only problem is that I can not even get it up and running. I am left with a button "spell check" that does NOTHING when clicked. I think the more we help eachother on this hack, the more it will benefit the all of us.

...hint, hint... Anybody have any advice about what problem I may be having. See previous post above.

Mark.B
02-11-2005, 06:24 PM
I have this working fine, and have also altered most of the CSS quite nicely to match the site.

However, I have no idea how to alter the font that the text of the post appears in, within the editor window on the spellchecker, nor the background to this. Any ideas?

Greebo
02-15-2005, 04:28 PM
I don't suppose there is any way to enable this if php doesn't have pspell included? My host doesn't have it compiled into php and won't be adding it.

trulylowcarb
02-21-2005, 11:02 PM
I have pspell enabled but my host tells me I need to upload my own dictionary because they don't store those on the server. I saved a word list as en-us.dic because the php path to 'language' on my particular server is shown as en-us.

I uploaded the dictionary file to my main forum directory and made sure both it and custom.pws are CHMOD to 777.

Now, can someone please advise me as to what else I need to do at this point in order for custom.pws to find and use the proper dictionary?

Thanks in advance.

tamarian
02-21-2005, 11:17 PM
I have pspell enabled but my host tells me I need to upload my own dictionary because they don't store those on the server. I saved a word list as en-us.dic because the php path to 'language' on my particular server is shown as en-us.

I uploaded the dictionary file to my main forum directory and made sure both it and custom.pws are CHMOD to 777.

Now, can someone please advise me as to what else I need to do at this point in order for custom.pws to find and use the proper dictionary?

Thanks in advance.

Your host may need to update their /etc/ dictionary config files to point to your dictionary, if they don't allow the use of the standard paths stated in the apspell conf files.

I have never done it before, so not sure what changes need to be made, but if they have any aspell gurus there, ask them to point the config files to your dictionary files.

trulylowcarb
02-21-2005, 11:46 PM
I never understand ANY of the responses given by my host, I do not think English is a first language for any of them, so I don't know if they can or will help me.... DRAT IT ALL anyway! I really wanted this to work.
But, Thanks anyway....

safiel
02-27-2005, 12:28 AM
OK, figured it out! We were missing the .pwli file in the pspell data directory. Cpanel had to wack it at one point...go figure...

Here's what ya need to do:

Check the pspell data directory. If you don't know where that is type:

pspell-config pkgdatadir

That should tell you where to look. In my case it was /usr/share/pspell/

You need to create a file in that directory called en-aspell.pwli (I use english) and the only thing that is in the file is the path to your dictionary. In my case the file contains one line as below:

/usr/lib/aspell/english

Bingo, it works again...

Good 'ole CPanel....

Hope that helps anyone else that has the problem...

This fix worked for me. Thanks!

Hyrel
02-28-2005, 07:33 PM
This hack is everything I need. I'm a terrible speller =(

However, I'm completely lost as to how to install this. My phpinfo does not have the spell thing in it, so I need to add that but I don't know how. And then the thing with aspell has me completely confused.

If some kind and geneous soul could help me get past these obstacles I think I could wing the rest.

The forum is for my world of warcraft guild. Sadly they are stuck with a girl who knows nothing about php, sql, css. I'm just kind of winging all of this really. I can donate for the help. I just hate embarrassing myself with misspelled words in my messages.

Ship_
03-13-2005, 05:12 PM
I am suck a n00b .. but I dont see the places I am supposed to edit in the newreply .. am I tryin to do it in the wrong part .. I am using newreply.php but dont see it ..

please help me ..

thanks

Mechanical Mind
03-13-2005, 07:27 PM
I am suck a n00b .. but I dont see the places I am supposed to edit in the newreply .. am I tryin to do it in the wrong part .. I am using newreply.php but dont see it ..

please help me ..

thanks

There is a chance that your templates have already been modified, so that you cannot easily find the EXACT location for the modifications...

However, if you post your complete template, then others here who are more experienced should easily be able to pick out the right spot for you...

(We can't tell you where to put it, if we can't see it. ;) )

tamarian
03-13-2005, 08:54 PM
I am using newreply.php but dont see it

This hack does not require editing of any vBulletin php files, just templates from the admin panel.

tamarian
03-13-2005, 08:58 PM
This hack is everything I need. I'm a terrible speller =(

However, I'm completely lost as to how to install this. My phpinfo does not have the spell thing in it, so I need to add that but I don't know how. And then the thing with aspell has me completely confused.

If some kind and geneous soul could help me get past these obstacles I think I could wing the rest.

The forum is for my world of warcraft guild. Sadly they are stuck with a girl who knows nothing about php, sql, css. I'm just kind of winging all of this really. I can donate for the help. I just hate embarrassing myself with misspelled words in my messages.

Unfortunately, to install aspell, you will need access to the root level, or have a host willing to install it, and recompile php for you. I think only dedicated servers can do that, but it depends on the hosting company. If you don't have aspell instaled, and php was not compiled with pspell, and don't have root access, then the best thing is to use the other hack, PHPSpell.

Ship_
03-14-2005, 02:46 AM
This hack does not require editing of any vBulletin php files, just templates from the admin panel.

That makes so much sence now .. thanks ..

but I dont see a quick reply template ..

yes. . I have it working great now on my site

Ship_
03-14-2005, 02:57 AM
Sorry .. I did not read far enough .. I have it now .. Thanks again for the help

Snake
04-19-2005, 10:52 AM
Will this hack work on vB 3.0.7? I just wanna make sure.

whodah
04-22-2005, 07:47 PM
i'm running 3.0.7 and it does not appear to work for the WYSIWYG editor.

basic editor, standard editor (guided or advanced) both work.

i've verified that in WYSIWYG mode that the script does two things:
a) points to:

<input type="button" value="Spell Check" onClick="spellCheck( 'vbform', 'WYSIWYG_HTML', '2');">


b) that the text area in WYSIWYG is identified correctly, namely it's:

<input type="hidden" name="WYSIWYG_HTML" id="html_hidden_field" value="&lt;p&gt;&lt;/p&gt;" />


i was hoping that the js didn't match up to the input name.. but not that easy of a fix!!

dmyrick
04-25-2005, 09:08 PM
Hope this is a simple error but I don't understand it (I'm new to PHP and web designing).
I'm running;
PHP 4.3.11 Win 32 and vBulletin 3.0.7 on Windows Server 2003 and Aspell-0-50-3-3.
I installed the Aspell, enabled the pspell extension and unziped the files to the forums directory for the PungoSpell.
I added the the spell check button to the Newreply template but when I click the button to do a spell check I get the following error;
Line: 911
Char: 1
Error: Object expected
Code: 0
URL: http://www.ultra-inc.com/forums/newreply.php?do=newreply&noquote=1&p=37

whodah
04-25-2005, 09:15 PM
looks more like a javascript error...

dmyrick
04-25-2005, 09:37 PM
It was a javascript error, I forgot a closing quote, oops. Thanks.

Now I get
Fatal error: Call to undefined function: pspell_new() in c:\inetpub\wwwroot\forums\checkspelling.php on line 32
I think I saw this error several post back though so I'm off to search for it.

Can anyone recomend a good PHP book?

bi11i
05-04-2005, 03:23 PM
Nice, very nice. My problem is this, when I run the spellchecker, everything works, but I see this at the top of the spellchecker window:
Warning: array_merge() [function.array-merge (http://forum.opiophile.org/function.array-merge)]: Argument #1 is not an array in \global.php on line 367

Warning: in_array() [function.in-array (http://forum.opiophile.org/function.in-array)]: Wrong datatype for second argument in \includes\functions.php on line 2285

Warning: Invalid argument supplied for foreach() in \includes\functions.php on line 2290
Funny thing is that I have Warning reporting turned OFF in my php.ini, so why am I seeing this anyway? What can be done?

Thanks for the help!

I'm running this on v3.0.7 with IIS 6 and PHP v5.0.4.

I should also post that I get the same error in an additional, smaller window when trying to use the learn function.

tamarian
05-04-2005, 08:51 PM
bi11i, try adding this in the beginning of checkspelling.php, before "include ('global.php');

error_reporting(E_ERROR);

bi11i
05-04-2005, 11:09 PM
Actually, I don't see that line in checkspelling.php. I do see it in pungo-spell-config.php, however it doesn't do anything (no matter which file i put it in.)

Any other ideas?

tamarian
05-04-2005, 11:10 PM
Actually, I don't see that line in checkspelling.php. I do see it in pungo-spell-config.php, however it doesn't do anything (no matter which file i put it in.)

Any other ideas?

Did you fill out the usergroup id's in config?

bi11i
05-04-2005, 11:16 PM
yes, in fact the whole thing works, it's just that I get the warnings.... Strange?

tamarian
05-04-2005, 11:26 PM
yes, in fact the whole thing works, it's just that I get the warnings.... Strange?

Yes, it's strange. Have you installed any hacks to functions.php?

In any case, add this to both php files, and see if it goes:

error_reporting(E_ERROR);

bi11i
05-04-2005, 11:35 PM
actually yes, I'm running vBadvanced. Like I said, I already put it that line in both files... Any others? (how about putting it in functions.php?)

bi11i
05-07-2005, 11:26 PM
my final plea for help! I've tried all of the above and still see these errors.

What can I do? My only hack is vBadvanced; nothing more....

Warning: array_merge() [function.array-merge (http://forum.opiophile.org/function.array-merge)]: Argument #1 is not an array in \global.php on line 367

Warning: in_array() [function.in-array (http://forum.opiophile.org/function.in-array)]: Wrong datatype for second argument in \includes\functions.php on line 2285

Warning: Invalid argument supplied for foreach() in \includes\functions.php on line 2290

Marco van Herwaarden
05-08-2005, 08:28 AM
Try placing the following in your pungo-spell-config.php, just before the include global.php:

$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();


PS What PHP version are you running?

bi11i
05-08-2005, 04:46 PM
That worked! Thanks!

Logician
05-16-2005, 12:08 PM
Line 47, 48, and 49 should look like (note, I've replaced the HEX 0D character, the line break, in with a space so it displays right on this page):

// can't have newlines or carriage returns in javascript string
$mystr = str_replace(" ", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

Not:
// can't have newlines or carriage returns in javascript string
$mystr = str_replace("
", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

The problem is most editors won't read it right. I had to use UltraEdit32, in UNIX mode. To see if you're having the same problem as I did, try spell checking a single line of text with no line breaks. Just like 3 words. If that works fine but more text doesn't - that's probably the problem.
Good catch!

For me this fixed the "Error:Unterminated string constant" problem of messages with linebreaks:

edit checkspelling.php, find:


$mystr = stripslashes($_POST['spellstring']);
// can't have newlines or carriage returns in javascript string
$mystr = str_replace(" ", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);


replace it as:

$mystr = stripslashes($_POST['spellstring']);
// can't have newlines or carriage returns in javascript string
$mystr = str_replace("\r", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);

cteselle
05-18-2005, 10:10 PM
Good catch!

For me this fixed the "Error:Unterminated string constant" problem of messages with linebreaks:

edit checkspelling.php, find:


$mystr = stripslashes($_POST['spellstring']);
// can't have newlines or carriage returns in javascript string
$mystr = str_replace(" ", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);


replace it as:

$mystr = stripslashes($_POST['spellstring']);
// can't have newlines or carriage returns in javascript string
$mystr = str_replace("\r", "", $mystr);
$mystr = str_replace("\n", "_|_", $mystr);


adding the \r did it for me to!

ChrisRogers
05-21-2005, 06:53 PM
jsfj

bsousa
05-29-2005, 09:44 AM
OK, figured it out! We were missing the .pwli file in the pspell data directory. Cpanel had to wack it at one point...go figure...

Here's what ya need to do:

Check the pspell data directory. If you don't know where that is type:

pspell-config pkgdatadir

That should tell you where to look. In my case it was /usr/share/pspell/

You need to create a file in that directory called en-aspell.pwli (I use english) and the only thing that is in the file is the path to your dictionary. In my case the file contains one line as below:

/usr/lib/aspell/english

Bingo, it works again...

Good 'ole CPanel....

Hope that helps anyone else that has the problem...

Who owns this file on your box? I've tried your suggestion and am still getting the same errors. :disappointed:

Neutral Singh
06-01-2005, 05:59 AM
Hi i am constantly getting the following error when i click on Spell Check Button:

A new windows popsup and then display the error message:
Server not Found

Even when i try to run the following link, the error message displays:
http://www.sikhphilosophy.net/sikhphilosophy/checkspelling.php


What could be the reasons. Everything is enabled on server side.

Please guide me.

Thanks

gonecountry
06-02-2005, 09:17 PM
Had this installed on my site but the only thing that happens when you click on the spell check is a blank page comes up, no errors nothing. Any help would be appreciated. Thanks

tamarian
06-02-2005, 11:58 PM
Neutral Singh and gonecountry: If you check through this thread, you'll see that this hack is quite server dependant on PHP compilation and aspell intallation and dictionaries, so it's really hard to debug without admin access to the server. Why not try the PHPSpell hack, it's a lot easier to install:

https://vborg.vbsupport.ru/showthread.php?&threadid=65723

Snake
06-03-2005, 10:28 AM
tamarian, which of your spell hack is better? PungoSpell or PHPSpell? In my opinion, Pungo is the best.

tamarian
06-03-2005, 10:37 AM
tamarian, which of your spell hack is better? PungoSpell or PHPSpell? In my opinion, Pungo is the best.

PungoSpell has a better look and feel, but harder to get working. PHPSpell installs with no problems. I'd say try to install PungoSpell and if it doesn't work, go for PHPSpell :)

Snake
06-03-2005, 03:23 PM
Alright, I hear ya. :)

Vivi Ornitier
06-04-2005, 05:45 PM
Trying to figure it out...

tamarian
06-17-2005, 11:53 AM
There now a new version for vB 3.5:

https://vborg.vbsupport.ru/showthread.php?threadid=83258

Mr. Brian
06-28-2005, 08:53 AM
Any ideal as howcome I got a error?

Fatal error: Call to undefined function: pspell_new() in /home/soccera/public_html/forums/checkspelling.php on line 32

tamarian
06-28-2005, 10:31 AM
Any ideal as howcome I got a error?

This error means your PHP was compiled without pspell support.