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