View Single Post
  #473  
Old 01-20-2007, 06:27 PM
Vampyre's Avatar
Vampyre Vampyre is offline
 
Join Date: Jun 2003
Location: Down Under
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks, syrus.xl, for releasing this as a free version for vB licensees.

Quote:
Originally Posted by Allan View Post
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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05684 seconds
  • Memory Usage 1,827KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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