X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fsqspell_config.php;h=3c544a029d6df5092f8451f7f1ca5e60b5c8174d;hp=7ef16dac153dbb7ad94741ac403aae7a70f2b8ae;hb=f197ec8835b64975ff47dc6cd86dae75605baebf;hpb=2a917bbc8c16c3989e6e9c7af86918bfbc7c79a8 diff --git a/plugins/squirrelspell/sqspell_config.php b/plugins/squirrelspell/sqspell_config.php index 7ef16dac..3c544a02 100644 --- a/plugins/squirrelspell/sqspell_config.php +++ b/plugins/squirrelspell/sqspell_config.php @@ -1,34 +1,107 @@ + * $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' );
+ * 
* - * $Id$ + * @global array $SQSPELL_APP + */ +$SQSPELL_APP = array('English' => 'ispell -a', + 'Spanish' => 'ispell -d spanish -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'); + +/** + * 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; -require_once('../functions/prefs.php'); +/** + * 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; -/* Just for poor wretched souls with E_ALL. :) */ -global $username, $data_dir; +/** + * Default dictionary + * @global string $SQSPELL_APP_DEFAULT + */ +$SQSPELL_APP_DEFAULT = 'English'; /** - * Example: + * 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. * - * $SQSPELL_APP = array( 'English' => 'ispell -a', - * 'Spanish' => 'ispell -d spanish -a' ); + * 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_APP = array('English' => 'ispell -a', - 'Spanish' => 'ispell -d spanish -a'); -$SQSPELL_APP_DEFAULT = 'English'; -$SQSPELL_WORDS_FILE = +$SQSPELL_WORDS_FILE = getHashedFile($username, $data_dir, "$username.words"); -$SQSPELL_EREG = 'ereg'; -$SQSPELL_SOUP_NAZI = 'Mozilla/3, Mozilla/2, Opera 4, Opera/4, ' - . 'Macintosh, OmniWeb'; - -?>