PDA

View Full Version : v3Arcade - new look to your arcade main page


GenSec
11-07-2004, 10:00 PM
As I was asked about this one ;)
---------------------------------------------------
These hack adds new look to your arcade main page.

Files to edit: 1
Templates to edit: 2


Very easy to install... Just 2"
---------------------------------------------------

Find in arcade.php



// Gets all of the games
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (strlen($game['username'])>12) {
$game['username'] = "<font size=1>".$game['username']."</font>";
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g<$upperlimit)) {
eval('$gamebits .= "' . fetch_template('arcade_main_games_bit') . '";');
exec_switch_bg();
}
if ($game['gamesettings'] & 1) {
$g++;
}
unset($extra);
}



and replace with

// Gets all of the games
$gamebits .="<tr>";
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g < $upperlimit)) {
if(!(($g+1)%4)) $nextrow="</tr><tr>";
else $nextrow="";
eval('$gamebits .= "' . fetch_template('arcade_main_games_bit') . '";');
exec_switch_bg();
}
if ($game['gamesettings'] & 1) {
$g++;
}
unset($extra);
}
$gamebits .="</tr>";



Change your "arcade_main_games_bit" template to the attached.

And edit "arcade_main" template around $gamebits
to change every newrest colspan="4" to your number of columns :)

<tr align="center">
<td colspan="4" class="thead">total games: $gamecount </td>
</tr>
$gamebits
<tr align="center">
<td class="thead" colspan="4" align="left">




------------------
Thats all!

You can easy to make your own number of columns :)

Don't forget to edit number of games per page!

--------------------------------------------

Forget to say if you want to include info about the game size

you need to edit the game table in your DB



ALTER TABLE `games` ADD `filesize` INT( 10 ) DEFAULT '0' NOT NULL ;


and after new game instalation to use game_size.php ;)

Oblivion Knight
11-08-2004, 09:03 AM
Another excellent addon to the Arcade.. :)

Polo
11-08-2004, 01:08 PM
nice, thanks for sharing ;)

GamerJunk.net
11-08-2004, 01:14 PM
Does this not work with the categories mod?

GenSec
11-08-2004, 01:36 PM
Does this not work with the categories mod?

It works with categories... on my board - no problem. Why should?

But frankly :) I don't know about what "categories mod" your ask

free4ever
11-08-2004, 01:43 PM
ThanX it is great ..

Zath
11-08-2004, 04:01 PM
Works great but how can i set the number of games displayed per page?

frankenberrie
11-08-2004, 06:14 PM
Nice - installed

Rick Sample
11-08-2004, 06:40 PM
Thanks for the release!

:)

GenSec
11-08-2004, 09:22 PM
Works great but how can i set the number of games displayed per page?
It's in arcade.php default option :)

Look for
$perpage = 10;

a bit above my hack. I advice $perpage = 24 or 28 ....(numrows*4)

Lionel
11-09-2004, 12:03 PM
It works with categories... on my board - no problem. Why should?

But frankly :) I don't know about what "categories mod" your ask

I had a rough time with categories and ushop arcade pass. I am going to try again later.

Oblivion Knight
11-09-2004, 01:56 PM
This also requires a bit of modification to work with the Favourites system, though I got there in the end.. :D

Lionel
11-09-2004, 02:08 PM
This also requires a bit of modification to work with the Favourites system, though I got there in the end.. :D

where is the favourites system? I must have missed that one! :disappointed:

Oblivion Knight
11-09-2004, 03:35 PM
It's pretty hidden.. ;)

http://www.v3arcade.com/play/showpost.php?p=14123&postcount=2

Lionel
11-09-2004, 04:33 PM
thanks.

Lionel
11-09-2004, 07:02 PM
This is a great hack. Has anyone managed to install it with the arcade pass? It gets though with the game cost and the jackpot column....

GenSec
11-09-2004, 11:49 PM
This is a great hack. Has anyone managed to install it with the arcade pass? It gets though with the game cost and the jackpot column....
If you look on what I suggest to change in arcade.php you see that it has only 4 new lines to include in


// Gets all of the games
$gamebits .="<tr>";
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g < $upperlimit)) {
if(!(($g+1)%4)) $nextrow="</tr><tr>";
else $nextrow="";
eval('$gamebits .= "' . fetch_template('arcade_main_games_bit') . '";');
exec_switch_bg();
}
if ($game['gamesettings'] & 1) {
$g++;
}
unset($extra);
}
$gamebits .="</tr>";
block :)

Lionel
11-09-2004, 11:51 PM
thanks

frankenberrie
11-10-2004, 11:36 AM
Installed .... Excellent job@

dina
11-10-2004, 12:53 PM
An amazing mod, the only problem I can see is this;

Your record: íåò

It will display this if you don't have a record in the game. Any way to fix this?

GenSec
11-10-2004, 08:54 PM
An amazing mod, the only problem I can see is this;

Your record: ???

It will display this if you don't have a record in the game. Any way to fix this?
Sorry. Forget retranslate :)

Just edit "arcade_main_games_bit" template to
<br />Your score:&nbsp;<if condition="$personalBest[$gamename] >= 1"><b>$personalBest[$gamename]</b><else />none</if>

none = ??? ;)

Lionel
11-10-2004, 08:58 PM
This mod is really nice. Unfortunately I cannot use it because of the arcadepass mod. When I do, whatever I gain for space in the width, I loose in the height with the addition of the arcadepass parameters 2 extra lines for cost and jackpot.

GenSec
11-10-2004, 11:37 PM
Lionel. Just modify number of rows and cols :)

Brent H
11-11-2004, 02:53 PM
GREAT hack man very impressed! Was looking for something that would clean up my arcade :D

I just have two small cosmetic problems. First, on pages that are able to show the full 24 games on a page, there is a thick black bar at the bottom. (Attatchment 1)

On pages where there is not enough games to show 24, it leaves a big black space. (Attachment 2)

Any help would be much appreciated. Thanks you.

GenSec
11-11-2004, 10:12 PM
TheHeggy. I guess it's from bgcolor of table in wich $gamebits placed in arcade_main template in your style. Try to change it.

Wachtmeister
11-12-2004, 09:46 PM
Will this work if my forum uses fatabase prefix? My tables are named "vb3_games" an so on.... ??

KTBleeding
11-12-2004, 11:17 PM
Just a few things here...

First, looks much better than the default, good job.
Second, how do we change the colums? I want like.. three colums instead of four..
Third, when I executed the query for the filesize, all my games show "0 kb"
Fourth, the instructions were a bit shady when it came down to modifying the "arcade_main" template.

I put in the code you had but it got rid of the cellspacing which I liked having in there.. Here is my "arcade_main" template if anyone wants to use it. I got it to show the single bar at the top and to still show the cellspacing.

<!-- arcade welcome -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead" width="20%">
<span class="smallfont"><b>Logged in</b> as</span></td>
<td class="thead" width="40%"><span class="smallfont"><b>Welcome</b> to the <b>Arcade</b>!</span></td>
<td class="thead" width="40%"><span class="smallfont">Arcade <b>News & Events</b></span></td>
</tr>
<tr align="center">
<td class="alt1" width="20%" valign="middle">
<if condition="$bbuserinfo[userid]!=0">
<b>$bbuserinfo[musername]</b>
<span class="smallfont"><br />
$bbuserinfo[usertitle]<br /><br />
$bbuserinfo[avatar]<br /><br />
<else />
<b><i>Guest</i></b><br />
<font size="1"><a href="$vboptions[bburl]/register.php">Click here to register!</a></font>
</if>
</span>

</td>
$welcomeblock
<td class="alt1" width="40%" valign="top">$arcadenews</td>
</tr>
</table></td>
</tr>
</table>
<!-- /arcade welcome -->
<if condition="$ischallengepending == 1">
<!-- small space -->
<span class="smallfont"><br>
</span>
<!-- /small space -->
<!-- personal -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead">Pending Challenges</td>
</tr>
<tr align="center">
<td class="alt1"><table>$challengebits</table></td>
</tr>
</table></td>
</tr>
</table>
<!-- /personal -->
</if>
<!-- small space -->
<span class="smallfont"><br>
</span>
<!-- /small space -->
<!-- games -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead" colspan="4">Total Games: $gamecount</td>
</tr>
$gamebits </table></td>
</tr>
</table>
<!-- /games -->
<br />
$pagenav

