Thread: Major Additions - [DBTech] vBArcade v2 (vB5)
View Single Post
  #137  
Old 09-27-2023, 09:01 PM
madace06 madace06 is offline
 
Join Date: Sep 2023
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SO GOT THE DATABSE RUNNING AND INSTALLED FOR V5.7.5 JUST HAVING FEW FRONT END ISSUES BUT HOPE FULL GET THERE

HERE IS THE DATABASE CODE USED I CHANGED IN CORE/PACKAGES/INSTALL/100.PHP

JUST COPY AND PAST IN TEXT FILE SAY AS 100.PHP UPLOAD AND RUN
Code:
<?php
// New Tables

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_access`
	(
		`accessid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`enabled` tinyint(1) unsigned NOT NULL DEFAULT '1',
		`usergroups` text NOT NULL,
		`games` text NOT NULL,
		`displayorder` int(10) unsigned NOT NULL DEFAULT '10',
		`important` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`default` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`timespan` int(10) unsigned NOT NULL DEFAULT '0',
		`mintime` int(10) unsigned NOT NULL DEFAULT '0',
		`minposts` int(10) unsigned NOT NULL DEFAULT '0',
		`avgposts` double unsigned NOT NULL DEFAULT '0',
		`lastposts` int(10) unsigned NOT NULL DEFAULT '0',
		`minrep` int(10) unsigned NOT NULL DEFAULT '0',
		`earned` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`maxplays` int(10) unsigned NOT NULL DEFAULT '0',
		`punish` tinyint(1) unsigned NOT NULL DEFAULT '0',
		PRIMARY KEY (`accessid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_access');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_category`
	(
		`categoryid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`enabled` tinyint(1) unsigned NOT NULL DEFAULT '1',
		`title` varchar(255) NOT NULL,
		`displayorder` int(10) unsigned NOT NULL DEFAULT '10',
		`password` varchar(255) NOT NULL DEFAULT '',
		`usergroups` text NOT NULL,
		`icon` varchar(255) NOT NULL DEFAULT '',
		`description` text NOT NULL,
		PRIMARY KEY (`categoryid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_category');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_data`
	(
		`gameid` varchar(255) NOT NULL,
		`local_winner` int(10) unsigned NOT NULL DEFAULT '0',
		`global_user` varchar(255) NOT NULL DEFAULT '',
		`global_link` varchar(255) NOT NULL DEFAULT '',
		`global_score` double NOT NULL DEFAULT '0',
		`local_plays` int(10) unsigned NOT NULL DEFAULT '0',
		`local_avgscore` double NOT NULL DEFAULT '0',
		`local_timespent` int(10) unsigned NOT NULL DEFAULT '0',
		`global_plays` int(10) unsigned NOT NULL DEFAULT '0',
		`global_avgscore` double NOT NULL DEFAULT '0',
		`global_timespent` int(10) unsigned NOT NULL DEFAULT '0',
		`ratings` int(10) unsigned NOT NULL DEFAULT '0',
		`avgrating` double unsigned NOT NULL DEFAULT '0',
		`favorites` int(10) unsigned NOT NULL DEFAULT '0',
		`comments` int(10) unsigned NOT NULL DEFAULT '0',
		`history_winner` int(10) unsigned NOT NULL DEFAULT '0',
		`commentthreadid` int(10) unsigned NOT NULL DEFAULT '0',
		`reportthreadid` int(10) unsigned NOT NULL DEFAULT '0',
		PRIMARY KEY (`gameid`)
	) ENGINE=InnoDB
");
self::report('Created Table', 'dbtech_vbarcade_data');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_favorite`
	(
		`gameid` varchar(255) NOT NULL,
		`userid` int(10) unsigned NOT NULL DEFAULT '0',
		`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
		UNIQUE KEY `gameid` (`gameid`,`userid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_favorite');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_game`
	(
		`gameid` varchar(255) NOT NULL,
		`enabled` tinyint(1) unsigned NOT NULL DEFAULT '1',
		`displayorder` int(10) unsigned NOT NULL DEFAULT '10',
		`title` varchar(255) NOT NULL,
		`description` text NOT NULL,
		`instruction` text NOT NULL,
		`controls` text NOT NULL,
		`keywords` text NOT NULL,
		`author` varchar(255) NOT NULL DEFAULT '',
		`copyright` varchar(255) NOT NULL DEFAULT '',
		`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
		`width` double unsigned NOT NULL,
		`height` double unsigned NOT NULL,
		`decimals` tinyint(2) NOT NULL DEFAULT '0',
		`scoring` tinyint(1) unsigned NOT NULL DEFAULT '1',
		`tourns` tinyint(1) unsigned NOT NULL DEFAULT '1',
		`system` char(3) NOT NULL,
		`license` text NOT NULL,
		`flashfile` varchar(255) NOT NULL,
		`icon` varchar(255) NOT NULL,
		`badge` varchar(255) NOT NULL,
		PRIMARY KEY (`gameid`)
	) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
");
self::report('Created Table', 'dbtech_vbarcade_game');

self::$db->query_write("
	CREATE TABLE `dbtech_vbarcade_match`
	(
		`matchid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`tournid` int(10) unsigned NOT NULL DEFAULT '0',
		`userid` int(10) unsigned NOT NULL DEFAULT '0',
		`against` int(10) unsigned NOT NULL DEFAULT '0',
		`score` double NOT NULL DEFAULT '0',
		`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
		`round` tinyint(2) unsigned NOT NULL DEFAULT '1',
		`attempt` tinyint(2) unsigned NOT NULL DEFAULT '0',
		`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
		PRIMARY KEY (`matchid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_match');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_rating`
	(
		`gameid` varchar(255) NOT NULL,
		`userid` int(10) unsigned NOT NULL DEFAULT '0',
		`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
		`rating` tinyint(1) unsigned NOT NULL DEFAULT '0',
		UNIQUE KEY `gameid` (`gameid`,`userid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_rating');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_relation`
	(
		`gameid` varchar(255) NOT NULL,
		`categoryid` int(10) unsigned NOT NULL DEFAULT '0',
		UNIQUE KEY `gameid` (`gameid`,`categoryid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_relation');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_session`
	(
		`sessionid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`global` int(10) unsigned NOT NULL DEFAULT '0',
		`gameid` varchar(255) NOT NULL,
		`label` varchar(255) NOT NULL DEFAULT '',
		`userid` int(10) unsigned NOT NULL DEFAULT '0',
		`ipaddress` char(15) NOT NULL DEFAULT '',
		`timestart` int(10) unsigned NOT NULL DEFAULT '0',
		`timefinish` int(10) unsigned NOT NULL DEFAULT '0',
		`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`record` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`score` double NOT NULL DEFAULT '0',
		`verify` varchar(255) NOT NULL,
		`chain` varchar(255) NOT NULL DEFAULT '',
		`comment` varchar(255) NOT NULL DEFAULT '',
		`matchid` int(10) unsigned NOT NULL DEFAULT '0',
		PRIMARY KEY (`sessionid`)
	) ENGINE=InnoDB
");
self::report('Created Table', 'dbtech_vbarcade_session');

self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `dbtech_vbarcade_tourn`
	(
		`tournid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`gameid` varchar(255) NOT NULL,
		`title` varchar(255) NOT NULL,
		`description` text NOT NULL,
		`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
		`recurring` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`private` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`usergroups` text NOT NULL,
		`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
		`winner` int(10) unsigned NOT NULL DEFAULT '0',
		`rounds` tinyint(2) unsigned NOT NULL DEFAULT '1',
		`attempts` tinyint(2) unsigned NOT NULL DEFAULT '1',
		PRIMARY KEY (`tournid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbarcade_tourn');


// Populate tables
self::$db->query_write("
	REPLACE INTO `dbtech_vbarcade_access`
		(`accessid`, `enabled`, `usergroups`, `games`, `displayorder`, `important`, `default`, `timespan`, `mintime`, `minposts`, `avgposts`, `lastposts`, `minrep`, `earned`, `maxplays`, `punish`)
	VALUES 
		(1, 1, '', '', 10, 0, 4, 86400, 0, 0, 0, 0, 0, 4, 0, 3)
");
self::report('Populated Table', 'dbtech_vbarcade_access');

self::$db->query_write("
	INSERT INTO `dbtech_vbarcade_category` 
		(`categoryid`, `enabled`, `title`, `displayorder`, `password`, `usergroups`)
	VALUES 
		(1, 1, 'Puzzle', 10, '', ''),
		(2, 1, 'Action', 10, '', ''),
		(3, 1, 'Retro', 10, '', ''),
		(4, 1, 'Sports', 10, '', ''),
		(5, 1, 'Shooter', 10, '', ''),
		(6, 1, 'RPG', 10, '', ''),
		(7, 1, 'Misc', 10, '', '')
");
self::report('Populated Table', 'dbtech_vbarcade_access');


// Add the administrator field
if (self::$db_alter->fetch_table_info('administrator'))
{
	self::$db_alter->add_field(array(
		'name'       => 'arcadepermissions',
		'type'       => 'int',
		'length'     => '10',
		'attributes' => 'unsigned',
		'null'       => false,	// True = NULL, false = NOT NULL
		'default'    => '0'
	));
	self::report('Altered Table', 'administrator');
}

// Add the user field
if (self::$db_alter->fetch_table_info('user'))
{
	self::$db_alter->add_field(array(
		'name'       => 'dbtech_vbarcade_matchcount',
		'type'       => 'int',
		'length'     => '10',
		'attributes' => 'unsigned',
		'null'       => false,	// True = NULL, false = NOT NULL
		'default'    => '0'
	));
	self::report('Altered Table', 'user');
}
Reply With Quote
Благодарность от:
jeremystcyr69
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01103 seconds
  • Memory Usage 1,825KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete