phpDocumentor updates
[squirrelmail.git] / plugins / squirrelspell / setup.php
1 <?php
2
3 /**
4 * setup.php
5 *
6 * Squirrelspell setup file, as defined by the SquirrelMail-1.2 API.
7 *
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
11 * @version $Id$
12 * @package plugins
13 * @subpackage squirrelspell
14 * @todo remove sqspell_ prefix from main php scripts.
15 */
16
17 /** @ignore */
18 if (! defined('SM_PATH')) define('SM_PATH','../../');
19
20 /**
21 * Standard SquirrelMail plugin initialization API.
22 *
23 * @return void
24 */
25 function squirrelmail_plugin_init_squirrelspell() {
26 global $squirrelmail_plugin_hooks;
27 $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
28 'squirrelspell_setup';
29 $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
30 'squirrelspell_optpage_register_block';
31 $squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
32 'squirrelspell_options';
33 $squirrelmail_plugin_hooks['right_main_after_header']['squirrelspell'] =
34 'squirrelspell_upgrade';
35 }
36
37 /**
38 * Register option block
39 *
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.
43 * @return void
44 */
45 function squirrelspell_optpage_register_block() {
46 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
47 squirrelspell_optpage_block_function();
48 }
49
50 /**
51 * Add spell check button in compose.
52 *
53 * This function adds a "Check Spelling" link to the "Compose" row
54 * during message composition.
55 * @return void
56 */
57 function squirrelspell_setup() {
58 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
59 squirrelspell_setup_function();
60 }
61
62 /**
63 * Upgrade dictionaries
64 *
65 * Transparently upgrades user's dictionaries when message listing is loaded
66 * @since 1.5.1 (sqspell 0.5)
67 */
68 function squirrelspell_upgrade() {
69 include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
70 squirrelspell_upgrade_function();
71 }
72
73 /**
74 * Display SquirrelSpell version
75 * @since 1.5.1 (sqspell 0.5)
76 * @return string plugin's version
77 */
78 function squirrelspell_version() {
79 return '0.5';
80 }
81
82 ?>