vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - vB Spell (https://vborg.vbsupport.ru/showthread.php?t=124578)

Chadi 09-17-2006 02:45 PM

Is anyone going to help?

davidw 09-19-2006 06:26 PM

Please correct me if I am wrong but, in the installcode:
Code:

                        <installcode><![CDATA[
$db->hide_errors();
// Create vB Spell Table
$db->query_write("CREATE TABLE IF NOT EXISTS vbspell (
  word varchar(30) NOT NULL,
  sound varchar(10) NOT NULL,
  UNIQUE KEY word (word),
  KEY sound (sound)
) TYPE=MyISAM");

// Remove Old vB Spell Table
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "vbspell");

// Add Dictionary Terms
if (is_file("./DICTIONARY.DIC")) {
$start_time = time();
$last_time = 0;
$words_processed = 0;

$FileSize = filesize("./DICTIONARY.DIC");
$fp = fopen("./DICTIONARY.DIC","r");

while (!feof($fp)) {
        $data = trim(fgets($fp, 4096));
        if ($data != "") {
                $words_processed++;
                $db->query_write("REPLACE INTO vbspell VALUES('" . addslashes($data) . "', '" . metaphone($data) . "')");
                $end_time = time() - $start_time;
                if ($end_time > $last_time) {
                        $loc = ftell($fp);
                        $percent = round(($loc / $FileSize)*100, 0);
                        echo construct_phrase($vbphrase['processing_x'], "$words_processed... (".$percent."%)") . "<br />\n";
                        vbflush();
                }
                $last_time = $end_time;
        }
}
fclose($fp);
}
$db->show_errors();
                        ]]></installcode>

Why is this
Code:

// Remove Old vB Spell Table
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "vbspell");

listed right after the create table? - the way that appears, anyone who sets that up will immediately create a table and then remove it. What should be the case is the Remove old vb Spell Table FIRST, then the Create if not exists. Although on paper, it would appear that it would not delete a regular non-prefixed vbspell table, it does, or in my case, did delete it. We had to manually (twice now - once for initial install, and once for reinstall after I reimported the product) set up the vbspell table.

davidw 09-19-2006 06:40 PM

LOL, reading through, someone else has already noticed this as well. :P

tspore 09-20-2006 06:24 AM

So how do I get this to work on my server? I tried to delete code, I tried everything listed on all 9 pages. Anyone have any clues that they could give me?

Parker Clack 09-20-2006 10:46 AM

Christian:

Thanks. That fixed it.

Just remove

// Remove Old vB Spell Table
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "vbspell");

from the product install file and it loads just fine.

davidw 09-20-2006 12:15 PM

Quote:

Originally Posted by tspore
So how do I get this to work on my server? I tried to delete code, I tried everything listed on all 9 pages. Anyone have any clues that they could give me?

What is it [not] doing?

ShackMaster 09-20-2006 04:26 PM

I installed it as normal... got db error when spell checking. I removed the
// Remove Old vB Spell Table
$db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "vbspell");

from the .xml install file, imported it again with overwrite enabled.... now clicking on the spell check does nothing.

jw00dy 09-20-2006 04:41 PM

If I remember correctly, I had to delete mine, and actually go to the table in phpmyadmin and smoke the vbspell table as well, then it worked.

ShackMaster 09-20-2006 05:16 PM

lol... it's working now... maybe I wasn't holding my mouth right.

user02934123123 09-23-2006 06:44 AM

Dear all,

I just can't get this to install at all on 3.6.1. When I first tried a normal install with the dictionary file, I got the same problems many others have had: the install script took too long to run, and the server killed it. I then uninstalled the scraps of the mod that had wound their way into the system, and tried the alternative method (as above in this thread); but now always receive the following error during the import run:
PHP Code:

Database error in vBulletin 3.6.1:

Invalid SQL:

                
INSERT INTO setting
                    
(varnamegrouptitlevaluedefaultvaluedatatypeoptioncodedisplayorderadvancedvolatilevalidationcodeblacklistproduct)
                
VALUES
                    
(
                    
'vbspell_allow_all',
                    
'vbspell',
                    
'1',
                    
'1',
                    
'free',
                    
'yesno',
                    
2,
                    
0,
                    
1,
                    
'',
                    
0,
                    
'spellvb'
    
),
    (
                    
'vbspell_use_groups',
                    
'vbspell',
                    
'2,5,6,9,19',
                    
'5,6',
                    
'free',
                    
'',
                    
3,
                    
0,
                    
1,
                    
'',
                    
0,
                    
'spellvb'
    
),
    (
                    
'vbspell_levenshtein_distance',
                    
'vbspell',
                    
'3',
                    
'3',
                    
'free',
                    
'',
                    
4,
                    
0,
                    
1,
                    
'',
                    
0,
                    
'spellvb'
    
);

MySQL Error  Duplicate entry 'vbspell_allow_all' for key 1
Error Number 
1062
Date         
SaturdaySeptember 23rd 2006 03:41:45 AM
Script       
http://www.(...)/forum/admincp/plugin.php?do=productimport
Referrer     http://www.(...)/forum/admincp/plugin.php?do=productadd
IP Address   000.000.000.000
Username     
username
Classname    
vb_database 

I've tried modifying the installscript as per comments above, but to no success.

I would deeply appreciate some assistance from anyone who's managed to get the script to work -- right now it simply doesn't function on 3.6.1, as it won't install.


All times are GMT. The time now is 02:21 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.01509 seconds
  • Memory Usage 1,768KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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