Isaac's Blog

« 2in diameter hail! | Main | ugh, weather station errors »

MTSpeling plugin... update!

As many of you have seen, my spelling is, well, horrid. So I found a spell checker for MT, called MTSpeling. It had one HUGE disadvantage:

MTSpeling provides support for a personal dictionary of words that it will treat as spelled correctly, stored as a cookie on the user�s web browser. The only support in the plugin is to be able to read and parse the spelling-dict cookie as a colon-seperated list of words.

How friggin lame is that? I have direct access to my server, why can't I just read a local file? well, now you can, heres the hack...

The line after "$Lingua::Ispell::path" add:

my $personaldictfile = '/path/to/';

Now do a search on cookie, you should end up at around line 34. after this cookie check, add this to line 41:

open (FILE,"$personaldictfile"); my @personaldict = ; close FILE;

foreach my $word (@personaldict) {
chomp $word;

Come on alex, its that simple, why'd u make it seem so hard?

There is no current support in the plugin for dictionaries stored anywhere other than as a cookie in the browser.

There is now! muahahahaa. This new file works with one word per line. none of that colon stuff the cookie had to use.

So I finish this entry, hit preview to let it spell check, and this came up "colon-seperated" from the original page. How funny is it that a spell cheking page has spelling errors?

Post a comment