X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fsqspell_config.php;h=46acc575160c66142e424bf5e9121b2568530ec7;hp=e0405b4bfadb296aeebb6ca091a69dbeacb6f5bf;hb=0397590e2d0620ad93ae22d2c8d33fe1283068f6;hpb=849bdf42ed7bd7cca68909d2b46869742dfd210e diff --git a/plugins/squirrelspell/sqspell_config.php b/plugins/squirrelspell/sqspell_config.php index e0405b4..46acc57 100644 --- a/plugins/squirrelspell/sqspell_config.php +++ b/plugins/squirrelspell/sqspell_config.php @@ -1,88 +1,27 @@ "ispell -a"); - - or - - $SQSPELL_APP = array("English" => "/usr/local/bin/aspell -a"); - - Sometimes you have to specify full path for PHP to find it. - Aspell is a better spell-checker than Ispell, so you're encouraged - to use it. - - If you want to have more than one dictionary available to users, - configure the array to look something like this: - - $SQSPELL_APP = array( - "English" => "aspell -a", - "Russian" => "ispell -d russian -a", - ... - "Swahili" => "ispell -d swahili -a" - ); - - Watch the commas, making sure there isn't one after your last - dictionary declaration. Also, make sure all these dictionaries - are available on your system before you specify them here. - - Whatever your setting is, don't omit the "-a" flag. - - **/ -$SQSPELL_APP = array("English" => "ispell -a"); - -/** - DEFAULT DICTIONARY - ------------------- - Even if you're only running one dictionary, still specify which one - is the default. Watch the case -- it has to be exactly as in array - you declared in $SQSPELL_APP. - **/ -$SQSPELL_APP_DEFAULT="English"; - -/** - USER DICTIONARY: - ----------------- - $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file. - The default setting should be OK for most everyone. Read PRIVACY and - CRYPTO in the "doc" directory. - **/ -$SQSPELL_WORDS_FILE = "$data_dir/$username.words"; - -/** - CASE SENSITIVITY: - ------------------ - Use $SQSPELL_EREG="ereg" for case-sensitive matching of user - dictionary, or $SQSPELL_EREG="eregi" for case-insensitive - matching. It is advised to use case-sensitive matching. - **/ -$SQSPELL_EREG="ereg"; - -/** - SOUP NAZI (AVOIDING BAD BROWSERS) - ------------------------------------- - Since some browsers choke on JavaScript, here is an option to disable the - browsers with known problems. All you do is add some part of an USER_AGENT - string of an offending browser which you want to disable and users will not - know about this plugin. E.g. browsers with "Mozilla/4.61 (Macintosh, I, PPC)" - USER_AGENT string will get weeded out if you provide "Macintosh" in the - config string. - - Mozilla/2 -- You're kidding, right? - Mozilla/3 -- known not to work - Opera -- known not to work - Macintosh -- Netscape 4.x on Macintosh chokes for some reason. - Adding until resolved. - **/ -$SQSPELL_SOUP_NAZI = "Mozilla/3, Mozilla/2, Opera 4, Opera/4, Macintosh"; + /** + * sqspell_config.php -- SquirrelSpell Configuration file. + * + * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * + * + * $Id$ + */ + + require_once('../functions/prefs.php'); + + /* Just for poor wretched souls with E_ALL. :) */ + global $username, $data_dir; + + $SQSPELL_APP = array( 'English' => 'ispell -a', + 'Spanish' => 'ispell -d spanish -a' ); + $SQSPELL_APP_DEFAULT = 'English'; + $SQSPELL_WORDS_FILE = + getHashedFile($username, $data_dir, "$username.words"); + $SQSPELL_EREG = 'ereg'; + $SQSPELL_SOUP_NAZI = 'Mozilla/3, Mozilla/2, Opera 4, Opera/4, Macintosh'; ?>