fsf changes, meant to be rebased on upstream
[squirrelmail.git] / plugins / squirrelspell / INSTALL
CommitLineData
38c5802f 1SquirrelSpell plugin
2--------------------
849bdf42 3
7aa22276 4Modify the sqspell_config.php file making sure you have ispell or aspell
849bdf42 5available on your system and located in PHP's path. The squirrelspell
6doesn't check for that and if it is not available, you're just going to
38c5802f 7get a "No errors found" message every time. :) Quite pleasing, but not
849bdf42 8very useful.
9
10Read files in "doc" directory -- they explain some features.
11
12Enable the plugin either by hand or by running the configure script from
598294a7 13your SquirrelMail install directory.
849bdf42 14
38c5802f 15NOTE: If you are using php >= 4.3.0 squirrelspell should work in safe mode.
16Otherwise, 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 23Enjoy and report bugs. ;)
9804bcde 24
2b5a7157 25This is an options commented sqspell_config.php
9804bcde 26
27<?php
7996c920 28/**
29 * sqspell_config.php -- SquirrelSpell Configuration file.
30 *
c997cbe6 31 * Copyright (c) 1999-2021 The SquirrelMail Project Team
7996c920 32 * Licensed under the GNU GPL. For full terms see the file COPYING.
33 */
34
35/** @ignore */
36if (! defined('SM_PATH')) define('SM_PATH','../../');
37
38/**
39 * getHashedFile() function for SQSPELL_WORDS_FILE and
40 * sqgetGlobalVar() from global.php
41 */
42include_once(SM_PATH . 'functions/prefs.php');
43
44/** vars needed for getHashedFile() */
45global $data_dir;
46sqgetGlobalVar('username', $username, SQ_SESSION);
47
48/**
49 * List of configured dictionaries
50 */
51$SQSPELL_APP = array('English' => 'ispell -a',
52 'Spanish' => 'ispell -d spanish -a');
53
54/**
55 * Default dictionary
56 */
57$SQSPELL_APP_DEFAULT = 'English';
58
59/**
60 * File that stores user's dictionary
61 *
62 * This setting is used only when squirrelspell is upgraded from
63 * older setup. Since 1.5.1 SquirrelSpell stores all settings in
64 * same place that stores other SquirrelMail user preferences.
65 */
66$SQSPELL_WORDS_FILE =
67 getHashedFile($username, $data_dir, "$username.words");
3de977ea 68