vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vB Spell :: Spell Checker in WYSIWYG and Standard Modes (https://vborg.vbsupport.ru/showthread.php?t=92202)

tamarian 07-13-2005 10:00 PM

vB Spell :: Spell Checker in WYSIWYG and Standard Modes
 
A 3.6 version by cynix2 is posted here:
https://vborg.vbsupport.ru/showthread.php?t=124578

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: Many of you liked PungoSpell, but didn't like recompiling PHP for it. Many liked PHPSpell, but didn't like the lack of WYSIWYG support and browser compatibility. vB Spell solved both problems, I hope, by combining the best of each.

Features:
o Supports most recent versions of browsers. Tested on IE, Firefox, Mozilla/Netsacpe, Opera and Konqueror (Konqueror implies Safari, but please confirm Mac folks)
o Learn Feature uses cookies, so it won't increase the database size
o Admin panel options
o Works in WYSIWYG toolbar, Standard toolbar, and no toolbar
o Can be added in full edit mode, quick edit and quick reply.
o Skips quoted text and other tags (PHP, code, etc.)
o Usergroup permisisons
o Template based interface, and uses your default style.
o Link buttons (Thesarus and Lookup) with links to Merriam Webster's online thesarus and dictionary links with the suggestion for misspelled words.

Installation:
Note: There is a french version of vB Spell, by cclaerhout posted here

1. Upload files and run vbspell_install.php
2. Go to AdminCP > vBulletin Options > vB Spell and edit your usergroup permisisons.
3. Template edits: (see alternative method, if you don't mind removing the ieSpell button made by vB : https://vborg.vbsupport.ru/showpost....9&postcount=48)

For each template where you would like to add a vB Spell, do the following edits (Example: editpost, newreply, newthread, etc.)

A. Find:
HTML Code:

</head>
Add before:
HTML Code:

<script src="vbspell.js"></script>
B. Find: (or anywhere in the body)
HTML Code:

$navbar
Add after:
HTML Code:

<form name="spell_form" id="spell_form" method="POST" target="spellWindow" action="vbspell.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:
HTML Code:

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

Add below:
HTML Code:

<input type="button" class="button" value="Spell Check" onClick="spellCheck('vbform', '$editorid', '2');" />

Other templates:

Optional: Other Templates that contain edit boxes are:
USERCP_SHELL just add A before the </head section and B after it. Required for pm_newpm and modifysignature.
editpost
Calendar Templates: calendar_edit
New Posting Templates: newreply, newthread

Quick reply: . Put change A and B in showthread, as the rest, and use this for step C:
HTML Code:

<input type="button" class="button" value="Spell Check" onClick="spellCheck('qrform', '$editorid', '2');" />
Right after this (also in showthread):
HTML Code:

                        <input type="submit" class="button" value="$vbphrase[go_advanced]" accesskey="x" title="(Alt + X)" name="preview" tabindex="3" id="qr_preview" onclick="this.form.clickedelm.value = this.value" />
For quick edit in postbit_quickedit, use this for step C (A and B are in showthread):
HTML Code:

                <input type="button" class="button" value="Spell Check" onClick="spellCheck('vbform', '$editorid', '2');" />
After this:
HTML Code:

                <input type="button" class="button" tabindex="1" accesskey="p" value="$vbphrase[go_advanced]" id="{$editorid}_adv" />

History:
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)
November 2nd. 2005: Fixes a bug with slashes in text.
October 17. 2005: Check for primary and secondary group for permission. Bug fix for quoted words.
September 13, 2005: v0.9.9 Bugfix for JS on IE with RC3
July 15, 2005: v0.9.8 Bugfix for JS code mismatch with template.
July 14, 2005: v0.9.7 Initial release for vB 3.5 beta-4

Please click Install if you have installed this mod.

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

jesus likes pie 07-14-2005 09:53 PM

Could be useful. Do you have the option not to spell check your posts? For example i was on a board and it annoyed the crap out of me to HAVE to go through every word that triggered an incorrectly spelled word.

So is it an option to just not spell check it?

tamarian 07-14-2005 10:05 PM

Quote:

Originally Posted by jesus likes pie
Could be useful. Do you have the option not to spell check your posts? For example i was on a board and it annoyed the crap out of me to HAVE to go through every word that triggered an incorrectly spelled word.

So is it an option to just not spell check it?

Yes. It will only check spell the post if you click on the "Spell Check" button.

theArchitect 07-15-2005 01:03 AM

Quote:

Originally Posted by tamarian
Yes. It will only check spell the post if you click on the "Spell Check" button.

I loved this in 3.0 and am glad to have it back in 3.5.0.

Only one problem. I have installed it and the checking of spelling is working. But it is not correcting the words. The corrections happen in the pop-up window but then when I click done and quit or just quit the post is not changed.

Any thoughts as to what I have done wrong?

tamarian 07-15-2005 01:07 AM

Quote:

Originally Posted by theArchitect
I loved this in 3.0 and am glad to have it back in 3.5.0.

Only one problem. I have installed it and the checking of spelling is working. But it is not correcting the words. The corrections happen in the pop-up window but then when I click done and quit or just quit the post is not changed.

Any thoughts as to what I have done wrong?

What version of vB 3.5 are you running? Each beta is quite different :)

If you have beta-4, whivh page are you getting this with? What editor mode, and what browser and version?

theArchitect 07-15-2005 01:12 AM

Sorry.

I am running beta 4. And I get this with the WYSIWYG and standard editor in both the advanced mode and quick reply.

tamarian 07-15-2005 01:14 AM

Quote:

Originally Posted by theArchitect
Sorry.

I am running beta 4. And I get this with the WYSIWYG and standard editor in both the advanced mode and quick reply.

And your browser? Have you tried on different browsers?

theArchitect 07-15-2005 01:31 AM

Quote:

Originally Posted by tamarian
And your browser? Have you tried on different browsers?

Sorry. I am stuck between a number of projects.

I am on a Mac and running FireFox.

I have also tested it in the latest versions of Netscape, Opera, IE and Safari and all come up the same.

tamarian 07-15-2005 01:36 AM

Quote:

Originally Posted by theArchitect
Sorry. I am stuck between a number of projects.

I am on a Mac and running FireFox.

I have also tested it in the latest versions of Netscape, Opera, IE and Safari and all come up the same.

Have you reverted all the temlates that need reverting after upgrading to beta4? The client scripts and tool bar templates have changed in beta4.

Feel free to PM a test account (regular user), and I'll check and see what's going on.

theArchitect 07-15-2005 09:59 PM

Just one more question about enabling it for quickedit. I must be missing the TFO because I can't work out where I should put the button line. I have got it working for quickreply but can't for quickedit.

Apart from that I have to say that this system totally rocks.

I would recommend everyone to put it on their boards. And for those server load Nazis who are worried about it pulling resources, you can enable/disable it per user group. So you could make it available to your paid members which gives them an added incentive to join up.

tamarian 07-15-2005 10:08 PM

Quote:

Originally Posted by theArchitect
Just one more question about enabling it for quickedit. I must be missing the TFO because I can't work out where I should put the button line. I have got it working for quickreply but can't for quickedit.

My mistake. The instructions should say to put step C in postbit_quickedit, not showthread. (A and B go in showthread)

You can put it right after this, for example:
HTML Code:

                <if condition="$show['deletepostoption']">
                <input type="button" class="button" tabindex="1" value="$vbphrase[delete]" id="{$editorid}_delete" />
                </if>


theArchitect 07-15-2005 10:16 PM

Many thanks. It is all up and running now.

Also, I would suggest that if you want to spell check your PMs that B should be put in USERCP_SHELL and not in pm_newpm as it stops all the other buttons from working.

Or maybe that was what you meant and I just misread it.

tamarian 07-15-2005 10:23 PM

Quote:

Originally Posted by theArchitect
Also, I would suggest that if you want to spell check your PMs that B should be put in USERCP_SHELL and not in pm_newpm as it stops all the other buttons from working.

I haven't tested PM's :) Instructions updated.

eXtremeTim 07-15-2005 10:57 PM

Umm vb has its own built in spell checker now. ;) Since beta 3.

But good work.

tamarian 07-15-2005 11:24 PM

Quote:

Originally Posted by eXtremeTim
Umm vb has its own built in spell checker now. ;) Since beta 3.

Only for those on Windows, and if they like using Internet Explorer, and speak English only :)

I personally like client based spell checking, and there are client based spell checkers for other browsers. I use SpellBound for Mozilla.

But a server based spell checker is needed for those on the road, and don't have their home PC setup, or the many users who don't know about client-side spell checkers, or those on other browsers.

eXtremeTim 07-16-2005 12:52 AM

Thats why I said good work. ;)

tamarian 07-16-2005 07:29 AM

Quote:

Originally Posted by eXtremeTim
Thats why I said good work. ;)

Oh yes, I got that part :)

It's just that I've heard this comment at vb.com, and some people think ieSpell solves all the problems :)

FASherman 07-16-2005 01:53 PM

Quote:

Originally Posted by eXtremeTim
Umm vb has its own built in spell checker now. ;) Since beta 3.

But good work.

Since when is a button which is nothing more than a link to an external program "its own built in spell checker"?

Look! VB now has its own built-in sports site!

:ermm:

jesus likes pie 07-17-2005 08:31 PM

i cant get quick reply to work because i cant find any of that in showthread_quickreply......

shiva 07-17-2005 10:52 PM

The instructions are wrong for that.

You should have both A and B in the showthread template.

Add the code (to replace "C") at the bottom of the showthread_quickreply. It doesn't look very nice, but it works.

tamarian 07-17-2005 11:24 PM

Quote:

Originally Posted by shiva
The instructions are wrong for that.

You should have both A and B in the showthread template.

Add the code (to replace "C") at the bottom of the showthread_quickreply. It doesn't look very nice, but it works.

Are they still wrong?

It should work without editing showthread_quickreply. Check the latest edit of the template instructions, and if it's still wrong let me know :)

jesus likes pie 07-18-2005 12:58 AM

Quote:

Originally Posted by shiva
The instructions are wrong for that.

You should have both A and B in the showthread template.

Add the code (to replace "C") at the bottom of the showthread_quickreply. It doesn't look very nice, but it works.



Thanks ;)

Gary King 07-22-2005 04:31 PM

I get this error on the vbspell.php page when spellchecking:
Code:

Notice: Only variable references should be returned by reference in /home/garyking/public_html/maloria.com/includes/class_core.php on line 1736

Notice: Only variable references should be returned by reference in /home/garyking/public_html/maloria.com/includes/class_core.php on line 1683

Notice: Only variables should be assigned by reference in /home/garyking/public_html/maloria.com/includes/class_core.php on line 1423

Anyways, I simply added error_reporting(0); on the page, since they seem to only be Notices.

tamarian 07-22-2005 06:36 PM

Quote:

Originally Posted by Gary King
I get this error on the vbspell.php page when spellchecking:

Anyways, I simply added error_reporting(0); on the page, since they seem to only be Notices.

Ah, this is because I forgot to update debug code before uploading :)

In vbspell.php and vbspell_iframe.php

Chenge this:
PHP Code:

error_reporting(E_ALL); 

To this:
PHP Code:

error_reporting(E_ALL & ~E_NOTICE); 

I've update the zip file in case anyone else if getting this.

lierduh 07-28-2005 11:48 PM

Not sure if you need to do this.

After upgrading to RC1. The spellcheck popped up as a blank page.
I had to uninstall and reinstall using the installation script before it started to work again.

tamarian 07-28-2005 11:53 PM

Quote:

Originally Posted by lierduh
Not sure if you need to do this.

After upgrading to RC1. The spellcheck popped up as a blank page.
I had to uninstall and reinstall using the installation script before it started to work again.

No need to do this. I think that was due to the new JS code in vB RC1. A hard refresh of the browser should fix this.

lierduh 07-29-2005 12:02 AM

Quote:

Originally Posted by tamarian
No need to do this. I think that was due to the new JS code in vB RC1. A hard refresh of the browser should fix this.

Things I tried before doing that (IE 6):

1) Refresh at Edit Post page.
2) Ctrl-Refresh at Edit Post page.
3) Delete all offline contents.

My problem could be caused by other reasons. I thought too I wouldn't need to reinstall.:)

tamarian 07-29-2005 12:25 AM

Quote:

Originally Posted by lierduh
Things I tried before doing that (IE 6):

1) Refresh at Edit Post page.
2) Ctrl-Refresh at Edit Post page.
3) Delete all offline contents.

My problem could be caused by other reasons. I thought too I wouldn't need to reinstall.:)

