PHP Code:
// ################################ Create NuTT Tables ###############################
if ($_REQUEST['step'] == 5)
{
echo "Adding Table nutt_cats<br />";
$DB_site->query("CREATE TABLE `nutt_cats` (
`id` mediumint(9) NOT NULL auto_increment,
`title` varchar(50) NOT NULL default '',
`options` int(10) NOT NULL default '0',
`pic` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) TYPE=MyISAM;");
echo "Adding Table nutt_files<br />";
$DB_site->query("CREATE TABLE `nutt_files` (
`id` int(10) NOT NULL auto_increment,
`torrent` int(10) NOT NULL default '0',
`filename` varchar(150) NOT NULL default '',
`size` int(25) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;");
echo "Adding Table nutt_peers<br />";
$DB_site->query("CREATE TABLE `nutt_peers` (
`id` int(10) unsigned NOT NULL auto_increment,
`torrent` int(10) unsigned NOT NULL default '0',
`peer_id` varchar(20) NOT NULL default '',
`ip` varchar(64) NOT NULL default '',
`port` smallint(5) unsigned NOT NULL default '0',
`uploaded` bigint(20) unsigned NOT NULL default '0',
`downloaded` bigint(20) unsigned NOT NULL default '0',
`to_go` bigint(20) unsigned NOT NULL default '0',
`seeder` enum('yes','no') NOT NULL default 'no',
`started` int(11) NOT NULL default '0',
`last_action` int(11) NOT NULL default '0',
`connectable` enum('yes','no') NOT NULL default 'yes',
`userid` int(10) unsigned NOT NULL default '0',
`agent` varchar(60) NOT NULL default '',
`finishedat` int(10) unsigned NOT NULL default '0',
`downloadoffset` bigint(20) unsigned NOT NULL default '0',
`uploadoffset` bigint(20) unsigned NOT NULL default '0',
`passkey` varchar(32) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `torrent_peer_id` (`torrent`,`peer_id`),
KEY `torrent` (`torrent`),
KEY `torrent_seeder` (`torrent`,`seeder`),
KEY `last_action` (`last_action`),
KEY `connectable` (`connectable`),
KEY `userid` (`userid`)
) TYPE=MyISAM;");
echo "Adding Table nutt_rate<br />";
$DB_site->query("CREATE TABLE `nutt_rate` (
`id` int(11) NOT NULL auto_increment,
`rate` int(11) NOT NULL default '0',
`torrent` int(11) NOT NULL default '0',
`userid` int(11) NOT NULL default '0',
`ip` varchar(62) NOT NULL default '',
`time` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;");
echo "Adding Table nutt_torrents<br />";
$DB_site->query("CREATE TABLE `nutt_torrents` (
`id` int(10) NOT NULL auto_increment,
`threadid` int(10) NOT NULL default '0',
`filename` varchar(255) NOT NULL default '',
`owner` varchar(255) NOT NULL default '0',
`ownerm` varchar(255) NOT NULL default '',
`ownerid` int(10) NOT NULL default '0',
`visible` varchar(5) NOT NULL default '',
`deleted` varchar(10) NOT NULL default 'no',
`hash` varchar(255) NOT NULL default '',
`name` varchar(255) NOT NULL default '',
`size` int(25) NOT NULL default '0',
`numfiles` int(10) NOT NULL default '0',
`type` varchar(10) NOT NULL default '',
`descr` mediumtext NOT NULL,
`cat` int(10) NOT NULL default '0',
`save` varchar(255) NOT NULL default '',
`added` int(25) NOT NULL default '0',
`last_action` int(25) NOT NULL default '0',
`downloaded` int(10) NOT NULL default '0',
`seeders` int(10) NOT NULL default '0',
`leechers` int(10) NOT NULL default '0',
`rated` mediumtext NOT NULL,
`comments` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;");
echo "<br />NuTT Tables Added!<br /><br />";
// insert data
$DB_site->query("INSERT INTO `nutt_cats` VALUES (1, 'MP3', 0, 'mp3.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (2, 'Single', 0, 'single.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (3, 'Album', 0, 'album.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (4, 'PV', 0, 'pv.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (5, 'DVD', 0, 'dvd.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (6, 'Images', 0, 'img.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (7, 'TV', 0, 'tv.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (8, 'Performance', 0, 'perf.gif')");
$DB_site->query("INSERT INTO `nutt_cats` VALUES (9, 'Misc', 0, 'misc.gif')");
echo "<br />NuTT Tables Populated!<br /><br />";
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."usergroup ADD nuttpermissions INT(10) UNSIGNED DEFAULT '0' NOT NULL");
$DB_site->query("UPDATE ".TABLE_PREFIX."usergroup SET nuttpermissions='511' WHERE usergroupid='6'");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD uploaded BIGINT(20) DEFAULT '0' NOT NULL");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD downloaded BIGINT(20) DEFAULT '0' NOT NULL");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD tempuploaded BIGINT(20) DEFAULT '0' NOT NULL");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD tempdownloaded BIGINT(20) DEFAULT '0' NOT NULL");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD tempreset INT(10) UNSIGNED DEFAULT '0' NOT NULL");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD passkey VARCHAR(32) DEFAULT '0' NOT NULL");
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD agent VARCHAR(255) DEFAULT '0' NOT NULL");
echo "<br />vBulletin Tables Updated!<br /><br />";
}
this is from the nut_install.php , i need to know is it as simple as changing this
PHP Code:
$DB_site->query("CREATE TABLE `nutt_rate` (
`id` int(11) NOT NULL auto_increment,
`rate` int(11) NOT NULL default '0',
`torrent` int(11) NOT NULL default '0',
`userid` int(11) NOT NULL default '0',
`ip` varchar(62) NOT NULL default '',
`time` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;");
to this???
PHP Code:
$DB_site->query("CREATE TABLE . TABLE PREFIX. `nutt_rate` (
`id` int(11) NOT NULL auto_increment,
`rate` int(11) NOT NULL default '0',
`torrent` int(11) NOT NULL default '0',
`userid` int(11) NOT NULL default '0',
`ip` varchar(62) NOT NULL default '',
`time` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;");
And if so what other files do i need to edit that call to the tables
|