//Assign the configuration variables to smarty
$smarty->assign("T_CONFIGURATION", $configuration);
//Assign global configuration values to smarty
$smarty->assign("T_MAX_FILE_SIZE", FileSystemTree::getUploadMaxSize());
//Initialize languages and notify smarty on weather we have an RTL language
$languages = EfrontSystem::getLanguages();
if ($languages[$setLanguage]['rtl']) {
    $smarty->assign("T_RTL", 1);
    $GLOBALS['rtl'] = true;
}
//$smarty -> assign("T_RTL", 1);$GLOBALS['rtl'] = true;
//Instantiate current theme
//$currentTheme = new themes(G_CURRENTTHEME);
$smarty->assign("T_THEME_SETTINGS", $currentTheme);
$smarty->assign("T_LOGO", EfrontSystem::setLogoFile($currentTheme));
$smarty->assign("T_FAVICON", EfrontSystem::setFaviconFile($currentTheme));
/**Initialize valid currencies
 * @todo: remove from here, move to a function or class*/
require_once $path . "includes/currencies.php";
//Load filters if smarty is set
if (isset($smarty)) {
    //Convert normal images to css sprites
    $smarty->load_filter('output', 'eF_template_applyImageMap');
    //Convert plain urls to theme-specific urls
    $smarty->load_filter('output', 'eF_template_applyThemeToImages');
    //Format the timestamps according to system settings
    $smarty->load_filter('output', 'eF_template_formatTimestamp');
    //Convert logins to personal-message enabled clickable links
    $smarty->load_filter('output', 'eF_template_loginToMessageLink');
    //Format logins according to system settings
    $smarty->load_filter('output', 'eF_template_formatLogins');