vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Spell checker: PHPSpell for vBulletin3 WYSIWYG and Standard mode (https://vborg.vbsupport.ru/showthread.php?t=65723)

tamarian 05-31-2004 10:00 PM

Spell checker: PHPSpell for vBulletin3 WYSIWYG and Standard mode
 
PHPSpell for vBulletin3 WYSIWYG and Standard mode

Intro: PHPSpell uses a MySQL based disctionary and requires no additional tools than your standard PHP/MySQL setup. One draw back to this hack is that while it works with vBulletin in WYSIWYG mode, the popup window will still display html and vBCode tags. But the advantages are numerous, such as the "learn" capability and the admin tool.

There is another hack https://vborg.vbsupport.ru/showthrea...threadid=65737 for PungoSpell that supports WYSIWYG mode disply on the spell check popup window. It has less features than PHPSpell, but it supports WYSIWYG display. Check it out, and compare which one is best for your forum.

Credit PHPSpell Was written for PHPBB, and then expanded to work for all major forum software, including vB2 and vB3. Due to vB3's WYSIWYG mode, PHPSpell only supports standard mode. This hack will allow it to work for both standard and WYSIWYG.

If you like this software, please click the PayPal button on the Author's site, so they'll add more features. Their future plans so far include:

Quote:

* PHPBB Template integration
* Other Languages (Currently supports English & Russian)
* Finish Language support so that hardcoded output is stored in language files
* Ability to delete Learned Words for the end user
* Ability for Admin to View/Edit/Delete words in installed dictionaries
* Ability for Admin to export Dictionaries
* Ability for end user to choose which Dictionary/Thesaurus Site to use
* Ability for end user to be able to change which Language to use
* Ability for end user to change # of words to find.
* Ability for Integrated Dictionary/Thesaurus
* Other Program Integration
Demo: http://www.master-technology.com/demos/spell/index.php

What this hack does This hack modifies the PHPSpell software package from PHPSpell to allow spell checking on vBulletin for both modes, WYSIWYG and standard mode.

Note: You will see tags like <br> and others in WYSIWYG and BBCode in standard mode. Edit the config file to ignore them. This happens in both WYSIWYG mode, and in standard mode. It will show the tags, but it will not spell check them. This hack does not add new features to the spell checker, it just makes it work, as designed, for vB3 in both WYSIWYG and standard mode.

Instructions

1. Download the attached file, and unpack into a new directory called "spelling" below your forum directory.

2. Edit the config file "spell_config.php" and enter your forum database username and password.

3. Find a dictionary and upload it to the "spelling" directory. A copy is provided in the zip file. PHPSpell's site has a couple of dictionaries for download: http://www.master-technology.com/dem...l/download.php

4. Run "spell_admin.php" from your browser (URL/spelling/spell_admin.php) to create the dictionary datanbase table. When done, delete this file and the dictionary file.

5. You might want to modify the css files to have the look and feel of your forum and colours.

6. The rest is template edits for each template where you'd like to have the spell checker. For example:

newreply template

Find

Code:

</head>
Add above

Code:

<script language='javascript' src='spelling/spellmessage.js'></script>
Find the submit and preview buttons:

Code:

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

Add below:
Code:

<if condition="DOTOOLBAR!=2">
<input type="hidden" name="toolbar" value="1" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('1');"/>
<else />
<input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('2');"/>
</if>

And repeat the same steps for other templates like newthread etc.


Optional: Other Templates that contain edit boxes are:
USERCP_SHELL just add the first change here in above the </head section. Required for pm_newpm and modifysignature.
editpost
Calendar Templates: calendar_edit
New Posting Templates: newreply, newthread
Modify User Options Templates: modifysignature (add the the first change in USERCP_SHELL)
Private Message Templates: pm_newpm (add the the first change in USERCP_SHELL)

I may have missed a few, so let me know.

7. If it doesn't work, run the file "spell_diags.php" from your browser, it will test your setup and report any problems.

Enjoy

Boofo 06-01-2004 03:17 PM

Any screenshots?

tamarian 06-01-2004 03:29 PM

Quote:

Originally Posted by Boofo
Any screenshots?

There's a demo link posted, but here's a couple screenshots. Correction, I'm having difficulty uploading PNG shots, so I'll try to add them later. In the mean time, visit the official homepage for PHPSpell for an online demo.

Boofo 06-01-2004 04:21 PM

I was hoping to see how it looked integrated into vb. ;)

msimplay 06-01-2004 04:34 PM

can someone do a list of templates to insert this code into because newbies will not so easily be able to find the templates

ok i just did it so i'll do the above

showthread_quickreply
newthread
newreply
pm_newpm

welo 06-01-2004 04:49 PM

I have a meeting shortly so I'll be out of the loop for the rest of the afternoon. Will install it on my test board this evening though and post a few notes later. Cheers for this.

tamarian 06-01-2004 04:58 PM

Quote:

Originally Posted by Boofo
I was hoping to see how it looked integrated into vb. ;)

PM me your email and you can post them for me :)

vB.org apparently won't let me uplaod them, as the upload hangs. Might be due to the size of the disctonary taking up all my space allowance....

However, the "integration" part will just show a "spell check" button, next to the "preview" button. The online demo listed will be identical, as it's a popup window.

tamarian 06-01-2004 04:59 PM

Quote:

Originally Posted by msimplay
can someone do a list of templates to insert this code into because newbies will not so easily be able to find the templates

Great idea. I've listed them in step 6.

msimplay 06-01-2004 05:20 PM

Thanks Tamarian :)

msimplay 06-01-2004 05:38 PM

Big problem with the spellchecker

it seems to be picking up the html from the wyziwyg editor

Acido 06-01-2004 05:41 PM

Is not working OK in wysiwyg :(

The spellchecker add tags like : <P style="MARGIN: 0px"> to the text :(

tamarian 06-01-2004 05:52 PM

RE: HTML tags like <br>, add them in the config file to ignore.

Note, this happens in both WYSIWYG mode, and in standard mode. It will show the tags, but it will not spell check them.

This hack does not add new features to the spell checker, it just makes it work, as designed, for vB3 in both WYSIWYG and standard mode.

msimplay 06-01-2004 06:09 PM

hmm its not what i had expected then :S
anyone got the if condition to make it only work for standard editor then coz parsing html will only confuse users

i used

HTML Code:

 
  <input type="hidden" name="toolbar" value="1" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('1');"/>
  <else />
  <input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="window.open('http://www.spellcheck.net','spellchecker','statusbar=no,menubar=no, toolbar=no,scrollbars=yes,resizable=yes,width=647,        height=391'); return false;"/>
  </if>

instead of

HTML Code:

<input type="hidden" name="toolbar" value="1" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('1');"/>
 <else />
 <input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="window.open('http://www.spellcheck.net','spellchecker','statusbar=no,menubar=no, toolbar=no,scrollbars=yes,resizable=yes,width=647,          height=391'); return false;"/>
 </if>

because i wanted to compensate for the lack html stripping from spellchecker
this way both parties get to use a spell checker
otherwise i was planning to remove the spell checker for wyziwyg editor users altogether

insanctus 06-01-2004 06:52 PM

Quote:

Originally Posted by msimplay
hmm its not what i had expected then :S
anyone got the if condition to make it only work for standard editor then coz parsing html will only confuse users

i used

HTML Code:


 <input type="hidden" name="toolbar" value="1" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('1');"/>
 <else />
 <input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="window.open('http://www.spellcheck.net','spellchecker','statusbar=no,menubar=no, toolbar=no,scrollbars=yes,resizable=yes,width=647,          height=391'); return false;"/>
 </if>

instead of

HTML Code:

<if condition="DOTOOLBAR!=2">
<input type="hidden" name="toolbar" value="1" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('1');"/>
<else />
<input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('2');"/>
</if>

because i wanted to compensate for the lack html stripping from spellchecker
this way both parties get to use a spell checker

Does anyone have this working? I have yet to try it out, but by lookin at how small the word list size is I do not see how it could be to powerful.

msimplay 06-01-2004 06:53 PM

Quote:

Originally Posted by insanctus
Does anyone have this working? I have yet to try it out, but by lookin at how small the word list size is I do not see how it could be to powerful.

i have it working at my site
check it using test as username and password

it is quite powerful in respect of having a thesaurus aswell
and you can add ur own words to it
even though that kind of negates the reason to use the spell checker
oh well we can't win em all :P

ps if u visit my site use both the standard editor and the wyziwyg both spell checkers are different :)

tamarian 06-01-2004 07:03 PM

Quote:

Originally Posted by msimplay
hmm its not what i had expected then :S
anyone got the if condition to make it only work for standard editor then coz parsing html will only confuse users

The conditional is already there :)

Just remove the "else" part:

Code:

<else />
<input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('2');"/>


insanctus 06-01-2004 07:04 PM

Looks cool I guess I will try it out later on my site.

msimplay 06-01-2004 07:07 PM

Quote:

Originally Posted by tamarian
The conditional is already there :)

Just remove the "else" part:

Code:

<else />
 <input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('2');"/>


thanks but i decided to change the spellchecker for wyziwyg instead of removing the option altogether

insanctus 06-01-2004 08:10 PM

Ok installed and works, thanks msimplay for the demo log in (it is what made me choose to use this)

Nice add in !

msimplay 06-01-2004 09:06 PM

Quote:

Originally Posted by insanctus
Ok installed and works, thanks msimplay for the demo log in (it is what made me choose to use this)

Nice add in !

sorry about the mix up i just changed the instructions to the right ones in mt original thread


heres the right html

HTML Code:

<input type="hidden" name="toolbar" value="1" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="openspell('1');"/>
 <else />
 <input type="hidden" name="toolbar" value="2" />
        <input type="button" class="button" name="spellcheck" value="SpellCheck" accesskey="c" tabindex="1" onclick="window.open('http://www.spellcheck.net','spellchecker','statusbar=no,menubar=no, toolbar=no,scrollbars=yes,resizable=yes,width=647,          height=391'); return false;"/>
 </if>       


tamarian 06-02-2004 12:06 AM

News: I will shortly release another spell checker hack, based on PungoSpell which will support standard and WYSIWYG modes, and displays WYSIWYG in the popup windows without the tags.

One draw back to PungoSpell, is that it will require you to have PSPELL compiled into PHP. Some have this by default, but some don't. Another draw back is the lack of the "learn" button.

I initially worked on it and had it tested, but decided to use PHPSpell for the added features. . But since I modified it already, I'll just clean it and release it, so those who prefer full WYSIWYG display can use it.

Stay tuned.

tamarian 06-02-2004 02:17 AM

PungoSpell hack is now available:

https://vborg.vbsupport.ru/showthread.php?t=65737

It has a better WYSIWYG display, with no tags shown.

Enjoy.

msimplay 06-04-2004 08:20 PM

can i just say that all those using my test account for checking the spellchecker please restrict ur posting to the test forums :)

Mont 06-08-2004 09:10 PM

I added this hack to my forums, but cannot get it to ignore the <P </P tags even though I don't have html enabled on the forums, but did set it to true in the config file. TIA for any help

PHP Code:

$Spell_Config['HTML_Tags'] = array('<a','</a','<p','<p','<P','</P','<img','</img','<b','</b','<center','</center','<i','</i','<u','</u','<list','</list','<font','</font'); 


tamarian 06-09-2004 10:59 PM

Quote:

Originally Posted by Mont
I don't have html enabled on the forums, but did set it to true in the config file.

Disable HTML in the config file. This should get rid of most of the tags, except <br>, which you can disable through the ignore option.

Mont 06-10-2004 12:27 PM

any advice on getting rid of the <P></P> tags?

http://2coolfishing.net/screenshot.jpg

Code:

// -------------------------------------------
  // BBCode Tags
  // -------------------------------------------
  $Spell_Config['BBCODE_Tags'] =

array('[b','[/b','[p','[/p','[P','[/P','[url','[/url',array('[img','[/img]'),'[i','[/i','[color',

'[/color','[size','[/size','[u','[/u','[list','[/list',array('[quote','[/quote]'),array('[code','

'));[/code]

ethics 06-24-2004 04:55 PM

Fantastic hack, sir!

raptor260 06-28-2004 04:48 PM

Here is something to chew on. I tried to install the spell checker program, but in my error.log If get this message.

[Mon Jun 28 10:28:18 2004] [error] PHP Warning: main(../config.php): failed to open stream: No such file or directory in /usr/home/domains/byuboyz.com/www/htdocs/forums/spelling/spell_config.php on line 197
[Mon Jun 28 10:28:18 2004] [error] PHP Warning: main(): Failed opening '../config.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/home/domains/byuboyz.com/www/htdocs/forums/spelling/spell_config.php on line 197.

In the web page I get this error message,

You need to fill in the Database Information in the Spelling Configuration File.

Where is this file called config.php.

ethics 06-28-2004 04:55 PM

Quote:

Originally Posted by raptor260
Here is something to chew on. I tried to install the spell checker program, but in my error.log If get this message.

[Mon Jun 28 10:28:18 2004] [error] PHP Warning: main(../config.php): failed to open stream: No such file or directory in /usr/home/domains/byuboyz.com/www/htdocs/forums/spelling/spell_config.php on line 197
[Mon Jun 28 10:28:18 2004] [error] PHP Warning: main(): Failed opening '../config.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/home/domains/byuboyz.com/www/htdocs/forums/spelling/spell_config.php on line 197.

In the web page I get this error message,

You need to fill in the Database Information in the Spelling Configuration File.

Where is this file called config.php.

Sometimes, you have to use your noggin!!! ;)

The config file is spell_config.php or something like that.

raptor260 06-28-2004 06:00 PM

Not to a smart AS$ but if you look in the spell_config.php on line 197 it refers to ../config.php. Where is that file located. It does not live in the forums directory nor does it live in the root of my website.

tamarian 06-28-2004 06:09 PM

Quote:

Originally Posted by raptor260
Not to a smart AS$ but if you look in the spell_config.php on line 197 it refers to ../config.php. Where is that file located. It does not live in the forums directory nor does it live in the root of my website.

config.php is part of vBulletin. So if you don't have it at the root of your forum directory, then your setup may not be what it should, or too customized....

ethics 06-28-2004 06:18 PM

Quote:

Originally Posted by raptor260
Not to a smart AS$ but if you look in the spell_config.php on line 197 it refers to ../config.php. Where is that file located. It does not live in the forums directory nor does it live in the root of my website.

my spell_config goes up to line 173. Not sure where you are looking but that's the only config file I've had to edit in order for this hack to work.

tamarian 06-28-2004 06:32 PM

Quote:

Originally Posted by ethics
my spell_config goes up to line 173. Not sure where you are looking but that's the only config file I've had to edit in order for this hack to work.

Hmm, I didn't notice the line number, but it gives me a clue....

Raptor: Did you install the original PHPSpell code from their site? That won't work... You need to download the hack files from the first post, as it contains the code changes to make it work for vBulletin in both editing modes.

The original code only works for standard mode, and it contains the config error you listed :)

Ngreth Thergn 06-28-2004 08:16 PM

I have installed this on two boards, using cut and paste.

For some reason, on one of my boards the spellcheck buttons will not apear, despite doing the same cut and paste.

the boards are http://mboards.eqtraders.com/eq (spellcheck button apears) and http://mboards.eqtraders.com/eq2 (spellcheck button will not apear)

Or am I missing an easy Vbulletin switch?

tamarian 06-28-2004 08:25 PM

Quote:

Originally Posted by Ngreth Thergn
I have installed this on two boards, using cut and paste.

For some reason, on one of my boards the spellcheck buttons will not apear, despite doing the same cut and paste.

the boards are http://mboards.eqtraders.com/eq (spellcheck button apears) and http://mboards.eqtraders.com/eq2 (spellcheck button will not apear)

Or am I missing an easy Vbulletin switch?

Double check your cut and paste.

The buttons are plain HTML. If they don't appear, then you have not updated the template correctly. I can't think of any other reason.

Ngreth Thergn 06-29-2004 02:42 PM

I did have a mistake... (the script tag was bellow head not above head) but it still does not work, even with clean fix. I do have Hack Traking Log on that board and not the other... I wonder if that is it...

teksigns 06-29-2004 03:05 PM

Learn do not work when word contains

's at the end

like it's

kall 07-06-2004 12:51 AM

Is this compatible with Firefox 0.9?

I have installed it, and it works marvellously with explorer, but the SpellCheck button doesn't open a new window on Firefox.

Yes, I do have popups enabled for the domain. :)

tamarian 07-06-2004 01:24 AM

Quote:

Originally Posted by kall
Is this compatible with Firefox 0.9?

I have installed it, and it works marvellously with explorer, but the SpellCheck button doesn't open a new window on Firefox.

Yes, I do have popups enabled for the domain. :)

I'm using FireFox 0.9 with no problems...... Is JavaScript enables?

romeshomey 07-12-2004 04:13 PM

The only question I have is, in the showthread_quickreply I do not have a </head> tag

I do have a </thead> tag though, is that where I need to make the modification?


All times are GMT. The time now is 04:49 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.01649 seconds
  • Memory Usage 1,882KB
  • 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
  • (7)bbcode_code_printable
  • (5)bbcode_html_printable
  • (1)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