X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fsqspell_config.php;h=1a55f2fe96a5d3660dc2d0bd7a9a27cf57b641b2;hb=22387c8d44f3ab104db6e19180d3775a45762359;hp=e0405b4bfadb296aeebb6ca091a69dbeacb6f5bf;hpb=849bdf42ed7bd7cca68909d2b46869742dfd210e;p=squirrelmail.git diff --git a/plugins/squirrelspell/sqspell_config.php b/plugins/squirrelspell/sqspell_config.php index e0405b4b..1a55f2fe 100644 --- a/plugins/squirrelspell/sqspell_config.php +++ b/plugins/squirrelspell/sqspell_config.php @@ -1,88 +1,107 @@ "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. +/** + * sqspell_config.php -- SquirrelSpell Configuration file. + * + * @copyright 1999-2017 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage squirrelspell + */ - If you want to have more than one dictionary available to users, - configure the array to look something like this: +/** vars needed for getHashedFile() */ +global $data_dir; +sqgetGlobalVar('username', $username, SQ_SESSION); - $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. +/** + * List of configured dictionaries + * + * This feature was added/changed in 0.3. Use this array to set up + * which dictionaries are available to users. If you only have + * English spellchecker on your system, then let this line be: + *
+ *   $SQSPELL_APP = array('English' => 'ispell -a');
+ *     or
+ *   $SQSPELL_APP = array('English' => '/usr/local/bin/aspell -a');
+ *
+ * Sometimes you have to specify full path for PHP to find it. + * + * You can use Aspell or Ispell spellcheckers, the command line is the + * same. Aspell might provide better spellchecking for Western languages. + * + * 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'
+ *                        );
+ *
+ * WARNINGS: + * + *
+ * Example:
+ * $SQSPELL_APP = array('English' => 'ispell -a',
+ *                      'Spanish' => 'ispell -d spanish -a' );
+ * 
+ * + * @global array $SQSPELL_APP + */ +$SQSPELL_APP = array('English' => 'ispell -a', + 'Spanish' => 'ispell -d spanish -a'); - **/ -$SQSPELL_APP = array("English" => "ispell -a"); +/** + * Sample configuration for PHP pspell extension. Sets dictionary options. + * Each language definition can contain up to 3 comma delimited options. + * First option sets language, second sets spelling, third one sets jargon. + * See http://www.php.net/pspell-new + * + * Pspell extension is supported since 0.6 (sm 1.5.2) + */ +//$SQSPELL_APP = array('English' => 'en', +// 'Spanish' => 'es'); /** - 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"; + * 0 - default, command line ispell or aspell utilities configured with SQSPELL_APP + * 1 - use php pspell extension. WARNING requires different SQSPELL_APP options. + */ +$SQSPELL_SPELLCHECKER = 0; /** - 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"; + * Can be used to turn of detection of proc_open support in command line spellcheck + * module. Option is not used if $SQSPELL_SPELLCHECKER is set to 1. + */ +$SQSPELL_FORCE_POPEN = false; /** - 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"; + * Default dictionary + * @global string $SQSPELL_APP_DEFAULT + */ +$SQSPELL_APP_DEFAULT = 'English'; /** - 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"; + * File that stores user's dictionary + * + * $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file. + * The default setting should be OK for most everyone. + * + * This setting is used only when SquirrelSpell is upgraded from + * older setup. Since SquirrelMail 1.5.1 SquirrelSpell stores all settings in + * same place that stores other SquirrelMail user preferences. + * @global string $SQSPELL_WORDS_FILE + * @deprecated setting is still needed in order to handle upgrades + */ +$SQSPELL_WORDS_FILE = + getHashedFile($username, $data_dir, "$username.words"); -?>