787dbf2346d8f13c79c7c5787fbeaf65477a0a13
[squirrelmail.git] / plugins / spamcop / setup.php
1 <?php
2 /**
3 * setup.php -- SpamCop plugin - setup script
4 *
5 * @copyright (c) 1999-2005 The SquirrelMail Project Team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7 * @version $Id$
8 * @package plugins
9 * @subpackage spamcop
10 */
11
12 /**
13 * Initialize the plugin
14 * @access private
15 */
16 function squirrelmail_plugin_init_spamcop() {
17 global $squirrelmail_plugin_hooks;
18
19 $squirrelmail_plugin_hooks['optpage_register_block']['spamcop'] =
20 'spamcop_options';
21 $squirrelmail_plugin_hooks['loading_prefs']['spamcop'] =
22 'spamcop_load';
23 $squirrelmail_plugin_hooks['read_body_header_right']['spamcop'] =
24 'spamcop_show_link';
25 $squirrelmail_plugin_hooks['compose_send']['spamcop'] =
26 'spamcop_while_sending';
27 }
28
29 /**
30 * Loads spamcop settings and validates some of values (make '' into 'default', etc.)
31 * @access private
32 */
33 function spamcop_load() {
34 include_once(SM_PATH . 'plugins/spamcop/functions.php');
35 spamcop_load_function();
36 }
37
38
39 /**
40 * Shows spamcop link on the read-a-message screen
41 * @access private
42 */
43 function spamcop_show_link() {
44 include_once(SM_PATH . 'plugins/spamcop/functions.php');
45 spamcop_show_link_function();
46 }
47
48 /**
49 * Show spamcop options block
50 * @access private
51 */
52 function spamcop_options() {
53 include_once(SM_PATH . 'plugins/spamcop/functions.php');
54 spamcop_options_function();
55 }
56
57
58 /**
59 * Process messages submitted by email
60 * @access private
61 */
62 function spamcop_while_sending() {
63 include_once(SM_PATH . 'plugins/spamcop/functions.php');
64 spamcop_while_sending_function();
65 }
66 ?>