6 * Squirrelspell setup file, as defined by the SquirrelMail-1.2 API.
8 * @author Konstantin Riabitsev <icon at duke.edu>
9 * @copyright © 1999-2006 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
13 * @subpackage squirrelspell
14 * @todo remove sqspell_ prefix from main php scripts.
19 * Standard SquirrelMail plugin initialization API.
23 function squirrelmail_plugin_init_squirrelspell() {
24 global $squirrelmail_plugin_hooks;
25 $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
26 'squirrelspell_setup';
27 $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
28 'squirrelspell_optpage_register_block';
29 $squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
30 'squirrelspell_options';
31 $squirrelmail_plugin_hooks['right_main_after_header']['squirrelspell'] =
32 'squirrelspell_upgrade';
36 * Register option block
38 * This function formats and adds the plugin and its description to the
39 * Options screen. Code moved to internal function in order to reduce
43 function squirrelspell_optpage_register_block() {
44 include_once(SM_PATH
. 'plugins/squirrelspell/sqspell_functions.php');
45 squirrelspell_optpage_block_function();
49 * Add spell check button in compose.
51 * This function adds a "Check Spelling" link to the "Compose" row
52 * during message composition.
55 function squirrelspell_setup() {
56 include_once(SM_PATH
. 'plugins/squirrelspell/sqspell_functions.php');
57 squirrelspell_setup_function();
61 * Upgrade dictionaries
63 * Transparently upgrades user's dictionaries when message listing is loaded
64 * @since 1.5.1 (sqspell 0.5)
66 function squirrelspell_upgrade() {
67 include_once(SM_PATH
. 'plugins/squirrelspell/sqspell_functions.php');
68 squirrelspell_upgrade_function();
72 * Display SquirrelSpell version
73 * @since 1.5.1 (sqspell 0.5)
74 * @return string plugin's version
76 function squirrelspell_version() {