The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Spell Checker: PungoSpell for vBulletin3 Standard and WYSIWYG modes Details »» | ||||||||||||||||||||||||||||
Spell Checker: PungoSpell for vBulletin3 Standard and WYSIWYG modes
Developer Last Online: Nov 2023
There's also a vB 3.5 version: https://vborg.vbsupport.ru/showthrea...threadid=83258
PungoSpell for vBulletin3 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: v1.6 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) v1.5. Minor bug fixes v1.4 1. Fixed scrolling, so the spelling window will scroll to the next mis-spelled word. 2. Changed config defaults to allow the most common configuration. The "Learn" function is turned of by default. Make sure you test it before tunrning it on. 3. Re-worded comments on config options, hopefully they will now make sense. v1.3 1. Created a new config file (pungo-spell-config.php) to avoid the need to edit checkspelling.php, which is a bit tricky with end of line characters. 2. Added an option to disable the learn feature. This may be needed if your aspell setup does not allow, or not properly setup, for personal wordlists. 3. The language is now defined in the config file as well. v1.1: 1. Added a "Learn" button. This allows users to add words into the dictionary. 2. Restricted access to members only, with allowed usergroups definable in config file 3. Restrict user groups allowed to use the "Learn" feature. Configurable option. 3. Options to ignore quote blocks, code bloacks, and PHP blocks 4. Added buttons (Thesarus and Lookup) with links to Merriam Webster's online thesarus and dictionary links with the suggestion for misspelled words. 5. Added Quit and Done buttons. One to quite without saving, and one to save without going through the whole post for suggestions. 6. Fixed extra lines added for WYSIWYG paragraphs 7. Made it skip vBCode tags, so it won't spell check URL's v1.0: Initial version, . Identical to PungoSpell functionality, but adapted to handle vBulletins's WYSIWYG and standard mode. Note: There's another hack for spell checker for vBulletin3 using PHPSpell. You might want to compare both to decide which one you like best. https://vborg.vbsupport.ru/showthrea...threadid=65723 PHPSpell has a "learn" button, to allow adding new words to the dictionary, PungoSpell does not. PungoSpell has a better WYSIWYG display, while PHPSpell does not hide HTML and vBCode tags. So each one has it's advantages and disadvantages. In a future release, I'll try to add a "learn" functionality to PungoSpell. (done) 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. From the readme file: Quote:
Bugs: Scrolling down to the misspelled word is not yet working. Instructions 1. Download the attached file, and unpack into your main forum directory. Make sure the file "custom.pws" is writable by apache, otherwise the "Learn" function will not work. 2. It has English setup by default. If you want it to use any other language, it's easy. Just edit the config file "pungo-spell-config.php". Change this line: $my_lang = "en"; "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. 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 3. Edit the config section in checkspelling.php to suit your needs: [code] // Config section $my_lang = "en"; // set the language you want, make sure you have the correct aspell dictionary on your system // Access restriction options $allow_guests = 0; // Change to 1 if you allow guests to post and use the spell checker $restrict_groups = 0; // Change to 1 to enable access restriction by group id $allowd_groups = array (2, 5, 6); // usergroups who can access the spell checker // Learn function options $customwordlist = "custom.pws"; // make sure this file is readable by your apache user $learn_enabled = 0; // set to 1 to enable the learn feature. Make sure you test first, to ensure your server setup allows this. $restrict_learn_function = 0; // set to 1 if you want to restrict which usergroup id may add words to your dictionary. $word_list_maintainers = array (2, 5, 6); // usergroups that are allowed to use the "Learn" feature // // Ignore options $ignore_quotes = 1; // 1 means ignore the [QUOTE] block, 0 means spell check within quotes $ignore_code = 1; // Same but for the Code:
tag $ignore_php = 1; // Same, but for the [PHP] tag // end config section newreply template A. Find Code:
</head> Code:
<script src="spellcheck.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="checkspelling.php"> <input type="hidden" name="spell_formname" value=""> <input type="hidden" name="spell_fieldname" value=""> <input type="hidden" name="spellstring" value=""> </form> 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" /> Code:
<if condition="DOTOOLBAR!=2"> <input type="hidden" name="toolbar" value="1" /> <input type="button" class="button" value="Spell Check" onClick="spellCheck( 'vbform', 'message', '1');"> <else /> <input type="hidden" name="toolbar" value="2" /> <input type="button" class="button" value="Spell Check" onClick="spellCheck( 'vbform', 'WYSIWYG_HTML', '2');"> </if> Optional: Other Templates that contain edit boxes are: USERCP_SHELL just add the first change (A) 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 (A) in USERCP_SHELL) and the rest (B and C) here. Quick reply 1. Show Thread Templates: Put change (A) in showthread, and the rest (B and C) in showthread_quickreply 2. Contributed by Boofo: change: <if condition="DOTOOLBAR!=2"> to: <if condition="$WYSIWYG!=2"> I may have missed a few templates, so let me know. Private Messages To install in Private Messaging, check Chris's post here: https://vborg.vbsupport.ru/showpost....6&postcount=84 ------ Trouble shooting: 1. If you get a spell check window that says "This is a test". This is most likely due to end of line characters caused by an editor. To resolve this, re-upload the original files with FTP in binary mode. When editing the config file, make sure you use an editor that does not add any end of line characters, such as "vi" or others. 2. 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. ----- Enjoy P.S. The two screenshots below show the spell check popup menu. One for standard mode, and one for WYSIWYG mode. Show Your Support
|
Comments |
#222
|
|||
|
|||
Sorry .. I did not read far enough .. I have it now .. Thanks again for the help
|
#223
|
||||
|
||||
Will this hack work on vB 3.0.7? I just wanna make sure.
|
#224
|
|||
|
|||
i'm running 3.0.7 and it does not appear to work for the WYSIWYG editor.
basic editor, standard editor (guided or advanced) both work. i've verified that in WYSIWYG mode that the script does two things: a) points to: Code:
<input type="button" value="Spell Check" onClick="spellCheck( 'vbform', 'WYSIWYG_HTML', '2');">
Code:
<input type="hidden" name="WYSIWYG_HTML" id="html_hidden_field" value="<p></p>" /> |
#225
|
|||
|
|||
Hope this is a simple error but I don't understand it (I'm new to PHP and web designing).
I'm running; PHP 4.3.11 Win 32 and vBulletin 3.0.7 on Windows Server 2003 and Aspell-0-50-3-3. I installed the Aspell, enabled the pspell extension and unziped the files to the forums directory for the PungoSpell. I added the the spell check button to the Newreply template but when I click the button to do a spell check I get the following error; Line: 911 Char: 1 Error: Object expected Code: 0 URL: Code:
http://www.ultra-inc.com/forums/newreply.php?do=newreply&noquote=1&p=37 |
#226
|
|||
|
|||
looks more like a javascript error...
|
#227
|
|||
|
|||
It was a javascript error, I forgot a closing quote, oops. Thanks.
Now I get Fatal error: Call to undefined function: pspell_new() in c:\inetpub\wwwroot\forums\checkspelling.php on line 32 I think I saw this error several post back though so I'm off to search for it. Can anyone recomend a good PHP book? |
#228
|
||||
|
||||
Nice, very nice. My problem is this, when I run the spellchecker, everything works, but I see this at the top of the spellchecker window:
Code:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in \global.php on line 367 Warning: in_array() [function.in-array]: Wrong datatype for second argument in \includes\functions.php on line 2285 Warning: Invalid argument supplied for foreach() in \includes\functions.php on line 2290 Thanks for the help! I'm running this on v3.0.7 with IIS 6 and PHP v5.0.4. I should also post that I get the same error in an additional, smaller window when trying to use the learn function. |
#229
|
|||
|
|||
bi11i, try adding this in the beginning of checkspelling.php, before "include ('global.php');
Quote:
|
#230
|
||||
|
||||
Actually, I don't see that line in checkspelling.php. I do see it in pungo-spell-config.php, however it doesn't do anything (no matter which file i put it in.)
Any other ideas? |
#231
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|