vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   v3Arcade - new look to your arcade main page (https://vborg.vbsupport.ru/showthread.php?t=71481)

GenSec 11-07-2004 10:00 PM

v3Arcade - new look to your arcade main page
 
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);
        }

and replace with
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>";

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 :)
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 ;
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

Quote:

Originally Posted by RasMasta
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

Quote:

Originally Posted by Zath
Works great but how can i set the number of games displayed per page?

It's in arcade.php default option :)

Look for
Code:

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

Lionel 11-09-2004 12:03 PM

Quote:

Originally Posted by GenSec
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

Quote:

Originally Posted by Oblivion Knight
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/showpos...23&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

Quote:

Originally Posted by Lionel
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

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>";

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

Quote:

Originally Posted by dina
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
Code:

<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.

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


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:

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>";

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.

[high]* Intex clicks INSTALL.[/high]

GenSec 11-13-2004 07:25 PM

Quote:

Originally Posted by Intex
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

Quote:

Originally Posted by urmyantichrist
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

Quote:

Originally Posted by Lionel
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

[high]* ChuanSE clicks install :D[/high]

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 :(


All times are GMT. The time now is 04:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02297 seconds
  • Memory Usage 1,847KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete