moving functions to separate file, adding configuration files
[squirrelmail.git] / plugins / fortune / setup.php
1 <?php
2 /**
3 * Fortune plugin setup script
4 *
5 * @copyright (c) 1999-2004 The SquirrelMail Project Team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7 * @version $Id$
8 * @package plugins
9 * @subpackage fortune
10 */
11
12 /**
13 * If SM_PATH isn't defined, define it.
14 * @ignore
15 */
16 if (!defined('SM_PATH')) {
17 define('SM_PATH','../../');
18 }
19
20 /**
21 * Init plugin
22 * @access private
23 */
24 function squirrelmail_plugin_init_fortune() {
25 global $squirrelmail_plugin_hooks;
26
27 $squirrelmail_plugin_hooks['mailbox_index_before']['fortune'] = 'fortune';
28 $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load';
29 $squirrelmail_plugin_hooks['optpage_loadhook_display']['fortune'] = 'fortune_options';
30 }
31
32 /**
33 * Call fortune display function
34 * @access private
35 */
36 function fortune() {
37 include_once(SM_PATH . 'plugins/fortune/functions.php');
38 fortune_function();
39 }
40
41 /**
42 * Call fortune option display function
43 * @access private
44 */
45 function fortune_options() {
46 include_once(SM_PATH . 'plugins/fortune/functions.php');
47 fortune_function_options();
48 }
49
50 /**
51 * Call fortune prefs load function
52 * @access private
53 */
54 function fortune_load() {
55 include_once(SM_PATH . 'plugins/fortune/functions.php');
56 fortune_function_load();
57 }
58 ?>