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)

cynix2 08-20-2006 10:00 PM

vB Spell
 
What this does: vB Spell allows you to install a dictionary (English dictionary included) into your MysQL database, and provide a spell checking window that works in both of vB's editor modes, standard and WYSIWYG.

Background: This mod was originally developed by tamarian for vB 3.5.x. With the release of 3.6.x the installer stopped working for fresh installs and the template changes were considerably out of date, tamarian gave me permission to release a 3.6.x version with updates.
This version should work with both 3.5.x and 3.6.x series.

Features:
  • Supports most recent versions of browsers. Tested on IE, Firefox, Mozilla/Netsacpe, Opera and Konqueror (Konqueror implies Safari, but please confirm Mac folks).
  • Learn Feature uses cookies, so it won't increase the database size.
  • Admin panel options.
  • Spell Check button appears anywhere there is a WYSIWYG Enhanced or Standard Editor Toolbar [includes quickreply but not quickedit].
  • Skips quoted text and other tags (PHP, code, etc.).
  • Usergroup permisisons.
  • Template based interface, and uses your default style.
  • Link buttons (Thesarus and Lookup) with links to Merriam Webster's online thesarus and dictionary links with the suggestion for misspelled words.

Installation:
  • Unzip main package.
  • Upload the contents of the 'upload' folder to your forum home directory.
    Regular Install:
    • Unzip dictionary-reg.zip.
    • Upload DICTIONARY.DIC to your forum home directory.
    Alternate Install
    • Unzip dictionary-alt.zip.
    • Import the SQL files to your database.
  • Import product-spellvb.xml.
  • Go to AdminCP > vBulletin Options > vB Spell and edit your usergroup permisisons.
  • Template changes are now automatic. [accept for quickedit]
Q: What is the Alternate Install method for?
A: If you are having problems with the Regular Install (such as your dictionary import freezes at x%) then you should consider using the Alternate Install. If neither of these methods work for you then there might be an issue with your server host.

Upgrading:
  • Unzip main package.
  • Upload the contents of the 'upload' folder to your forum home directory.
  • Import product-spellvb.xml.

To manually force the quickedit template to work with this mod:
postbit_quickedit
Find
Code:

                <if condition="is_browser('ie')">
                        <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
                        <td><div class="imagebutton" id="{$editorid}_cmd_spelling"><img src="$stylevar[imgdir_editor]/spelling.gif" width="21" height="20" alt="$vbphrase[check_spelling]" /></div></td>
                </if>

Replace with
Code:

                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_spelling(null)"><img onclick="spellCheck('3', '$editorid', '2');" src="$stylevar[imgdir_editor]/spelling.gif" width="21" height="20" alt="$vbphrase[check_spelling]" /></div></td>

History:
0.10.x NyNe versions
v0.10.3b - 06/22/07:
Compensated for an issue brought up in this post.
v0.10.3 - 06/22/07:
Added a check to the product installer so it would not remove the vbspell table after just having created it.
Added $vboptions[bburl] to all template code that asks for files (this *might* fix the PhotoPost issues - no promises).
v0.10.2b - 08/26/06:
Fixed error in product installer (removed table prefix).
Changed all <? to <?php for php5 compatibility.
v0.10.2a - 08/26/06:
Removed alt product installer.
Product installer included now checks for dictionary file, if dictionary file is not found it continues installing.
Product installer no longer drops dictionary table before installing.
v0.10.2 - 08/22/06:
vbspell template is now XHTML 1.0 Transitional.
Fixed a version check for vbspell template (made compatible with 3.5.x).
vB Spell window should now open on top of other windows.
Removed table prefix for vbspell sql table (product installer includes code to remove old tables).
Included alternate installation method (Credit goes to Replicators for the SQL Install method).
v0.10.1 - 08/21/06:
Beta release for 3.6.x series.
Switched to product/plugin based installer.

