![]() |
This is amaizing! Only problem was adding the dictionary to the database. I host with 1and1 and their DB konks out if i send to much at a time. so i had to add it until it gave me the error then find out how far it added and take all the stuff it added from the Dict.TXT and re add it. Worked perfectly.
|
Quote:
word 'word' "word" still finds 'word' misspelled. Thx, D. |
I've followed the instructions, put A and B in SHOWTHREAD and followed the special instructions and put
Code:
<input type="button" class="button" value="Spell Check" onClick="spellCheck('qeform', '$editorid', '2');" /> |
Quote:
|
This mod strips out all backslashes from a post.
If I type "C:\Mypath\Foo" vBSpell immediately strips it to "C:MypathFoo" when it comes up. |
Quote:
I don't know if that can be fixed, but if it can I'd really like to see the solution! |
I upgraded to vB3.5.1 and now when I try to use the spell checker, the popup window is completely blank.
|
Quote:
I ended up running the install script and selecting uninstall. Then I re-installed it & it's now working. The install/uninstall script made it very painless! |
Re: 3.5.1: The reason it stops working is that the vbspell template gets deleted after the upgrade, probably due to product id, as it was made before products. I'll check on that.
In the mean time, to get it back, all you need to do is re-create the vbspell template, either by running the install script (only the template step), or create a new vbspell template by pasting this: HTML Code:
$stylevar[htmldoctype] |
Have you looked at the integration comments for template editing from message #48? These are very slick and so far seem to work great.
It replaces the IE only enabled ABC-checkmark with this editor. It seems to work really well and only required three template edits. Comments? -t |
Quote:
|
love this hack this reminds me of outlook good program..ok ..maybe you can help me i read through the thread looking for the error messages i get through ie and in firefox don't get any thing to work..everything is installed but when running a test on it i get an error message in ie and in firefox nothing happen can you help me to see where i messed up at.
thanks in advance :ermm: |
Quote:
|
Quote:
|
Quote:
What template(s) do I need to edit to get the spell checker ilinked to PM's? Steve |
Thanks for the Spell Checker mod. Everything works great except for the Quick edit. I was confused by the notes, is this fixed yet, or is it still not supposed to work?
Quote:
|
In the instructions above in the "Other templates:" section there are instructions for the template "pm_newpm"
Quote:
|
All of a sudden, I notice that this is not working as it did before. Now when I click spellcheck I get the popup and it's just displays the following.
Code:
options['vbspell_allow_all'] OR is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['vbspell_use_groups']))) $vbulletin->userinfo['can_use_vbspell'] = TRUE; if (!$vbulletin->userinfo['can_use_vbspell'] OR $vbulletin->userinfo['usergroupid'] == 0) print_no_permission(); $PersonalWords = array(); if (!empty($_COOKIE['vbspell_words'])) $PersonalWords = explode(',', urldecode(strtolower($_COOKIE['vbspell_words']))); require_once('./includes/searchwords.php'); // get search engine stop words, to save on queries. function MisSpelled($word) { global $db, $badwords, $PersonalWords; $word = trim($word, "'"); $partial = explode('\'', strtolower($word)); if (count($partial) > 1) $CheckPartial = TRUE; else $CheckPartial = FALSE; if (in_array($partial[0], $PersonalWords)) return FALSE; // User have "learned" this word elseif ($CheckPartial AND in_array(strtolower($word), $PersonalWords)) return FALSE; // User have "learned" this word elseif ($word === strtoupper($word)) return FALSE; // All uppercase, treat as abbriviation, might want to make this an admincp option.. elseif (in_array($partial[0], $badwords)) return FALSE; // Very common word elseif ($CheckPartial AND in_array($partial[0] . $partial[1], $badwords)) return FALSE; // Very common word elseif ($db->query_first("SELECT word FROM " . TABLE_PREFIX . "vbspell WHERE word = '" . addslashes($partial[0]) . "'")) return FALSE; // Found In dictionary else return TRUE; // probably mis-spelled } function Suggest($for) { global $db, $vbulletin; $for = trim($for, "'"); $WordList = array(); $SuggestedList = array(); $Suggestions = $db->query_read("SELECT word FROM " . TABLE_PREFIX . "vbspell WHERE sound = '" . addslashes(metaphone($for)) . "'"); while ($Suggestion = $db->fetch_array($Suggestions)) $WordList[$Suggestion['word']] = levenshtein($for, $Suggestion['word']); asort($WordList); reset($WordList); foreach ($WordList as $word => $distance) if ($distance <= $vbulletin->options['vbspell_levenshtein_distance']) $SuggestedList[] = $word; if ($for === ucfirst($for)) { foreach ($SuggestedList as $key => $word) $SuggestedList[$key] = ucfirst($word); } elseif ($for === strtoupper($for)) { // not possible yet, but might be allowed in admincp. foreach ($SuggestedList as $key => $word) $SuggestedList[$key] = strtoupper($word); } return $SuggestedList; } $mystr = str_replace('\\', '\\\\', $_REQUEST['spellstring']); $mystr = stripslashes($mystr); $FormName = $_POST['spell_formname']; $FieldName = $_POST['spell_fieldname']; // can't have newlines or carriage returns in javascript string $mystr = str_replace("\r", "", $mystr); $mystr = str_replace("\n", "_|_", $mystr); $mystr = trim($mystr); $ignore_sets = '\[QUOT.+\].*\[\/QUOTE\]|'; $ignore_sets .= '\[CODE\].*\[\/CODE\]|'; $ignore_sets .= '\[PHP\].*\[\/PHP\]|'; $ignore_sets .= '\[img\].*\[\/img\]|'; $ignore_sets .= '\[url.*\].*\[\/url\]|'; $ignore_sets .= '.*<\/a>|'; preg_match_all ( "/" . $ignore_sets . "\[[^\]]+\]|[[:alpha:]']+|<[^>]+>|&[^;\ ]+;/im", $mystr, $alphas, PREG_OFFSET_CAPTURE|PREG_PATTERN_ORDER); $mystr = str_replace('\\', '\\\\', $mystr); // this has to be done _after_ the matching. it messes up the // indexing otherwise. I have not figured out exactly why this // happens but I know this fixes it. $mystr = str_replace("\"", "\\\"", $mystr); $js .= 'var mispstr = "'.$mystr.'";'."\n"; $js .= 'var misps = Array('; $curindex = 0; for($i = 0; $i < sizeof($alphas[0]); $i++) { // if the word is an html tag or entity then skip it if (preg_match("/<[^>]+>|&[^;\ ]+;/", $alphas[0][$i][0])) continue; // ignore quotes if (preg_match("/\[QUOTE\].\[\/QUOTE\]/ism", $alphas[0][$i][0])) continue; // ignore BBCODE/VBCODE tags if (preg_match("/\[[^\]]+/", $alphas[0][$i][0])) continue; if (MisSpelled($alphas[0][$i][0])) { $js .= "new misp('" . str_replace("'", "\\'",$alphas[0][$i][0]) . "',". $alphas[0][$i][1] . "," . (strlen($alphas[0][$i][0]) + ($alphas[0][$i][1] - 1) ) . ",["; $suggestions = Suggest($alphas[0][$i][0]); foreach ($suggestions as $suggestion) { $sugs[] = "'".str_replace("'", "\\'", $suggestion)."'"; } if (sizeof($sugs)) { $js .= join(",", $sugs); } unset($sugs); $js .= "]),\n"; $sugs_found = 1; } } if ($sugs_found) $js = substr($js, 0, -2); $js .= ");"; eval('print_output("' . fetch_template('vbspell') . '");'); ?> |
Never mind. I forgot I turned off short open tags. This is why you should never use short open tags. *waves finger*
:D Simple fix by adding php after <? in vbspell.php. ;) |
Quote:
Quote:
|
Quote:
Good point :) |
Quote:
My users don't get the choice, but everyone has spell checking now. -t |
Quote:
|
On both 3.5 and 3.5.1.
So far it seems to work every time I have a posting window, regardless of how it's presented. -t |
Quote:
|
Quote:
Are you planning on any dictionary maintenance functions? Adding words to the dictionary would be a nice addition. I would think that at a minimun, integrating the phpspell admin Add a Word function into the Admin would be a valuable feature. On the high end, capturing the words that individuals add to their own private dictionaries for possible inclusion into the main dictionary would be very sweet. Anyway, a very nice utility. Fixing that annoying upgrade bug that whacks the template would be nice :). -t |
I just installed it on my 3.5.1 board and things are A-OK. Awesome mod.
Thanks man. |
Thanks tamarian,
This is just what the users on our forum have been wanting. Thanks so much. Easy to install. excellent. :) |
aight nice hack!!
how do I add a few words in the dictionary that aren't there? |
Quote:
Quote:
Love this hack... but is there any update on the problem above? The problem is, if this happens at the beginning of a post, you have no way to check the rest, it just keeps suggesting the same word :( thanks |
so...
would you like to share how to add a word or two the the dictionary? |
Quote:
|
Quote:
can i add words myself? or how does this work? |
Quote:
|
bump for my simple question
|
Quote:
|
doesn't work
|
Quote:
HTML Code:
if (misps[ wordindex ].suggestions.length) { HTML Code:
else |
k i got a wierd problem..
install works fine for new reply.. i just installed it into quick edit, and when i click modify, the button shows up, and when i click it, the pop up opens but is totally blank (it doesnt take the post text) and it goes "spell check done" then proceeds to whipe out the text completely, so there is nothing in the edit box when it goes back. any ideas? |
how do i make the pop up window bigger? the right hand side is cut off slightly.
|
All times are GMT. The time now is 07:38 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|