sqspell_config.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?php
  2. /**
  3. * sqspell_config.php -- SquirrelSpell Configuration file.
  4. *
  5. * @copyright &copy; 1999-2007 The SquirrelMail Project Team
  6. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  7. * @version $Id$
  8. * @package plugins
  9. * @subpackage squirrelspell
  10. */
  11. /** vars needed for getHashedFile() */
  12. global $data_dir;
  13. sqgetGlobalVar('username', $username, SQ_SESSION);
  14. /**
  15. * List of configured dictionaries
  16. *
  17. * This feature was added/changed in 0.3. Use this array to set up
  18. * which dictionaries are available to users. If you only have
  19. * English spellchecker on your system, then let this line be:
  20. *<pre>
  21. * $SQSPELL_APP = array('English' => 'ispell -a');
  22. * or
  23. * $SQSPELL_APP = array('English' => '/usr/local/bin/aspell -a');
  24. *</pre>
  25. * Sometimes you have to specify full path for PHP to find it.
  26. *
  27. * You can use Aspell or Ispell spellcheckers, the command line is the
  28. * same. Aspell might provide better spellchecking for Western languages.
  29. *
  30. * If you want to have more than one dictionary available to users,
  31. * configure the array to look something like this:
  32. *<pre>
  33. * $SQSPELL_APP = array('English' => 'aspell -a',
  34. * 'Russian' => 'ispell -d russian -a',
  35. * ...
  36. * 'Swahili' => 'ispell -d swahili -a'
  37. * );
  38. *</pre>
  39. * WARNINGS:
  40. * <ul>
  41. * <li>Watch the commas, making sure there isn't one after your last
  42. * dictionary declaration. Also, make sure all these dictionaries
  43. * are available on your system before you specify them here.</li>
  44. * <li>Whatever your setting is, don't omit the "-a" flag.</li>
  45. * <li>Remember to keep same array keys during upgrades. Don't rename them.
  46. * Users' dictionary settings use it.</li>
  47. * <li>Interface might translate array key, if used key is present in
  48. * SquirrelMail translations.</li>
  49. * </ul>
  50. * <pre>
  51. * Example:
  52. * $SQSPELL_APP = array('English' => 'ispell -a',
  53. * 'Spanish' => 'ispell -d spanish -a' );
  54. * </pre>
  55. *
  56. * @global array $SQSPELL_APP
  57. */
  58. $SQSPELL_APP = array('English' => 'ispell -a',
  59. 'Spanish' => 'ispell -d spanish -a');
  60. /**
  61. * Sample configuration for PHP pspell extension. Sets dictionary options.
  62. * Each language definition can contain up to 3 comma delimited options.
  63. * First option sets language, second sets spelling, third one sets jargon.
  64. * See http://www.php.net/pspell-new
  65. *
  66. * Pspell extension is supported since 0.6 (sm 1.5.2)
  67. */
  68. //$SQSPELL_APP = array('English' => 'en',
  69. // 'Spanish' => 'es');
  70. /**
  71. * 0 - default, command line ispell or aspell utilities configured with SQSPELL_APP
  72. * 1 - use php pspell extension. WARNING requires different SQSPELL_APP options.
  73. */
  74. $SQSPELL_SPELLCHECKER = 0;
  75. /**
  76. * Can be used to turn of detection of proc_open support in command line spellcheck
  77. * module. Option is not used if $SQSPELL_SPELLCHECKER is set to 1.
  78. */
  79. $SQSPELL_FORCE_POPEN = false;
  80. /**
  81. * Default dictionary
  82. * @global string $SQSPELL_APP_DEFAULT
  83. */
  84. $SQSPELL_APP_DEFAULT = 'English';
  85. /**
  86. * File that stores user's dictionary
  87. *
  88. * $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file.
  89. * The default setting should be OK for most everyone.
  90. *
  91. * This setting is used only when SquirrelSpell is upgraded from
  92. * older setup. Since SquirrelMail 1.5.1 SquirrelSpell stores all settings in
  93. * same place that stores other SquirrelMail user preferences.
  94. * @global string $SQSPELL_WORDS_FILE
  95. * @deprecated setting is still needed in order to handle upgrades
  96. */
  97. $SQSPELL_WORDS_FILE =
  98. getHashedFile($username, $data_dir, "$username.words");
  99. /**
  100. * Function used for checking words in user's dictionary
  101. * @global string $SQSPELL_EREG
  102. * @deprecated It is not used since 1.5.1 (sqspell 0.5)
  103. */
  104. $SQSPELL_EREG = 'ereg';