Saturday 1 December 2007

Ads within your category columns

From This:

To This:


Notice how the ad is in placed in the middle column of the category display. How I did this was to edit the homecatbox.php file which you will find in your theme 21 folder.

Open up homecatbox.php and locate the line $a = 0; immediately after add the line $ads = 0;

Now find:

echo "<div align='right'><a href='".get_category_link("name=".$category['name'])."'>More ".$category['name']." ".$category['type']." »</a></div>";

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

Immediately after add:

if ($ads == 1) { // Set to the number of the position prior to the one you wish the ad to be placed e.g. for position 2 as in my pics I entered the number 1.
echo "<td width='".$width."%' valign='middle'>";
echo "
<div>

<center>";
echo 'YOUR AD CODE HERE';
echo "
</center>

</div>

</td>";
$a++;
$ads++;
}

Now this should work however I have done other modifications to this file and have had to take this out but I am confident it should still do the trick. As usual though, any problems just get in touch with me.

Also where you ad the code you could use a showad tag so that you are able to change the ad from the admin panel but I have started to remove this feature and hardwire the ads therefore I haven't done that.

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.