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)

ChuanSE 11-20-2004 08:24 AM

Quote:

Originally Posted by sabret00the
installed it, it's working well, thank you :)

Looks neat hu ;)

TwinsX2Dad 11-23-2004 03:52 PM

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!

GenSec 11-23-2004 10:01 PM

$DB_site->query("UPDATE vb3_games SET filesize='$filesize' WHERE gameid=$att[gameid]");

TwinsX2Dad 11-24-2004 12:56 PM

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

Is that correct? If it is, then I have some real problems. :nervous:

DaPro 11-24-2004 02:59 PM

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:

ALTER TABLE `gamesADD `filesizeINT10 ) DEFAULT '0' NOT NULL 

then run it, and your all set.

TwinsX2Dad 11-24-2004 09:02 PM

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'

PennylessZ28 11-25-2004 04:51 AM

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

DigitalDesktops 11-25-2004 12:15 PM

installed

GenSec 11-25-2004 05:55 PM

Quote:

Originally Posted by TwinsX2Dad
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'

It means you already make this :)

GenSec 11-25-2004 06:02 PM

Quote:

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


Is that correct? If it is, then I have some real problems. :nervous:

It should be
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!";
?>


buck3t 11-28-2004 02:53 AM

Looks and works great. Unfortunately I must have missed something as it still says Game, Champion, Personal Best, and Description at the top of the columns.

Suggestions?

GenSec 11-28-2004 06:59 PM

buck3t
Check "arcade_main" template

buck3t 11-28-2004 09:08 PM

Fixed.

sstrayer 11-29-2004 01:58 PM

Installed minus the game size part. Thanks!

Benj 12-03-2004 09:17 AM

this might be a general arcade question but it applies to this hack to:-

how do you control how many games are showed per page ???

Polo 12-03-2004 01:01 PM

Benj in arcade.php change
PHP Code:

$perpage 10

Change 10 to how ever many games you want to show up per page.

Cole2026 12-04-2004 11:35 PM

Thanks. Very kool.

Mark.B 01-22-2005 11:19 PM

Great hack which I have running on my v3 Arcade.

What would be REALLY great is if someone wrote a similar hack for ibProarcade, then both my arcades would look the same. :D

anarchystar 01-24-2005 03:59 AM

this is a great mod, took all of about 5 minutes to install.

Socomjunky.com 02-13-2005 11:13 PM

hey are u russian. if u are cool. kak dila?

well listen does this work for the ibProArcade too????

Mark.B 02-13-2005 11:26 PM

Quote:

Originally Posted by Socomjunky.com
hey are u russian. if u are cool. kak dila?


well listen does this work for the ibProArcade too????

It doesn't, but there is a hack on www.ibproarcade-vb.com that will give you the basic column layout, you can then tweak it as I have done on my site. I run both arcades together and both look virtually identical to the look used in this hack. :D

Harry72 02-14-2005 04:12 PM

Thx for this super hack. Works great with 3.0.6 too !!! :laugh:

Now i will take a beer. :laugh: :lick:

phreak420 02-15-2005 01:13 AM

you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Umm, what did I do wrong in installing it?

djjeffa 02-15-2005 01:13 AM

anyway to chouse where the games are located in each colum?
like what order ther displayed in?

MissKalunji 02-20-2005 02:27 PM

i dont kow what i did but this aint working at all!!!!!!!! i tried everything and thats what comes up (thats without even editing the arcade.php

http://www.dancehallareaz.com/forum/arcade.php

when i had the modification

nuthin appears wassup?

i tried to revert template i cant...

MissKalunji 02-20-2005 03:21 PM

Quote:

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


Thanks to you it workssssssssssss :nervous:

MissKalunji 02-20-2005 03:38 PM

Quote:

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

i have the same problem where did i go wrong?

MissKalunji 02-20-2005 03:45 PM

FIXED

now i wanna know how can i put them in alphabetic order??

nguyenvuan 02-21-2005 02:22 AM

I got this problem when I change template arcade_main_games_bit:

Code:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*****/public_html/home/forums/includes/adminfunctions_template.php(3096) : eval()'d code on line 4

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Please help me!!!

MissKalunji 02-21-2005 11:38 AM

Quote:

Originally Posted by nguyenvuan
I got this problem when I change template arcade_main_games_bit:

Code:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/*****/public_html/home/forums/includes/adminfunctions_template.php(3096) : eval()'d code on line 4

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Please help me!!!


revert your template and copy again..thats what i did for like 3 hours to finally get it to work....

RichieBoy67 02-26-2005 02:28 PM

I cannot find the

Quote:

// 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);
}
in my arcade.php...


--

Wential 02-26-2005 03:18 PM

Unless you deleted or modified it,
// Gets all of the games
starts on line 348 or arcade.php

ARCADE

RichieBoy67 02-26-2005 03:22 PM

My site is heavily modified....

Can I place the code somewhere else to get this to work??

AuroraMike 03-04-2005 04:45 AM

Is there a way to reduce the number of columns? I read the above instructions and it reads like changing colspan= to a different number will reduce the # of games shown going across but that's not what's working. Right now I've opted to show 16 games per page. That's working fine. I have a 4x4 grid. But I'd much rather have a 3x4 grid (three across, four down) so that the boxes are a bit bigger. Changing the colspan= only changes the bar above and below the games listed (where "Total Games:" and the thin line beneath the columns are).

I've played with this for about 45 minutes and can't figure out where the columns are changed at. :ermm:

edit: nevermind, Intex answered this on page 1. I just missed his post.

SupraT 03-05-2005 01:25 AM

Quote:

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

This will be the fix for the columns.

Allan 04-14-2005 07:19 PM

very nice, thanks ;)

click install :)

Galaxy 04-17-2005 03:54 PM

I been trying to sort out the new look option but it all mest up

Code:

    <td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
        <tr align="center">
          <td class="thead">Game</td><td class="thead">Champion</td><td class="thead">Personal Best</td><td class="thead">Description</td>
        </tr>
        <tr align="center">
          <td colspan="18"  class="thead">total games: $gamecount </td>
        </tr>
        $gamebits
        <tr align="center">
  <td class="thead" colspan="18" align="center"> 
</table>
</tr>
</tr>
</table>
<!-- /games -->
<br />
$pagenav

I allso set the $perpage = 18; to 18 as you can see can anyone help fix this???

DRJ 04-27-2005 08:08 PM

Very nice, looks great.

*Installs

aberg 05-16-2005 12:27 PM

One of my users is always in the arcade and he has a lot of titles.
Now in the forum he has vertical a big rule of titels.( see the attachment)
How can i change the titles to a horizontal rule?

Polo 05-16-2005 12:34 PM

Quote:

Originally Posted by aberg
One of my users is always in the arcade and he has a lot of titles.
Now in the forum he has vertical a big rule of titels.( see the attachment)
How can i change the titles to a horizontal rule?

use the popup arcade hack for the awards, i use that at my site :) it works great and reduces lots of queries from your showthread.php :)


All times are GMT. The time now is 08:08 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.01317 seconds
  • Memory Usage 1,842KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (10)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