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


All times are GMT. The time now is 04:57 AM.

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.01192 seconds
  • Memory Usage 1,760KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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