Friday 2 November 2007

Game Thumbs Mod



This excellent mod was created by Tim of Twilight Gamer. I will be using this mod in one form or another on my site soon. I'll let Tim tell you in his own words what it does.

"Well I have been working on this mod and now the first version is completed. You can read the full mod at my new blog here.

It shows just a number of icons on the homepage or where ever you like. Makes it save space ans shows a lot of games at onces. Remember that people browsing sites to play games most likely will not take time to read. Images are everything on websites. Take alook at it. But please report any bugs, I have had tons of bugs with the system but should be worked out. Hope you like it.

If you have any ideas to add to this, please let me know thanks"

Additions to CategoryBoxes Mod - Game Text Links

I added Devons CategoryBoxes Mod - Game Text Links mod, excellent and works perfectly. I made a few small amendments. I made it adjustable from themeconfig. It might make it something that could be added to the next update of GSS.

What I did was add a new variable in themeconfig.php:

Code:

$themecfg['newestgameboximagenumber'] = 2;

This is the number of game thumbnail images and description you want listed before the text link list is started. In the above example (as on my site) you will have 2 games listed with thumbnail and descriptions.

Code:

$themecfg['newestgameboxnumber'] = 7;

newestgameboxnumber has to now be set at the number of games you want in total in each category box. As I have set my thumbnail list to 2, to have 5 games listed below in the text list. I have to set newestgameboxnumber to 7. 5+2 = 7.

Save themeconfig.php.

I made no changes to the code that Devon provided for categoryboxes.php (or in my case homecat.php as I was using theme 21).

Open up themefunctions.php find:

Code:

function dispgametd

Now find the following in Devon's code:

Code:

} else {
if($amount <= '1'){
echo "<table class='gltable' cellpadding='0' cellspacing='0'><tr><td><a href='".$link."' class='gamelink'><img src='[imgdir]".$game['nameid'].".png' alt='".$game['name']."' width='[twidth]' height='[theight]' class='gamethumb' align='left' /></a>
<a href='".$link."' class='gamelink'>".$game['name']."</a>";
echo "<br />";

Replace with:

Code:

} else {
global $themecfg;

if($amount <= $themecfg['newestgameboximagenumber']){
echo "<table class='gltable' cellpadding='0' cellspacing='0'><tr><td><a href='".$link."' class='gamelink'><img src='[imgdir]".$game['nameid'].".png' alt='".$game['name']."' width='[twidth]' height='[theight]' class='gamethumb' align='left' /></a>
<a href='".$link."' class='gamelink'>".$game['name']."</a>";
echo "<br />";

Now find (again in Devon's code):

Code:

} elseif($amount > '1') {

Replace with:

Code:

} elseif($amount > $themecfg['newestgameboximagenumber']) {

Save themefunctions.php

Upload the amended files to your server and away you go.

Hope that helps someone somewhere.

All the best.
Michael.

LiveTV Mod


Thank you to thesheep of i3arcade.com. This mod puts streamed TV onto your site.

Download the script from here. You need to add a new page to your site and add this code into the page. I added my page manually but as you can see at http://247mgf.co.uk/index.php/freetv/.

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.

Any errors please let me know

Hi,

Apologies if there are any errors in the mods on here. Unfortunately I can't work out how to insert code on blogger easily. If I get time I will try and find a better solution but for now this will have to do. Hopefully not to many errors will creep in.

Also please remember that most of these mods are what I have tried and use on my site which uses theme 21. I will try to make points when known to allow the code to work with your themes. Also the same problem goes with GSS versions, again I will try to make points when needed. Any problems though please contact me.

The only thing I ask in return is that you put on your site a link to my site and to the other mod contributors. Your small of thanking us for our time. Thank you.

All the best.
Michael.

Balloon Text over game links...

I'm writing up this post first because if I don't Twilight Gamer will burst a blood vessel and his offered me a lot of promises (don't forget Twilight Gamer! :)).

Here goes then, if you have installed the mod that Devon created that gives you a list of game links in your home category. See the pic below.

If you haven't done this mod I will add it up here later today including my small additions.

What Twilight Gamer and others asked was, could you have the game image, description etc. pop up when you run your mouse over the game links. Like in the pic below.


To do the same on your gamesitescript, you need to download balloontip from Dynamic Drive.

Step 1:
Upload the 2 arrow images, balloon.css and balloon.js from the above pack to your theme folder, I may put these somewhere else later but it was easier when I first wrote this. If you put them somewhere else make sure you change the links to them.

Step 2:
Open up your index.php file in your theme folder and the following in the head section:

<script type="text/javascript" src="balloontip.js">

/***********************************************
* Rich HTML Balloon Tooltip- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

Step 3:
Open themefunctions.php from your theme folder. Find the line that reads:

function dispgametd($table=false, $game2=false, $time=false, $amount='0') {

and replace it with:

function dispgametd($table=false, $game2=false, $time=false, $amount='0', $balloon='0') {

Then find:

} elseif($amount > '1') {
echo "<table class='gltable' cellpadding='0' cellspacing='0'><tr><td> > <a href='".$link."' class='gamelink'>".$game['name']."</a>";

and replace with:

} elseif($amount > '1') {
echo "<table class='gltable' cellpadding='0' cellspacing='0'><tr><td> > <a href='".$link."' class='gamelink' rel='balloon".$balloon."'>".$game['name']."</a>";
echo "<div id='balloon".$balloon."' class='balloonstyle' style='float:left; width: 200px; background-color: lightblue; border-color: black; border:1px solid'><table class='gltable' cellpadding='0' cellspacing='0'><tr><td><img src='[imgdir]".$game['nameid'].".png' alt='".$game['name']."' width='[twidth]' height='[theight]' class='gamethumb' align='left' />";
echo "<strong>".$game['name']."</strong><br />";

(HERE SHOULD BE THE CODE FOR COMMENTS / RATINGS - DIFFERENT ON DIFFERENT VERSIONS I BELIEVE - CONTACT ME IF NEED HELP)

After the comments check / display add:

echo $game['desc'];

The following should read:

echo "</td></tr></table></div>";

Leave this in place. Save and close themefunctions.php
Step 4:
Open homecatbox.php (or categoryboxes.php in Awesome theme) in your theme folder and find:

$a = 0;

Add after this:

$ii = 0;

Then find:

dispgametd(true,false,false,$i);

and replace with:

dispgametd(true,false,false,$i,$ii);

then find:

$i++;

and add after it:
$ii++;

Save and close.

Upload everything to your server and it should all work. The only other thing I change was in the balloon.css file. I add a 1px solid black border, removed the lineheight tag and reduced the font to 11px. Oh and added a width of 200px.

If I haven't explained it very well then please contact me and I will try again although some of the differences are due to theme differences. The original mod by Devon was done on the Awesome theme whereas I am working on theme 21. Also Devon has the cache control checks which means he is almost certainly working with GSS 3.1 which is a newer version to me. However what I have done will still work and I've tried to show where it should go regardless of which theme or version you are using.