diff --git a/system/router.php b/system/router.php index 0a5ed7f8..5b103a90 100644 --- a/system/router.php +++ b/system/router.php @@ -279,7 +279,7 @@ else { $uri = str_replace_first('/', '', $uri); } - $page = $uri; + $page = str_replace('index.php/', '', $uri); if (empty($page)) { $page = 'news'; } diff --git a/templates/tibiacom/index.php b/templates/tibiacom/index.php index 65f78018..2152b043 100644 --- a/templates/tibiacom/index.php +++ b/templates/tibiacom/index.php @@ -34,17 +34,7 @@ if(isset($config['boxes'])) } } else { - $tmp = str_replace('/', '', URI); - $exp = explode('/', URI); - if(URI !== 'account/create' && URI !== 'account/lost' && isset($exp[1])) { - if ($exp[0] === 'account') { - $tmp = 'accountmanage'; - } else if ($exp[0] === 'news' && $exp[1] === 'archive') { - $tmp = 'newsarchive'; - } - else - $tmp = $exp[0]; - } + $tmp = str_replace('/', '_', PAGE); } } else { @@ -353,12 +343,15 @@ foreach($config['menu_categories'] as $id => $cat) { $default_menu_color = "ffffff"; foreach($menus[$id] as $category => $menu) { + if (empty($menu['link'])) { + $menu['link'] = 'news'; + } $link_color = '#' . (strlen($menu['color']) == 0 ? $default_menu_color : $menu['color']); ?> '> -