4 * SquirrelMail Preview Pane Plugin
6 * @copyright © 1999-2007 The SquirrelMail Project Team
7 * @author Paul Lesneiwski <paul@squirrelmail.org>
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @subpackage preview_pane
17 * Register this plugin with SquirrelMail
20 function squirrelmail_plugin_init_preview_pane()
23 global $squirrelmail_plugin_hooks;
26 $squirrelmail_plugin_hooks['subject_link']['preview_pane']
27 = 'preview_pane_change_message_target';
28 $squirrelmail_plugin_hooks['optpage_loadhook_display']['preview_pane']
29 = 'preview_pane_show_options';
30 $squirrelmail_plugin_hooks['template_construct_message_list.tpl']['preview_pane']
31 = 'preview_pane_message_list';
36 if (!defined('SM_PATH'))
37 define('SM_PATH', '../');
41 * Returns info about this plugin
44 function preview_pane_info()
48 'english_name' => 'Preview Pane',
50 'required_sm_version' => '1.5.2',
51 'requires_configuration' => 0,
52 'requires_source_patch' => 0,
53 'required_plugins' => array(
55 'summary' => 'Provides a third frame below the message list for viewing message bodies.',
56 '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.',
64 * Returns version info about this plugin
67 function preview_pane_version()
70 $info = preview_pane_info();
71 return $info['version'];
78 * Build user options for display on "Display Preferences" page
81 function preview_pane_show_options()
84 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
85 preview_pane_show_options_do();
92 * Construct button that clears out any preview pane
93 * contents and inserts JavaScript function used by
94 * message subject link onclick handler. Also disallows
95 * the message list to be loaded into the bottom frame.
98 function preview_pane_message_list()
101 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
102 return preview_pane_message_list_do();
109 * Points message targets to open in the preview pane
110 * (and possibly refresh message list as well)
113 function preview_pane_change_message_target()
116 include_once(SM_PATH
. 'plugins/preview_pane/functions.php');
117 preview_pane_change_message_target_do();