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



All times are GMT. The time now is 06:55 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.01576 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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