9b5edd1d |
1 | <?php |
4b4abf93 |
2 | |
9b5edd1d |
3 | /** |
28e62e6d |
4 | * Fortune plugin setup script |
9b5edd1d |
5 | * |
47ccfad4 |
6 | * @copyright © 1999-2006 The SquirrelMail Project Team |
0fe5da50 |
7 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
8 | * @version $Id$ |
ea5f4b8e |
9 | * @package plugins |
10 | * @subpackage fortune |
9b5edd1d |
11 | */ |
12 | |
0fe5da50 |
13 | /** |
28e62e6d |
14 | * Init plugin |
7413ef70 |
15 | * @access private |
0fe5da50 |
16 | */ |
28e62e6d |
17 | function squirrelmail_plugin_init_fortune() { |
18 | global $squirrelmail_plugin_hooks; |
7413ef70 |
19 | |
b1870063 |
20 | $squirrelmail_plugin_hooks['template_construct_message_list.tpl']['fortune'] = 'fortune'; |
28e62e6d |
21 | $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load'; |
22 | $squirrelmail_plugin_hooks['optpage_loadhook_display']['fortune'] = 'fortune_options'; |
9b5edd1d |
23 | } |
24 | |
0fe5da50 |
25 | /** |
28e62e6d |
26 | * Call fortune display function |
7413ef70 |
27 | * @access private |
0fe5da50 |
28 | */ |
28e62e6d |
29 | function fortune() { |
30 | include_once(SM_PATH . 'plugins/fortune/functions.php'); |
b1870063 |
31 | return fortune_function(); |
9b5edd1d |
32 | } |
33 | |
0fe5da50 |
34 | /** |
28e62e6d |
35 | * Call fortune option display function |
7413ef70 |
36 | * @access private |
0fe5da50 |
37 | */ |
9b5edd1d |
38 | function fortune_options() { |
28e62e6d |
39 | include_once(SM_PATH . 'plugins/fortune/functions.php'); |
40 | fortune_function_options(); |
9b5edd1d |
41 | } |
42 | |
0fe5da50 |
43 | /** |
28e62e6d |
44 | * Call fortune prefs load function |
7413ef70 |
45 | * @access private |
0fe5da50 |
46 | */ |
28e62e6d |
47 | function fortune_load() { |
48 | include_once(SM_PATH . 'plugins/fortune/functions.php'); |
49 | fortune_function_load(); |
9b5edd1d |
50 | } |