diff --git a/www/pages/games.php b/www/pages/games.php index d2cfcab20..26c0108fa 100644 --- a/www/pages/games.php +++ b/www/pages/games.php @@ -4,9 +4,9 @@ if (!$page->users->isLoggedIn()) { $page->show403(); } -$games = new Games(); -$cat = new Category(); -$gen = new Genres(); +$games = new Games(['Settings' => $page->settings]); +$cat = new Category(['Settings' => $page->settings]); +$gen = new Genres(['Settings' => $page->settings]); $concats = $cat->getChildren(Category::CAT_PARENT_PC); $ctmp = array(); @@ -24,18 +24,22 @@ $catarray[] = $category; $page->smarty->assign('catlist', $ctmp); $page->smarty->assign('category', $category); -$browsecount = $games->getgamesCount($catarray, -1, $page->userdata["categoryexclusions"]); +$browsecount = $games->getGamesCount($catarray, -1, $page->userdata["categoryexclusions"]); $offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_REQUEST["offset"] : 0; -$ordering = $games->getgamesOrdering(); +$ordering = $games->getGamesOrdering(); $orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : ''; $results = $games2 = array(); -$results = $games->getgamesRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]); +$results = $games->getGamesRange($catarray, $offset, ITEMS_PER_COVER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"]); $maxwords = 50; foreach ($results as $result) { if (!empty($result['review'])) { + // remove "Overview" from start of review if present + if (0 === strpos($result['review'], 'Overview')) { + $result['review'] = substr($result['review'], 8); + } $words = explode(' ', $result['review']); if (sizeof($words) > $maxwords) { $newwords = array_slice($words, 0, $maxwords); @@ -44,8 +48,6 @@ foreach ($results as $result) { } $games2[] = $result; } -$platform = (isset($_REQUEST['platform']) && !empty($_REQUEST['platform'])) ? stripslashes($_REQUEST['platform']) : ''; -$page->smarty->assign('platform', $platform); $title = (isset($_REQUEST['title']) && !empty($_REQUEST['title'])) ? stripslashes($_REQUEST['title']) : ''; $page->smarty->assign('title', $title); @@ -55,11 +57,18 @@ $tmpgnr = array(); foreach ($genres as $gn) { $tmpgnr[$gn['id']] = $gn['title']; } + +$years = range(1903, (date("Y") + 1)); +rsort($years); +$year = (isset($_REQUEST['year']) && in_array($_REQUEST['year'], $years)) ? $_REQUEST['year'] : ''; +$page->smarty->assign('years', $years); +$page->smarty->assign('year', $year); + $genre = (isset($_REQUEST['genre']) && array_key_exists($_REQUEST['genre'], $tmpgnr)) ? $_REQUEST['genre'] : ''; $page->smarty->assign('genres', $genres); $page->smarty->assign('genre', $genre); -$browseby_link = '&title=' . $title . '&platform=' . $platform; +$browseby_link = '&title=' . $title . '&year=' . $year; $page->smarty->assign('pagertotalitems', $browsecount); $page->smarty->assign('pageroffset', $offset); diff --git a/www/templates/nntmux/views/frontend/console.tpl b/www/templates/nntmux/views/frontend/console.tpl index c6759f791..7468a5743 100644 --- a/www/templates/nntmux/views/frontend/console.tpl +++ b/www/templates/nntmux/views/frontend/console.tpl @@ -125,7 +125,7 @@
-