$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 */