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)
-   -   PungoSpell Spell Checker for vB3.5 WYSIWYG and Standard mode (https://vborg.vbsupport.ru/showthread.php?t=83258)

tamarian 06-16-2005 10:00 PM

PungoSpell Spell Checker for vB3.5 WYSIWYG and Standard mode
 
PungoSpell for vB 3.5 WYSIWYG and Standard mode


Intro: PungoSpell supports WYSIWYG mode disply using DHTML on the spell check popup window. It uses PHP's buitin PSPELL module. Many have this already compiled in, but if not, it's easy to add.

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

Change Log:
v2.4 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)

v2.3 Bug fix standard mode.
v2.2 Bugfix
v2.1 Changed JS to handle vB 3.5 beta 4
v2.0 Initial release for vB 3.5 beta Features, no more config edits, uses admin panel for settings :)


Note:
There's another hack for spell checker for vBulletin3 using PHPSpell. (I plan to port it to vB 3.5 shortly) You might want to compare both to decide which one you like best.
https://vborg.vbsupport.ru/showthrea...threadid=65723

Credit PungoSpell Is a free software using the MIT license. By default, it will work fine in standard mode. This hack will allow it to work for both standard and WYSIWYG.

Requirements: You will need to have PSPELL compiled into your PHP setup. Many have this by default. To find out if you already have it, check your PHP info from the vBulletin Admin Panel: Import & Maintenance > View PHP Info. Search for "pspell". If it's there, you're fine. If not, you can recompile PHP with the "--with-pspell" paramater.

You also need aspell software installed on your server with a dictionary setup.

Please check with your server admin if not sure


Installation Instructions

1. Download the attached file, and unpack into your main forum directory, except for pungo_install.php which should go into your admincp directory. Make sure the file "custom.pws" is writable by apache, otherwise the "Learn" function will not work.

2. Run pungo_install.php in the admincp directory. Once you're done, edit the options in the vB options menu under the title "PungoSpell".

3. It has English setup by default. If you want it to use any other language, it's easy. Just edit the language setting from your control panel.

"en" stands for English. Change it to the code of the language you want. Like "fr" for French, for example. Make sure your system has the required dictionary. You see the dictionary config by typing "aspell config" at the command line, to see which dictionaries you have.

4. Edit each template where you'd like to have the spell checker. For example:

newreply template

A. Find

Code:

</head>
Add above

Code:

<script src="pungospell.js"></script>

B.
Add somewhere the followin (below $navbar for example)g:
Code:

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

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:
Code:

<input type="button" class="button" value="Spell Check" onClick="spellCheck('vbform', '$editorid', '2');" />
And repeat the same steps for other templates like newthread etc.


Trouble shooting:

1. Learn doesn't work: Try this: Change the first line from custom.pws:

personal_ws-1.1 en 0

To:

personal_ws-1.1 english 0

en worked fine for me on Fedora and Gentoo, but I had to change to english on RHE.


2. Change language If you have learning enabled, affter you change the language from the admincp, you also, in the file custom.pws, the first line reads something like:

personal_ws-1.1 en 0

You will need to change en to the language you use, like fr


Please click Install if you have installed this mod.

TruthElixirX 06-16-2005 11:49 PM

Awesome hack Would install if I was running 3.5. :p

mholtum 06-17-2005 12:38 AM

Awesome! thanks so much!

[high]* mholtum installs
[/high]

When I click "Spell Check" I get this error in the popup window.
Code:

Fatal error: Call to undefined function: pspell_config_create() in /home/mholtum/public_html/vbtest/pungospell.php on line 44
here is line 44:
Code:

        $pspell_config = pspell_config_create($vbulletin->options['pungo_language']);

tamarian 06-17-2005 02:28 AM

Quote:

Originally Posted by mholtum
When I click "Spell Check" I get this error in the popup window.

Do you know if your PHP is compiled with PSPELL support?

You can find out by going to your admin panel -> Maintenance -> View PHP info

It should show a table for PSPELL and indicate it's enabled. If not, you may need to recompile PHP

mholtum 06-17-2005 03:10 AM

Quote:

Originally Posted by tamarian
Do you know if your PHP is compiled with PSPELL support?

You can find out by going to your admin panel -> Maintenance -> View PHP info

It should show a table for PSPELL and indicate it's enabled. If not, you may need to recompile PHP

I looked and couldn't find it.. How would I recompile PHP?

I contacted my host, and he replied:

it is not installed, but it can be.

I will take care of this tomorrow.

tamarian 06-17-2005 03:26 AM

Quote:

Originally Posted by mholtum
I looked and couldn't find it.. How would I recompile PHP?

Are you the server admin of your box? It could be tricky if you haven't done it before, so it's best to test on a test machine first. Here's how to do it:

http://www.vbulletin.com/forum/showthread.php?t=69072

You just need to add this in the PHP compile config step "--with-pspell"

mholtum 06-17-2005 03:49 AM

Quote:

Originally Posted by tamarian
Are you the server admin of your box? It could be tricky if you haven't done it before, so it's best to test on a test machine first. Here's how to do it:

http://www.vbulletin.com/forum/showthread.php?t=69072

You just need to add this in the PHP compile config step "--with-pspell"

I am not the admin of my server, but I shot him an email and he is going to install it for me tomorrow.. Thanks for the imput.

Marco van Herwaarden 06-17-2005 03:54 AM

Very nice.

But also seems like the vB developers have listened to the users and will be including a spell checker in Beta 2 (already active on vb.com).

tamarian 06-17-2005 03:57 AM

Quote:

Originally Posted by mholtum
I am not the admin of my server, but I shot him an email and he is going to install it for me tomorrow.. Thanks for the imput.

Good luck, I hope all goes well :)

tamarian 06-17-2005 04:00 AM

Quote:

Originally Posted by MarcoH64
Very nice.

But also seems like the vB developers have listened to the users and will be including a spell checker in Beta 2 (already active on vb.com).

It's great to have the new ieSpell on vB. But keep in mind it only works for IE. Some of us don't have Windows, or IE :) Some, who use the ieSpell, would still prefer other spell checkers.


All times are GMT. The time now is 02:07 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.01099 seconds
  • Memory Usage 1,762KB
  • 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
  • (6)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
  • (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