Revision history for SpellcheckHack


Revision [19227]

Last edited on 2008-01-28 00:14:44 by BrianKoontz [Modified links pointing to docs server]

No Differences

Revision [17014]

Edited on 2007-05-31 23:27:41 by BrianKoontz [Reverted]
Additions:
if (evalText.match(/[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
this.currentWordIndex++;
if (evalText.match(/[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
if (evalText.match(/[A-Z]+[a-z]+[A-Z0-9][A-Za-z0-9]*/) == null)
this.addButton("spell","Check Spelling","","document.getElementById('" + this.id + "')._owner.spellcheck");
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );
$index = 0;
and replace with
# exec aspell command - redirect STDERR to STDOUT
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
exec($cmd, $linesout, $ret);
if(!$ret) {
//if($aspellret = exec($cmd)) {
// $linesout = explode( "\n", $aspellret );
$index = 0;
You need to provide your own "spell" icon to put in 3rdparty/plugins/wikiedit/images -- I used someone's copy of a standard MS application spellcheck action. For testing, you can use any of the included icons, for instance "createtable".
There's probably a way to clean up the wiki paths to use the Wikka config variables, but for me the hard coded paths worked fine.
CategoryUserContributions
Deletions:
if (evalText.match(/[A-ZÄÖÜ] [a-zßäöü] [A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
this.currentWordIndex ;
if (evalText.match(/[A-ZÄÖÜ] [a-zßäöü] [A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
if (evalText.match(/[A-Z] [a-z] [A-Z0-9][A-Za-z0-9]*/) == null)
this.addButton("spell","Check Spelling","","document.getElementById('" this.id "')._owner.spellcheck");
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>


Revision [16813]

Edited on 2007-05-31 10:50:17 by FphP64 [Reverted]
Additions:
if (evalText.match(/[A-ZÄÖÜ] [a-zßäöü] [A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
this.currentWordIndex ;
if (evalText.match(/[A-ZÄÖÜ] [a-zßäöü] [A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
if (evalText.match(/[A-Z] [a-z] [A-Z0-9][A-Za-z0-9]*/) == null)
this.addButton("spell","Check Spelling","","document.getElementById('" this.id "')._owner.spellcheck");
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>
Deletions:
if (evalText.match(/[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
this.currentWordIndex++;
if (evalText.match(/[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
if (evalText.match(/[A-Z]+[a-z]+[A-Z0-9][A-Za-z0-9]*/) == null)
this.addButton("spell","Check Spelling","","document.getElementById('" + this.id + "')._owner.spellcheck");
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );
$index = 0;
and replace with
# exec aspell command - redirect STDERR to STDOUT
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
exec($cmd, $linesout, $ret);
if(!$ret) {
//if($aspellret = exec($cmd)) {
// $linesout = explode( "\n", $aspellret );
$index = 0;
You need to provide your own "spell" icon to put in 3rdparty/plugins/wikiedit/images -- I used someone's copy of a standard MS application spellcheck action. For testing, you can use any of the included icons, for instance "createtable".
There's probably a way to clean up the wiki paths to use the Wikka config variables, but for me the hard coded paths worked fine.
CategoryUserContributions


Revision [14137]

Edited on 2006-05-07 14:50:22 by BrianKoontz [Added note]
Additions:
# exec aspell command - redirect STDERR to STDOUT
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );
$index = 0;
Deletions:
# exec aspell command - redirect STDERR to STDOUT
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );


Revision [14136]

Edited on 2006-05-07 14:48:25 by BrianKoontz [Added note]
Additions:
<<PHP4 does not support return values from exec(); invocation of the spellchecker will fail on these systems. You must modify 3rdparty/plugins/speller/server-scripts/spellchecker.php. Locate this code at about line 92 in the file:
# exec aspell command - redirect STDERR to STDOUT
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );
$index = 0;
and replace with
# exec aspell command - redirect STDERR to STDOUT
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
exec($cmd, $linesout, $ret);
if(!$ret) {
//if($aspellret = exec($cmd)) {
// $linesout = explode( "\n", $aspellret );
$index = 0;


Revision [14135]

Edited on 2006-05-07 14:39:09 by BrianKoontz [Added note]
Additions:
<<Depending on the editor and character set you're using, a cut-and-paste on the code above may not work due to the extended character set. If you cannot get the spellchecker to display, check to see if the evalText.match(...) line copied correctly. If you do not anticipate the need for extended characters in your wiki names, you can replace this line:
if (evalText.match(/[A-ZÄÖÜ]+[a-zßäöü]+[A-Z0-9ÄÖÜ][A-Za-z0-9ÄÖÜßäöü]*/) == null)
with
if (evalText.match(/[A-Z]+[a-z]+[A-Z0-9][A-Za-z0-9]*/) == null)
<<::c::


Revision [14091]

Edited on 2006-05-03 20:40:20 by SpectreMoo [Removed unnecessary line from spellchecker.php changes]
Deletions:
$word_win_src = spellercss = $wiki_path.'/speller/wordWindow.js';


Revision [10242]

Edited on 2005-07-28 00:23:42 by SpectreMoo [small change]
Additions:
Adding spell checking to your wiki pages isn't very difficult, here's how I did it:
Deletions:
I find having a spellchecker on the wiki to be quite useful; here's how I added one:


Revision [10241]

Edited on 2005-07-27 23:49:55 by SpectreMoo [Small change]
Additions:
I find having a spellchecker on the wiki to be quite useful; here's how I added one:
this.popUpUrl = '/speller/spellchecker.html';
this.spellCheckScript = '/speller/server-scripts/spellchecker.php';
Deletions:
I find having a spellchecker on the wiki quite useful; here's how I added one:
// this.popUpUrl = '/speller/spellchecker.html';
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php';


Revision [10239]

Edited on 2005-07-27 23:46:55 by SpectreMoo [Added CategoryUserContributions]
Additions:
CategoryUserContributions


Revision [10238]

The oldest known version of this page was created on 2005-07-27 23:45:48 by SpectreMoo [Added CategoryUserContributions]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki