Support Forums - Arcade Trade Script
September 08, 2010, 05:24:23 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to show gamaes from a specific category on home page  (Read 95 times)
cheeku
ATS Owner
Newbie
*
Posts: 19


View Profile Email
« on: July 28, 2010, 01:51:38 AM »

Hi,

If i want to show games from a particular category say physics-games in  my case on my home page, where would i need to make the changes.Kindly help in this regards.


Cheeku
Logged
lfhost
Newbie
*
Posts: 8


View Profile
« Reply #1 on: July 29, 2010, 05:38:00 PM »

you will see the functions used in your themes files

being-played-now.html
top-played.html
newest-games.html

have a look in your themes inc/func.php which is where the functions reside.

You will see functions like
Code:
beingPlayedNow($baseDir,$templateBase,$seoFriendly,$preGamePageStatus,0,14)
you can change the last but one slot (0 in this case) to the catid you want to show.

But it only accepts a single ID.

You could always change it to an array() like
Code:
beingPlayedNow($baseDir,$templateBase,$seoFriendly,$preGamePageStatus,array(1,3,5),14)


and then in your themes inc/func.php

Then you can change the following in the functions you pass an array for

find

Code:
if ($catID != "" && $catID != 0) {
$catQuery = "AND cat = '$catID'";
}

replace with

Code:
if($catID[0] != "" && is_array($catID))
{
$catlist = implode(", ",$catID);
$catQuery = "AND cat IN(".$catlist.") ";
}
elseif ($catID != "" && $catID != 0) {
$catQuery = "AND cat = '$catID'";
}
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!