vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   PHP Spell Checker intergration into vBulletin (https://vborg.vbsupport.ru/showthread.php?t=54204)

Tropicalsuns 07-08-2003 08:09 PM

I can't seem to get by this:

Quote:

You must choose a Database Type in the Spell Configuration file.
I have database set to MySQL

Quote:

/ ----- Uncomment which ever line you need -----
// ----------------------------------------------
// $Spell_Config["DB_Type"] = "PHPBB";
// $Spell_Config["DB_Type"] = "Hivemail";
$Spell_Config["DB_Type"] = "MySQL";
// $Spell_Config["DB_Type"] = "PHPNuke";

It does not form a spelling table in the database.

It just goes right to the "you must choose database"

Any Thoughts?

Nathan_Anderson 07-09-2003 03:06 AM

All,

Thanks to iggy123 for supporting this mod on this site. I have got Jelsoft to give me access for a week to clear up any confusion and answer some questions. If you want me to stay around longer you will have to let the reps at Jelsoft know that I am legit and worth keeping around. :-D

0. Make sure you upload everything from Common & from the MySQL directories to your "spelling" directory!

1. I noticed that there was some confusion about "learn" -- this does not modify anything on your server -- you don't have to worry about users adding "bad" words to your dictionary. :-) It only effects the user who learned the word. So If I learn "phpSpell" then when you spell check it still will come up wrong for you; since only I learned it.

2. If you have pspell/ispell installed/built in to your php; you can choose to use pspell rather than mysql as your dictionary source.
(This presumes you have pspell/ispell installed correctly and a dictionary for them installed correctly).

3. Most people won't have pspell installed; so as of this moment you will want to choose:
Code:

$Spell_Config["DB_Type"] = "MySQL";
remember you only want ONE "DB_Type" uncommented. Second you will need to make sure you change right below it:
Code:

  $Spell_Config["DB_Username"] = "...";
    $Spell_Config["DB_Password"] = "...";
    $Spell_Config["DB_Database"] = "...";
    $Spell_Config["D_Host"] = "localhost";

To what you have in your "config.php" file.

4. For those who would like more possible words to show up you have two options:
Code:

  $Spell_Config["Levenshtein_Distance"] = 3;
change this to a larger number -- it will product more words.
and/or this one.
Code:

  $Spell_Config["Off_By_One_Search"] = 0;
Change to 1 or 2. 1 = Checks only if no matches were found using the normal search. 2 = Always check this way also. This option is tremendously slower than the normal method. Which is why the default is typically set at 1 or 0.

5. Feel free to ask me anything about the spell checker and problems with it and I will attempt to help you out while I have access to here.

And finally I have added support for vBulletin in the next version of the spell checker. :-) You will set the DB_Type = "vBulletin" and everything else besides the template change will be handled for you. However I need someone who wants to test it to make sure I got it right. :-D I don't have access to vBulletin, so I am using what I found posted in another forum as the base to add the support. If someone want to help me get it fully supporting 2.x & 3.x let me know!

Nathan.

iggy123 07-09-2003 07:28 AM

Nathan - Thnx for this support you application is great and thnx for taking the time to come to the boards and explain.
I would love to help you more, but as I explained in my mail messages to you - and i think you will have found out - I am not very good at php..
If you need a "character reference" then let me know.

msimplay 08-07-2003 04:14 AM

excellent is all i can say :P
should have it as default in vbulletin :D

snakes1100 08-07-2003 04:44 AM

vb 2.3.0

1st install, no issues and seems to be working fine. Thanks Iggy

Added all the additions Intex posted also, except i went back to the bginput instead of bgclass.

Overgrow 08-12-2003 04:03 PM

Thanks! (consider it licked)

TLCanna 08-13-2003 06:06 PM

Took me about three hours, but it was well worth the time, my members are ecstatic.

The way the dictionary and mysql work is, the installation creates a new table in the forum database. And you have to have the dictionary file in the spelling directory in order for the installation to load the new table. All of which was omitted in the documentation. Or at least I didn't see that part.

Also the javascript has to be changed to recognize the form and textbox.

Use the MySQL native connection for the database type, and supply the password and databse info of your forum database.

On a scale of complexity, this is by far the hardest hack yet, but the most rewarding.

If anybody needs help, shoot me an email, and I will be glad to help.

Anna

TLCanna 08-13-2003 06:09 PM

Quote:

07-08-03 at 04:09 PM Tropicalsuns said this in Post #41
I can't seem to get by this:

I have database set to MySQL

It does not form a spelling table in the database.

It just goes right to the "you must choose database"

Any Thoughts?


You forgot to add the dictionary file to the spelling directory. Do that, and you will be off to the races.

TLCanna 08-13-2003 06:13 PM

Quote:

06-20-03 at 12:40 PM iggy123 said this in Post #20
To disable the learn function totaly do this:

In the spelling folder open your spelling.js (remember to back it up first...)

Online 404 (approx) find:
PHP Code:

    odoc.write("<input type='button' value='Learn' class='clbutton' 
onclick='this.blur();parent.Learn_Word("
+The_Current_Word_ID+");'><br>"); 

and delete all of it

then still in spelling.js find online 473 (approx):
PHP Code:

function Learn_Word(Word_ID)
{
  
Word Bad_Words[Word_ID].Word;
  
Cookie Get_Cookie("SpellLearned");
  if (
Cookie == nullCookie Word;
  else 
Cookie Cookie "," Word;
  
Set_Cookie("SpellLearned",Cookie);
  
Ignore_All_Words(Word_ID);


and delete that as well.

Save the spelling.js and the learn button is removed.


Why do you want to delete the learn button, It looks like to me that it only updates a cookie, and doesn't actually add any new records to the databse. Am I missing something?

Parker Clack 08-13-2003 07:28 PM

Nathan:

I love your script and I am using it on my site. I also have pspell installed on my server and I was wondering how I would go about changing the config file so that it uses pspell instead of MySQL. Also once I have it set up to use pspell can I delete the spelling_words table that was set up in my database?

I almost forgot. I have aspell enabled with my version of PHP and I was wondering if this can be set up to use aspell instead?

Thanks,
Parker

Parker Clack 08-14-2003 10:38 PM

Does anyone have Nathan's email address? I would like to get in touch with him regarding using his script on our forum using aspell or pspell instead of MySQL.

Thanks,
Parker

Nathan_Anderson 08-14-2003 11:21 PM

Quote:

Yesterday at 01:28 PM Parker Clack said this in Post #50
[B]Nathan:

I love your script and I am using it on my site. I also have pspell installed on my server and I was wondering how I would go about changing the config file so that it uses pspell instead of MySQL. Also once I have it set up to use pspell can I delete the spelling_words table that was set up in my database?
Yes, you go into the configuration and set the dbtype to pspell. :) Upload the spell_pspell.php file Then you can delete the word table as it will then use your pspell/aspell tables.


Quote:

I almost forgot. I have aspell enabled with my version of PHP and I was wondering if this can be set up to use aspell instead?
Yes, if your apell is a recent version; then the php pspell interface is what is used to call both the older pspell and the newer aspell libraries. If you have a really old verison of apell then it might not work.

Nathan.
P.S. My Email address is in the documentation phpspell@master-technology.com

Nathan_Anderson 08-14-2003 11:33 PM

Anna,

Quote:

The way the dictionary and mysql work is, the installation creates a new table in the forum database. And you have to have the dictionary file in the spelling directory in order for the installation to load the new table. All of which was omitted in the documentation. Or at least I didn't see that part.
Also the javascript has to be changed to recognize the form and textbox.
That is basically because I don't actually have a copy of vBulletain. So, I won't have install instructions (or a nice spell_vbulletin.php or .js) until someone wants to work with me and give me some information that I need. :)


Quote:

On a scale of complexity, this is by far the hardest hack yet, but the most rewarding.
Sorry, that it was so hard. Glad you like it. :D

It is very hard to guess at things. :-D If I have access to the code; you would see a nice and easy drag and drop install like phpbb, or invisionboard. Once someone helps me; I hope to have a easy install instructions for vBulletin.

Nathan

Parker Clack 08-15-2003 01:09 AM

Nathan:

Using $Spell_Config["DB_Type"] = "pspell";
returns
"You must choose a Database Type in the Spell Configuration file."

I don't see anything in the config file that calls on the spell_pspell.php file if pspell is what is set as the DB_Type.

Any suggestions?

Parker

Nathan_Anderson 08-15-2003 03:33 AM

Quote:

Today at 07:09 PM Parker Clack said this in Post #54
Nathan:

Using $Spell_Config["DB_Type"] = "pspell";
returns
"You must choose a Database Type in the Spell Configuration file."

I don't see anything in the config file that calls on the spell_pspell.php file if pspell is what is set as the DB_Type.

Any suggestions?

Parker



Line #33 in the config file is:
Code:

//  $Spell_Config["DB_Type"] = "PSPELL";
You uncomment it.

2nd, in the pspell directory of the last couple versions of my spell checker is the spell_pspell.php file which you upload.

Nathan.

Parker Clack 08-15-2003 09:07 AM

Nathan:

The .zip file that we have here to download does not have that line in it or anyway of telling it when the DB_Type is pspell what to do if it is pspell.

Is there anyway you can email me a copy of phpspell to me?

Thanks,
Parker

Jim Mayhugh 08-15-2003 01:40 PM

Took all of 5 minutes to install, works like a charm.

Great Hack. Thanks.

Nathan_Anderson 08-15-2003 01:50 PM

Quote:

Today at 03:07 AM Parker Clack said this in Post #56
Nathan:

The .zip file that we have here to download does not have that line in it or anyway of telling it when the DB_Type is pspell what to do if it is pspell.

Is there anyway you can email me a copy of phpspell to me?

