acc678f7566952d047ffa840091478f14cd43257
4 * SquirrelMail Preview Pane Plugin
6 * @copyright © 1999-2009 The SquirrelMail Project Team
7 * @author Paul Lesniewski <paul@squirrelmail.org>
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @subpackage preview_pane
16 * Register this plugin with SquirrelMail
18 function squirrelmail_plugin_init_preview_pane()
21 global $squirrelmail_plugin_hooks;
24 $squirrelmail_plugin_hooks['subject_link']['preview_pane']
25 = 'preview_pane_change_message_target';
26 $squirrelmail_plugin_hooks['optpage_loadhook_display']['preview_pane']
27 = 'preview_pane_show_options';
28 $squirrelmail_plugin_hooks['template_construct_message_list.tpl']['preview_pane']
29 = 'preview_pane_message_list';
30 $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['preview_pane']
31 = 'preview_pane_open_close_buttons';
36 if (!defined('SM_PATH'))
37 define('SM_PATH', '../');
41 * Returns info about this plugin
43 function preview_pane_info()
47 'english_name' => 'Preview Pane',
49 'required_sm_version' => '1.5.2',
50 'requires_configuration' => 0,
51 'requires_source_patch' => 0,
52 'required_plugins' => array(
54 'summary' => 'Provides a third frame below the message list for viewing message bodies.',
55 'details' => 'This plugin allows the user to turn on an extra frame below the mailbox message list where the messages themselves are displayed, very similar to many other popular (typically non-web-based) email clients.',
63 * Returns version info about this plugin
65 function preview_pane_version()
68 $info = preview_pane_info();
69 return $info['version'];
76 * Build user options for display on "Display Preferences" page
78 function preview_pane_show_options()
81 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
82 preview_pane_show_options_do();
89 * Construct button that clears out any preview pane
90 * contents and inserts JavaScript function used by
91 * message subject link onclick handler. Also disallows
92 * the message list to be loaded into the bottom frame.
94 function preview_pane_message_list()
97 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
98 return preview_pane_message_list_do();
105 * Points message targets to open in the preview pane
106 * (and possibly refresh message list as well)
108 function preview_pane_change_message_target($args)
111 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
112 preview_pane_change_message_target_do($args);
119 * Adds preview pane open/close (and clear) buttons next to
122 function preview_pane_open_close_buttons()
125 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
126 return preview_pane_open_close_buttons_do();