setTemplateDir(ROOT_DIR . '/tpl/'); $smarty->setCompileDir(ROOT_DIR . '/tpl_c/'); $smarty->setCacheDir(ROOT_DIR . '/cache/'); $smarty->caching = false; $smarty->assign('APPLICATION_NAME', NOMAPPLICATION); $smarty->assign('SERVER_URL', Utils::get_server_name()); $smarty->assign('TITLE_IMAGE', IMAGE_TITRE); $smarty->assign('use_nav_js', file_exists($_SERVER['DOCUMENT_ROOT'] . '/nav/nav.js')); $smarty->assign('lang', $lang); $smarty->assign('langs', $ALLOWED_LANGUAGES); $smarty->assign('date_format', $date_format); function smarty_modifier_poll_url($poll_id, $admin = false) { return Utils::getUrlSondage($poll_id, $admin); } function smarty_modifier_markdown($md, $clear = false) { return Utils::markdown($md, $clear); } function smarty_modifier_resource($link) { return Utils::get_server_name() . $link; } function smarty_modifier_html($html) { return Utils::htmlEscape($html); }