Use addButton() here too
[squirrelmail.git] / plugins / newmail / setup.php
CommitLineData
4508b1b6 1<?php
4b4abf93 2
ebe02dfc 3/**
4 * newmail.php
5 *
ebe02dfc 6 * Copyright (c) 2000 by Michael Huttinger
ebe02dfc 7 *
8 * Quite a hack -- but my first attempt at a plugin. We were
9 * looking for a way to play a sound when there was unseen
10 * messages to look at. Nice for users who keep the squirrel
11 * mail window up for long periods of time and want to know
12 * when mail arrives.
13 *
14 * Basically, I hacked much of left_main.php into a plugin that
15 * goes through each mail folder and increments a flag if
16 * there are unseen messages. If the final count of unseen
17 * folders is > 0, then we play a sound (using the HTML at the
18 * far end of this script).
19 *
20 * This was tested with IE5.0 - but I hear Netscape works well,
21 * too (with a plugin).
22 *
4b5049de 23 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
4b4abf93 24 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
ebe02dfc 25 * @version $Id$
26 * @package plugins
27 * @subpackage newmail
28 */
4508b1b6 29
ebe02dfc 30
91e0dccc 31/**
ebe02dfc 32 * Init newmail plugin
33 */
34function squirrelmail_plugin_init_newmail() {
35 global $squirrelmail_plugin_hooks;
48879ef0 36 $totalNewArr=array();
37 global $totalNewArr;
ebe02dfc 38
48879ef0 39 $squirrelmail_plugin_hooks['folder_status']['newmail'] = 'newmail_folder_status';
40 $squirrelmail_plugin_hooks['left_main_after']['newmail'] = 'newmail_plugin';
ebe02dfc 41 $squirrelmail_plugin_hooks['optpage_register_block']['newmail'] = 'newmail_optpage_register_block';
42 $squirrelmail_plugin_hooks['options_save']['newmail'] = 'newmail_sav';
43 $squirrelmail_plugin_hooks['loading_prefs']['newmail'] = 'newmail_pref';
44 $squirrelmail_plugin_hooks['optpage_set_loadinfo']['newmail'] = 'newmail_set_loadinfo';
45}
4508b1b6 46
ebe02dfc 47/**
48 * Register newmail option block
49 */
50function newmail_optpage_register_block() {
e8489902 51 include_once(SM_PATH . 'plugins/newmail/functions.php');
52 newmail_optpage_register_block_function();
ebe02dfc 53}
4508b1b6 54
ebe02dfc 55/**
56 * Save newmail plugin settings
57 */
58function newmail_sav() {
e8489902 59 include_once(SM_PATH . 'plugins/newmail/functions.php');
60 newmail_sav_function();
ebe02dfc 61}
4508b1b6 62
ebe02dfc 63/**
64 * Load newmail plugin settings
65 */
66function newmail_pref() {
e8489902 67 include_once(SM_PATH . 'plugins/newmail/functions.php');
68 newmail_pref_function();
ebe02dfc 69}
2d4c15d6 70
ebe02dfc 71/**
72 * Set loadinfo data
73 *
74 * Used by option page when saving settings.
75 */
76function newmail_set_loadinfo() {
e8489902 77 include_once(SM_PATH . 'plugins/newmail/functions.php');
78 newmail_set_loadinfo_function();
ebe02dfc 79}
e697b6cc 80
ebe02dfc 81/**
82 * Insert needed data in left_main
83 */
84function newmail_plugin() {
e8489902 85 include_once(SM_PATH . 'plugins/newmail/functions.php');
86 newmail_plugin_function();
ebe02dfc 87}