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
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
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:
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>
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>
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:
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
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;
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );
$index = 0;
Deletions:
if($aspellret = exec($cmd)) {
$linesout = explode( "\n", $aspellret );
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;
# 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;
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::
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:
Additions:
Adding spell checking to your wiki pages isn't very difficult, here's how I did it:
Deletions:
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';
this.popUpUrl = '/speller/spellchecker.html';
this.spellCheckScript = '/speller/server-scripts/spellchecker.php';
Deletions:
// this.popUpUrl = '/speller/spellchecker.html';
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php';
Additions:
CategoryUserContributions