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)


All times are GMT. The time now is 08:33 AM.

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.01205 seconds
  • Memory Usage 1,746KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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