Happy New Year
[squirrelmail.git] / plugins / squirrelspell / INSTALL
index 808dec0cbff9a9f59ab7998e0ce35e5e8edf4322..4b0b3200a418f8718118e2079c36e5598264c4b2 100644 (file)
-SquirrelSpell-v0.3.1
----------------------
+SquirrelSpell plugin
+--------------------
 
-Untar SquirrelSpell into your squirrelmail/plugins directory. Modify the 
-sqspell_config.php file making sure you have ispell or aspell
+Modify the sqspell_config.php file making sure you have ispell or aspell
 available on your system and located in PHP's path. The squirrelspell
 doesn't check for that and if it is not available, you're just going to
-get a "No errors found"  message every time. :) Quite pleasing, but not
+get a "No errors found" message every time. :) Quite pleasing, but not
 very useful.
 
 Read files in "doc" directory -- they explain some features.
 
 Enable the plugin either by hand or by running the configure script from
-your squirrelmail install directory.
+your SquirrelMail install directory.
+
+NOTE: If you are using php >= 4.3.0 squirrelspell should work in safe mode.
+Otherwise, you may have to disable safe mode for the squirrelspell directory.
+   APACHE CONF EXAMPLE:
+        <Directory /webroot/squirrelmail/plugins/squirrelspell>
+                php_admin_value safe_mode 0
+        </Directory>
+
 
 Enjoy and report bugs. ;)
 
 This is an options commented sqspell_config.php
 
 <?php
+/**
+ *  sqspell_config.php -- SquirrelSpell Configuration file.
+ *
+ *  Copyright (c) 1999-2020 The SquirrelMail Project Team
+ *  Licensed under the GNU GPL. For full terms see the file COPYING.
+ */
+
+/** @ignore */
+if (! defined('SM_PATH')) define('SM_PATH','../../');
+
+/**
+ * getHashedFile() function for SQSPELL_WORDS_FILE and 
+ * sqgetGlobalVar() from global.php
+ */
+include_once(SM_PATH . 'functions/prefs.php');
+
+/** vars needed for getHashedFile() */
+global $data_dir;
+sqgetGlobalVar('username', $username, SQ_SESSION);
+
+/**
+ * List of configured dictionaries
+ */
+$SQSPELL_APP = array('English' => 'ispell -a',
+                     'Spanish' => 'ispell -d spanish -a');
+
+/**
+ * Default dictionary
+ */
+$SQSPELL_APP_DEFAULT = 'English';
+
+/**
+ * File that stores user's dictionary
+ *     
+ * This setting is used only when squirrelspell is upgraded from
+ * older setup. Since 1.5.1 SquirrelSpell stores all settings in
+ * same place that stores other SquirrelMail user preferences.
+ */
+$SQSPELL_WORDS_FILE =
+   getHashedFile($username, $data_dir, "$username.words");
 
-   /**
-    **  sqspell_config.php -- SquirrelSpell Configuration file.
-    **
-    **  Copyright (c) 1999-2000 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **
-    **
-    **  $Id$
-    **/
-
-    /* Just for poor wretched souls with E_ALL. :) */
-    global $username, $data_dir;
-
-    /**
-       SPELL-CHECKING APPLICATIONS:
-       ----------------------------
-       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.
-       Aspell is a better spell-checker than Ispell, so you're encouraged
-       to use it.
-
-       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"
-                      );
-
-       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.
-
-    **/
-    $SQSPELL_APP = array('English' => 'ispell -a');
-
-    /**
-       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';
-
-    /**
-       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";
-
-    /**
-       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";
-
-    /**
-       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';
-?>    
\ No newline at end of file