489703460994678e4e35e848d4960c4421d52d82
[squirrelmail.git] / plugins / squirrelspell / sqspell_config.php
1 <?php
2 /**
3 * sqspell_config.php -- SquirrelSpell Configuration file.
4 *
5 * Copyright (c) 1999-2005 The SquirrelMail Project Team
6 * Licensed under the GNU GPL. For full terms see the file COPYING.
7 *
8 * @version $Id$
9 * @package plugins
10 * @subpackage squirrelspell
11 */
12
13 /** @ignore */
14 if (! defined('SM_PATH')) define('SM_PATH','../../');
15
16 /** getHashedFile() function for SQSPELL_WORDS_FILE and sqgetGlobalVar() from global.php */
17 include_once(SM_PATH . 'functions/prefs.php');
18
19 /** vars needed for getHashedFile() */
20 global $data_dir;
21 sqgetGlobalVar('username', $username, SQ_SESSION);
22
23 /**
24 * List of configured dictionaries
25 *
26 * This feature was added/changed in 0.3. Use this array to set up
27 * which dictionaries are available to users. If you only have
28 * English spellchecker on your system, then let this line be:
29 *<pre>
30 * $SQSPELL_APP = array('English' => 'ispell -a');
31 * or
32 * $SQSPELL_APP = array('English' => '/usr/local/bin/aspell -a');
33 *</pre>
34 * Sometimes you have to specify full path for PHP to find it.
35 *
36 * You can use Aspell or Ispell spellcheckers. Aspell might provide
37 * better spellchecking for Western languages.
38 *
39 * If you want to have more than one dictionary available to users,
40 * configure the array to look something like this:
41 *<pre>
42 * $SQSPELL_APP = array('English' => 'aspell -a',
43 * 'Russian' => 'ispell -d russian -a',
44 * ...
45 * 'Swahili' => 'ispell -d swahili -a'
46 * );
47 *</pre>
48 * WARNINGS:
49 * <ul>
50 * <li>Watch the commas, making sure there isn't one after your last
51 * dictionary declaration. Also, make sure all these dictionaries
52 * are available on your system before you specify them here.</li>
53 * <li>Whatever your setting is, don't omit the "-a" flag.</li>
54 * <li>Remember to keep same array keys during upgrades. Don't rename them.
55 * Users' dictionary settings use it.</li>
56 * <li>Interface might translate array key, if used key is present in
57 * SquirrelMail translations.</li>
58 * </ul>
59 * <pre>
60 * Example:
61 * $SQSPELL_APP = array('English' => 'ispell -a',
62 * 'Spanish' => 'ispell -d spanish -a' );
63 * </pre>
64 *
65 * @global array $SQSPELL_APP
66 */
67 $SQSPELL_APP = array('English' => 'ispell -a',
68 'Spanish' => 'ispell -d spanish -a');
69
70 /**
71 * Default dictionary
72 * @global string $SQSPELL_APP_DEFAULT
73 */
74 $SQSPELL_APP_DEFAULT = 'English';
75
76 /**
77 * File that stores user's dictionary
78 *
79 * $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file.
80 * The default setting should be OK for most everyone.
81 *
82 * This setting is used only when SquirrelSpell is upgraded from
83 * older setup. Since SquirrelMail 1.5.1 SquirrelSpell stores all settings in
84 * same place that stores other SquirrelMail user preferences.
85 * @global string $SQSPELL_WORDS_FILE
86 * @deprecated setting is still needed in order to handle upgrades
87 */
88 $SQSPELL_WORDS_FILE =
89 getHashedFile($username, $data_dir, "$username.words");
90
91 /**
92 * Function used cheching words in user's dictionary
93 * @global string $SQSPELL_EREG
94 * @deprecated It is not used since 1.5.1 (sqspell 0.5)
95 */
96 $SQSPELL_EREG = 'ereg';
97
98 ?>