Missed a spot. Please use less accusatory language when telling ppl they broke plugi...
[squirrelmail.git] / plugins / squirrelspell / setup.php
CommitLineData
849bdf42 1<?php
4b4abf93 2
d112ed5a 3/**
4 * setup.php
91e0dccc 5 *
4b4abf93 6 * Squirrelspell setup file, as defined by the SquirrelMail-1.2 API.
d112ed5a 7 *
4b4abf93 8 * @author Konstantin Riabitsev <icon at duke.edu>
47ccfad4 9 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
4b4abf93 10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7996c920 11 * @version $Id$
ea5f4b8e 12 * @package plugins
13 * @subpackage squirrelspell
e5af0839 14 * @todo remove sqspell_ prefix from main php scripts.
d112ed5a 15 */
849bdf42 16
7996c920 17
d112ed5a 18/**
598294a7 19 * Standard SquirrelMail plugin initialization API.
90ad8cd1 20 *
d112ed5a 21 * @return void
22 */
23function squirrelmail_plugin_init_squirrelspell() {
7996c920 24 global $squirrelmail_plugin_hooks;
25 $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
90ad8cd1 26 'squirrelspell_setup';
7996c920 27 $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
90ad8cd1 28 'squirrelspell_optpage_register_block';
7996c920 29 $squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
90ad8cd1 30 'squirrelspell_options';
7996c920 31 $squirrelmail_plugin_hooks['right_main_after_header']['squirrelspell'] =
90ad8cd1 32 'squirrelspell_upgrade';
d112ed5a 33}
849bdf42 34
d112ed5a 35/**
e5af0839 36 * Register option block
90ad8cd1 37 *
e5af0839 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
40 * setup.php size.
d112ed5a 41 * @return void
42 */
43function squirrelspell_optpage_register_block() {
e5af0839 44 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
45 squirrelspell_optpage_block_function();
d112ed5a 46}
849bdf42 47
d112ed5a 48/**
e5af0839 49 * Add spell check button in compose.
50 *
d112ed5a 51 * This function adds a "Check Spelling" link to the "Compose" row
52 * during message composition.
d112ed5a 53 * @return void
54 */
55function squirrelspell_setup() {
e5af0839 56 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
57 squirrelspell_setup_function();
7996c920 58}
59
60/**
e5af0839 61 * Upgrade dictionaries
62 *
7996c920 63 * Transparently upgrades user's dictionaries when message listing is loaded
64 * @since 1.5.1 (sqspell 0.5)
65 */
66function squirrelspell_upgrade() {
7996c920 67 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
e5af0839 68 squirrelspell_upgrade_function();
7996c920 69}
70
71/**
e5af0839 72 * Display SquirrelSpell version
7996c920 73 * @since 1.5.1 (sqspell 0.5)
74 * @return string plugin's version
7996c920 75 */
76function squirrelspell_version() {
e5af0839 77 return '0.5';
d112ed5a 78}