Hmmm, I'm wondering if this might be template dependant. When I tested RC1, I only tested one template (new thread). I'll do more tests to see if anything might cause a problem with RC1.

Let's hear from others if the RC1 upgrade went fine, or if they also had problems. If anyone else encountered problems, let me know which templates work and which ones didn't. But at leat we know that a re-install will fix the problem, if it happens :)

lierduh 07-29-2005 12:31 AM

Quote:

Originally Posted by tamarian
Hmmm, I'm wondering if this might be template dependant. When I tested RC1, I only tested one template (new thread). I'll do more tests to see if anything might cause a problem with RC1.

Let's hear from others if the RC1 upgrade went fine, or if they also had problems. If anyone else encountered problems, let me know which templates work and which ones didn't. But at leat we know that a re-install will fix the problem, if it happens :)

I forgot to confess.:) I reverted all templates after RC1 and inserted spellcheck stuff afterwards.

lierduh 07-29-2005 06:13 AM

I have noticed spellcheck removes all the line breaks. Is this an intended feature?:)

tamarian 07-29-2005 12:28 PM

Quote:

Originally Posted by lierduh
I have noticed spellcheck removes all the line breaks. Is this an intended feature?:)

It shouldn't.

lierduh 08-14-2005 02:27 AM

I have lost the vBSpell functionalities as before again -- an empty pop up form. An uninstall and reinstall fixes that without even needing the reload of IE. So more likely is a server side issue, or some java stuff which I don't know anything about.:) Also the line breaks are still removed by the spellcheck as soon as I click "Done". If no one else has this problem, then I will start to look for the reasons caused in my forums.

diettalk 09-13-2005 12:51 AM

I scanned through but I don't think anyone mentioned this but when you preview a post and use the spell checker, it strips out the paragraph spacing and jumples up the thread.

tamarian 09-13-2005 01:10 AM

Quote:

Originally Posted by diettalk
I scanned through but I don't think anyone mentioned this but when you preview a post and use the spell checker, it strips out the paragraph spacing and jumples up the thread.

Which RC version?

diettalk 09-13-2005 01:11 AM

3 ... thanks Tamarian.

tamarian 09-13-2005 03:59 PM

Quote:

Originally Posted by diettalk
3 ... thanks Tamarian.

O.k., I've just installed RC3 and tested it. I was unable to reproduce where it would strip any line breaks.

Would you recount the exact steps where this would happen, in which template, edit or new thread/reply, and what mode, WYSIWYG, or standard, etc.

Brinnie 09-13-2005 08:12 PM

maybe a browser compatability issue?????

diettalk 09-13-2005 08:34 PM

IE, vBulletin RC3, Standard Editor, "post reply" or "post new thread".

When your done with your post (that contains some paragraph's), hit preview post and then do a spell check. When it's done spell checking, it will remove all paragraph's.

lierduh 09-13-2005 10:41 PM

Quote:

Originally Posted by tamarian
O.k., I've just installed RC3 and tested it. I was unable to reproduce where it would strip any line breaks.

Would you recount the exact steps where this would happen, in which template, edit or new thread/reply, and what mode, WYSIWYG, or standard, etc.

I have had this problem ever since I installed (RC2, RC1?). Many of my users also reported the same. See my post before this.

The error occurs as soon as I click DONE. The post text area gets rewritten, but all the paragraph marks were stripped.

I am using IE6 (SP2) with MS Java Virtual Machine.

I reported another bug before, but I will repeat here:

Every time I upgrade to a newer version of vB. The vbSpell pop up box will come up with empty contents. A trick to fix this is to unstall templates and reinstall templates using the bundled installation routine. What might have fixed the problem probably is: build_all_styles() function.

tamarian 09-14-2005 12:08 AM

Quote:

Originally Posted by diettalk
IE, vBulletin RC3, Standard Editor, "post reply" or "post new thread".

When your done with your post (that contains some paragraph's), hit preview post and then do a spell check. When it's done spell checking, it will remove all paragraph's.


Try this file as a replacement to vbspell.js and let me know if it works (change the txt to js)


All times are GMT. The time now is 12:40 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.01869 seconds
  • Memory Usage 1,872KB
  • 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
  • (1)bbcode_code_printable
  • (11)bbcode_html_printable
  • (2)bbcode_php_printable
  • (23)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