Many thanks, syrus.xl, for releasing this as a free version for vB licensees.
Quote:
Originally Posted by Allan
In xml file, find:
Code:
<codes>
<code version="beta 1">
<installcode><![CDATA[$db->reporterror = 0;
echo "Adding Tables<br /><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist1</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist1 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist2</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist2 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist3</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist3 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist4</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist4 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist5</font><br />";
$vbulletin->db->query_write("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "mp3player_settings (
active int(11) NOT NULL default '0',
pmadminid int(11) NOT NULL default '0',
pmactive int(11) NOT NULL default '0',
pmadminname varchar(150) NOT NULL default '',
pmadmintitle varchar(150) NOT NULL default '',
pmadmintext varchar(255) NOT NULL default '',
approvemp3 int(11) NOT NULL default '0')");
echo "<font size=\"1\">Added Table - mp3player_settings</font><br />";
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "mp3player_settings VALUES (1, 1, 1, 'ADMIN NAME', 'New MP3 Added', 'This is a test to see if the pm system works', 0)");
echo "<font size=\"1\">Settings Added</font><br />";
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup ADD COLUMN mp3playergrouppermissions INT(10) UNSIGNED NOT NULL DEFAULT '0'");
echo "<font size=\"1\">Added usergroup - Permissions</font><br />";
// Rebuild Bitfields
require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
build_forum_permissions();
echo "<font size=\"1\">vB Bitfield Builder Done</font><br />";]]></installcode>
<uninstallcode><![CDATA[$db->query("DELETE FROM " . TABLE_PREFIX . "template WHERE title LIKE 'mp3player_%'");
$db->query("DELETE FROM " . TABLE_PREFIX . "template WHERE title='mp3player'");
$db->query("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname LIKE 'mp3player_%'");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist1
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist2
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist3
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist4
");]]></uninstallcode>
</code>
</codes>
Replace with:
Code:
<codes>
<code version="beta 1">
<installcode><![CDATA[$db->reporterror = 0;
echo "Adding Tables<br /><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
`approvemp3` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist1</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist1 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
`approvemp3` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist2</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist2 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
`approvemp3` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist3</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist3 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
`approvemp3` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist4</font><br />";
$vbulletin->db->query_write("CREATE TABLE ". TABLE_PREFIX ."mp3playlist4 (
`id` int(11) NOT NULL auto_increment,
`url_product` varchar(255) NOT NULL default '',
`url_product_stream` varchar(100) NOT NULL default '',
`url_product_buffer` int(1) NOT NULL default '0',
`mp3name` varchar(155) NOT NULL default '',
`approvemp3` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM");
echo "<font size=\"1\">Added Table - mp3playlist5</font><br />";
$vbulletin->db->query_write("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "mp3player_settings (
active int(11) NOT NULL default '0',
pmadminid int(11) NOT NULL default '0',
pmactive int(11) NOT NULL default '0',
pmadminname varchar(150) NOT NULL default '',
pmadmintitle varchar(150) NOT NULL default '',
pmadmintext varchar(255) NOT NULL default '',
approvemp3 int(11) NOT NULL default '0')");
echo "<font size=\"1\">Added Table - mp3player_settings</font><br />";
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "mp3player_settings VALUES (1, 1, 1, 'ADMIN NAME', 'New MP3 Added', 'This is a test to see if the pm system works', 0)");
echo "<font size=\"1\">Settings Added</font><br />";
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup ADD COLUMN mp3playergrouppermissions INT(10) UNSIGNED NOT NULL DEFAULT '0'");
echo "<font size=\"1\">Added usergroup - Permissions</font><br />";
// Rebuild Bitfields
require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
build_forum_permissions();
echo "<font size=\"1\">vB Bitfield Builder Done</font><br />";]]></installcode>
<uninstallcode><![CDATA[$db->query("DELETE FROM " . TABLE_PREFIX . "template WHERE title LIKE 'mp3player_%'");
$db->query("DELETE FROM " . TABLE_PREFIX . "template WHERE title='mp3player'");
$db->query("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname LIKE 'mp3player_%'");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist1
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist2
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist3
");
$db->query("
DROP TABLE IF EXISTS " . TABLE_PREFIX . "mp3playlist4
");]]></uninstallcode>
</code>
</codes>
PS: Thanks Sofia ^^
|
Thanks for the update, Allan.:up:
It's installed like a charm.
|