Happy New Year
[squirrelmail.git] / plugins / squirrelspell / modules / options_main.mod
CommitLineData
849bdf42 1<?php
4b4abf93 2
d112ed5a 3/**
4 * options_main.mod
4b4abf93 5 *
d112ed5a 6 * Squirrelspell module
d112ed5a 7 *
8 * Default page called when accessing SquirrelSpell's options.
9 *
4b4abf93 10 * @author Konstantin Riabitsev <icon at duke.edu>
77a1e3d1 11 * @copyright 1999-2022 The SquirrelMail Project Team
4b4abf93 12 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
44d661aa 13 * @version $Id$
14 * @package plugins
15 * @subpackage squirrelspell
d112ed5a 16 */
91e0dccc 17
a564b9e3 18global $SQSPELL_APP, $main_options_changed_message;
19
20if (!empty($main_options_changed_message))
21 $msg = $main_options_changed_message;
22else
23 $msg = '';
24
25$msg .= '<p>'
d112ed5a 26 . _("Please choose which options you wish to set up:")
27 . '</p>'
28 . '<ul>'
29 . '<li><a href="sqspell_options.php?MOD=edit_dic">'
30 . _("Edit your personal dictionary") . '</a></li>';
31/**
32 * See if more than one dictionary is defined system-wide.
33 * If so, let the user choose his preferred ones.
34 */
35if (sizeof($SQSPELL_APP)>1) {
36 $msg .= '<li><a href="sqspell_options.php?MOD=lang_setup">'
37 . _("Set up international dictionaries")
38 . "</a></li>\n";
39}
40/**
41 * See if MCRYPT is available.
42 * If so, let the user choose whether s/he wants to encrypt the
43 * personal dictionary file.
44 */
45if (function_exists("mcrypt_generic")) {
46 $msg .= '<li><a href="sqspell_options.php?MOD=enc_setup">'
47 . _("Encrypt or decrypt your personal dictionary")
48 . "</a></li>\n";
49} else {
50 $msg .= '<li>'
7996c920 51 . _("Personal dictionary encryption options are not available")
90ad8cd1 52 . '</li>';
d112ed5a 53}
54$msg .= "</ul>\n";
a564b9e3 55
56
57
58// add checkbox to enable/disable the spellcheck button on compose screen
59//
60$sqspell_show_button = getPref($data_dir, $username, 'sqspell_show_button', 1);
61$msg .= '<form method="post">'
62 . '<input type="hidden" name="MOD" value="change_main_options" />'
63 . '<input type="hidden" name="smtoken" value="' . sm_generate_security_token() . '" />'
64 . '<p>'
65 . '<input type="checkbox" id="sqspell_show_button" name="sqspell_show_button" value="1"';
66if ($sqspell_show_button) {
67 $msg .= ' checked="checked"';
68}
69$msg .= ' /><label for="sqspell_show_button"> '
70 . sprintf(_("Show \"%s\" button when composing"), _("Check Spelling"))
71 . "</label>\n";
72$msg .= " <input type=\"submit\" value=\" "
73 . _("Make these changes") . " \" /></p></form>";
74
75
d112ed5a 76sqspell_makePage( _("SquirrelSpell Options Menu"), null, $msg);
77
78/**
79 * For Emacs weenies:
80 * Local variables:
81 * mode: php
82 * End:
2b6b400e 83 * vim: syntax=php
d112ed5a 84 */