Happy New Year
[squirrelmail.git] / plugins / preview_pane / setup.php
CommitLineData
505e00aa 1<?php
2
3/**
d4e46166 4 * SquirrelMail Preview Pane Plugin
5 *
353d074a 6 * @copyright 1999-2018 The SquirrelMail Project Team
37779891 7 * @author Paul Lesniewski <paul@squirrelmail.org>
d4e46166 8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 * @version $Id$
10 * @package plugins
11 * @subpackage preview_pane
12 */
505e00aa 13
14
15/**
d4e46166 16 * Register this plugin with SquirrelMail
17 */
505e00aa 18function squirrelmail_plugin_init_preview_pane()
19{
20
21 global $squirrelmail_plugin_hooks;
22
23
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';
e1b9b863 30 $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['preview_pane']
31 = 'preview_pane_open_close_buttons';
505e00aa 32
33}
34
35
36if (!defined('SM_PATH'))
37 define('SM_PATH', '../');
38
39
40/**
d4e46166 41 * Returns info about this plugin
42 */
505e00aa 43function preview_pane_info()
44{
45
46 return array(
47 'english_name' => 'Preview Pane',
48 'version' => '2.0',
49 'required_sm_version' => '1.5.2',
50 'requires_configuration' => 0,
51 'requires_source_patch' => 0,
52 'required_plugins' => array(
53 ),
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.',
56 );
57
58}
59
60
61
62/**
d4e46166 63 * Returns version info about this plugin
64 */
505e00aa 65function preview_pane_version()
66{
67
68 $info = preview_pane_info();
69 return $info['version'];
70
71}
72
73
74
75/**
d4e46166 76 * Build user options for display on "Display Preferences" page
77 */
505e00aa 78function preview_pane_show_options()
79{
80
81 include_once(SM_PATH . 'plugins/preview_pane/functions.php');
82 preview_pane_show_options_do();
83
84}
85
86
87
88/**
d4e46166 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.
93 */
505e00aa 94function preview_pane_message_list()
95{
96
97 include_once(SM_PATH . 'plugins/preview_pane/functions.php');
98 return preview_pane_message_list_do();
99
100}
101
102
103
104/**
d4e46166 105 * Points message targets to open in the preview pane
106 * (and possibly refresh message list as well)
107 */
010ff205 108function preview_pane_change_message_target($args)
505e00aa 109{
110
111 include_once(SM_PATH . 'plugins/preview_pane/functions.php');
010ff205 112 preview_pane_change_message_target_do($args);
505e00aa 113
114}
115
116
117
e1b9b863 118/**
d4e46166 119 * Adds preview pane open/close (and clear) buttons next to
120 * "provider link"
121 */
e1b9b863 122function preview_pane_open_close_buttons()
123{
124
125 include_once(SM_PATH . 'plugins/preview_pane/functions.php');
126 return preview_pane_open_close_buttons_do();
127
128}
129
130
131