moving main color tags to css
[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>
9 * @copyright &copy; 1999-2005 The SquirrelMail Project Team
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/** @ignore */
18if (! defined('SM_PATH')) define('SM_PATH','../../');
19
d112ed5a 20/**
598294a7 21 * Standard SquirrelMail plugin initialization API.
90ad8cd1 22 *
d112ed5a 23 * @return void
24 */
25function squirrelmail_plugin_init_squirrelspell() {
7996c920 26 global $squirrelmail_plugin_hooks;
27 $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
90ad8cd1 28 'squirrelspell_setup';
7996c920 29 $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
90ad8cd1 30 'squirrelspell_optpage_register_block';
7996c920 31 $squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
90ad8cd1 32 'squirrelspell_options';
7996c920 33 $squirrelmail_plugin_hooks['right_main_after_header']['squirrelspell'] =
90ad8cd1 34 'squirrelspell_upgrade';
d112ed5a 35}
849bdf42 36
d112ed5a 37/**
e5af0839 38 * Register option block
90ad8cd1 39 *
e5af0839 40 * This function formats and adds the plugin and its description to the
41 * Options screen. Code moved to internal function in order to reduce
42 * setup.php size.
d112ed5a 43 * @return void
44 */
45function squirrelspell_optpage_register_block() {
e5af0839 46 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
47 squirrelspell_optpage_block_function();
d112ed5a 48}
849bdf42 49
d112ed5a 50/**
e5af0839 51 * Add spell check button in compose.
52 *
d112ed5a 53 * This function adds a "Check Spelling" link to the "Compose" row
54 * during message composition.
d112ed5a 55 * @return void
56 */
57function squirrelspell_setup() {
e5af0839 58 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
59 squirrelspell_setup_function();
7996c920 60}
61
62/**
e5af0839 63 * Upgrade dictionaries
64 *
7996c920 65 * Transparently upgrades user's dictionaries when message listing is loaded
66 * @since 1.5.1 (sqspell 0.5)
67 */
68function squirrelspell_upgrade() {
7996c920 69 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
e5af0839 70 squirrelspell_upgrade_function();
7996c920 71}
72
73/**
e5af0839 74 * Display SquirrelSpell version
7996c920 75 * @since 1.5.1 (sqspell 0.5)
76 * @return string plugin's version
7996c920 77 */
78function squirrelspell_version() {
e5af0839 79 return '0.5';
d112ed5a 80}
90ad8cd1 81
f8a1ed5a 82?>