616ba1d04a6cedf2218721b2e57bfee4eb612766
[squirrelmail.git] / plugins / mail_fetch / setup.php
1 <?php
2
3 /**
4 * mail_fetch/setup.php
5 *
6 * Setup of the mailfetch plugin.
7 *
8 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id$
11 * @package plugins
12 * @subpackage mail_fetch
13 */
14
15 /**
16 * Initialize the plugin
17 */
18 function squirrelmail_plugin_init_mail_fetch() {
19 global $squirrelmail_plugin_hooks;
20
21 $squirrelmail_plugin_hooks['menuline']['mail_fetch'] = 'mail_fetch_link';
22 $squirrelmail_plugin_hooks['loading_prefs']['mail_fetch'] = 'mail_fetch_load_pref';
23 $squirrelmail_plugin_hooks['login_verified']['mail_fetch'] = 'mail_fetch_setnew';
24 $squirrelmail_plugin_hooks['left_main_before']['mail_fetch'] = 'mail_fetch_login';
25 $squirrelmail_plugin_hooks['optpage_register_block']['mail_fetch'] = 'mailfetch_optpage_register_block';
26 $squirrelmail_plugin_hooks['rename_or_delete_folder']['mail_fetch'] = 'mail_fetch_folderact';
27 }
28
29 /**
30 * display link in menu line
31 * @private
32 */
33 function mail_fetch_link() {
34 displayInternalLink('plugins/mail_fetch/fetch.php', _("Fetch"), '');
35 echo '&nbsp;&nbsp;';
36 }
37
38 /**
39 * load preferences
40 * @private
41 */
42 function mail_fetch_load_pref() {
43 include_once(SM_PATH . 'plugins/mail_fetch/functions.php');
44 mail_fetch_load_pref_function();
45 }
46
47 /**
48 * Fetch pop3 mails on login.
49 * @private
50 */
51 function mail_fetch_login() {
52 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
53 mail_fetch_login_function();
54 }
55
56 /**
57 * Adds preference that is used to detect new logins
58 * @private
59 */
60 function mail_fetch_setnew() {
61 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
62 mail_fetch_setnew_function();
63 }
64
65 /**
66 * Add plugin option block
67 * @private
68 */
69 function mailfetch_optpage_register_block() {
70 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
71 mailfetch_optpage_register_block_function();
72 }
73
74 /**
75 * Update mail_fetch settings when folders are renamed or deleted.
76 * @since 1.5.1 and 1.4.5
77 * @private
78 */
79 function mail_fetch_folderact($args) {
80 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
81 mail_fetch_folderact_function($args);
82 }
83 ?>