Showing posts with label homecatbox. Show all posts
Showing posts with label homecatbox. Show all posts

Thursday, 1 November 2007

Random Games in Home Categories

This was posted by Netpants on Arcade Webmasters.

I've tested it and it works well. I might add it to my main site but still wondering if its worth the extra queries.

To make the games random on the front page of your GSS in the Home categories simply do the following.

Open /plugins/site/themes/21/homecatbox.php and find this

Code:

$games = get_games("order=deforder&sort=defsort&shortdesc=".$themecfg['maxdesclength']."&limitstart=0&limitnum=".$themecfg['newestgameboxnumber']."&thecat="._sp($category['name'])."&htmlize=true");

And replace with this

Code:


$q = "SELECT * FROM games WHERE cat='"._sp($category['name'])."' AND id!='".$game['id']."' ORDER BY RAND() DESC LIMIT 0, ".$themecfg['newestgameboxnumber']."";
$games = get_games("shortdesc=".$themecfg['maxdesclength']."&limitstart=0&limitnum="."&htmlize=true&diffquery=".$q);

Hit save, and your done. Then refresh the home page a few times, and a random set of games should appear each time.

CategoryBoxes Mod - Game Text Links


This is the mod by Devon of Arcade Surge for adding text game links in the category boxes (Awesome theme) or homecatbox (21 theme)

Mod CategoryBoxes Like Fun4MySpace

I've added a few mods to this to have the mod controlled from the themeconfig file and the a mod to add full game image / description on mouseover. All these mods will be added to this blog (if not already :)).

For the additions to CategoryBoxes Mod - Game Text Links click here.