Incoproated template config file. Templates can now include their own javascript...
[squirrelmail.git] / include / load_prefs.php
index a04f57b818b30ea61470d10e47a8878f5e551d1c..5e11b45f272a9b9e98bd60ef60618e2b2955c2f4 100644 (file)
@@ -27,10 +27,10 @@ $custom_css = getPref($data_dir, $username, 'custom_css', 'none' );
 $theme = ( !isset($theme) ? array() : $theme );
 $color = ( !isset($color) ? array() : $color );
 $aTemplateSet = ( !isset($aTemplateSet) ? array() : $aTemplateSet );
+$templateset_default = ( !isset($templateset_default) ? 0 : $templateset_default );
 
 $chosen_theme = getPref($data_dir, $username, 'chosen_theme');
-$sTplDir = getPref($data_dir, $username, 'sTplDir');
-
+$sTplDir = getPref($data_dir, $username, 'sTplDir', SM_PATH . 'templates/default/');
 $found_templateset = false;
 
 /* need to adjust $chosen_template path with SM_PATH */
@@ -103,10 +103,20 @@ if (!defined('download_php')) {
 }
 
 // user's icon theme, if using icons
-$icon_theme = getPref($data_dir, $username, 'icon_theme', 'none' );
+$icon_theme = getPref($data_dir, $username, 'icon_theme', 'images/themes/xp/' );
+if ($icon_theme == 'template') {
+    $icon_theme = $sTplDir . 'images/';
+}
+
+/*
+ * NOTE: The $icon_theme_path var should contain the path to the icon 
+ *       theme to use.  If the admin has disabled icons, or the user has
+ *       set the icon theme to "None," no icons will be used.
+ */
+$icon_theme_path = (!$use_icons || $icon_theme=='none') ? NULL : $icon_theme;
 
 // show (or not) flag and unflag buttons on mailbox list screen
-$show_flag_buttons = getPref($data_dir, $username, 'show_flag_buttons', SMPREF_OFF );
+$show_flag_buttons = getPref($data_dir, $username, 'show_flag_buttons', SMPREF_ON );
 
 /* Load the user's special folder preferences */
 $move_to_sent =
@@ -289,7 +299,7 @@ $alt_index_colors =
     getPref($data_dir, $username, 'alt_index_colors', SMPREF_ON );
 
 $fancy_index_highlite =
-    getPref($data_dir, $username, 'fancy_index_highlite', SMPREF_OFF );
+    getPref($data_dir, $username, 'fancy_index_highlite', SMPREF_ON );
 
 /* Folder List Display Format */
 $location_of_bar =