2f8f8c82b49da3f68d7c0b5f6909f912224e6b31
[squirrelmail.git] / include / options / compose.php
1 <?php
2
3 /**
4 * options_compose.php
5 *
6 * Copyright (c) 1999-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Displays all options concerning composing of new messages
10 *
11 * @version $Id$
12 * @package squirrelmail
13 */
14
15 /** Define the group constants for this options page. */
16 define('SMOPT_GRP_GENERAL', 0);
17
18 /**
19 * This function builds an array with all the information about
20 * the options available to the user, and returns it. The options
21 * are grouped by the groups in which they are displayed.
22 * For each option, the following information is stored:
23 * - name: the internal (variable) name
24 * - caption: the description of the option in the UI
25 * - type: one of SMOPT_TYPE_*
26 * - refresh: one of SMOPT_REFRESH_*
27 * - size: one of SMOPT_SIZE_*
28 * - save: the name of a function to call when saving this option
29 * @return array all option information
30 */
31 function load_optpage_data_compose() {
32
33 /* Build a simple array into which we will build options. */
34 $optgrps = array();
35 $optvals = array();
36
37 /******************************************************/
38 /* LOAD EACH GROUP OF OPTIONS INTO THE OPTIONS ARRAY. */
39 /******************************************************/
40
41 /*** Load the General Options into the array ***/
42 $optgrps[SMOPT_GRP_GENERAL] = _("Message Composition");
43 $optvals[SMOPT_GRP_GENERAL] = array();
44
45 $optvals[SMOPT_GRP_GENERAL][] = array(
46 'name' => 'editor_size',
47 'caption' => _("Width of Editor Window"),
48 'type' => SMOPT_TYPE_INTEGER,
49 'refresh' => SMOPT_REFRESH_NONE,
50 'size' => SMOPT_SIZE_TINY
51 );
52
53 $optvals[SMOPT_GRP_GENERAL][] = array(
54 'name' => 'editor_height',
55 'caption' => _("Height of Editor Window"),
56 'type' => SMOPT_TYPE_INTEGER,
57 'refresh' => SMOPT_REFRESH_NONE,
58 'size' => SMOPT_SIZE_TINY
59 );
60
61 $optvals[SMOPT_GRP_GENERAL][] = array(
62 'name' => 'location_of_buttons',
63 'caption' => _("Location of Buttons when Composing"),
64 'type' => SMOPT_TYPE_STRLIST,
65 'refresh' => SMOPT_REFRESH_NONE,
66 'posvals' => array(SMPREF_LOC_TOP => _("Before headers"),
67 SMPREF_LOC_BETWEEN => _("Between headers and message body"),
68 SMPREF_LOC_BOTTOM => _("After message body"))
69 );
70
71
72 $optvals[SMOPT_GRP_GENERAL][] = array(
73 'name' => 'use_javascript_addr_book',
74 'caption' => _("Addressbook Display Format"),
75 'type' => SMOPT_TYPE_STRLIST,
76 'refresh' => SMOPT_REFRESH_NONE,
77 'posvals' => array('1' => _("Javascript"),
78 '0' => _("HTML"))
79 );
80
81 $optvals[SMOPT_GRP_GENERAL][] = array(
82 'name' => 'forward_cc',
83 'caption' => _("Include CCs when Forwarding Messages"),
84 'type' => SMOPT_TYPE_BOOLEAN,
85 'refresh' => SMOPT_REFRESH_NONE
86 );
87
88 $optvals[SMOPT_GRP_GENERAL][] = array(
89 'name' => 'include_self_reply_all',
90 'caption' => _("Include Me in CC when I Reply All"),
91 'type' => SMOPT_TYPE_BOOLEAN,
92 'refresh' => SMOPT_REFRESH_NONE
93 );
94
95 $optvals[SMOPT_GRP_GENERAL][] = array(
96 'name' => 'compose_new_win',
97 'caption' => _("Compose Messages in New Window"),
98 'type' => SMOPT_TYPE_BOOLEAN,
99 'refresh' => SMOPT_REFRESH_ALL
100 );
101
102 $optvals[SMOPT_GRP_GENERAL][] = array(
103 'name' => 'compose_width',
104 'caption' => _("Width of Compose Window"),
105 'type' => SMOPT_TYPE_INTEGER,
106 'refresh' => SMOPT_REFRESH_ALL,
107 'size' => SMOPT_SIZE_TINY
108 );
109
110 $optvals[SMOPT_GRP_GENERAL][] = array(
111 'name' => 'compose_height',
112 'caption' => _("Height of Compose Window"),
113 'type' => SMOPT_TYPE_INTEGER,
114 'refresh' => SMOPT_REFRESH_ALL,
115 'size' => SMOPT_SIZE_TINY
116 );
117
118 $optvals[SMOPT_GRP_GENERAL][] = array(
119 'name' => 'sig_first',
120 'caption' => _("Append Signature before Reply/Forward Text"),
121 'type' => SMOPT_TYPE_BOOLEAN,
122 'refresh' => SMOPT_REFRESH_NONE
123 );
124
125 $optvals[SMOPT_GRP_GENERAL][] = array(
126 'name' => 'body_quote',
127 'caption' => _("Prefix for Original Message when Replying"),
128 'type' => SMOPT_TYPE_STRING,
129 'refresh' => SMOPT_REFRESH_NONE,
130 'size' => SMOPT_SIZE_TINY,
131 'save' => 'save_option_reply_prefix'
132 );
133
134 $optvals[SMOPT_GRP_GENERAL][] = array(
135 'name' => 'reply_focus',
136 'caption' => _("Cursor Position when Replying"),
137 'type' => SMOPT_TYPE_STRLIST,
138 'refresh' => SMOPT_REFRESH_NONE,
139 'posvals' => array('' => _("To: field"),
140 'focus' => _("Focus in body"),
141 'select' => _("Select body"),
142 'none' => _("No focus"))
143 );
144
145 $optvals[SMOPT_GRP_GENERAL][] = array(
146 'name' => 'strip_sigs',
147 'caption' => _("Strip signature when replying"),
148 'type' => SMOPT_TYPE_BOOLEAN,
149 'refresh' => SMOPT_REFRESH_NONE
150 );
151
152 /* Assemble all this together and return it as our result. */
153 $result = array(
154 'grps' => $optgrps,
155 'vals' => $optvals
156 );
157 return ($result);
158 }
159
160 /******************************************************************/
161 /** Define any specialized save functions for this option page. ***/
162 /******************************************************************/
163
164 function save_option_header($option) {
165 }
166
167
168 ?>