Thanks,
Parker

At the bottom of any of my messages on any of the forums I watch is a link to the latest version of phpspell. :)

Nathan.

pgowder 08-19-2003 11:42 PM

Is this what vbportal.com uses for the spell checking?

Nathan_Anderson 08-20-2003 12:23 AM

Quote:

Today at 05:42 PM pgowder said this in Post #59
Is this what vbportal.com uses for the spell checking?

Have no idea -- they don't seem to have a public forum that I can post on without signing up for a new account. If you click on my link at the bottom of the page and try out the spell checker. (Actually do a spell check to see it in action as the initial page is just a simple form.)

Nathan.

pgowder 08-20-2003 12:32 AM

Is it possible to change the button to match the submit and preview buttons?

Nathan_Anderson 08-20-2003 12:46 AM

Quote:

Today at 06:32 PM pgowder said this in Post #61
Is it possible to change the button to match the submit and preview buttons?
Yes.

Nathan.

iggy123 08-20-2003 01:01 PM

Quote:

Today at 01:42 AM pgowder said this in Post #59
Is this what vbportal.com uses for the spell checking?


No its not the one they use - not to sure what it is though.

Parker Clack 08-23-2003 12:47 PM

Nathan:

This doesn't appear to be working in Opera. Any ideas?

Parker

Nathan_Anderson 08-23-2003 02:06 PM

Which version of Opera? What version of phpSpell?
See if it works at: http://www.master-technology.com/demo-spell/
Which is always running the latest code base.

Nathan.

Kaelon 09-03-2003 03:25 AM

This was originally working fine under 2.3.0, but then I upgraded to 2.3.2 and now the pop-up loads, but doesn't do any spell-checking.

Was I supposed to do something to the vBulletin files themselves?

Thanks,
Kaelon

FastAttack 09-14-2003 05:12 AM

works great on 2.3.2 :)

obsidian 10-07-2003 09:20 PM

Quote:

Originally Posted by pgowder
Is it possible to change the button to match the submit and preview buttons?

Any hints as to how to do this? I think I am having a Monk Moment because my buttons do not match :)

Nathan_Anderson 10-07-2003 09:27 PM

You just need to change the template so that the class is the same for the spellcheck button as the other buttons.

Nathan.

obsidian 10-07-2003 10:41 PM

ahhh got it. Thanks for your help. Great Hack.

NJTackle 10-28-2003 06:45 PM

Does this work with vB3 Beta 7?

Thanks! ;)

Nathan_Anderson 10-28-2003 10:55 PM

The latest version on my site should.

Nathan.

NJTackle 10-28-2003 11:22 PM

Should is the key phrase! :rolleyes:

I downloaded the latest version and it doesn't include an install sheet for vBulletin. So I tried to use mySQL, but can't find where to put the code for the Spell button. vb3 is a completely different beast considering the new text editor WYSIWYG!

Any ideas?

NJTackle 10-29-2003 08:52 PM

Quote:

Originally Posted by Nathan_Anderson
The latest version on my site should.

Nathan.

Can you post install instructions specific to VB3 beta 7? Your download doesn't appear to include this.

Thanks! ;)

jbear6 11-01-2003 05:53 PM

Does this work on Vbulletin 2.2.6?

Thanks
Jbear6

N_Jay 12-16-2003 11:11 PM

Is this the best spell checker?

Also, what is teh "INSTALL" button on the thread for?
Is that to simulate how the hack works?

If so, I could not see a difference.

NJTackle 12-26-2003 11:06 PM

Well, I've got this working in v3.0.0 Gamma, but only for the standard text editor. It doesn't work with WYSIWYG. :disappointed:


Can someone help with this???? :rolleyes:

Thanks!

(Excellent mod Nathan!!!! Thanks!)

Acido 01-16-2004 12:35 AM

Just suporting this request. I'm waiting to use it with vb 3.0.0 wysiwyg

;)

Red Blaze 01-30-2004 03:30 PM

Installed with no problems. This should not be in beta, it works fine even for the quick reply.

Emmy2 02-22-2004 11:45 PM

Okay, I think I've sorta got this figured out. Everything looks okay and I have the Spell Check buttons in all the right places.

The only problem for me is when I go to the forums/spelling/spell_admin.php and try to import the english dictionary I get this error message...

Quote:

Installing ENGLISH.DIC (English)...
Unable to create dictionary database table: Code: 1226
Message: User 'myusername' has exceeded the 'max_questions' resource (current value: 72000)
Result: Link: Resource id #3
DB: bwforums User: Server: mysqlserverinformation Unable to perform spell check at this time.
Am I right in surmising that it's telling me I've used up the 72000 queries per hour limit that my webhost has? Any way around this? Can I create the dictionary table some other way? I think it got to around 18% of the file before I got the error message. Or am I doing this all wrong? Please help, I'm so close and yet so far!


All times are GMT. The time now is 09:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01440 seconds
  • Memory Usage 1,851KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete