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