0.9.x tamarian versions
v0.9.12 - 12/25/05:
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).
v0.9.11 - 11/02/05:
Fixes a bug with slashes in text.
v0.9.10 - 10/17/05:
Check for primary and secondary group for permission.
Bug fix for quoted words.
v0.9.9 - 09/13/05:
Bugfix for JS on IE with RC3.
v0.9.8 - 07/15/05:
Bugfix for JS code mismatch with template.
v0.9.7 - 07/14/05:
Initial release for vB 3.5 beta-4.

NOTE: The above section says NyNe versions, because I go by the name NyNe everywhere accept here.

Scrrenshots: (from tamarian's 3.0.7, but it's identical)

cynix2 08-21-2006 07:02 PM

Please give feedback.

Im not sure how well this works on Macs (if at all).

amnesia623 08-21-2006 10:47 PM

Has this been successfully installed on 3.6?

Replicators 08-22-2006 12:14 AM

Ran into the same problem i had with tam's hack and that is "exceeding max questions", i would suggest having the dictionary as a .sql and just have the product small and painless, or more people will run into this problem. I get to 98% then get a db error.

I will see if i can do it myself, and put it up on here. Also you shouldn't use admincp as a directory as some people do rename this folder for security reasons.

Replicators 08-22-2006 01:55 AM

I redone the way this mod handles the dictionary. Instead of drawing from the dictionary, it will use sql files instead. This is for only the people that get "Exceeded Max Questions" when importing the product. If it imports fine, DO NOT use this!

There was some changes done to the product file aswell as the vbspell.php, as i took out the use of table prefix and instead use just vbspell as a DB table.

@cynix2 - If i was wrong for doing this, pm me, and i will remove this. It is just another way of doing it, and i did give you full credit for it.

DaveAK 08-22-2006 02:24 AM

As with the 3.5.x version the path to the DICTIONARY.DOC file is hard coded. Some people may not be using admincp for their control panel directory.

Other than that all seems good! Thanks!

(I haven't made the QuickEdit mod yet though, but I see no reason why that should give any problems.)

DaveAK 08-22-2006 02:59 AM

OK, I made the Quick Edit mod and that seems to work as well, but one annoying thing is that when you click the icon the popup window is hidden behind the main browser window. I'm using the latest FireFox on XP. Any ideas as why it does this?

Azhrialilu 08-22-2006 11:23 AM

I might try this, although I don't really like automatic template edits as they generally don't work for me as I customise my styles so much lol so expect me to be back asking what the edits are and where I need them to go :)

Maagic 08-22-2006 12:24 PM

Quote:

Originally Posted by amnesia623
Has this been successfully installed on 3.6?

Just did and it is working as described.

Snake 08-22-2006 12:51 PM

Excellent been waiting for this! :)

bbcentral 08-22-2006 02:28 PM

I just did a test on my 3.6.0 test server, and it failed.
It got to 97%, then:
Quote:

Fatal error: Maximum execution time of 30 seconds exceeded in MY_SITE_ROOT\forum\admincp\plugin.php(1924) : eval()'d code on line 24
I am trying again using Replicators' version above.
I've imported the product XML, this time it worked.
Importing the SQL files using phpMyAdmin...
Full SQL is too large (I have an 8MB upload limit).
Trying with Split SQL...
I strongly recommend deleting the ZIP files after you import each one.
This way you don't lose track of which one you are up to, and don't get duplicate records.
Part 1 and 2 worked, part 3 isn't working.
Quote:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO vbspell VALUES ('dacryon', 'TKRYN')' at line 1
Seems to be something to do with importing zip files. I'll import the SQL file instead.
Still doesn't work. I had to resave the file in DOS format for it to import correctly. Seems part 1 and 2 are DOS format SQL files, the rest are UTF-8, and I can't import them unless I resave them in DOS format.
All files imported, vbspell has 192,917 rows of data.
Just made a post, the spellcheck button appears now. It corrected both words I spelt wrong, however when you click the spellcheck button the new window opens as a pop-under. I'm using Firefox on XP.

