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