Some fixup.
[squirrelmail.git] / functions / constants.php
index fd98ff32d5fd8712dae2beb61fdab06777230999..a53c3cb5d8e74cab04b1f2f09f2da517c9560e63 100644 (file)
@@ -1,42 +1,53 @@
 <?php
+
     /**
-     * constants.php
+     *  constants.php
      *
-     * Copyright (c) 1999-2001 The SquirrelMail Development Team
-     * Licensed under the GNU GPL. For full terms see the file COPYING.
+     *  Copyright (c) 1999-2001 The SquirrelMail Development Team
+     *  Licensed under the GNU GPL. For full terms see the file COPYING.
      *
-     * Loads constants used by the rest of the Squirrelmail source.
-     * This file is include by src/login.php, src/redirect.php and
-     * src/load_prefs.php.
+     *  Loads constants used by the rest of the Squirrelmail source.
+     *  This file is include by src/login.php, src/redirect.php and
+     *  src/load_prefs.php.
      *
-     * $Id$
+     *  $Id$
      */
 
-    /******************************************************/
-    /* Set values for constants used in the options code. */
-    /******************************************************/
-
-    /* Define constants for the various option types. */
-    define('SMOPT_TYPE_STRING', 0);
-    define('SMOPT_TYPE_STRLIST', 1);
-    define('SMOPT_TYPE_TEXTAREA', 2);
-    define('SMOPT_TYPE_INTEGER', 3);
-    define('SMOPT_TYPE_FLOAT', 4);
-    define('SMOPT_TYPE_BOOLEAN', 5);
-
-    /* Define constants for the options refresh levels. */
-    define('SMOPT_REFRESH_NONE', 0);
-    define('SMOPT_REFRESH_FOLDERLIST', 1);
-    define('SMOPT_REFRESH_ALL', 2);
-
     /**************************************************************/
     /* Set values for constants used by Squirrelmail preferences. */
     /**************************************************************/
 
-    /* Define constants for javascript settings. */
+    require_once( '../functions/plugin.php' );      // Required for the hook
+
+    /* Define basic, general purpose preference constants. */
+    define('SMPREF_NO', 0);
+    define('SMPREF_OFF', 0);
+    define('SMPREF_YES', 1);
+    define('SMPREF_ON', 1);
+    define('SMPREF_NONE', 'none');
+
+    /* Define constants for location based preferences. */
+    define('SMPREF_LOC_TOP', 'top');
+    define('SMPREF_LOC_BETWEEN', 'between');
+    define('SMPREF_LOC_BOTTOM', 'bottom');
+    define('SMPREF_LOC_LEFT', '');
+    define('SMPREF_LOC_RIGHT', 'right');
+
+    /* Define preferences for folder settings. */
+    define('SMPREF_UNSEEN_NONE', 1);
+    define('SMPREF_UNSEEN_INBOX', 2);
+    define('SMPREF_UNSEEN_ALL', 3);
+    define('SMPREF_UNSEEN_ONLY', 1);
+    define('SMPREF_UNSEEN_TOTAL', 2);
+
+    /* Define constants for time/date display preferences. */
+    define('SMPREF_TIME_24HR', 1);
+    define('SMPREF_TIME_12HR', 2);
+
+    /* Define constants for javascript preferences. */
+    define('SMPREF_JS_OFF', 0);
     define('SMPREF_JS_ON', 1);
-    define('SMPREF_JS_OFF', 2);
-    define('SMPREF_JS_AUTODETECT', 3);
+    define('SMPREF_JS_AUTODETECT', 2);
 
-    do_hook("loading_constants");
+    do_hook('loading_constants');
 ?>