Intex
11-13-2004, 12:09 PM
KTBleeding - The query for the filesize is just the row for storing the information. In order to generate the filesize information for games currently in your database, you have to run the game_size.php that is included with the hack.

Once you've run that it should be fine, but don't forget you'll need to run it after you install any more games. Perhaps just setup a scheduled task within vB Admincp once a week etc. depending on how frequently you add games.

As for the column problem - I had this as well and the instructions for changing it were a little bit grey, particularly as they show other mods that you may not have included. Anyway, go to your arcade_main template and look for the section beginning:

<!-- games -->

Around that area, change any instances of colspan="#" to however many columns you want, i.e. colspan="3". This is in the instructions, but it fails to mention that you have to go to the /forum/arcade.php file and change the following code as well:


// Gets all of the games
$gamebits .="<tr>";
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g < $upperlimit)) {
if(!(($g+1)%3)) $nextrow="</tr><tr>";


Change the number at the end of that code, i.e. if(!(($g+1)%4)) to if(!(($g+1)%3)). You should then have your three columns!!

You'll need to set the $perpage = #; to a number that displays the correct amount for your columns. For example, I have 3 columns and therefore I've changed mine to $perpage = 21;. This ensures there are no empty cells in the table.

Hope that helps.

Intex
11-13-2004, 05:25 PM
GenSec - good job, works great.

* Intex clicks INSTALL.

GenSec
11-13-2004, 07:25 PM
KTBleeding

Change the number at the end of that code, i.e. if(!(($g+1)%4)) to if(!(($g+1)%3)). You should then have your three columns!!

Absolutely!

And your english-php is perfect:)

DjJoschimo
11-14-2004, 02:35 PM
I have a problem please see my Pictures:

Pic false <-- is the Screen on my Board..

Pic ineedthisone <<- I need this Screen on my Board .. What can i do? Or what is wrong?

And when i start game_size.php i become errors.... Please Help

greetz
DjJoschimo

DjJoschimo
11-14-2004, 04:49 PM
OK forget i have it

The Watcher
11-14-2004, 05:07 PM
really nice hack, a great improvement when you have many games

thanks

sabret00the
11-16-2004, 10:48 AM
i been dying for this :o

urmyantichrist
11-16-2004, 07:45 PM
I have a problem when games haven't been played yet... A small red X'ed box comes up, as if an image is missing... Am I missing something??

GenSec
11-17-2004, 06:09 AM
I have a problem when games haven't been played yet... A small red X'ed box comes up, as if an image is missing... Am I missing something??

Image for new game

http://yourdomain/forum/images/arcade/new.gif Something like http://2x2online.ru/forum/images/arcade/new.gif

Areku
11-17-2004, 07:15 AM
where is the favourites system? I must have missed that one! :disappointed:

I'd like to know how the fav system works... aka, if some1 adds it to favs, where does he get the list of his favs?

ChuanSE
11-17-2004, 11:40 PM
GenSec mate, this is really cool :D

* ChuanSE clicks install :D

sabret00the
11-18-2004, 03:49 PM
installed it, it's working well, thank you :)

pagekeeper
11-18-2004, 09:37 PM
hey, hmm maybe i should of asked if it works with 3.0.3 but i've installed it it works well, but i cant get rid of the blank spaces :(

ChuanSE
11-20-2004, 08:24 AM
installed it, it's working well, thank you :)

Looks neat hu ;)

TwinsX2Dad
11-23-2004, 03:52 PM
When I run game_size.php, I am getting an error.

-------------------------------------------------------
Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE games SET filesize='11' WHERE gameid=1
mysql error: Table 'siteroot_forums.games' doesn't exist

mysql error number: 1146
-------------------------------------------------------
What must I modify in the php file? I've tried several fixes, to no avail.

My table prefix is the standard vb3_

My games table, specifically, is: vb3_games

Thanks!

GenSec
11-23-2004, 10:01 PM
$DB_site->query("UPDATE vb3_games SET filesize='$filesize' WHERE gameid=$att[gameid]");

TwinsX2Dad
11-24-2004, 12:56 PM
That was very similar to one I'd tried with no success - but I figured I'd made an error somewhere, so I took a fresh file_size.php and changed the line to your suggestion. I got the same result as illustrated above.

Here's what I have, after adding your suggestion:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

require_once('./global.php');

$games = $DB_site->query("SELECT * FROM games");
while ($att = $DB_site->fetch_array($games))
{

$path = "./games/".$att['file'];
$filesize = filesize($path);
$filesize = intval($filesize/1024);
$DB_site->query("UPDATE vb3_games SET filesize='$filesize' WHERE gameid=$att[gameid]");
}

echo "DONE!";
?>

Is that correct? If it is, then I have some real problems. :nervous:

DaPro
11-24-2004, 02:59 PM
Be sure to read the directions, the text directions fail to mention this, please edit them

go to your mysql execute thing and put this in.

ALTER TABLE `games` ADD `filesize` INT( 10 ) DEFAULT '0' NOT NULL ;

then run it, and your all set.

TwinsX2Dad
11-24-2004, 09:02 PM
I thought I'd done that, but I tried again anyway. I got this response:

SQL-query:

ALTER TABLE `vb3_games` ADD `filesize` INT( 10 ) DEFAULT '0' NOT NULL
MySQL said:

#1060 - Duplicate column name 'filesize'

PennylessZ28
11-25-2004, 04:51 AM
Nice but your directions are lacking in the last phase of altering the arcade_main template. I've had no luck installing this and having it look decent.

Everything around my $gamebits, looks nothing like what you have posted in the instructions.

<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">

DigitalDesktops
11-25-2004, 12:15 PM
installed

GenSec
11-25-2004, 05:55 PM
I thought I'd done that, but I tried again anyway. I got this response:

SQL-query:

ALTER TABLE `vb3_games` ADD `filesize` INT( 10 ) DEFAULT '0' NOT NULL
MySQL said:

#1060 - Duplicate column name 'filesize'
It means you already make this :)

GenSec
11-25-2004, 06:02 PM
That was very similar to one I'd tried with no success - but I figured I'd made an error somewhere, so I took a fresh file_size.php and changed the line to your suggestion. I got the same result as illustrated above.

Here's what I have, after adding your suggestion:


Is that correct? If it is, then I have some real problems. :nervous:

It should be

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

require_once('./global.php');

$games = $DB_site->query("SELECT * FROM vb3_games");
while ($att = $DB_site->fetch_array($games))
{

$path = "./games/".$att['file'];
$filesize = filesize($path);
$filesize = intval($filesize/1024);
$DB_site->query("UPDATE vb3_games SET filesize='$filesize' WHERE gameid=$att[gameid]");
}

echo "DONE!";
?>

buck3t
11-28-2004, 02:53 AM
Looks and works great. Unfortunately I must have missed something as it still says Game, Champion, Personal Best, and Description at the top of the columns.

Suggestions?

GenSec
11-28-2004, 06:59 PM
buck3t
Check "arcade_main" template

buck3t
11-28-2004, 09:08 PM
Fixed.

sstrayer
11-29-2004, 01:58 PM
Installed minus the game size part. Thanks!

Benj
12-03-2004, 09:17 AM
this might be a general arcade question but it applies to this hack to:-

how do you control how many games are showed per page ???

Polo
12-03-2004, 01:01 PM
Benj in arcade.php change
$perpage = 10;
Change 10 to how ever many games you want to show up per page.

Cole2026
12-04-2004, 11:35 PM
Thanks. Very kool.

Mark.B
01-22-2005, 11:19 PM
Great hack which I have running on my v3 Arcade.

What would be REALLY great is if someone wrote a similar hack for ibProarcade, then both my arcades would look the same. :D

anarchystar
01-24-2005, 03:59 AM
this is a great mod, took all of about 5 minutes to install.

Socomjunky.com
02-13-2005, 11:13 PM
hey are u russian. if u are cool. kak dila?

well listen does this work for the ibProArcade too????

Mark.B
02-13-2005, 11:26 PM
hey are u russian. if u are cool. kak dila?


well listen does this work for the ibProArcade too????
It doesn't, but there is a hack on www.ibproarcade-vb.com that will give you the basic column layout, you can then tweak it as I have done on my site. I run both arcades together and both look virtually identical to the look used in this hack. :D

Harry72
02-14-2005, 04:12 PM
Thx for this super hack. Works great with 3.0.6 too !!! :laugh:

Now i will take a beer. :laugh: :lick:

phreak420
02-15-2005, 01:13 AM
you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Umm, what did I do wrong in installing it?

djjeffa
02-15-2005, 01:13 AM
anyway to chouse where the games are located in each colum?
like what order ther displayed in?

MissKalunji
02-20-2005, 02:27 PM
i dont kow what i did but this aint working at all!!!!!!!! i tried everything and thats what comes up (thats without even editing the arcade.php

http://www.dancehallareaz.com/forum/arcade.php

when i had the modification

nuthin appears wassup?

i tried to revert template i cant...

MissKalunji
02-20-2005, 03:21 PM
If you look on what I suggest to change in arcade.php you see that it has only 4 new lines to include in


// Gets all of the games
$gamebits .="<tr>";
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g < $upperlimit)) {
if(!(($g+1)%4)) $nextrow="</tr><tr>";
else $nextrow="";
eval('$gamebits .= "' . fetch_template('arcade_main_games_bit') . '";');
exec_switch_bg();
}
if ($game['gamesettings'] & 1) {
$g++;
}
unset($extra);
}
$gamebits .="</tr>";
block :)


Thanks to you it workssssssssssss :nervous:

MissKalunji
02-20-2005, 03:38 PM
I have a problem please see my Pictures:

Pic false <-- is the Screen on my Board..

Pic ineedthisone <<- I need this Screen on my Board .. What can i do? Or what is wrong?

And when i start game_size.php i become errors.... Please Help

greetz
DjJoschimo

i have the same problem where did i go wrong?

MissKalunji
02-20-2005, 03:45 PM
FIXED

now i wanna know how can i put them in alphabetic order??

nguyenvuan
02-21-2005, 02:22 AM
I got this problem when I change template arcade_main_games_bit:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*****/public_html/home/forums/includes/adminfunctions_template.php(3096) : eval()'d code on line 4

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Please help me!!!

MissKalunji
02-21-2005, 11:38 AM
I got this problem when I change template arcade_main_games_bit:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*****/public_html/home/forums/includes/adminfunctions_template.php(3096) : eval()'d code on line 4

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Please help me!!!


revert your template and copy again..thats what i did for like 3 hours to finally get it to work....

RichieBoy67
02-26-2005, 02:28 PM
I cannot find the

// Gets all of the games
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (strlen($game['username'])>12) {
$game['username'] = "<font size=1>".$game['username']."</font>";
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g<$upperlimit)) {
eval('$gamebits .= "' . fetch_template('arcade_main_games_bit') . '";');
exec_switch_bg();
}
if ($game['gamesettings'] & 1) {
$g++;
}
unset($extra);
}

in my arcade.php...


--

Wential
02-26-2005, 03:18 PM
Unless you deleted or modified it,
// Gets all of the games
starts on line 348 or arcade.php

ARCADE (http://www.sizefetish.com/arcade.php)

RichieBoy67
02-26-2005, 03:22 PM
My site is heavily modified....

Can I place the code somewhere else to get this to work??

AuroraMike
03-04-2005, 04:45 AM
Is there a way to reduce the number of columns? I read the above instructions and it reads like changing colspan= to a different number will reduce the # of games shown going across but that's not what's working. Right now I've opted to show 16 games per page. That's working fine. I have a 4x4 grid. But I'd much rather have a 3x4 grid (three across, four down) so that the boxes are a bit bigger. Changing the colspan= only changes the bar above and below the games listed (where "Total Games:" and the thin line beneath the columns are).

I've played with this for about 45 minutes and can't figure out where the columns are changed at. :ermm:

edit: nevermind, Intex answered this on page 1. I just missed his post.

SupraT
03-05-2005, 01:25 AM
KTBleeding - The query for the filesize is just the row for storing the information. In order to generate the filesize information for games currently in your database, you have to run the game_size.php that is included with the hack.

Once you've run that it should be fine, but don't forget you'll need to run it after you install any more games. Perhaps just setup a scheduled task within vB Admincp once a week etc. depending on how frequently you add games.

As for the column problem - I had this as well and the instructions for changing it were a little bit grey, particularly as they show other mods that you may not have included. Anyway, go to your arcade_main template and look for the section beginning:

<!-- games -->

Around that area, change any instances of colspan="#" to however many columns you want, i.e. colspan="3". This is in the instructions, but it fails to mention that you have to go to the /forum/arcade.php file and change the following code as well:


// Gets all of the games
$gamebits .="<tr>";
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g < $upperlimit)) {
if(!(($g+1)%3)) $nextrow="</tr><tr>";


Change the number at the end of that code, i.e. if(!(($g+1)%4)) to if(!(($g+1)%3)). You should then have your three columns!!

You'll need to set the $perpage = #; to a number that displays the correct amount for your columns. For example, I have 3 columns and therefore I've changed mine to $perpage = 21;. This ensures there are no empty cells in the table.

Hope that helps.

This will be the fix for the columns.

Allan
04-14-2005, 07:19 PM
very nice, thanks ;)

click install :)

Galaxy
04-17-2005, 03:54 PM
I been trying to sort out the new look option but it all mest up


<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead">Game</td><td class="thead">Champion</td><td class="thead">Personal Best</td><td class="thead">Description</td>
</tr>
<tr align="center">
<td colspan="18" class="thead">total games: $gamecount </td>
</tr>
$gamebits
<tr align="center">
<td class="thead" colspan="18" align="center">
</table>
</tr>
</tr>
</table>
<!-- /games -->
<br />
$pagenav


I allso set the $perpage = 18; to 18 as you can see can anyone help fix this???

DRJ
04-27-2005, 08:08 PM
Very nice, looks great.

*Installs

aberg
05-16-2005, 12:27 PM
One of my users is always in the arcade and he has a lot of titles.
Now in the forum he has vertical a big rule of titels.( see the attachment)
How can i change the titles to a horizontal rule?

Polo
05-16-2005, 12:34 PM
One of my users is always in the arcade and he has a lot of titles.
Now in the forum he has vertical a big rule of titels.( see the attachment)
How can i change the titles to a horizontal rule?
use the popup arcade hack for the awards, i use that at my site :) it works great and reduces lots of queries from your showthread.php :)

Vevina
05-16-2005, 10:14 PM
sweet installed :)

axi
05-19-2005, 03:58 PM
how can we store game_size.php so nobody can run it? Can we rename it or store it in admincp folder?

MortysTW
05-20-2005, 03:52 PM
Love this hack. ITs perfect. Thanks!

But I have the Categories mod installed and this Mod worked perfectly even with this Categories Mod. So that's not my issue. My issue is that the Categories Mod takes away listing of any game on the main entrance page to the arcade.php that visitors first see when they hit the arcade.

I would like to get this mod to also display on my main Arcade page below the list of categories. Can you help me out? I couldn't figure out which mod page would be better to post this question at.

steadicamop
05-23-2005, 06:28 PM
I can't find this code, I've even tried searching for the three top lines individually and nothing came back

// Gets all of the games
while ($game = $DB_site->fetch_array($result_allgames)) {
$gamename = $game['shortname'];
if ($gamecache["$game[shortname]"]) {
$game = $gamecache["$game[shortname]"];
} else {
// the game has never had a score recorded
// $extra is used as a conditional for the arcade_main_games_bit template
$extra = 1;
}
if (strlen($game['username'])>12) {
$game['username'] = "<font size=1>".$game['username']."</font>";
}
if (($game['gamesettings'] & 1)&&($g >= $startingfrom && $g<$upperlimit)) {
eval('$gamebits .= "' . fetch_template('arcade_main_games_bit') . '";');
exec_switch_bg();
}
if ($game['gamesettings'] & 1) {
$g++;
}
unset($extra);
}

Any help plz :D

Polo
05-23-2005, 07:55 PM
try looking for this line:

unset($extra);this line has to be there...

steadicamop
05-23-2005, 08:05 PM
Believe it or not ... it's not there, just searched through arcade.php - not found :(

Polo
05-23-2005, 08:06 PM
really?? mmm... did you modified the arcade.php file alot?

1nf3rn0
05-23-2005, 09:53 PM
Believe it or not ... it's not there, just searched through arcade.php - not found :(
are you using an editor?..or just notepad or wordpad?..if usin any of them, make sure you are searching in the opposite direction from where your cursor is placed...please take no offense...ive just done this before...

steadicamop
05-24-2005, 06:07 AM
I did the changes remotely via ftp .... I used CuteFTP's built in editor, that's pretty darn handy too.

I've not hacked the Arcade at all .. only for the resolution selection for the games, that's the only one installed.

I might just download the original arcade.php and see what happens if I replace it for the current one.

waza
05-27-2005, 04:34 PM
You will probably need the latest version of v3arcade, v1.0.3.
The lines aren't there in v1.0.0,

Now for my problem:
I can't get the layout right, the page is totaly messed up.
So can somebody who has only installed this modification on v3arcade, share his arcade_main template?

Thx,
seba

MissKalunji
05-27-2005, 04:48 PM
You will probably need the latest version of v3arcade, v1.0.3.
The lines aren't there in v1.0.0,

Now for my problem:
I can't get the layout right, the page is totaly messed up.
So can somebody who has only installed this modification on v3arcade, share his arcade_main template?

Thx,
seba

<!-- arcade welcome -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead" width="20%">
<span class="smallfont"><b>Logged in</b> as</span></td>
<td class="thead" width="40%"><span class="smallfont"><b>Welcome</b> to the <b>Arcade</b>!</span></td>
<td class="thead" width="40%"><span class="smallfont">Arcade <b>News & Events</b></span></td>
</tr>
<tr align="center">
<td class="alt1" width="20%" valign="middle">
<if condition="$bbuserinfo[userid]!=0">
<b>$bbuserinfo[musername]</b>
<span class="smallfont"><br />
$bbuserinfo[usertitle]<br /><br />
$bbuserinfo[avatar]<br /><br />
<else />
<b><i>Guest</i></b><br />
<font size="1"><a href="$vboptions[bburl]/register.php">Click here to register!</a></font>
</if>
</span>

</td>
$welcomeblock
<td class="alt1" width="40%" valign="top">$arcadenews</td>
</tr>
</table></td>
</tr>
</table>
<!-- /arcade welcome -->
<if condition="$ischallengepending == 1">
<!-- small space -->
<span class="smallfont"><br>
</span>
<!-- /small space -->
<!-- personal -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead">Pending Challenges</td>
</tr>
<tr align="center">
<td class="alt1"><table>$challengebits</table></td>
</tr>
</table></td>
</tr>
</table>
<!-- /personal -->
</if>
<!-- small space -->
<br \><table cellspacing="0" border="0" width="$stylevar[tablewidth]">
<tr>
<td>

<if condition="$mhsusername">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="400" align="left">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead"><img src="$stylevar[imgdir_arcade]/king.gif" alt="The most Champions Titles !" align="absmiddle" border=0>Arcade-King:</td><td class="alt1">
<span class="smallfont"><a href="arcade.php?do=stats&userid=$mhsuser"><b>$mhsusername</b></a> has <b>$mosthigh</b> Champions-Titles !</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</if>

<if condition="$mhsarray">
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="90%" align="left">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td class="thead"><img src="$stylevar[imgdir_arcade]/morekings.gif" alt="The most Champions Titles !" align="absmiddle" border=0>Arcade-Kings:</td><td class="alt1">
<span class="smallfont"><b>$mhsarray</b></a> have <b>$mosthigh</b> Champions-Titles !</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</if>
<br \>
<td align="right">$pagenav</td>
</td>
</tr>
</table>
<span class="smallfont"><br>
</span>
<!-- /small space -->
<!-- games -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td colspan="3" class="thead">total games: $gamecount </td>
</tr>
$gamebits
<tr align="center">
<td class="thead" colspan="3" align="left"> </table></td>
</tr>
</table>
<!-- /games -->

<br />
$pagenav

MissKalunji
05-27-2005, 05:37 PM
You will probably need the latest version of v3arcade, v1.0.3.
The lines aren't there in v1.0.0,

Now for my problem:
I can't get the layout right, the page is totaly messed up.
So can somebody who has only installed this modification on v3arcade, share his arcade_main template?

Thx,
seba


did it work?

waza
05-27-2005, 06:44 PM
Hey,
I first also had to upload my changed arcade.php (I uploaded the wrong one)
It was still a mess, but it worked with your template.
thx a lot!

MissKalunji
05-28-2005, 12:32 AM
Hey,
I first also had to upload my changed arcade.php (I uploaded the wrong one)
It was still a mess, but it worked with your template.
thx a lot!

glad i was able to help you :nervous:

VBUsers
06-03-2005, 12:21 AM
i would like to take out the total of games shown. it makes it look funny since all the games are on the same page. where can i edit that out. i just want the games to be on the arcade page so it looks cleaner than it does now. thanks ahead of time for the help

VBUsers
06-07-2005, 06:07 AM
i would like to take out the total of games shown. it makes it look funny since all the games are on the same page. where can i edit that out. i just want the games to be on the arcade page so it looks cleaner than it does now. thanks ahead of time for the help

bump

SpeedyHire
06-07-2005, 12:27 PM
worx like a charm m8
many thanx for the mod:)

dsboyce8624
06-07-2005, 03:06 PM
bump

Just remove that <tr></tr> section from the code.

VBUsers
06-07-2005, 05:24 PM
Just remove that <tr></tr> section from the code.


could you be a little more specific please thanks

dsboyce8624
06-07-2005, 06:40 PM
could you be a little more specific please thanks

Theres a line that says:
<tr align="center">
<td colspan="4" class="thead">total games: $gamecount </td>
</tr>

Change the "total games: $gamecount " to whatever you want the header to say.

Aeolian_X
06-18-2005, 12:43 AM
Great Hack! Looks great in my Arcade. Thank you!

*Clicks Install and Rocks On!*

ryne661
07-10-2005, 04:06 PM
How can you undo

ALTER TABLE `games` ADD `filesize` INT( 10 ) DEFAULT '0' NOT NULL ;

in the db?

I am trying to uninstall this hack...

DjTaz
07-11-2005, 07:00 AM
ryne661 - if u have phpmyadmin ... log into the sql , go to games and find the table filesize and delete it from there.

atxhorn
07-15-2005, 01:10 PM
very nice

cherieann
07-21-2005, 05:26 AM
Installed with a few differences, Prolly gonna edit it a bit more :) But thanks!

kregger
07-26-2005, 02:33 AM
Where do I change the $pagenav so that more games show up per page? Sorry, a bit of a n00b staggering around here. hehe I think that's the thing I have to change(or would it be the $gamesbit). I got the hack to work but its only showing 10 games per page. TIA!

Craig

Gio~Logist
07-26-2005, 02:35 AM
go to arcade.php and change


$perpage = 10;


to whatever number you'd like

kregger
07-26-2005, 02:41 AM
go to arcade.php and change


$perpage = 10;


to whatever number you'd like

Wow! Quick answer! :D Thank ya!

Hack looks muuuuuuch better.

Craig

Warlord
07-28-2005, 11:44 PM
Great Mod, my arcade looks loads better.

unknowngiver
08-07-2005, 06:36 PM
https://vborg.vbsupport.ru/

I have this problem
can anyone help please

and i also changed the colspan=4 to colspan=2 but it didnt do anything

bigdog829
08-09-2005, 02:47 AM
http://img8.imageshack.us/img8/6484/untitled5kt1.jpg

I have this problem
can anyone help please

and i also changed the colspan=4 to colspan=2 but it didnt do anything


I removed this from arcade_main

<td class="thead">Game</td><td class="thead">Champion</td><td class="thead">Personal Best</td><td class="thead">Description</td>

Replaced with

<td colspan="4" class="thead">total games: $gamecount </td>

csidlernet
08-10-2005, 05:15 AM
sweet thanks

thephonemall
08-12-2005, 04:51 AM
Can someone please assist me with altering my Game Table? I do not know where to do this. I uploaded game_size.php to admincp but when I run it I receive a database error. I suspect it is because I did not alter the Game Table.
Currently no sizes show up. Looks like:
Play: [ Kb]

sinoeu
10-09-2005, 07:29 PM
Can someone please assist me with altering my Game Table? I do not know where to do this. I uploaded game_size.php to admincp but when I run it I receive a database error. I suspect it is because I did not alter the Game Table.
Currently no sizes show up. Looks like:
Play: [ Kb]

Can anybody upgrade this wonderful hack for vb3.5?

MThornback
10-21-2005, 12:03 PM
Note for people: There are 2 instances of games in the game_size.php file, you need to add prefixes (if you use them) to BOTH for it to work :)

Oblivion Knight
10-21-2005, 12:22 PM
Can anybody upgrade this wonderful hack for vb3.5?It's done, just waiting for permission to release the port.. ;)