Bring defaults for the folder selection pref in line.
[squirrelmail.git] / include / constants.php
CommitLineData
202bcbcc 1<?php
2
3/**
4 * constants.php
5 *
6 * Loads constants used by the rest of the SquirrelMail source.
202bcbcc 7 *
867fed37 8 * Before 1.5.2 script was stored in functions/constants.php
4b5049de 9 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
202bcbcc 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
b37e457f 18/**
19 * SquirrelMail version number -- DO NOT CHANGE
20 * @since 1.5.2
21 */
22define('SM_VERSION', '1.5.2 [SVN]');
23
202bcbcc 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 */
32define('SMPREF_NO', 0);
33define('SMPREF_OFF', 0);
34define('SMPREF_YES', 1);
35define('SMPREF_ON', 1);
36define('SMPREF_NONE', 'none');
37
38/**
39 * Define constants for location based preferences.
40 * @since 1.2.0
41 */
42define('SMPREF_LOC_TOP', 'top');
43define('SMPREF_LOC_BETWEEN', 'between');
44define('SMPREF_LOC_BOTTOM', 'bottom');
45define('SMPREF_LOC_LEFT', '');
46define('SMPREF_LOC_RIGHT', 'right');
47
48/**
49 * Define preferences for folder settings.
50 * @since 1.2.0
51 */
52define('SMPREF_UNSEEN_NONE', 1);
53define('SMPREF_UNSEEN_INBOX', 2);
54define('SMPREF_UNSEEN_ALL', 3);
55define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5)
56define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5)
57define('SMPREF_UNSEEN_ONLY', 1);
58define('SMPREF_UNSEEN_TOTAL', 2);
59
d56050e1 60define('SMPREF_MAILBOX_SELECT_LONG', 0);
61define('SMPREF_MAILBOX_SELECT_INDENTED', 1);
62define('SMPREF_MAILBOX_SELECT_DELIMITED', 2);
63
202bcbcc 64/**
65 * Define constants for time/date display preferences.
66 * @since 1.2.0
67 */
68define('SMPREF_TIME_24HR', 1);
69define('SMPREF_TIME_12HR', 2);
70
71/**
72 * Define constants for javascript preferences.
73 * @since 1.2.0
74 */
75define('SMPREF_JS_OFF', 0);
76define('SMPREF_JS_ON', 1);
77define('SMPREF_JS_AUTODETECT', 2);
78
79/**
80 * default value for page_selector_max
81 * @since 1.5.1
82 */
83define('PG_SEL_MAX', 10);
84
85
86/**
87 * The number of pages to cache msg headers
88 * @since 1.5.1
89 */
90define('SQM_MAX_PAGES_IN_CACHE',5);
91
92/**
93 * The number of mailboxes to cache msg headers
94 * @since 1.5.1
95 */
96define('SQM_MAX_MBX_IN_CACHE',3);
97
98/**
99 * Sort constants used for sorting of messages
100 * @since 1.5.1
101 */
102define('SQSORT_NONE',0);
103define('SQSORT_DATE_ASC',1);
104define('SQSORT_DATE_DESC',2);
105define('SQSORT_FROM_ASC',3);
106define('SQSORT_FROM_DESC',4);
107define('SQSORT_SUBJ_ASC',5);
108define('SQSORT_SUBJ_DESC',6);
109define('SQSORT_SIZE_ASC',7);
110define('SQSORT_SIZE_DESC',8);
111define('SQSORT_TO_ASC',9);
112define('SQSORT_TO_DESC',10);
113define('SQSORT_CC_ASC',11);
114define('SQSORT_CC_DESC',12);
115define('SQSORT_INT_DATE_ASC',13);
116define('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 */
124define('SQSORT_THREAD',32);
125
126/**
127 * Mailbox preference array keys
128 * @since 1.5.1
129 */
130define('MBX_PREF_SORT',0);
131define('MBX_PREF_LIMIT',1);
132define('MBX_PREF_AUTO_EXPUNGE',2);
133define('MBX_PREF_INTERNALDATE',3);
134define('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 */
141define('SQM_ADDR_PERSONAL', 0);
142define('SQM_ADDR_ADL', 1);
143define('SQM_ADDR_MAILBOX', 2);
144define('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 */
151define('SQM_COL_CHECK',0);
152define('SQM_COL_FROM',1);
153define('SQM_COL_DATE', 2);
154define('SQM_COL_SUBJ', 3);
155define('SQM_COL_FLAGS', 4);
156define('SQM_COL_SIZE', 5);
157define('SQM_COL_PRIO', 6);
158define('SQM_COL_ATTACHMENT', 7);
159define('SQM_COL_INT_DATE', 8);
160define('SQM_COL_TO', 9);
161define('SQM_COL_CC', 10);
162define('SQM_COL_BCC', 11);
c2b585c5 163
164/**
165 * Generic variable type constants
166 * @since 1.5.2
167 */
168define('SQ_TYPE_INT', 'int');
169define('SQ_TYPE_STRING', 'string');
170define('SQ_TYPE_BOOL', 'bool');
171define('SQ_TYPE_ARRAY', 'array');
172
28294310 173/**
174 * Template engines supported
175 * @since 1.5.2
176 */
177define('SQ_PHP_TEMPLATE', 'PHP_');
178define('SQ_SMARTY_TEMPLATE', 'Smarty_');
179
f258865c 180/**
181 * Used by plugins to indicate an incompatibility with a SM version
182 * @since 1.5.2
183 */
184define('SQ_INCOMPATIBLE', 'INCOMPATIBLE');
185