code:
} else {
$url =~ s/Enter your text to spellcheck. (Up to 5000 characters)/$vars_wordlets_mods{spell_check_no_text}/isg;
$url =~ s/<FORM><input type="BUTTON" NAME="GOBACK" VALUE=" Back " OnClick="history.go(-1)"></FORM>/<form action="javascript:window.close();"><input type="submit" name="close" value="$vars_wordlets_mods{spell_check_close}" /></form>/isg;
}
(I don't understand why there is "Back" button in that code. It doesn't appear in my spellcheck window. What's it for? I'm also totally confused by the s/.../...isg; code. This seems to be the same text that comes from vars_wordlets_mods. What's that all about?)
When there are no spelling errors, the code has a button that lets the user spell check again for some reason. I guess in case he/she adds something to the spellcheck window. The single button in that case is "Spellcheck Text." Clicking this button goes to spellcheck.net, and there is no way to get spell checked text back to the original window. I tried modifying the code to just provide a close button when the text is spelled correctly. I changed this code:
code:
[qb] } elsif ($url =~ /SpellCheck Text/) {
$url =~ s/(<form action=")http://(www.spellcheck.net/.+?)(" method="post">)/$1$vars_config{CGIURL}/ubb_spell.cgi$3n<input type="hidden" name="ubb" value="$2" />n<input type="hidden" name="f" value="$in{f}" />/isg;
$url =~ s/No spelling errors were found in this text./$vars_wordlets_mods{spell_check_spelled_correctly}/isg;
$url =~ s/SpellCheck Text/$vars_wordlets_mods{spell_check_text}/isg;
}
[/qb]