The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
v3Arcade - new look to your arcade main page Details »» | |||||||||||||||||||||||||||
v3Arcade - new look to your arcade main page
Developer Last Online: Jun 2010
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 Code:
// 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); } Code:
// 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>"; And edit "arcade_main" template around $gamebits to change every newrest colspan="4" to your number of columns Code:
<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 Code:
ALTER TABLE `games` ADD `filesize` INT( 10 ) DEFAULT '0' NOT NULL ; Show Your Support
|
Comments |
#42
|
||||
|
||||
Quote:
|
#43
|
|||
|
|||
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! |
#44
|
|||
|
|||
$DB_site->query("UPDATE vb3_games SET filesize='$filesize' WHERE gameid=$att[gameid]");
|
#45
|
|||
|
|||
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: Code:
<?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!"; ?> |
#46
|
|||
|
|||
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. PHP Code:
|
#47
|
|||
|
|||
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' |
#48
|
|||
|
|||
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. HTML Code:
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> |
#49
|
|||
|
|||
installed
|
#50
|
|||
|
|||
Quote:
|
#51
|
|||
|
|||
Quote:
Code:
<?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!"; ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|