We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 48ba50a9 authored by elleo's avatar elleo

Make it possible to switch to a mobile theme via a get parameter

parent 2f06c3c7
......@@ -45,20 +45,26 @@ if (isset($_GET['lang'])) {
}
$current_lang = setlocale(LC_ALL, $languages);
bindtextdomain('nixtape', $install_path . '/themes/' . $default_theme . '/locale/');
if(isset($_GET['mobile']) && $_GET['mobile']) {
$theme = 'mobile';
} else {
$theme = $default_theme;
}
bindtextdomain('nixtape', $install_path . '/themes/' . $theme . '/locale/');
textdomain('nixtape');
$smarty = new Smarty();
$smarty->template_dir = $install_path . '/themes/'. $default_theme . '/templates/';
$smarty->compile_dir = $install_path. '/themes/' . $default_theme . '/templates_c/';
$smarty->template_dir = $install_path . '/themes/'. $theme . '/templates/';
$smarty->compile_dir = $install_path. '/themes/' . $theme . '/templates_c/';
$smarty->cache_dir = $install_path. '/cache/';
$current_lang = preg_replace('/.UTF-8/', '', $current_lang);
$smarty->assign('lang_selector_array', array(($current_lang) => 1));
$smarty->assign('base_url', $base_url);
$smarty->assign('default_theme', $default_theme);
$smarty->assign('img_url', $base_url . '/themes/' . $default_theme . '/img/');
$smarty->assign('img_url', $base_url . '/themes/' . $theme . '/img/');
$smarty->assign('this_page', $_SERVER['REQUEST_URI']);
$smarty->assign('this_page_absolute',
(empty($_SERVER['HTTPS']) ? 'http://' : 'http://')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment