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 |
#22
|
|||
|
|||
Quote:
Just edit "arcade_main_games_bit" template to Code:
<br />Your score: <if condition="$personalBest[$gamename] >= 1"><b>$personalBest[$gamename]</b><else />none</if> |
#23
|
|||
|
|||
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.
|
#24
|
|||
|
|||
Lionel. Just modify number of rows and cols
|
#25
|
||||
|
||||
GREAT hack man very impressed! Was looking for something that would clean up my arcade
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. |
#26
|
|||
|
|||
TheHeggy. I guess it's from bgcolor of table in wich $gamebits placed in arcade_main template in your style. Try to change it.
|
#27
|
||||
|
||||
Will this work if my forum uses fatabase prefix? My tables are named "vb3_games" an so on.... ??
|
#28
|
||||
|
||||
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. Code:
<!-- 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 |
#29
|
|||
|
|||
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: 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)%3)) $nextrow="</tr><tr>"; 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. |
#30
|
|||
|
|||
GenSec - good job, works great.
[high]* Intex clicks INSTALL.[/high] |
#31
|
|||
|
|||
Quote:
And your english-php is perfect |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|