38c5802f |
1 | SquirrelSpell plugin |
2 | -------------------- |
849bdf42 |
3 | |
7aa22276 |
4 | Modify the sqspell_config.php file making sure you have ispell or aspell |
849bdf42 |
5 | available on your system and located in PHP's path. The squirrelspell |
6 | doesn't check for that and if it is not available, you're just going to |
38c5802f |
7 | get a "No errors found" message every time. :) Quite pleasing, but not |
849bdf42 |
8 | very useful. |
9 | |
10 | Read files in "doc" directory -- they explain some features. |
11 | |
12 | Enable the plugin either by hand or by running the configure script from |
598294a7 |
13 | your SquirrelMail install directory. |
849bdf42 |
14 | |
38c5802f |
15 | NOTE: If you are using php >= 4.3.0 squirrelspell should work in safe mode. |
16 | Otherwise, you may have to disable safe mode for the squirrelspell directory. |
17 | APACHE CONF EXAMPLE: |
598294a7 |
18 | <Directory /webroot/squirrelmail/plugins/squirrelspell> |
19 | php_admin_value safe_mode 0 |
20 | </Directory> |
38c5802f |
21 | |
22 | |
849bdf42 |
23 | Enjoy and report bugs. ;) |
9804bcde |
24 | |
2b5a7157 |
25 | This is an options commented sqspell_config.php |
9804bcde |
26 | |
27 | <?php |
28 | |
29 | /** |
30 | ** sqspell_config.php -- SquirrelSpell Configuration file. |
31 | ** |
9eb3fcb3 |
32 | ** Copyright (c) 1999-2000 The SquirrelMail Project Team |
9804bcde |
33 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
34 | ** |
35 | ** |
36 | ** |
37 | ** $Id$ |
38 | **/ |
39 | |
40 | /* Just for poor wretched souls with E_ALL. :) */ |
41 | global $username, $data_dir; |
42 | |
43 | /** |
44 | SPELL-CHECKING APPLICATIONS: |
45 | ---------------------------- |
46 | This feature was added/changed in 0.3. Use this array to set up |
47 | which dictionaries are available to users. If you only have |
48 | English spellchecker on your system, then let this line be: |
49 | |
50 | $SQSPELL_APP = array("English" => "ispell -a"); |
51 | |
52 | or |
53 | |
54 | $SQSPELL_APP = array("English" => "/usr/local/bin/aspell -a"); |
55 | |
56 | Sometimes you have to specify full path for PHP to find it. |
57 | Aspell is a better spell-checker than Ispell, so you're encouraged |
58 | to use it. |
59 | |
60 | If you want to have more than one dictionary available to users, |
61 | configure the array to look something like this: |
62 | |
63 | $SQSPELL_APP = array( |
598294a7 |
64 | "English" => "aspell -a", |
9804bcde |
65 | "Russian" => "ispell -d russian -a", |
598294a7 |
66 | ... |
67 | "Swahili" => "ispell -d swahili -a" |
68 | ); |
9804bcde |
69 | |
70 | Watch the commas, making sure there isn't one after your last |
71 | dictionary declaration. Also, make sure all these dictionaries |
72 | are available on your system before you specify them here. |
73 | |
74 | Whatever your setting is, don't omit the "-a" flag. |
75 | |
76 | **/ |
77 | $SQSPELL_APP = array('English' => 'ispell -a'); |
78 | |
79 | /** |
80 | DEFAULT DICTIONARY |
81 | ------------------- |
82 | Even if you're only running one dictionary, still specify which one |
83 | is the default. Watch the case -- it has to be exactly as in array |
84 | you declared in $SQSPELL_APP. |
85 | **/ |
86 | $SQSPELL_APP_DEFAULT='English'; |
87 | |
88 | /** |
89 | USER DICTIONARY: |
90 | ----------------- |
91 | $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file. |
92 | The default setting should be OK for most everyone. Read PRIVACY and |
93 | CRYPTO in the "doc" directory. |
94 | **/ |
95 | $SQSPELL_WORDS_FILE = "$data_dir/$username.words"; |
96 | |
97 | /** |
98 | CASE SENSITIVITY: |
99 | ------------------ |
100 | Use $SQSPELL_EREG="ereg" for case-sensitive matching of user |
101 | dictionary, or $SQSPELL_EREG="eregi" for case-insensitive |
102 | matching. It is advised to use case-sensitive matching. |
103 | **/ |
104 | $SQSPELL_EREG="ereg"; |
105 | |
106 | /** |
107 | SOUP NAZI (AVOIDING BAD BROWSERS) |
108 | ------------------------------------- |
109 | Since some browsers choke on JavaScript, here is an option to disable the |
110 | browsers with known problems. All you do is add some part of an USER_AGENT |
111 | string of an offending browser which you want to disable and users will not |
112 | know about this plugin. E.g. browsers with "Mozilla/4.61 (Macintosh, I, PPC)" |
113 | USER_AGENT string will get weeded out if you provide "Macintosh" in the |
114 | config string. |
115 | |
116 | Mozilla/2 -- You're kidding, right? |
117 | Mozilla/3 -- known not to work |
118 | Opera -- known not to work |
119 | Macintosh -- Netscape 4.x on Macintosh chokes for some reason. |
120 | Adding until resolved. |
121 | **/ |
122 | $SQSPELL_SOUP_NAZI = 'Mozilla/3, Mozilla/2, Opera 4, Opera/4, Macintosh'; |
598294a7 |
123 | ?> |