Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
v3Arcade - new look to your arcade main page Details »»
v3Arcade - new look to your arcade main page
Version: 1.00, by GenSec GenSec is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-07-2004 Last Update: Never Installs: 83
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 11-10-2004, 08:54 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 = ???
Reply With Quote
  #23  
Old 11-10-2004, 08:58 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #24  
Old 11-10-2004, 11:37 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lionel. Just modify number of rows and cols
Reply With Quote
  #25  
Old 11-11-2004, 02:53 PM
Brent H's Avatar
Brent H Brent H is offline
 
Join Date: Sep 2004
Location: Phoenix, AZ
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #26  
Old 11-11-2004, 10:12 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TheHeggy. I guess it's from bgcolor of table in wich $gamebits placed in arcade_main template in your style. Try to change it.
Reply With Quote
  #27  
Old 11-12-2004, 09:46 PM
Wachtmeister's Avatar
Wachtmeister Wachtmeister is offline
 
Join Date: Apr 2004
Location: West-Berlin, Germany
Posts: 190
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work if my forum uses fatabase prefix? My tables are named "vb3_games" an so on.... ??
Reply With Quote
  #28  
Old 11-12-2004, 11:17 PM
KTBleeding's Avatar
KTBleeding KTBleeding is offline
 
Join Date: Feb 2004
Location: Tooele, UT
Posts: 756
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #29  
Old 11-13-2004, 12:09 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 11-13-2004, 05:25 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

GenSec - good job, works great.

[high]* Intex clicks INSTALL.[/high]
Reply With Quote
  #31  
Old 11-13-2004, 07:25 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04654 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete