{$_SERVER['SERVER_NAME']} is currently down for maintenance"); } if (Config::getSession() && !isset($_SESSION)) { session_start(); } // Smarty default stuff if (Config::getSmarty()) { require_once 'contrib/smarty/Smarty.class.php'; $smarty = new Smarty(); define('TEMPLATES', "/var/www/josh/{$_SERVER['SERVER_NAME']}/templates/"); $smarty->template_dir = TEMPLATES; $temp_path = "/tmp/smarty/{$_SERVER['SERVER_NAME']}/"; $cache_dir = $temp_path . 'cache'; $compile_dir = $temp_path . 'compile'; if (!file_exists($cache_dir)) { mkdir($cache_dir, 0777, true); } if (!file_exists($compile_dir)) { mkdir($compile_dir, 0777, true); } $smarty->cache_dir = $cache_dir ; $smarty->compile_dir = $compile_dir; $smarty->load_filter('output','trimwhitespace'); // Include custom Smarty functions $directory = JLIB_PATH . 'smarty/'; if (is_dir($directory)) { if ($handle = opendir($directory)) { while (($file = readdir($handle)) !== false) { if (!preg_match('/^\./', $file)) { list($type, $name, $ext) = split('\.', $file); require_once $directory . $file; $smarty->register_function($name, "smarty_{$type}_{$name}"); } } closedir($handle); } } } // Use the FCKeditor instead of textareas if (Config::getFCKEditor()) { require_once '/var/www/josh/common/static/fckeditor/fckeditor.php'; } // Use the FCKeditor instead of textareas if (Config::getMagpieRSS()) { require_once '/var/www/josh/common/contrib/magpierss/rss_fetch.inc'; } //Request::load(); ?>