Apart from that, all working! Thanks to both of you for doing such a great job, now I get to try doing it on my live forum! :D

jrofosho 08-22-2006 02:39 PM

I get this error when i click the "Check Spelling" icon:

Warning: main(./includes/searchwords.php): failed to open stream: No such file or directory in /vbspell.php on line 40

Fatal error: main(): Failed opening required './includes/searchwords.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/range/public_html/vbspell.php on line 40

bbcentral 08-22-2006 02:46 PM

That's a weird one jrofosho.
I know this is obvious, but does that searchwords.php file definitely exist in the includes folder?
It's part of vBulletin.

bashy 08-22-2006 03:05 PM

Hi

Just installed on 3.6 and install went 100% ok
Using it is different though, Window is behind browser and the window aint right please see image

Any ideas please....

Before anyone says out.....yes, its me, the one with all the hacks installed...
Look he's at it again....lol :p

bbcentral 08-22-2006 03:34 PM

Bashy, I guess any problems you're having are because of another mod :)
I've only got a few installed and it works with them. I think you've got some template editing to do :P
wow, I'm stunned! If I tried to install that many hacks, I'd get beaten up by my members :D

bashy 08-22-2006 03:41 PM

The issue in the image is the portal i use m8....

I would not have a clue how not to get the portal to show up in the popup :(

Oh well, looks like this aint for me :(

cynix2 08-22-2006 03:50 PM

Quote:

Originally Posted by jrofosho
I get this error when i click the "Check Spelling" icon:

Warning: main(./includes/searchwords.php): failed to open stream: No such file or directory in /vbspell.php on line 40

Fatal error: main(): Failed opening required './includes/searchwords.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/range/public_html/vbspell.php on line 40

searchwords.php comes with vB, you might want to re download the vB package from vbulletin.com and then upload the file to the includes folder

Quote:

Originally Posted by bashy
Hi

Just installed on 3.6 and install went 100% ok
Using it is different though, Window is behind browser and the window aint right please see image

Any ideas please....

Before anyone says out.....yes, its me, the one with all the hacks installed...
Look he's at it again....lol :p

can you send me the plugins your portal uses?

cynix2 08-22-2006 04:00 PM

Quote:

Originally Posted by Replicators
I redone the way this mod handles the dictionary. Instead of drawing from the dictionary, it will use sql files instead. This is for only the people that get "Exceeded Max Questions" when importing the product. If it imports fine, DO NOT use this!

There was some changes done to the product file aswell as the vbspell.php, as i took out the use of table prefix and instead use just vbspell as a DB table.

@cynix2 - If i was wrong for doing this, pm me, and i will remove this. It is just another way of doing it, and i did give you full credit for it.

no it's cool, glad you made the changes, i'll include it as a download
the only thing i dont really like is the table prefix being missing, but it's not a big deal

deegan 08-22-2006 05:48 PM

I uploaded both the upload folder, and the dictionary zip, now I am at a loss for what to do next, as I don't see vbspell in my list on vb options?

cynix2 08-22-2006 05:51 PM

first off dont upload the upload folder, open the folder and upload what's inside
secondly dont upload the dictionary zip, unzip it and upload what's inside (assuming you're doing the regular install, if not you'll need to import the sql files)

then import the product file to vB's product manager

bbcentral 08-22-2006 05:53 PM

I run a Blues Brothers forum, and I needed a way to add "Aykroyd" to my dictionary (somehow "Belushi" was already in there!), as well as any words we come across that should be in the list.
I searched this thread, and the other vB Spell thread and couldn't find any easy way to add new words, apart from the Learn cookie method (which isn't much help in this case). Until this feature is added (perhaps as an AdminCP thing), here's a page I threw together quickly to generate the SQL required to add a new word to your dictionary. I assume this also works for 3.5.x, if they're using the same vbspell table structure.

http://www.bbhosts.net/vbspell/

You should be able to just copy/paste the SQL into phpMyAdmin, or whatever database admin software you use.

If it's useful to anyone let me know, extra feature ideas are welcome :)

deegan 08-22-2006 06:03 PM

Quote:

Originally Posted by cynix2
first off dont upload the upload folder, open the folder and upload what's inside
secondly dont upload the dictionary zip, unzip it and upload what's inside (assuming you're doing the regular install, if not you'll need to import the sql files)

then import the product file to vB's product manager

O.k, thanks, did that, I did unzip the diction. sorry, I am not sure about the last part of your instruction?, please let me thank you in advance

"then import the product file to vB's product manager"

Should I erase that upload folder in there?

cynix2 08-22-2006 06:14 PM

keep everything you've done so far, go to the plugins and products section in your admin cp and click manage products, then click add/import product, browse for product-spellvb[reg].xml
click import

cynix2 08-22-2006 06:16 PM

bbc that is a good idea, i'll look around for a good way to add a page to the admincp so that this can be done

deegan 08-22-2006 06:20 PM

Quote:

Originally Posted by cynix2
keep everything you've done so far, go to the plugins and products section in your admin cp and click manage products, then click add/import product, browse for product-spellvb[reg].xml
click import

When I browse, it takes me to my pictures, sorry, I am totally ignorant to this system, and computers period. How do I get to my ftp, or should I just find it on my desktop.

transitbus 08-22-2006 06:27 PM

well installing this crashed mysql (max 50,000) by using the regular install method so I think you need to break up the regular install into chunks like you do in the alt install.

Now to wait on hold forever to have my host restart mysql. :angry:

deegan 08-22-2006 06:31 PM

I think I'm missing a step here, how to communicate with my host, is there some way to do this, perhaps a setup that allows me to transfer files and what not?

steadicamop 08-22-2006 06:47 PM

Got this installed, took a bit had to do a progressive dump into mysql to get it working!!

Now I got that far, no text actually shows on the spell checker, it must give me options but the text just isn't there, it changes it to nothing!!!

Also the pop up window it opens in isn't long enough, the text box just disappears off the side....

HELP!!

transitbus 08-22-2006 06:57 PM

To me this isn't worth crashing and f'ing up your database over. I got the exceed 50k error both ways so I have decided to forget this for now.

bashy 08-22-2006 06:58 PM

There aint any m8...its a stand alone, but intergrated, does that make sense... www.mkportal.it

Quote:

Originally Posted by cynix2
can you send me the plugins your portal uses?


deegan 08-22-2006 07:03 PM

Anyone know anything about importing from your server?

I can't seem to find the stuff I have put in my admincp?

steadicamop 08-22-2006 07:09 PM

Sorry - sussed out why it wasn't working correctly; I dumped the data into the DB first then installed the product - which wipes the table first, so removed everything I just uploaded!!

For anyone having problems getting the Dictionary into the database, try this:

http://www.ozerov.de/bigdump.php

It can dump very large sql files into the database in small chunks, very simple and works extremely well, and doesn't crash out your database!!

Cheers

Jason

deegan 08-22-2006 07:18 PM

Ahhh, o.k, didn't see that other file on my desktop the vb spell reg. got it now, but it says.................

Warning: filesize(): Stat failed for ./DICTIONARY.DIC (errno=2 - No such file or directory) in /admincp/plugin.php(1232) : eval()'d code on line 18

Warning: fopen(./DICTIONARY.DIC): failed to open stream: No such file or directory in /admincp/plugin.php(1232) : eval()'d code on line 19
Unable to open dictionary file: ./DICTIONARY.DIC

cynix2 08-22-2006 07:28 PM

@bashy
open ./includes/functions.php
find and remove
Code:

//added from MKportal
define ( 'IN_MKP', 1 );
require_once "../mkportal/include/VB/vb_out.php";
$output = mkportal_board_out($output);
//end added

create a new plugin on the 'global_complete' hook call it 'MK Portal' with the following code
Code:

$holdmkp[] = "vbspell";
$mkp = "yes";

foreach ($holdmkp as $id => $item) {
        if(strpos($filename, $item) === false || strpos($userinfo['location'], $item) === false){ $mkp = $mkp; } else { $mkp = "no"; }
}

if ($mkp = "yes") {
//added from MKportal
define ( 'IN_MKP', 1 );
require_once "../mkportal/include/VB/vb_out.php";
$output = mkportal_board_out($output);
//end added
}

if you have any other pages you dont want the sidebar on just add more lines ad the top like this
Code:

$holdmkp[] = "index";
$holdmkp[] = "showthread";

ect...
that SHOULD fix the problem with that portal

cynix2 08-22-2006 07:31 PM

@deegan
you didnt upload the dictionary.dic file to your forum home directory
please do this first, THEN import the product
also make sure you've uploaded all the files from the main package as well (not just the dictionary)

deegan 08-22-2006 07:35 PM

Quote:

Originally Posted by cynix2
@deegan
you didnt upload the dictionary.dic file to your forum home directory
please do this first, THEN import the product
also make sure you've uploaded all the files from the main package as well (not just the dictionary)

So the dictionary. dic goes to home, not admincp?

bashy 08-22-2006 07:36 PM

Cheers m8

So...doing this, i wont loose the Forum within the portal look will i?
Cause that bit you said to remove is thet bit that does that ya see?

Nother issue....

On uninstall it dont uninstall properly.....

Please see image..... How do i rectify that please?


Quote:

Originally Posted by cynix2
@bashy
open ./includes/functions.php
find and remove
Code:

//added from MKportal
define ( 'IN_MKP', 1 );
require_once "../mkportal/include/VB/vb_out.php";
$output = mkportal_board_out($output);
//end added

create a new plugin on the 'global_complete' hook call it 'MK Portal' with the following code
Code:

$holdmkp[] = "vbspell";
$mkp = "yes";
 
foreach ($holdmkp as $id => $item) {
    if(strpos($filename, $item) === false || strpos($userinfo['location'], $item) === false){ $mkp = "yes"; } else { $mkp = "no"; }
}
 
if ($mkp = "yes") {
//added from MKportal
define ( 'IN_MKP', 1 );
require_once "../mkportal/include/VB/vb_out.php";
$output = mkportal_board_out($output);
//end added
}

if you have any other pages you dont want the sidebar on just add more lines ad the top like this
Code:

$holdmkp[] = "index";
$holdmkp[] = "showthread";

ect...
that SHOULD fix the problem with that portal


cynix2 08-22-2006 07:46 PM

@bashy
wait no the plugin above is wrong
change
Code:

if(strpos($filename, $item) === false || strpos($userinfo['location'], $item) === false){ $mkp = "yes"; } else { $mkp = "no"; }
to
Code:

if(strpos($filename, $item) === false || strpos($userinfo['location'], $item) === false){ $mkp = $mkp; } else { $mkp = "no"; }
*updated in original post*

that should keep the portal on your pages but not show it on the spell checker

as for the uninstall stuff, make sure your templates for editor_toolbar_on, postbit_quickedit, and showthread_quickreply are reverted

deegan 08-22-2006 07:54 PM

It appears to be working, thanks, I put it in the folder above admincp.

Should I erase the other dictionary files I put elsewhere, or does that matter?

cynix2 08-22-2006 07:55 PM

@deegan
it wastes space, so i recommend you delete all *.dic files now that your installation is complete, but there is no need to remove them if you dont want to or dont feel comfortable doing it


All times are GMT. The time now is 05:05 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.01544 seconds
  • Memory Usage 1,856KB
  • 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
  • (10)bbcode_code_printable
  • (11)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