Replacing deprecated HTML "center" element (second try).
[squirrelmail.git] / plugins / fortune / setup.php
CommitLineData
9b5edd1d 1<?php
4b4abf93 2
9b5edd1d 3/**
28e62e6d 4 * Fortune plugin setup script
9b5edd1d 5 *
47ccfad4 6 * @copyright &copy; 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
ea5f4b8e 13/**
28e62e6d 14 * If SM_PATH isn't defined, define it.
15 * @ignore
0fe5da50 16 */
28e62e6d 17if (!defined('SM_PATH')) {
18 define('SM_PATH','../../');
9b5edd1d 19}
20
0fe5da50 21/**
28e62e6d 22 * Init plugin
7413ef70 23 * @access private
0fe5da50 24 */
28e62e6d 25function squirrelmail_plugin_init_fortune() {
26 global $squirrelmail_plugin_hooks;
7413ef70 27
28e62e6d 28 $squirrelmail_plugin_hooks['mailbox_index_before']['fortune'] = 'fortune';
29 $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load';
30 $squirrelmail_plugin_hooks['optpage_loadhook_display']['fortune'] = 'fortune_options';
9b5edd1d 31}
32
0fe5da50 33/**
28e62e6d 34 * Call fortune display function
7413ef70 35 * @access private
0fe5da50 36 */
28e62e6d 37function fortune() {
38 include_once(SM_PATH . 'plugins/fortune/functions.php');
39 fortune_function();
9b5edd1d 40}
41
0fe5da50 42/**
28e62e6d 43 * Call fortune option display function
7413ef70 44 * @access private
0fe5da50 45 */
9b5edd1d 46function fortune_options() {
28e62e6d 47 include_once(SM_PATH . 'plugins/fortune/functions.php');
48 fortune_function_options();
9b5edd1d 49}
50
0fe5da50 51/**
28e62e6d 52 * Call fortune prefs load function
7413ef70 53 * @access private
0fe5da50 54 */
28e62e6d 55function fortune_load() {
56 include_once(SM_PATH . 'plugins/fortune/functions.php');
57 fortune_function_load();
9b5edd1d 58}
28e62e6d 59?>