Vergleich install/resources/upgrade1.php - 1.2.0 - 1.2.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 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: upgrade1.php 1930 2006-07-12 02:00:11Z chris $

 * $Id: upgrade1.php 3030 2007-04-26 00:19:47Z Tikitiki $

 */

/**

 */

/**

Zeile 26Zeile 26
	$output->print_header("Database Changes since Release Candidate 2");

$contents .= "<p>Making necessary database modifications...";

	$output->print_header("Database Changes since Release Candidate 2");

$contents .= "<p>Making necessary database modifications...";

	$db->query("ALTER TABLE users ADD regip varchar(50) NOT NULL;");






	
if(!$db->field_exists('regip', "users"))
{
$db->query("ALTER TABLE users ADD regip varchar(50) NOT NULL;");
}


	$db->query("ALTER TABLE banned CHANGE lifted lifted varchar(40) NOT NULL;");

	$db->query("ALTER TABLE banned CHANGE lifted lifted varchar(40) NOT NULL;");

	
$db->query("ALTER TABLE attachments ADD posthash varchar(50) NOT NULL AFTER pid;");
$db->query("ALTER TABLE attachments ADD thumbnail blob NOT NULL");
$db->query("ALTER TABLE attachments ADD thumbnailsm char(3) NOT NULL;");













		
if(!$db->field_exists('posthash', "attachments"))
{
$db->query("ALTER TABLE attachments ADD posthash varchar(50) NOT NULL AFTER pid;");
}

if(!$db->field_exists('thumbnail', "attachments"))
{
$db->query("ALTER TABLE attachments ADD thumbnail blob NOT NULL");
}

if(!$db->field_exists('thumbnailsm', "attachments"))
{
$db->query("ALTER TABLE attachments ADD thumbnailsm char(3) NOT NULL;");
}


	$db->query("DELETE FROM attachtypes");
$db->query("INSERT INTO attachtypes VALUES(NULL,'Compressed Archive','','zip gz tar rar ace cab','1024');");
$db->query("INSERT INTO attachtypes VALUES(NULL,'JPEG Image','','jpg jpe jpeg','500');");

	$db->query("DELETE FROM attachtypes");
$db->query("INSERT INTO attachtypes VALUES(NULL,'Compressed Archive','','zip gz tar rar ace cab','1024');");
$db->query("INSERT INTO attachtypes VALUES(NULL,'JPEG Image','','jpg jpe jpeg','500');");

Zeile 45Zeile 60
	$db->query("INSERT INTO attachtypes VALUES(NULL,'Microsoft Word Document','','doc rtf','1024');");
$db->query("INSERT INTO attachtypes VALUES(NULL,'Executable','','exe com bat','1024');");


	$db->query("INSERT INTO attachtypes VALUES(NULL,'Microsoft Word Document','','doc rtf','1024');");
$db->query("INSERT INTO attachtypes VALUES(NULL,'Executable','','exe com bat','1024');");


	$db->query("ALTER TABLE themes DROP small;");
$db->query("ALTER TABLE themes DROP smallend;");
$db->query("ALTER TABLE themes DROP font;");
$db->query("ALTER TABLE themes DROP fontend;");
$db->query("ALTER TABLE themes DROP large;");
$db->query("ALTER TABLE themes DROP largeend;");
$db->query("ALTER TABLE themes ADD smallfont varchar(150) NOT NULL;");
$db->query("ALTER TABLE themes ADD smallfontsize varchar(20) NOT NULL;");
$db->query("ALTER TABLE themes ADD normalfont varchar(150) NOT NULL;");
$db->query("ALTER TABLE themes ADD normalfontsize varchar(20) NOT NULL;");
$db->query("ALTER TABLE themes ADD largefont varchar(150) NOT NULL;");
$db->query("ALTER TABLE themes ADD largefontsize varchar(20) NOT NULL;");
$db->query("ALTER TABLE themes ADD menubgcolor varchar(15) NOT NULL;");
$db->query("ALTER TABLE themes ADD menubgimage varchar(100) NOT NULL;");
$db->query("ALTER TABLE themes ADD menucolor varchar(15) NOT NULL;");
$db->query("ALTER TABLE themes ADD menuhoverbgcolor varchar(15) NOT NULL;");
$db->query("ALTER TABLE themes ADD menuhoverbgimage varchar(100) NOT NULL;");
$db->query("ALTER TABLE themes ADD menuhovercolor varchar(15) NOT NULL;");
$db->query("ALTER TABLE themes ADD panelbgcolor varchar(15) NOT NULL;");
$db->query("ALTER TABLE themes ADD panelbgimage varchar(100) NOT NULL;");
$db->query("ALTER TABLE themes ADD linkhover varchar(15) NOT NULL AFTER link;");






































































	if($db->field_exists('small', "themes"))
{
$db->query("ALTER TABLE themes DROP small;");
}
if($db->field_exists('smallend', "themes"))
{
$db->query("ALTER TABLE themes DROP smallend;");
}
if($db->field_exists('font', "themes"))
{
$db->query("ALTER TABLE themes DROP font;");
}
if($db->field_exists('frontend', "themes"))
{
$db->query("ALTER TABLE themes DROP fontend;");
}
if($db->field_exists('large', "themes"))
{
$db->query("ALTER TABLE themes DROP large;");
}
if($db->field_exists('largeend', "themes"))
{
$db->query("ALTER TABLE themes DROP largeend;");
}

if(!$db->field_exists('smallfont', "themes"))
{
$db->query("ALTER TABLE themes ADD smallfont varchar(150) NOT NULL;");
}
if(!$db->field_exists('smallfontsize', "themes"))
{
$db->query("ALTER TABLE themes ADD smallfontsize varchar(20) NOT NULL;");
}
if(!$db->field_exists('normalfont', "themes"))
{
$db->query("ALTER TABLE themes ADD normalfont varchar(150) NOT NULL;");
}
if(!$db->field_exists('normalfontsize', "themes"))
{
$db->query("ALTER TABLE themes ADD normalfontsize varchar(20) NOT NULL;");
}
if(!$db->field_exists('largefont', "themes"))
{
$db->query("ALTER TABLE themes ADD largefont varchar(150) NOT NULL;");
}
if(!$db->field_exists('largefontsize', "themes"))
{
$db->query("ALTER TABLE themes ADD largefontsize varchar(20) NOT NULL;");
}
if(!$db->field_exists('menubgcolor', "themes"))
{
$db->query("ALTER TABLE themes ADD menubgcolor varchar(15) NOT NULL;");
}
if(!$db->field_exists('menubgimage', "themes"))
{
$db->query("ALTER TABLE themes ADD menubgimage varchar(100) NOT NULL;");
}
if(!$db->field_exists('menucolor', "themes"))
{
$db->query("ALTER TABLE themes ADD menucolor varchar(15) NOT NULL;");
}
if(!$db->field_exists('menuhoverbgcolor', "themes"))
{
$db->query("ALTER TABLE themes ADD menuhoverbgcolor varchar(15) NOT NULL;");
}
if(!$db->field_exists('menuhoverbgimage', "themes"))
{
$db->query("ALTER TABLE themes ADD menuhoverbgimage varchar(100) NOT NULL;");
}
if(!$db->field_exists('menuhovercolor', "themes"))
{
$db->query("ALTER TABLE themes ADD menuhovercolor varchar(15) NOT NULL;");
}
if(!$db->field_exists('panelbgcolor', "themes"))
{
$db->query("ALTER TABLE themes ADD panelbgcolor varchar(15) NOT NULL;");
}
if(!$db->field_exists('panelbgimage', "themes"))
{
$db->query("ALTER TABLE themes ADD panelbgimage varchar(100) NOT NULL;");
}
if(!$db->field_exists('linkhover', "themes"))
{
$db->query("ALTER TABLE themes ADD linkhover varchar(15) NOT NULL AFTER link;");
}
if(!$db->field_exists('extracss', "themes"))
{
$db->query("ALTER TABLE themes ADD extracss varchar(10) NOT NULL AFTER linkhover;");
}


	$db->query("UPDATE themes SET linkhover='#000000'");

$db->query("UPDATE themes SET smallfont='Verdana', smallfontsize='11px', normalfont='Verdana', normalfontsize='13px', largefont='Verdana', largefontsize='20px';");

$contents .= "done</p>";


	$db->query("UPDATE themes SET linkhover='#000000'");

$db->query("UPDATE themes SET smallfont='Verdana', smallfontsize='11px', normalfont='Verdana', normalfontsize='13px', largefont='Verdana', largefontsize='20px';");

$contents .= "done</p>";


	$db->query("DROP TABLE settinggroups;");

	$db->query("DROP TABLE IF EXISTS settinggroups;");

	$db->query("CREATE TABLE settinggroups (
gid smallint(6) NOT NULL auto_increment,
name varchar(220) NOT NULL default '',

	$db->query("CREATE TABLE settinggroups (
gid smallint(6) NOT NULL auto_increment,
name varchar(220) NOT NULL default '',

Zeile 82Zeile 166
	  PRIMARY KEY  (gid)
);");


	  PRIMARY KEY  (gid)
);");


	$db->query("DROP TABLE settings;");

	$db->query("DROP TABLE IF EXISTS settings;");

	$db->query("CREATE TABLE settings (
sid smallint(6) NOT NULL auto_increment,
name varchar(120) NOT NULL default '',

	$db->query("CREATE TABLE settings (
sid smallint(6) NOT NULL auto_increment,
name varchar(120) NOT NULL default '',

Zeile 181Zeile 265
	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (1, 'boardclosed', 'Board Closed', 'If you need to close your forums to make some changes or perform an upgrade, this is the global switch. Viewers will not be able to view your forums, however, they will see a message with the reason you specify below.<br />\r\n<br />\r\n<b>Administrators will still be able to view the forums.</b>', 'yesno', 'no', 1, 26);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (2, 'boardclosed_reason', 'Board Closed Reason', 'If your forum is closed, you can set a message here that your visitors will be able to see when they visit your forums.', 'textarea', 'These forums are currently closed for maintenance. Please check back later.', 2, 26);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (3, 'bbname', 'Board Name', 'The name of your message boards. We recommend that it is not over 75 characters.', 'text', 'MyBB Community Forums', 1, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (1, 'boardclosed', 'Board Closed', 'If you need to close your forums to make some changes or perform an upgrade, this is the global switch. Viewers will not be able to view your forums, however, they will see a message with the reason you specify below.<br />\r\n<br />\r\n<b>Administrators will still be able to view the forums.</b>', 'yesno', 'no', 1, 26);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (2, 'boardclosed_reason', 'Board Closed Reason', 'If your forum is closed, you can set a message here that your visitors will be able to see when they visit your forums.', 'textarea', 'These forums are currently closed for maintenance. Please check back later.', 2, 26);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (3, 'bbname', 'Board Name', 'The name of your message boards. We recommend that it is not over 75 characters.', 'text', 'MyBB Community Forums', 1, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (4, 'bburl', 'Board URL', 'The url to your forums.<br />Include the http://. Do NOT include a trailing slash.', 'text', 'http://www.mybboard.com/community', 2, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (4, 'bburl', 'Board URL', 'The url to your forums.<br />Include the http://. Do NOT include a trailing slash.', 'text', 'http://www.mybboard.net/community', 2, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (5, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (5, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (6, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (6, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (7, 'reportviapms', 'Send Reported Posts via PMS', 'Do you want to send reported post messages via the private messaging function to moderators?', 'yesno', 'yes', 5, 8);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (8, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (7, 'reportviapms', 'Send Reported Posts via PMS', 'Do you want to send reported post messages via the private messaging function to moderators?', 'yesno', 'yes', 5, 8);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (8, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (9, 'adminemail', 'Admin Email', 'The administrator\'s email address. This will be used for outgoing emails sent via the forums.', 'text', 'contact@mybboard.com', 1, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (9, 'adminemail', 'Admin Email', 'The administrator\'s email address. This will be used for outgoing emails sent via the forums.', 'text', 'contact@mybboard.net', 1, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (10, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (11, 'threadsperpage', 'Threads Per Page', '', 'text', '20', 1, 7);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (12, 'stickyprefix', 'Sticky Threads Prefix', 'The prefix of topics which have been made sticky by a moderator or administrator.', 'text', '<b>Sticky:</b>', 2, 7);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (10, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (11, 'threadsperpage', 'Threads Per Page', '', 'text', '20', 1, 7);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (12, 'stickyprefix', 'Sticky Threads Prefix', 'The prefix of topics which have been made sticky by a moderator or administrator.', 'text', '<b>Sticky:</b>', 2, 7);");

Zeile 222Zeile 306
	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (42, 'bannedusernames', 'Banned Usernames', 'Ban users from registering certain usernames.  Seperate them with a space.', 'textarea', 'drcracker Oops! hmmm', 1, 14);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (43, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (44, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (42, 'bannedusernames', 'Banned Usernames', 'Ban users from registering certain usernames.  Seperate them with a space.', 'textarea', 'drcracker Oops! hmmm', 1, 14);");
$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (43, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (44, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (45, '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', 2, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (45, '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', 2, 1);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (46, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (47, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (48, 'showwol', 'Show Who\'s Online?', 'Display the currently active users on the forum home page.', 'yesno', 'yes', 4, 16);");

	$db->query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (46, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (47, '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 `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (48, 'showwol', 'Show Who\'s Online?', 'Display the currently active users on the forum home page.', 'yesno', 'yes', 4, 16);");