Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: upgrade2.php 1930 2006-07-12 02:00:11Z chris $
| * $Id: upgrade2.php 3030 2007-04-26 00:19:47Z Tikitiki $
|
*/
/**
| */
/**
|
Zeile 26 | Zeile 26 |
---|
$output->print_header("Database Changes since Release Candidate 3");
$contents .= "<p>Making necessary database modifications...";
|
$output->print_header("Database Changes since Release Candidate 3");
$contents .= "<p>Making necessary database modifications...";
|
| $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."badwords");
|
$db->query("CREATE TABLE ".TABLE_PREFIX."badwords ( bid smallint(6) NOT NULL auto_increment, badword varchar(100) NOT NULL,
| $db->query("CREATE TABLE ".TABLE_PREFIX."badwords ( bid smallint(6) NOT NULL auto_increment, badword varchar(100) NOT NULL,
|
Zeile 33 | Zeile 35 |
---|
PRIMARY KEY(bid) );");
|
PRIMARY KEY(bid) );");
|
$db->query("ALTER TABLE ".TABLE_PREFIX."attachtypes ADD icon varchar(100) NOT NULL;");
| if(!$db->field_exists("icon", TABLE_PREFIX."attachtypes")) { $db->query("ALTER TABLE ".TABLE_PREFIX."attachtypes ADD icon varchar(100) NOT NULL;"); }
|
$db->query("DELETE FROM ".TABLE_PREFIX."attachtypes;");
$db->query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (1, 'Zip File', 'application/zip', 'zip', 1024, 'images/attachtypes/zip.gif');");
| $db->query("DELETE FROM ".TABLE_PREFIX."attachtypes;");
$db->query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (1, 'Zip File', 'application/zip', 'zip', 1024, 'images/attachtypes/zip.gif');");
|
Zeile 52 | Zeile 57 |
---|
$db->query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (15, '', 'application/pdf', 'pdf', 2048, 'images/attachtypes/pdf.gif');"); $db->query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (16, '', 'image/bmp', 'bmp', 500, 'images/attachtypes/image.gif');");
|
$db->query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (15, '', 'application/pdf', 'pdf', 2048, 'images/attachtypes/pdf.gif');"); $db->query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (16, '', 'image/bmp', 'bmp', 500, 'images/attachtypes/image.gif');");
|
$db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD outerwidth varchar(15) NOT NULL;"); $db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD outercolor varchar(15) NOT NULL;");
| if(!$db->field_exists("outerwidth", TABLE_PREFIX."themes")) { $db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD outerwidth varchar(15) NOT NULL;"); } if(!$db->field_exists("icon", TABLE_PREFIX."themes")) { $db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD outercolor varchar(15) NOT NULL;"); }
|
$db->query("ALTER TABLE ".TABLE_PREFIX."themes CHANGE body bodybgcolor varchar(15) NOT NULL;");
|
$db->query("ALTER TABLE ".TABLE_PREFIX."themes CHANGE body bodybgcolor varchar(15) NOT NULL;");
|
$db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD bodybgimage varchar(100) NOT NULL default '' AFTER bodybgcolor;"); $db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD bodybgimageattributes varchar(100) NOT NULL default '' AFTER bodybgimage;");
| if(!$db->field_exists("bodybgimage", TABLE_PREFIX."themes")) { $db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD bodybgimage varchar(100) NOT NULL default '' AFTER bodybgcolor;"); } if(!$db->field_exists("bodybgimageattributes", TABLE_PREFIX."themes")) { $db->query("ALTER TABLE ".TABLE_PREFIX."themes ADD bodybgimageattributes varchar(100) NOT NULL default '' AFTER bodybgimage;"); }
|
$db->query("UPDATE ".TABLE_PREFIX."themes SET outerwidth='0', bodybgcolor='#e3e3e3', bodybgimage='images/Light/logo_bg.png', bodybgimageattributes='repeat-x'");
|
$db->query("UPDATE ".TABLE_PREFIX."themes SET outerwidth='0', bodybgcolor='#e3e3e3', bodybgimage='images/Light/logo_bg.png', bodybgimageattributes='repeat-x'");
|
| $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."regimages;");
|
$db->query("CREATE TABLE ".TABLE_PREFIX."regimages ( imagehash varchar(32) NOT NULL, imagestring varchar(8) NOT NULL,
| $db->query("CREATE TABLE ".TABLE_PREFIX."regimages ( imagehash varchar(32) NOT NULL, imagestring varchar(8) NOT NULL,
|
Zeile 67 | Zeile 87 |
---|
$db->query("UPDATE ".TABLE_PREFIX."adminoptions SET cpstyle=''");
|
$db->query("UPDATE ".TABLE_PREFIX."adminoptions SET cpstyle=''");
|
$db->query("ALTER TABLE ".TABLE_PREFIX."users ADD language varchar(50) NOT NULL;"); $db->query("ALTER TABLE ".TABLE_PREFIX."users ADD timeonline bigint(30) NOT NULL default '0';"); $db->query("ALTER TABLE ".TABLE_PREFIX."users ADD showcodebuttons int(1) NOT NULL default '1';");
| if(!$db->field_exists("language", TABLE_PREFIX."users")) { $db->query("ALTER TABLE ".TABLE_PREFIX."users ADD language varchar(50) NOT NULL;"); } if(!$db->field_exists("timeonline", TABLE_PREFIX."users")) { $db->query("ALTER TABLE ".TABLE_PREFIX."users ADD timeonline bigint(30) NOT NULL default '0';"); } if(!$db->field_exists("showcodebuttons", TABLE_PREFIX."users")) { $db->query("ALTER TABLE ".TABLE_PREFIX."users ADD showcodebuttons int(1) NOT NULL default '1';"); }
|
$db->query("UPDATE ".TABLE_PREFIX."users SET language='english', showcodebuttons=1");
|
$db->query("UPDATE ".TABLE_PREFIX."users SET language='english', showcodebuttons=1");
|
$db->query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation ADD oldgroup bigint(30) NOT NULL;"); $db->query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation ADD misc varchar(255) NOT NULL;");
| if(!$db->field_exists("oldgroup", TABLE_PREFIX."awaitingactivation")) { $db->query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation ADD oldgroup bigint(30) NOT NULL;"); } if(!$db->field_exists("misc", TABLE_PREFIX."awaitingactivation")) { $db->query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation ADD misc varchar(255) NOT NULL;"); }
|
$db->query("DELETE FROM ".TABLE_PREFIX."awaitingactivation WHERE type='e'");
|
$db->query("DELETE FROM ".TABLE_PREFIX."awaitingactivation WHERE type='e'");
|
$db->query("DROP TABLE ".TABLE_PREFIX."settings;");
| $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."settings;");
|
$db->query("CREATE TABLE ".TABLE_PREFIX."settings ( sid smallint(6) NOT NULL auto_increment, name varchar(120) NOT NULL default '',
| $db->query("CREATE TABLE ".TABLE_PREFIX."settings ( sid smallint(6) NOT NULL auto_increment, name varchar(120) NOT NULL default '',
|
Zeile 89 | Zeile 124 |
---|
PRIMARY KEY (sid) );");
|
PRIMARY KEY (sid) );");
|
| $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."reportedposts;");
|
$db->query("CREATE TABLE ".TABLE_PREFIX."reportedposts ( rid smallint(6) NOT NULL auto_increment, pid smallint(6) NOT NULL,
| $db->query("CREATE TABLE ".TABLE_PREFIX."reportedposts ( rid smallint(6) NOT NULL auto_increment, pid smallint(6) NOT NULL,
|
Zeile 101 | Zeile 137 |
---|
PRIMARY KEY (rid) );");
|
PRIMARY KEY (rid) );");
|
| $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."threadsread;");
|
$db->query("CREATE TABLE ".TABLE_PREFIX."threadsread ( tid smallint(6) NOT NULL, uid smallint(6) NOT NULL,
| $db->query("CREATE TABLE ".TABLE_PREFIX."threadsread ( tid smallint(6) NOT NULL, uid smallint(6) NOT NULL,
|
Zeile 125 | Zeile 162 |
---|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bbname', 'Board Name', 'The name of your message boards. We recommend that it is not over 75 characters.', 'text', 'MyBB Forums', 1, 1);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bburl', 'Board URL', 'The url to your forums.<br />Include the http://. Do NOT include a trailing slash.', 'text', '', 2, 1);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'homename', 'Homepage Name', 'The name of your homepage. This will appear in the footer with a link to it.', 'text', 'MyBB', 3, 1);");
|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bbname', 'Board Name', 'The name of your message boards. We recommend that it is not over 75 characters.', 'text', 'MyBB Forums', 1, 1);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bburl', 'Board URL', 'The url to your forums.<br />Include the http://. Do NOT include a trailing slash.', 'text', '', 2, 1);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'homename', 'Homepage Name', 'The name of your homepage. This will appear in the footer with a link to it.', 'text', 'MyBB', 3, 1);");
|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'homeurl', 'Homepage URL', 'The full URL of your homepage. This will be linked to in the footer along with its name.', 'text', 'http://www.mybboard.com', 4, 1);");
| $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'homeurl', 'Homepage URL', 'The full URL of your homepage. This will be linked to in the footer along with its name.', 'text', 'http://www.mybboard.net', 4, 1);");
|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'dateformat', 'Date Format', 'The format of the dates used on the forum. This format uses the PHP date() function. We recommend not changing this unless you know what you\'re doing.', 'text', 'm-d-Y', 1, 3);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'adminemail', 'Admin Email', 'The administrator\'s email address. This will be used for outgoing emails sent via the forums.', 'text', '', 5, 1);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'timeformat', 'Time Format', 'The format of the times used on the forum. This format uses PHP\'s date() function. We recommend not changing this unless you know what you\'re doing.', 'text', 'h:i A', 2, 3);");
| $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'dateformat', 'Date Format', 'The format of the dates used on the forum. This format uses the PHP date() function. We recommend not changing this unless you know what you\'re doing.', 'text', 'm-d-Y', 1, 3);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'adminemail', 'Admin Email', 'The administrator\'s email address. This will be used for outgoing emails sent via the forums.', 'text', '', 5, 1);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'timeformat', 'Time Format', 'The format of the times used on the forum. This format uses PHP\'s date() function. We recommend not changing this unless you know what you\'re doing.', 'text', 'h:i A', 2, 3);");
|
Zeile 163 | Zeile 200 |
---|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bannedusernames', 'Banned Usernames', 'Ban users from registering certain usernames. Seperate them with a space.', 'textarea', 'drcracker Oops! hmmm', 1, 14);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxpolloptions', 'Maximum Number of Poll Options', 'The maximum number of options for polls that users can post.', 'text', '10', 3, 13);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'dotfolders', 'Use \'dot\' Icons', 'Do you want to show dots on the thread indicators of threads users have participated in.', 'yesno', 'yes', 8, 7);");
|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bannedusernames', 'Banned Usernames', 'Ban users from registering certain usernames. Seperate them with a space.', 'textarea', 'drcracker Oops! hmmm', 1, 14);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxpolloptions', 'Maximum Number of Poll Options', 'The maximum number of options for polls that users can post.', 'text', '10', 3, 13);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'dotfolders', 'Use \'dot\' Icons', 'Do you want to show dots on the thread indicators of threads users have participated in.', 'yesno', 'yes', 8, 7);");
|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'contactlink', 'Contact Us Link', 'This will be used for the Contact Us link on the bottom of all the forum pages. Can either be an email address (using mailto:email@website.com) or a hyperlink.', 'text', 'mailto:contact@mybboard.com', 6, 1);");
| $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'contactlink', 'Contact Us Link', 'This will be used for the Contact Us link on the bottom of all the forum pages. Can either be an email address (using mailto:email@website.com) or a hyperlink.', 'text', 'mailto:contact@mybboard.net', 6, 1);");
|
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showdescriptions', 'Show Forum Descriptions?', 'This option will allow you to turn off showing the descriptions for forums.', 'yesno', 'yes', 1, 16);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showbirthdays', 'Show Today\'s Birthdays?', 'Do you want to show today\'s birthdays on the forum homepage?', 'yesno', 'yes', 2, 16);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showwol', 'Show Who\'s Online?', 'Display the currently active users on the forum home page.', 'yesno', 'yes', 4, 16);");
| $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showdescriptions', 'Show Forum Descriptions?', 'This option will allow you to turn off showing the descriptions for forums.', 'yesno', 'yes', 1, 16);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showbirthdays', 'Show Today\'s Birthdays?', 'Do you want to show today\'s birthdays on the forum homepage?', 'yesno', 'yes', 2, 16);"); $db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showwol', 'Show Who\'s Online?', 'Display the currently active users on the forum home page.', 'yesno', 'yes', 4, 16);");
|