Enabled user selection of address format when adding from address book during message...
[squirrelmail.git] / include / constants.php
1 <?php
2
3 /**
4 * constants.php
5 *
6 * Loads constants used by the rest of the SquirrelMail source.
7 *
8 * Before 1.5.2 script was stored in functions/constants.php
9 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @version $Id$
12 * @package squirrelmail
13 * @since 1.2.0
14 */
15
16 /** @ignore */
17
18 /**
19 * SquirrelMail version number -- DO NOT CHANGE
20 * @since 1.5.2
21 */
22 define('SM_VERSION', '1.5.2 [SVN]');
23
24 /**************************************************************/
25 /* Set values for constants used by SquirrelMail preferences. */
26 /**************************************************************/
27
28 /**
29 * Define basic, general purpose preference constants.
30 * @since 1.2.0
31 */
32 define('SMPREF_NO', 0);
33 define('SMPREF_OFF', 0);
34 define('SMPREF_YES', 1);
35 define('SMPREF_ON', 1);
36 define('SMPREF_NONE', 'none');
37
38 /**
39 * Define constants for location based preferences.
40 * @since 1.2.0
41 */
42 define('SMPREF_LOC_TOP', 'top');
43 define('SMPREF_LOC_BETWEEN', 'between');
44 define('SMPREF_LOC_BOTTOM', 'bottom');
45 define('SMPREF_LOC_LEFT', '');
46 define('SMPREF_LOC_RIGHT', 'right');
47
48 /**
49 * Define preferences for folder settings.
50 * @since 1.2.0
51 */
52 define('SMPREF_UNSEEN_NONE', 1);
53 define('SMPREF_UNSEEN_INBOX', 2);
54 define('SMPREF_UNSEEN_ALL', 3);
55 define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5)
56 define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5)
57 define('SMPREF_UNSEEN_ONLY', 1);
58 define('SMPREF_UNSEEN_TOTAL', 2);
59
60 define('SMPREF_MAILBOX_SELECT_LONG', 0);
61 define('SMPREF_MAILBOX_SELECT_INDENTED', 1);
62 define('SMPREF_MAILBOX_SELECT_DELIMITED', 2);
63
64 /**
65 * Define constants for time/date display preferences.
66 * @since 1.2.0
67 */
68 define('SMPREF_TIME_24HR', 1);
69 define('SMPREF_TIME_12HR', 2);
70
71 /**
72 * Define constants for javascript preferences.
73 * @since 1.2.0
74 */
75 define('SMPREF_JS_OFF', 0);
76 define('SMPREF_JS_ON', 1);
77 define('SMPREF_JS_AUTODETECT', 2);
78
79 /**
80 * default value for page_selector_max
81 * @since 1.5.1
82 */
83 define('PG_SEL_MAX', 10);
84
85
86 /**
87 * The number of pages to cache msg headers
88 * @since 1.5.1
89 */
90 define('SQM_MAX_PAGES_IN_CACHE',5);
91
92 /**
93 * The number of mailboxes to cache msg headers
94 * @since 1.5.1
95 */
96 define('SQM_MAX_MBX_IN_CACHE',3);
97
98 /**
99 * Sort constants used for sorting of messages
100 * @since 1.5.1
101 */
102 define('SQSORT_NONE',0);
103 define('SQSORT_DATE_ASC',1);
104 define('SQSORT_DATE_DESC',2);
105 define('SQSORT_FROM_ASC',3);
106 define('SQSORT_FROM_DESC',4);
107 define('SQSORT_SUBJ_ASC',5);
108 define('SQSORT_SUBJ_DESC',6);
109 define('SQSORT_SIZE_ASC',7);
110 define('SQSORT_SIZE_DESC',8);
111 define('SQSORT_TO_ASC',9);
112 define('SQSORT_TO_DESC',10);
113 define('SQSORT_CC_ASC',11);
114 define('SQSORT_CC_DESC',12);
115 define('SQSORT_INT_DATE_ASC',13);
116 define('SQSORT_INT_DATE_DESC',14);
117
118 /**
119 * Special sort constant thread which is added to above sort mode.
120 * By doing a bitwise check ($sort & SQSORT_THREAD) we know if the mailbox
121 * is sorted by thread.
122 * @since 1.5.1
123 */
124 define('SQSORT_THREAD',32);
125
126 /**
127 * Mailbox preference array keys
128 * @since 1.5.1
129 */
130 define('MBX_PREF_SORT',0);
131 define('MBX_PREF_LIMIT',1);
132 define('MBX_PREF_AUTO_EXPUNGE',2);
133 define('MBX_PREF_INTERNALDATE',3);
134 define('MBX_PREF_COLUMNS',4);
135 // define('MBX_PREF_FUTURE',unique integer key);
136
137 /**
138 * Email address array keys
139 * @since 1.5.1
140 */
141 define('SQM_ADDR_PERSONAL', 0);
142 define('SQM_ADDR_ADL', 1);
143 define('SQM_ADDR_MAILBOX', 2);
144 define('SQM_ADDR_HOST', 3);
145
146 /**
147 * Supported columns to show in a messages list
148 * The MBX_PREF_COLUMNS contains an ordered array with these columns
149 * @since 1.5.1
150 */
151 define('SQM_COL_CHECK',0);
152 define('SQM_COL_FROM',1);
153 define('SQM_COL_DATE', 2);
154 define('SQM_COL_SUBJ', 3);
155 define('SQM_COL_FLAGS', 4);
156 define('SQM_COL_SIZE', 5);
157 define('SQM_COL_PRIO', 6);
158 define('SQM_COL_ATTACHMENT', 7);
159 define('SQM_COL_INT_DATE', 8);
160 define('SQM_COL_TO', 9);
161 define('SQM_COL_CC', 10);
162 define('SQM_COL_BCC', 11);
163
164 /**
165 * Generic variable type constants
166 * @since 1.5.2
167 */
168 define('SQ_TYPE_INT', 'int');
169 define('SQ_TYPE_STRING', 'string');
170 define('SQ_TYPE_BOOL', 'bool');
171 define('SQ_TYPE_ARRAY', 'array');
172
173 /**
174 * Template engines supported
175 * @since 1.5.2
176 */
177 define('SQ_PHP_TEMPLATE', 'PHP_');
178 define('SQ_SMARTY_TEMPLATE', 'Smarty_');
179
180 /**
181 * Used by plugins to indicate an incompatibility with a SM version
182 * @since 1.5.2
183 */
184 define('SQ_INCOMPATIBLE', 'INCOMPATIBLE');
185