inital commit
This commit is contained in:
207
webroot/forum/install/resources/adminoptions.xml
Normal file
207
webroot/forum/install/resources/adminoptions.xml
Normal file
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<adminoptions>
|
||||
<user uid="0">
|
||||
<defaultviews>
|
||||
<view type="user">1</view>
|
||||
</defaultviews>
|
||||
<permissions>
|
||||
<module name="config">
|
||||
<permission name="tab">0</permission>
|
||||
<permission name="settings">0</permission>
|
||||
<permission name="banning">0</permission>
|
||||
<permission name="profile_fields">0</permission>
|
||||
<permission name="smilies">0</permission>
|
||||
<permission name="badwords">0</permission>
|
||||
<permission name="mycode">0</permission>
|
||||
<permission name="languages">0</permission>
|
||||
<permission name="post_icons">0</permission>
|
||||
<permission name="help_documents">0</permission>
|
||||
<permission name="plugins">0</permission>
|
||||
<permission name="attachment_types">0</permission>
|
||||
<permission name="mod_tools">0</permission>
|
||||
<permission name="spiders">0</permission>
|
||||
<permission name="calendars">0</permission>
|
||||
<permission name="warning">0</permission>
|
||||
<permission name="thread_prefixes">0</permission>
|
||||
<permission name="questions">0</permission>
|
||||
<permission name="report_reasons">0</permission>
|
||||
</module>
|
||||
<module name="forum">
|
||||
<permission name="tab">0</permission>
|
||||
<permission name="management">0</permission>
|
||||
<permission name="announcements">0</permission>
|
||||
<permission name="moderation_queue">0</permission>
|
||||
<permission name="attachments">0</permission>
|
||||
</module>
|
||||
<module name="style">
|
||||
<permission name="tab">0</permission>
|
||||
<permission name="themes">0</permission>
|
||||
<permission name="templates">0</permission>
|
||||
</module>
|
||||
<module name="tools">
|
||||
<permission name="tab">0</permission>
|
||||
<permission name="system_health">0</permission>
|
||||
<permission name="cache">0</permission>
|
||||
<permission name="tasks">0</permission>
|
||||
<permission name="backupdb">0</permission>
|
||||
<permission name="optimizedb">0</permission>
|
||||
<permission name="adminlog">0</permission>
|
||||
<permission name="modlog">0</permission>
|
||||
<permission name="recount_rebuild">0</permission>
|
||||
<permission name="php_info">1</permission>
|
||||
<permission name="spamlog">0</permission>
|
||||
<permission name="maillogs">0</permission>
|
||||
<permission name="mailerrors">0</permission>
|
||||
<permission name="warninglog">0</permission>
|
||||
<permission name="statistics">0</permission>
|
||||
<permission name="file_verification">0</permission>
|
||||
</module>
|
||||
<module name="user">
|
||||
<permission name="tab">0</permission>
|
||||
<permission name="users">0</permission>
|
||||
<permission name="groups">0</permission>
|
||||
<permission name="titles">0</permission>
|
||||
<permission name="banning">0</permission>
|
||||
<permission name="admin_permissions">0</permission>
|
||||
<permission name="mass_mail">0</permission>
|
||||
<permission name="group_promotions">0</permission>
|
||||
</module>
|
||||
</permissions>
|
||||
</user>
|
||||
<user uid="-4">
|
||||
<defaultviews>
|
||||
<view type="user">1</view>
|
||||
</defaultviews>
|
||||
<permissions>
|
||||
<module name="config">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="settings">1</permission>
|
||||
<permission name="banning">1</permission>
|
||||
<permission name="profile_fields">1</permission>
|
||||
<permission name="smilies">1</permission>
|
||||
<permission name="badwords">1</permission>
|
||||
<permission name="mycode">1</permission>
|
||||
<permission name="languages">1</permission>
|
||||
<permission name="post_icons">1</permission>
|
||||
<permission name="help_documents">1</permission>
|
||||
<permission name="plugins">1</permission>
|
||||
<permission name="attachment_types">1</permission>
|
||||
<permission name="mod_tools">1</permission>
|
||||
<permission name="spiders">1</permission>
|
||||
<permission name="calendars">1</permission>
|
||||
<permission name="warning">1</permission>
|
||||
<permission name="thread_prefixes">1</permission>
|
||||
<permission name="questions">1</permission>
|
||||
<permission name="report_reasons">1</permission>
|
||||
</module>
|
||||
<module name="forum">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="management">1</permission>
|
||||
<permission name="announcements">1</permission>
|
||||
<permission name="moderation_queue">1</permission>
|
||||
<permission name="attachments">1</permission>
|
||||
</module>
|
||||
<module name="style">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="themes">1</permission>
|
||||
<permission name="templates">1</permission>
|
||||
</module>
|
||||
<module name="tools">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="system_health">1</permission>
|
||||
<permission name="cache">1</permission>
|
||||
<permission name="tasks">1</permission>
|
||||
<permission name="backupdb">1</permission>
|
||||
<permission name="optimizedb">1</permission>
|
||||
<permission name="adminlog">1</permission>
|
||||
<permission name="modlog">1</permission>
|
||||
<permission name="recount_rebuild">1</permission>
|
||||
<permission name="php_info">1</permission>
|
||||
<permission name="spamlog">1</permission>
|
||||
<permission name="maillogs">1</permission>
|
||||
<permission name="mailerrors">1</permission>
|
||||
<permission name="warninglog">1</permission>
|
||||
<permission name="statistics">1</permission>
|
||||
<permission name="file_verification">1</permission>
|
||||
</module>
|
||||
<module name="user">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="users">1</permission>
|
||||
<permission name="groups">1</permission>
|
||||
<permission name="titles">1</permission>
|
||||
<permission name="banning">1</permission>
|
||||
<permission name="admin_permissions">1</permission>
|
||||
<permission name="mass_mail">1</permission>
|
||||
<permission name="group_promotions">1</permission>
|
||||
</module>
|
||||
</permissions>
|
||||
</user>
|
||||
<user uid="1">
|
||||
<defaultviews>
|
||||
<view type="user">1</view>
|
||||
</defaultviews>
|
||||
<permissions>
|
||||
<module name="config">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="settings">1</permission>
|
||||
<permission name="banning">1</permission>
|
||||
<permission name="profile_fields">1</permission>
|
||||
<permission name="smilies">1</permission>
|
||||
<permission name="badwords">1</permission>
|
||||
<permission name="mycode">1</permission>
|
||||
<permission name="languages">1</permission>
|
||||
<permission name="post_icons">1</permission>
|
||||
<permission name="help_documents">1</permission>
|
||||
<permission name="plugins">1</permission>
|
||||
<permission name="attachment_types">1</permission>
|
||||
<permission name="mod_tools">1</permission>
|
||||
<permission name="spiders">1</permission>
|
||||
<permission name="calendars">1</permission>
|
||||
<permission name="warning">1</permission>
|
||||
<permission name="thread_prefixes">1</permission>
|
||||
<permission name="questions">1</permission>
|
||||
<permission name="report_reasons">1</permission>
|
||||
</module>
|
||||
<module name="forum">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="management">1</permission>
|
||||
<permission name="announcements">1</permission>
|
||||
<permission name="moderation_queue">1</permission>
|
||||
<permission name="attachments">1</permission>
|
||||
</module>
|
||||
<module name="style">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="themes">1</permission>
|
||||
<permission name="templates">1</permission>
|
||||
</module>
|
||||
<module name="tools">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="system_health">1</permission>
|
||||
<permission name="cache">1</permission>
|
||||
<permission name="tasks">1</permission>
|
||||
<permission name="backupdb">1</permission>
|
||||
<permission name="optimizedb">1</permission>
|
||||
<permission name="recount_rebuild">1</permission>
|
||||
<permission name="php_info">1</permission>
|
||||
<permission name="adminlog">1</permission>
|
||||
<permission name="modlog">1</permission>
|
||||
<permission name="spamlog">1</permission>
|
||||
<permission name="maillogs">1</permission>
|
||||
<permission name="mailerrors">1</permission>
|
||||
<permission name="warninglog">1</permission>
|
||||
<permission name="statistics">1</permission>
|
||||
<permission name="file_verification">1</permission>
|
||||
</module>
|
||||
<module name="user">
|
||||
<permission name="tab">1</permission>
|
||||
<permission name="users">1</permission>
|
||||
<permission name="groups">1</permission>
|
||||
<permission name="titles">1</permission>
|
||||
<permission name="banning">1</permission>
|
||||
<permission name="admin_permissions">1</permission>
|
||||
<permission name="mass_mail">1</permission>
|
||||
<permission name="group_promotions">1</permission>
|
||||
</module>
|
||||
</permissions>
|
||||
</user>
|
||||
</adminoptions>
|
||||
19
webroot/forum/install/resources/adminviews.xml
Normal file
19
webroot/forum/install/resources/adminviews.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<adminviews version="1400" exported="1188690537">
|
||||
<view vid="1" uid="0" type="user" visibility="2">
|
||||
<title><![CDATA[All Users]]></title>
|
||||
<fields>
|
||||
<field name="avatar" />
|
||||
<field name="username" />
|
||||
<field name="email" />
|
||||
<field name="regdate" />
|
||||
<field name="lastactive" />
|
||||
<field name="postnum" />
|
||||
<field name="controls" />
|
||||
</fields>
|
||||
<sortby><![CDATA[username]]></sortby>
|
||||
<sortorder><![CDATA[asc]]></sortorder>
|
||||
<perpage><![CDATA[20]]></perpage>
|
||||
<view_type><![CDATA[card]]></view_type>
|
||||
</view>
|
||||
</adminviews>
|
||||
8
webroot/forum/install/resources/index.html
Normal file
8
webroot/forum/install/resources/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
374
webroot/forum/install/resources/language.lang.php
Normal file
374
webroot/forum/install/resources/language.lang.php
Normal file
@@ -0,0 +1,374 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8 English Language Pack
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
*/
|
||||
|
||||
/* INSTALL LANGUAGE VARIABLES */
|
||||
$l['none'] = 'None';
|
||||
$l['not_installed'] = 'Not Installed';
|
||||
$l['installed'] = 'Installed';
|
||||
$l['not_writable'] = 'Not Writable';
|
||||
$l['writable'] = 'Writable';
|
||||
$l['done'] = 'done';
|
||||
$l['next'] = 'Next';
|
||||
$l['error'] = 'Error';
|
||||
$l['multi_byte'] = 'Multi-Byte';
|
||||
$l['recheck'] = 'Recheck';
|
||||
|
||||
$l['title'] = "MyBB Installation Wizard";
|
||||
$l['welcome'] = 'Welcome';
|
||||
$l['license_agreement'] = 'License Agreement';
|
||||
$l['req_check'] = 'Requirements Check';
|
||||
$l['db_config'] = 'Database Configuration';
|
||||
$l['table_creation'] = 'Table Creation';
|
||||
$l['data_insertion'] = 'Data Insertion';
|
||||
$l['theme_install'] = 'Theme Installation';
|
||||
$l['board_config'] = 'Board Configuration';
|
||||
$l['admin_user'] = 'Administrator User';
|
||||
$l['finish_setup'] = 'Finish Setup';
|
||||
$l['upgrade_complete'] = 'Upgrade Complete';
|
||||
|
||||
$l['table_population'] = 'Table Population';
|
||||
$l['theme_installation'] = 'Theme Insertion';
|
||||
$l['create_admin'] = 'Create Administrator Account';
|
||||
|
||||
$l['already_installed'] = "MyBB is already installed";
|
||||
$l['mybb_already_installed'] = "<p>Welcome to the installation wizard for MyBB {1}. MyBB has detected it is already configured in this directory.</p>
|
||||
<p>Please choose a suitable action below:</p>
|
||||
|
||||
<div class=\"border_wrapper upgrade_note\" style=\"padding: 4px;\">
|
||||
<h3>Upgrade my existing copy of MyBB to {1} <span style=\"font-size: 80%; color: maroon;\">(Recommended)</span></h3>
|
||||
<p>This option will upgrade your current version of MyBB to MyBB {1}.</p>
|
||||
<p>You should choose this option when you wish to retain your current forum threads, posts, users and other information.</p>
|
||||
<form method=\"post\" action=\"upgrade.php\">
|
||||
<div class=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"Upgrade to MyBB {1} »\" /></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style=\"padding: 4px;\">
|
||||
<h3>Install a new copy of MyBB</h3>
|
||||
<p>This option will <span style=\"color: red;\">delete any existing forum you may have set up</span> and install a fresh version of MyBB.</p>
|
||||
<p>You should choose this option to erase your existing copy of MyBB if you wish to start again.</p>
|
||||
<form method=\"post\" action=\"index.php\" onsubmit=\"return confirm('Are you sure you wish to install a fresh copy of MyBB?\\n\\nThis will delete your existing forum. THIS PROCESS CANNOT BE UNDONE.');\">
|
||||
<input type=\"hidden\" name=\"action\" value=\"intro\" />
|
||||
<div class=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"Install MyBB {1} »\" /></div>
|
||||
</form>
|
||||
</div>";
|
||||
|
||||
$l['mybb_incorrect_folder'] = "<div class=\"border_wrapper upgrade_note\" style=\"padding: 4px;\">
|
||||
<h3>MyBB has detected that it is running from the \"Upload\" directory.</h3>
|
||||
<p>While there is nothing wrong with this, it is recommended that your upload the contents of the \"Upload\" directory and not the directory itself.<br /><br />For more information please see the <a href=\"https://docs.mybb.com/1.8/install/#uploading-files\" target=\"_blank\" rel=\"noopener\">MyBB Docs</a>.</p>
|
||||
</div>";
|
||||
|
||||
$l['welcome_step'] = '<p>Welcome to the installation wizard for MyBB {1}. This wizard will install and configure a copy of MyBB on your server.</p>
|
||||
<p>Now that you\'ve uploaded the MyBB files the database and settings need to be created and imported. Below is an outline of what is going to be completed during installation.</p>
|
||||
<ul>
|
||||
<li>MyBB requirements checked</li>
|
||||
<li>Configuration of database engine</li>
|
||||
<li>Creation of database tables</li>
|
||||
<li>Default data inserted</li>
|
||||
<li>Default themes and templates imported</li>
|
||||
<li>Creation of an administrator account to manage your board</li>
|
||||
<li>Basic board settings configured</li>
|
||||
</ul>
|
||||
<p>After each step has successfully been completed, click Next to move on to the next step.</p>
|
||||
<p>Click "Next" to view the MyBB license agreement.</p>
|
||||
<p><input type="checkbox" name="allow_anonymous_info" value="1" id="allow_anonymous" checked="checked" /> <label for="allow_anonymous"> Send anonymous statistics about your server specifications to the MyBB Group</label> (<a href="https://docs.mybb.com/1.8/install/anonymous-statistics/" style="color: #555;" target="_blank" rel="noopener"><small>What information is sent?</small></a>)</p>';
|
||||
|
||||
$l['license_step'] = '<div class="license_agreement">
|
||||
{1}
|
||||
</div>
|
||||
<p><strong>By clicking Next, you agree to the terms stated in the MyBB License Agreement above.</strong></p>';
|
||||
|
||||
|
||||
$l['req_step_top'] = '<p>Before you can install MyBB, we must check that you meet the minimum requirements for installation.</p>';
|
||||
$l['req_step_reqtable'] = '<div class="border_wrapper">
|
||||
<div class="title">Requirements Check</div>
|
||||
<table class="general" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Requirements</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="first">
|
||||
<td class="first">PHP Version:</td>
|
||||
<td class="last alt_col">{1}</td>
|
||||
</tr>
|
||||
<tr class="alt_row">
|
||||
<td class="first">Supported DB Extensions:</td>
|
||||
<td class="last alt_col">{2}</td>
|
||||
</tr>
|
||||
<tr class="alt_row">
|
||||
<td class="first">Supported Translation Extensions:</td>
|
||||
<td class="last alt_col">{3}</td>
|
||||
</tr>
|
||||
<tr class="alt_row">
|
||||
<td class="first">PHP XML Extensions:</td>
|
||||
<td class="last alt_col">{4}</td>
|
||||
</tr>
|
||||
<tr class="alt_row">
|
||||
<td class="first">Configuration File Writable:</td>
|
||||
<td class="last alt_col">{5}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="first">Settings File Writable:</td>
|
||||
<td class="last alt_col">{6}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="first">Cache Directory Writable:</td>
|
||||
<td class="last alt_col">{7}</td>
|
||||
</tr>
|
||||
<tr class="alt_row">
|
||||
<td class="first">File Uploads Directory Writable:</td>
|
||||
<td class="last alt_col">{8}</td>
|
||||
</tr>
|
||||
<tr class="last">
|
||||
<td class="first">Avatar Uploads Directory Writable:</td>
|
||||
<td class="last alt_col">{9}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>';
|
||||
$l['req_step_reqcomplete'] = '<p><strong>Congratulations, you meet the requirements to run MyBB.</strong></p>
|
||||
<p>Click Next to continue with the installation process.</p>';
|
||||
|
||||
$l['req_step_span_fail'] = '<span class="fail"><strong>{1}</strong></span>';
|
||||
$l['req_step_span_pass'] = '<span class="pass">{1}</span>';
|
||||
|
||||
$l['req_step_error_box'] = '<p><strong>{1}</strong></p>';
|
||||
$l['req_step_error_phpversion'] = 'MyBB Requires PHP 5.2.0 or later to run. You currently have {1} installed.';
|
||||
$l['req_step_error_dboptions'] = 'MyBB requires one or more suitable database extensions to be installed. Your server reported that none were available.';
|
||||
$l['req_step_error_xmlsupport'] = 'MyBB requires PHP to be compiled with support for XML Data Handling. Please see <a href="http://www.php.net/xml" target="_blank" rel="noopener">PHP.net</a> for more information.';
|
||||
$l['req_step_error_configdefaultfile'] = 'The configuration file (inc/config.default.php) could not be renamed. Please manually rename the <u>config.default.php</u> file to <u>config.php</u> to allow it to be written to or contact <a href="https://mybb.com/support" target="_blank" rel="noopener">MyBB Support.</a>';
|
||||
$l['req_step_error_configfile'] = 'The configuration file (inc/config.php) is not writable. Please adjust the <a href="https://docs.mybb.com/1.8/administration/security/file-permissions" target="_blank" rel="noopener">chmod</a> permissions to allow it to be written to.';
|
||||
$l['req_step_error_settingsfile'] = 'The settings file (inc/settings.php) is not writable. Please adjust the <a href="https://docs.mybb.com/1.8/administration/security/file-permissions" target="_blank" rel="noopener">chmod</a> permissions to allow it to be written to.';
|
||||
$l['req_step_error_cachedir'] = 'The cache directory (cache/) is not writable. Please adjust the <a href="https://docs.mybb.com/1.8/administration/security/file-permissions" target="_blank" rel="noopener">chmod</a> permissions to allow it to be written to.';
|
||||
$l['req_step_error_uploaddir'] = 'The uploads directory (uploads/) is not writable. Please adjust the <a href="https://docs.mybb.com/1.8/administration/security/file-permissions" target="_blank" rel="noopener">chmod</a> permissions to allow it to be written to.';
|
||||
$l['req_step_error_avatardir'] = 'The avatars directory (uploads/avatars/) is not writable. Please adjust the <a href="https://docs.mybb.com/1.8/administration/security/file-permissions" target="_blank" rel="noopener">chmod</a> permissions to allow it to be written to.';
|
||||
$l['req_step_error_cssddir'] = 'The css directory (css/) is not writable. Please adjust the <a href="https://docs.mybb.com/1.8/administration/security/file-permissions" target="_blank" rel="noopener">chmod</a> permissions to allow it to be written to.';
|
||||
$l['req_step_error_tablelist'] = '<div class="error">
|
||||
<h3>Error</h3>
|
||||
<p>The MyBB Requirements check failed due to the reasons below. MyBB installation cannot continue because you did not meet the MyBB requirements. Please correct the errors below and try again:</p>
|
||||
{1}
|
||||
</div>';
|
||||
|
||||
|
||||
$l['db_step_config_db'] = '<p>It is now time to configure the database that MyBB will use as well as your database authentication details. If you do not have this information, it can usually be obtained from your webhost.</p>';
|
||||
$l['db_step_config_table'] = '<div class="border_wrapper">
|
||||
<div class="title">Database Configuration</div>
|
||||
<table class="general" cellspacing="0">
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Database Settings</th>
|
||||
</tr>
|
||||
<tr class="first">
|
||||
<td class="first"><label for="dbengine">Database Engine:</label></td>
|
||||
<td class="last alt_col"><select name="dbengine" id="dbengine" onchange="updateDBSettings();">{1}</select></td>
|
||||
</tr>
|
||||
{2}
|
||||
</table>
|
||||
</div>
|
||||
<p>Once you\'ve checked these details are correct, click next to continue.</p>';
|
||||
|
||||
$l['database_settings'] = "Database Settings";
|
||||
$l['database_path'] = "Database Path:";
|
||||
$l['database_host'] = "Database Server Hostname:";
|
||||
$l['database_user'] = "Database Username:";
|
||||
$l['database_pass'] = "Database Password:";
|
||||
$l['database_name'] = "Database Name:";
|
||||
$l['table_settings'] = "Table Settings";
|
||||
$l['table_prefix'] = "Table Prefix:";
|
||||
$l['table_encoding'] = "Table Encoding:";
|
||||
|
||||
$l['db_step_error_config'] = '<div class="error">
|
||||
<h3>Error</h3>
|
||||
<p>There seems to be one or more errors with the database configuration information that you supplied:</p>
|
||||
{1}
|
||||
<p>Once the above are corrected, continue with the installation.</p>
|
||||
</div>';
|
||||
$l['db_step_error_invalidengine'] = 'You have selected an invalid database engine. Please make your selection from the list below.';
|
||||
$l['db_step_error_noconnect'] = 'Could not connect to the database server at \'{1}\' with the supplied username and password. Are you sure the hostname and user details are correct?';
|
||||
$l['db_step_error_nodbname'] = 'Could not select the database \'{1}\'. Are you sure it exists and the specified username and password have access to it?';
|
||||
$l['db_step_error_missingencoding'] = 'You have not selected an encoding yet. Please make sure you selected an encoding before continuing. (Select \'UTF-8 Unicode\' if you are not sure)';
|
||||
$l['db_step_error_sqlite_invalid_dbname'] = 'You may not use relative URLs for SQLite databases. Please use a file system path (ex: /home/user/database.db) for your SQLite database.';
|
||||
$l['db_step_error_invalid_tableprefix'] = 'You may only use an underscore (_) and alphanumeric characters in a table prefix. Please use a valid table prefix before continuing.';
|
||||
$l['db_step_error_tableprefix_too_long'] = 'You may only use a table prefix with a length of 40 characters or less. Please use a shorter table prefix before continuing.';
|
||||
$l['db_step_error_utf8mb4_error'] = '\'4-Byte UTF-8 Unicode\' requires MySQL 5.5.3 or above. Please select an encoding which is compatible with your MySQL version.';
|
||||
|
||||
$l['tablecreate_step_connected'] = '<p>Connection to the database server and database you specified was successful.</p>
|
||||
<p>Database Engine: {1} {2}</p>
|
||||
<p>The MyBB database tables will now be created.</p>';
|
||||
$l['tablecreate_step_created'] = 'Creating table {1}...';
|
||||
$l['tablecreate_step_done'] = '<p>All tables have been created, click Next to populate them.</p>';
|
||||
|
||||
$l['populate_step_insert'] = '<p>Now that the basic tables have been created, it\'s time to insert the default data.</p>';
|
||||
$l['populate_step_inserted'] = '<p>The default data has successfully been inserted into the database. Click Next to insert the default MyBB template and theme sets.</p>';
|
||||
|
||||
|
||||
$l['theme_step_importing'] = '<p>Loading and importing theme and template file...</p>';
|
||||
$l['theme_step_imported'] = '<p>The default theme and template sets have been successfully inserted. Click Next to configure the basic options for your board.</p>';
|
||||
|
||||
|
||||
$l['config_step_table'] = '<p>It is now time for you to configure the basic settings for your forums such as forum name, URL, your website details, along with your "cookie" domain and paths. These settings can easily be changed in the future through the MyBB Admin Control Panel.</p>
|
||||
<div class="border_wrapper">
|
||||
<div class="title">Board Configuration</div>
|
||||
<table class="general" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Forum Details</th>
|
||||
</tr>
|
||||
<tr class="first">
|
||||
<td class="first"><label for="bbname">Forum Name:</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="bbname" id="bbname" value="{1}" /></td>
|
||||
</tr>
|
||||
<tr class="alt_row last">
|
||||
<td class="first"><label for="bburl">Forum URL (No trailing slash):</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="bburl" id="bburl" value="{2}" onkeyup="warnUser(this, \'This option was set automatically. Do not change it if you are not sure about the correct value, otherwise links on your forum may be broken.\')" onchange="warnUser(this, \'This option was set automatically. Do not change it if you are not sure about the correct value, otherwise links on your forum may be broken.\')" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Website Details</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="first"><label for="websitename">Website Name:</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="websitename" id="websitename" value="{3}" /></td>
|
||||
</tr>
|
||||
<tr class="alt_row last">
|
||||
<td class="first"><label for="websiteurl">Website URL:</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="websiteurl" id="websiteurl" value="{4}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Cookie settings <a title="What\'s this?" target="_blank" rel="noopener" href="https://docs.mybb.com/1.8/development/cookies">(?)</a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="first"><label for="cookiedomain">Cookie Domain:</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="cookiedomain" id="cookiedomain" value="{5}" onkeyup="warnUser(this, \'This option was set automatically. Do not change it if you are not sure about the correct value, otherwise logging in or out on your forum may be broken.\')" onchange="warnUser(this, \'This option was set automatically. Do not change it if you are not sure about the correct value, otherwise logging in or out on your forum may be broken.\')" /></td>
|
||||
</tr>
|
||||
<tr class="alt_row last">
|
||||
<td class="first"><label for="cookiepath">Cookie Path:</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="cookiepath" id="cookiepath" value="{6}" onkeyup="warnUser(this, \'This option was set automatically. Do not change it if you are not sure about the correct value, otherwise logging in or out on your forum may be broken.\')" onchange="warnUser(this, \'This option was set automatically. Do not change it if you are not sure about the correct value, otherwise logging in or out on your forum may be broken.\')" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Contact Details</th>
|
||||
</tr>
|
||||
<tr class="last">
|
||||
<td class="first"><label for="contactemail">Contact Email:</label></td>
|
||||
<td class="last alt_col"><input type="text" class="text_input" name="contactemail" id="contactemail" value="{7}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Security Settings</th>
|
||||
</tr>
|
||||
<tr class="last">
|
||||
<td class="first"><label for="acppin">ACP PIN:</label><br />Leave this empty if you don\'t want to set one</td>
|
||||
<td class="last alt_col"><input type="password" class="text_input" name="pin" id="acppin" value="" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p>Once you\'ve correctly entered the details above and are ready to proceed, click Next.</p>';
|
||||
|
||||
$l['config_step_error_config'] = '<div class="error">
|
||||
<h3>Error</h3>
|
||||
<p>There seems to be one or more errors with the board configuration you supplied:</p>
|
||||
{1}
|
||||
<p>Once the above are corrected, continue with the installation.</p>
|
||||
</div>';
|
||||
$l['config_step_error_url'] = 'You did not enter the URL to your forums.';
|
||||
$l['config_step_error_name'] = 'You did not enter a name for your copy of MyBB.';
|
||||
$l['config_step_revert'] = 'Click to revert this setting to original value.';
|
||||
|
||||
|
||||
$l['admin_step_setupsettings'] = '<p>Setting up basic board settings...</p>';
|
||||
$l['admin_step_insertesettings'] = '<p>Inserted {1} settings into {2} groups.</p>
|
||||
<p>Updating settings with user defined values.</p>';
|
||||
$l['admin_step_insertedtasks'] = '<p>Inserted {1} scheduled tasks.</p>';
|
||||
$l['admin_step_insertedviews'] = '<p>Inserted {1} admin views.</p>';
|
||||
$l['admin_step_createadmin'] ='<p>You need to create an initial administrator account for you to login and manage your copy of MyBB. Please fill in the required fields below to create this account.</p>';
|
||||
$l['admin_step_admintable'] = '<div class="border_wrapper">
|
||||
<div class="title">Administrator Account Details</div>
|
||||
|
||||
<table class="general" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Account Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="first">
|
||||
<td class="first"><label for="adminuser">Username:</label></td>
|
||||
<td class="alt_col last"><input type="text" class="text_input" name="adminuser" id="adminuser" value="{1}" /></td>
|
||||
</tr>
|
||||
<tr class="alt_row">
|
||||
<td class="first"><label for="adminpass">Password:</label></td>
|
||||
<td class="alt_col last"><input type="password" class="text_input" name="adminpass" id="adminpass" value="" autocomplete="off" onchange="comparePass()" /></td>
|
||||
</tr>
|
||||
<tr class="last">
|
||||
<td class="first"><label for="adminpass2">Retype Password:</label></td>
|
||||
<td class="alt_col last"><input type="password" class="text_input" name="adminpass2" id="adminpass2" value="" autocomplete="off" onchange="comparePass()" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="first last">Contact Details</th>
|
||||
</tr>
|
||||
<tr class="first last">
|
||||
<td class="first"><label for="adminemail">Email Address:</label></td>
|
||||
<td class="alt_col last"><input type="text" class="text_input" name="adminemail" id="adminemail" value="{2}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p>Once you\'ve correctly entered the details above and are ready to proceed, click Next.</p>';
|
||||
|
||||
$l['admin_step_error_config'] = '<div class="error">
|
||||
<h3>Error</h3>
|
||||
<p>There seems to be one or more errors with the board configuration you supplied:</p>
|
||||
{1}
|
||||
<p>Once the above are corrected, continue with the installation.</p>
|
||||
</div>';
|
||||
$l['admin_step_error_nouser'] = 'You did not enter a username for your Administrator account.';
|
||||
$l['admin_step_error_nopassword'] = 'You did not enter a password for your Administrator account.';
|
||||
$l['admin_step_error_nomatch'] = 'The passwords you entered do not match.';
|
||||
$l['admin_step_error_noemail'] = 'You did not enter your email address for the Administrator\'s account.';
|
||||
$l['admin_step_nomatch'] = 'The retyped password does not match the password from the first input. Please correct it before continuing.';
|
||||
|
||||
$l['done_step_usergroupsinserted'] = "<p>Importing user groups...";
|
||||
$l['done_step_admincreated'] = '<p>Creating Administrator account...';
|
||||
$l['done_step_adminoptions'] = '<p>Building Administrator permissions...';
|
||||
$l['done_step_cachebuilding'] = '<p>Building data caches...';
|
||||
$l['done_step_success'] = '<p class="success">Your copy of MyBB has successfully been installed and configured correctly.</p>
|
||||
<p>The MyBB Group thanks you for your support in installing our software and we hope to see you around the <a href="https://community.mybb.com/" target="_blank" rel="noopener">Community Forums</a> if you need help or wish to become a part of the MyBB community.</p>';
|
||||
$l['done_step_locked'] = '<p>Your installer has been locked. To unlock the installer please delete the \'lock\' file in this directory.</p><p>You may now proceed to your new copy of <a href="../index.php">MyBB</a> or its <a href="../admin/index.php">Admin Control Panel</a>.</p>';
|
||||
$l['done_step_dirdelete'] = '<p><strong><span style="color:red">Please remove this directory before exploring your copy of MyBB.</span></strong></p>';
|
||||
$l['done_whats_next'] = '<div class="error"><p><strong>Switching from another forum software?</strong></p><p>MyBB offers a merge system for easy merging of multiple forums from various different popular forum software, allowing an easy conversion process to MyBB. If you\'re looking to switch to MyBB, you\'re heading in the right direction! Check out the <a target="_blank" rel="noopener" href="https://mybb.com/download/merge-system">Merge System</a> for more information.</p>';
|
||||
|
||||
/* UPGRADE LANGUAGE VARIABLES */
|
||||
$l['upgrade'] = "Upgrade Process";
|
||||
$l['upgrade_welcome'] = "<p>Welcome to the upgrade wizard for MyBB {1}.</p><p>Before you continue, please make sure you know which version of MyBB you were previously running as you will need to select it below.</p><p><strong>We strongly recommend that you also obtain a complete backup of your database and files before attempting to upgrade</strong> so if something goes wrong you can easily revert back to the previous version. Also, ensure that your backups are complete before proceeding.</p><p>Make sure you only click Next ONCE on each step of the upgrade process. Pages may take a while to load depending on the size of your forum.</p><p>Once you are ready, please select your old version below and click Next to continue.</p>";
|
||||
$l['upgrade_templates_reverted'] = 'Templates Reverted';
|
||||
$l['upgrade_templates_reverted_success'] = "<p>All of the templates have successfully been reverted to the new ones contained in this release. Please press next to continue with the upgrade process.</p>";
|
||||
$l['upgrade_settings_sync'] = 'Settings Synchronization';
|
||||
$l['upgrade_settings_sync_success'] = "<p>The board settings have been synchronized with the latest in MyBB.</p><p>{1} new settings inserted along with {2} new setting groups.</p><p>To finalize the upgrade, please click next below to continue.</p>";
|
||||
$l['upgrade_datacache_building'] = 'Data Cache Building';
|
||||
$l['upgrade_building_datacache'] = '<p>Building caches...';
|
||||
$l['upgrade_continue'] = 'Please press next to continue';
|
||||
$l['upgrade_locked'] = "<p>Your installer has been locked. To unlock the installer please delete the 'lock' file in this directory.</p><p>You may now proceed to your upgraded copy of <a href=\"../index.php\">MyBB</a> or its <a href=\"../{1}/index.php\">Admin Control Panel</a>.</p>";
|
||||
$l['upgrade_removedir'] = 'Please remove this directory before exploring your upgraded MyBB.';
|
||||
$l['upgrade_congrats'] = "<p>Congratulations, your copy of MyBB has successfully been updated to {1}.</p>{2}<p><strong>What's Next?</strong></p><ul><li>Please use the 'Find Updated Templates' tool in the Admin CP to find customized templates updated during this upgrade process. Edit them to contain the changes or revert them to originals.</li><li>Ensure that your board is still fully functional.</li></ul>";
|
||||
$l['upgrade_template_reversion'] = "Template Reversion Warning";
|
||||
$l['upgrade_template_reversion_success'] = "<p>All necessary database modifications have successfully been made to upgrade your board.</p><p>This upgrade requires all templates to be reverted to the new ones contained in the package so please back up any custom templates you have made before clicking next.";
|
||||
$l['upgrade_send_stats'] = "<p><input type=\"checkbox\" name=\"allow_anonymous_info\" value=\"1\" id=\"allow_anonymous\" checked=\"checked\" /> <label for=\"allow_anonymous\"> Send anonymous statistics about your server specifications to the MyBB Group</label> (<a href=\"https://docs.mybb.com/1.8/install/anonymous-statistics/\" style=\"color: #555;\" target=\"_blank\" rel=\"noopener\"><small>What information is sent?</small></a>)</p>";
|
||||
|
||||
$l['please_login'] = "Please Login";
|
||||
$l['login'] = "Login";
|
||||
$l['login_desc'] = "Please enter your username and password to begin the upgrade process. You must be a valid forum administrator to perform the upgrade.";
|
||||
$l['login_username'] = "Username";
|
||||
$l['login_password'] = "Password";
|
||||
$l['login_password_desc'] = "Please note that passwords are case sensitive.";
|
||||
|
||||
/* Error messages */
|
||||
$l['development_preview'] = "<div class=\"error\"><h2 class=\"fail\">Warning</h2><p>This version of MyBB is a development preview and is to be used for testing purposes only.</p><p>No official support, other than for plugins and theme development, will be provided for this version. By continuing with this install/upgrade you do so at your own risk.</p></div>";
|
||||
$l['locked'] = 'The installer is currently locked, please remove \'lock\' from the install directory to continue';
|
||||
$l['no_permision'] = "You do not have permissions to run this process. You need administrator permissions to be able to run the upgrade procedure.<br /><br />If you need to logout, please click <a href=\"upgrade.php?action=logout&logoutkey={1}\">here</a>. From there you will be able to log in again under your administrator account.";
|
||||
$l['no_theme_functions_file'] = 'No theme functions file has been found. Make sure that all files are uploaded properly.';
|
||||
|
||||
$l['task_versioncheck_ran'] = "The version check task successfully ran.";
|
||||
14215
webroot/forum/install/resources/mybb_theme.xml
Normal file
14215
webroot/forum/install/resources/mybb_theme.xml
Normal file
File diff suppressed because it is too large
Load Diff
519
webroot/forum/install/resources/mybb_theme_colors.xml
Normal file
519
webroot/forum/install/resources/mybb_theme_colors.xml
Normal file
@@ -0,0 +1,519 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<colors>
|
||||
<scheme><![CDATA[black=Black]]></scheme>
|
||||
<scheme><![CDATA[calm=Calm]]></scheme>
|
||||
<scheme><![CDATA[dawn=Dawn]]></scheme>
|
||||
<scheme><![CDATA[earth=Earth]]></scheme>
|
||||
<scheme><![CDATA[flame=Flame]]></scheme>
|
||||
<scheme><![CDATA[leaf=Leaf]]></scheme>
|
||||
<scheme><![CDATA[night=Night]]></scheme>
|
||||
<scheme><![CDATA[sun=Sun]]></scheme>
|
||||
<scheme><![CDATA[twilight=Twilight]]></scheme>
|
||||
<scheme><![CDATA[water=Water]]></scheme>
|
||||
<stylesheets>
|
||||
<stylesheet name="color_black.css" attachedto="black" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #202020 url(images/colors/black_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel .upper {
|
||||
background: #dcdbdc url(images/colors/black_tcat.png) repeat-x;
|
||||
color: #000;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #bbb;
|
||||
}
|
||||
|
||||
#panel .upper a:link,
|
||||
#panel .upper a:visited,
|
||||
#panel .upper a:hover,
|
||||
#panel .upper a:active {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#panel input.textbox {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #202121 url(images/colors/black_thead.png) top left repeat-x;
|
||||
color: #fff;
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #202121 url(images/colors/black_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
.tcat {
|
||||
background: #dcdbdc url(images/colors/black_tcat.png) repeat-x;
|
||||
color: #000000;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #bbb;
|
||||
}
|
||||
|
||||
.tcat a:link,
|
||||
.tcat a:visited,
|
||||
.tcat a:hover,
|
||||
.tcat a:active {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #111;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
border-color: #000;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_calm.css" attachedto="calm" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #48715b;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #385947 url(images/colors/calm_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #263c30;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #385947 url(images/colors/calm_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #385947 url(images/colors/calm_thead.png) top left repeat-x;
|
||||
color: #ffffff;
|
||||
border-bottom: 1px solid #263c30;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #263c30;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #48715b;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #48715b;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #48715b;
|
||||
color: #fff;
|
||||
border-color: #263c30;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_dawn.css" attachedto="dawn" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #d56c2c;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #d56c2c url(images/colors/dawn_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #011929;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #d56c2c url(images/colors/dawn_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #d56c2c url(images/colors/dawn_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #9a4e20;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #9a4e20;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #f2a555;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #f2a555;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #f2a555;
|
||||
color: #fff;
|
||||
border-color: #9a4e20;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_earth.css" attachedto="earth" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #6d5545;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #4a3a2e url(images/colors/earth_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #31261e;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #4a3b2f url(images/colors/earth_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #4a3b2f url(images/colors/earth_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #31261e;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #31261e;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #6d5545;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #6d5545;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #6d5545;
|
||||
color: #fff;
|
||||
border-color: #31261e;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_flame.css" attachedto="flame" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #a20000;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #750000 url(images/colors/flame_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #550000;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #750000 url(images/colors/flame_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #750000 url(images/colors/flame_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #550000;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #550000;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #a20000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #a20000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #a20000;
|
||||
color: #fff;
|
||||
border-color: #550000;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_leaf.css" attachedto="leaf" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #5aaf33;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #386e21 url(images/colors/leaf_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #234615;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #386e21 url(images/colors/leaf_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #386e21 url(images/colors/leaf_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #234615;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #234615;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #5aaf33;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #5aaf33;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #5aaf33;
|
||||
color: #fff;
|
||||
border-color: #234615;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_night.css" attachedto="night" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #023a61;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #022338 url(images/colors/night_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #011929;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #022338 url(images/colors/night_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #022338 url(images/colors/night_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #011929;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #011929;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #023a61;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #023a61;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #023a61;
|
||||
color: #fff;
|
||||
border-color: #011929;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_sun.css" attachedto="sun" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #ffdd4d url(images/colors/sun_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #111;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #ffdd4d url(images/colors/sun_thead.png) top left repeat-x;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #ffdd4d url(images/colors/sun_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #ffaf1a;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.thead a:link,
|
||||
.thead a:visited,
|
||||
.thead a:hover,
|
||||
.thead a:active {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #ffaf1a;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #ffea9c;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #ffea9c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #ffea9c;
|
||||
color: #000;
|
||||
border-color: #ffaf1a;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_twilight.css" attachedto="twilight" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #426276;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #273a46 url(images/colors/twilight_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #1d2b34;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #273a46 url(images/colors/twilight_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #273a46 url(images/colors/twilight_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #1d2b34;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #1d2b34;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #426276;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #426276;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #426276;
|
||||
color: #fff;
|
||||
border-color: #1d2b34;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
<stylesheet name="color_water.css" attachedto="water" version="1800"><![CDATA[a:link,
|
||||
a:visited,
|
||||
a:hover,
|
||||
a:active {
|
||||
color: #2d9595;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: #1e6365 url(images/colors/water_header.png) top left repeat-x;
|
||||
border-bottom: 1px solid #133f41;
|
||||
}
|
||||
|
||||
#header ul.menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#panel input.button {
|
||||
background: #1e6365 url(images/colors/water_thead.png) top left repeat-x;
|
||||
}
|
||||
|
||||
.thead {
|
||||
background: #1e6365 url(images/colors/water_thead.png) top left repeat-x;
|
||||
border-bottom: 1px solid #133f41;
|
||||
}
|
||||
|
||||
.thead input.textbox,
|
||||
.thead select {
|
||||
border: 1px solid #133f41;
|
||||
}
|
||||
|
||||
.popup_menu .popup_item:hover {
|
||||
background: #2d9595;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tt-suggestion.tt-is-under-cursor {
|
||||
background-color: #2d9595;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #2d9595;
|
||||
color: #fff;
|
||||
border-color: #133f41;
|
||||
}]]>
|
||||
</stylesheet>
|
||||
</stylesheets>
|
||||
</colors>
|
||||
170
webroot/forum/install/resources/mysql_db_inserts.php
Normal file
170
webroot/forum/install/resources/mysql_db_inserts.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (1, 'ZIP File', 'application/zip', 'zip', 1024, 'images/attachtypes/zip.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (2, 'JPG Image', 'image/jpeg', 'jpg', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (3, 'Text Document', 'text/plain', 'txt', 200, 'images/attachtypes/txt.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (4, 'GIF Image', 'image/gif', 'gif', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (5, 'Adobe Photoshop File', 'application/x-photoshop', 'psd', 1024, 'images/attachtypes/psd.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (6, 'PHP File', 'application/x-httpd-php', 'php', 500, 'images/attachtypes/php.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (7, 'PNG Image', 'image/png', 'png', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (8, 'Microsoft Word Document', 'application/msword', 'doc', 1024, 'images/attachtypes/doc.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (9, 'HTM File', 'text/html', 'htm', 100, 'images/attachtypes/html.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (10, 'HTML File', 'text/html', 'html', 100, 'images/attachtypes/html.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (11, 'JPEG Image', 'image/jpeg', 'jpeg', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (12, 'GZIP Compressed File', 'application/x-gzip', 'gz', 1024, 'images/attachtypes/tar.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (13, 'TAR Compressed File', 'application/x-tar', 'tar', 1024, 'images/attachtypes/tar.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (14, 'CSS Stylesheet', 'text/css', 'css', 100, 'images/attachtypes/css.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (15, 'Adobe Acrobat PDF', 'application/pdf', 'pdf', 2048, 'images/attachtypes/pdf.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (16, 'Bitmap Image', 'image/bmp', 'bmp', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (17, 'Microsoft Word 2007 Document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx', 1024, 'images/attachtypes/doc.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (18, 'Microsoft Excel Document', 'application/vnd.ms-excel', 'xls', 1024, 'images/attachtypes/xls.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (19, 'Microsoft Excel 2007 Document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx', 1024, 'images/attachtypes/xls.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (20, 'Microsoft PowerPoint Document', 'application/vnd.ms-powerpoint', 'ppt', 1024, 'images/attachtypes/ppt.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, `groups`,forums, avatarfile) VALUES (21, 'Microsoft PowerPoint 2007 Document', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx', 1024, 'images/attachtypes/ppt.png', 1, '-1', '-1', 0);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_calendars (name,disporder,startofweek,showbirthdays,eventlimit,moderation,allowhtml,allowmycode,allowimgcode,allowvideocode,allowsmilies) VALUES ('Default Calendar',1,0,1,4,0,0,1,1,1,1);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, usepostcounts, usethreadcounts, password, showinjump, style, overridestyle, rulestype, rulestitle, rules) VALUES (1, 'My Category', '', '', 'c', 0, '1', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, '', '');";
|
||||
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, usepostcounts, usethreadcounts, password, showinjump, style, overridestyle, rulestype, rulestitle, rules) VALUES (2, 'My Forum', '', '', 'f', 1, '1,2', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, '', '');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (1, 1, 'User Registration', 'Perks and privileges to user registration.', 'Some parts of this forum may require you to be logged in and registered. Registration is free and takes a few minutes to complete.<br />\r\n<br />\r\nYou are encouraged to register; once you register you will be able to post messages, set your own preferences, and maintain a profile.<br />\r\n<br />\r\nSome of the features that generally require registration are subscriptions, changing of styles, accessing of your Personal Pad (simple notepad) and emailing forum members.', 1, 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (2, 1, 'Updating Profile', 'Changing your data currently on record.', 'At some point during your stay, you may decide you need to update some information such as your instant messenger information, your password, or perhaps you need to change your email address. You may change any of this information from your user control panel. To access this control panel, simply click on the link in the upper right hand corner of most any page entitled \"user cp\". From there, simply choose \"Edit Profile\" and change or update any desired items, then proceed to click the submit button located at the bottom of the page for changes to take effect.', 1, 1, 2);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (3, 1, 'Use of Cookies on myBB', 'myBB uses cookies to store certain information about your registration.', 'myBulletinBoard makes use of cookies to store your login information if you are registered, and your last visit if you are not.<br />\r\n<br />\r\nCookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk.<br />\r\n<br />\r\nCookies on this forum also track the specific topics you have read and when you last read them.<br />\r\n<br />\r\nTo clear all cookies set by this forum, you can click <a href=\"misc.php?action=clearcookies&my_post_key={1}\">here</a>.', 1, 1, 3);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (4, 1, 'Logging In and Out', 'How to login and log out.', 'When you login, you set a cookie on your machine so that you can browse the forums without having to enter in your username and password each time. Logging out clears that cookie to ensure nobody else can browse the forum as you.<br />\r\n<br />\r\nTo login, simply click the login link at the top right hand corner of the forum. To log out, click the log out link in the same place. In the event you cannot log out, clearing cookies on your machine will take the same effect.', 1, 1, 4);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (5, 2, 'Posting a New Topic', 'Starting a new thread in a forum.', 'When you go to a forum you are interested in and you wish to create a new topic (or thread), simply choose the button at the top and bottom of the forums entitled \"New topic\". Please take note that you may not have permission to post a new topic in every forum as your administrator may have restricted posting in that forum to staff or archived the forum entirely.', 1, 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (6, 2, 'Posting a Reply', 'Replying to a topic within a forum.', 'During the course of your visit, you may encounter a thread to which you would like to make a reply. To do so, simply click the \"Post reply\" button at the bottom or top of the thread. Please take note that your administrator may have restricted posting to certain individuals in that particular forum.<br />\r\n<br />\r\nAdditionally, a moderator of a forum may have closed a thread meaning that users cannot reply to it. There is no way for a user to open such a thread without the help of a moderator or administrator.', 1, 1, 2);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (7, 2, 'MyCode', 'Learn how to use MyCode to enhance your posts.', 'You can use MyCode, a simplified version of HTML, in your posts to create certain effects.\r\n<p><br />\r\n[b]This text is bold[/b]<br />\r\n <b>This text is bold</b>\r\n<p>\r\n[i]This text is italicized[/i]<br />\r\n <i>This text is italicized</i>\r\n<p>\r\n[u]This text is underlined[/u]<br />\r\n <u>This text is underlined</u>\r\n<p><br />\r\n[url]http://www.example.com/[/url]<br />\r\n <a href=\"http://www.example.com/\">http://www.example.com/</a>\r\n<p>\r\n[url=http://www.example.com/]Example.com[/url]<br />\r\n <a href=\"http://www.example.com/\">Example.com</a>\r\n<p>\r\n[email]example@example.com[/email]<br />\r\n <a href=\"mailto:example@example.com\">example@example.com</a>\r\n<p>\r\n[email=example@example.com]E-mail Me![/email]<br />\r\n <a href=\"mailto:example@example.com\">E-mail Me!</a>\r\n<p>\r\n[email=example@example.com?subject=spam]E-mail with subject[/email]<br />\r\n <a href=\"mailto:example@example.com?subject=spam\">E-mail with subject</a>\r\n<p><br />\r\n[quote]Quoted text will be here[/quote]<br />\r\n <quote>Quoted text will be here</quote>\r\n<p>\r\n[code]Text with preserved formatting[/code]<br />\r\n <code>Text with preserved formatting</code>\r\n<p><br />\r\n[img]https://secure.php.net/images/php.gif[/img]<br />\r\n <img src=\"https://secure.php.net/images/php.gif\">\r\n<p>\r\n[img=50x50]https://secure.php.net/images/php.gif[/img]<br />\r\n <img src=\"https://secure.php.net/images/php.gif\" width=\"50\" height=\"50\">\r\n<p><br />\r\n[color=red]This text is red[/color]<br />\r\n <font color=\"red\">This text is red</font>\r\n<p>\r\n[size=3]This text is size 3[/size]<br />\r\n <font size=\"3\">This text is size 3</font>\r\n<p>\r\n[font=Tahoma]This font is Tahoma[/font]<br />\r\n <font face=\"Tahoma\">This font is Tahoma</font>\r\n<p><br />\r\n[align=center]This is centered[/align]<div align=\"center\">This is centered</div>\r\n<p>\r\n[align=right]This is right-aligned[/align]<div align=\"right\">This is right-aligned</div>\r\n<p><br />\r\n[list]<br />\r\n[*]List Item #1<br />\r\n[*]List Item #2<br />\r\n[*]List Item #3<br />\r\n[/list]<br />\r\n<ul>\r\n<li>List item #1</li>\r\n<li>List item #2</li>\r\n<li>List Item #3</li>\r\n</ul><p><font size=1>You can make an ordered list by using [list=1] for a numbered, and [list=a] for an alphabetical list.</size>', 1, 1, 3);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_helpsections (sid, name, description, usetranslation, enabled, disporder) VALUES (1, 'User Maintenance', 'Basic instructions for maintaining a forum account.', 1, 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_helpsections (sid, name, description, usetranslation, enabled, disporder) VALUES (2, 'Posting', 'Posting, replying, and basic usage of forum.', 1, 1, 2);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(1, 'Bug', 'images/icons/bug.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(2, 'Exclamation', 'images/icons/exclamation.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(3, 'Question', 'images/icons/question.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(4, 'Smile', 'images/icons/smile.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(5, 'Sad', 'images/icons/sad.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(6, 'Wink', 'images/icons/wink.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(7, 'Big Grin', 'images/icons/biggrin.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(8, 'Tongue', 'images/icons/tongue.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(9, 'Brick', 'images/icons/brick.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(10, 'Heart', 'images/icons/heart.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(11, 'Information', 'images/icons/information.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(12, 'Lightbulb', 'images/icons/lightbulb.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(13, 'Music', 'images/icons/music.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(14, 'Photo', 'images/icons/photo.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(15, 'Rainbow', 'images/icons/rainbow.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(16, 'Shocked', 'images/icons/shocked.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(17, 'Star', 'images/icons/star.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(18, 'Thumbs Down', 'images/icons/thumbsdown.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(19, 'Thumbs Up', 'images/icons/thumbsup.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(20, 'Video', 'images/icons/video.png');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_profilefields (fid, name, description, disporder, type, regex, length, maxlength, required, registration, profile, postbit, viewableby, editableby, postnum) VALUES (1, 'Location', 'Where in the world do you live?', 1, 'text', '', 0, 255, 0, 0, 1, 0, -1, -1, 0);";
|
||||
$inserts[] = "INSERT INTO mybb_profilefields (fid, name, description, disporder, type, regex, length, maxlength, required, registration, profile, postbit, viewableby, editableby, postnum) VALUES (2, 'Bio', 'Enter a few short details about yourself, your life story etc.', 2, 'textarea', '', 0, 0, 0, 0, 1, 0, -1, -1, 0);";
|
||||
$inserts[] = "INSERT INTO mybb_profilefields (fid, name, description, disporder, type, regex, length, maxlength, required, registration, profile, postbit, viewableby, editableby, postnum) VALUES (3, 'Sex', 'Please select your sex from the list below.', 3, 'select\nUndisclosed\nMale\nFemale\nOther', '', 0, 0, 0, 0, 1, 0, -1, -1, 0);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_questions (qid, question, answer, shown, correct, incorrect, active) VALUES(1, 'What does 2 + 2 equal?', '4\nFour', 0, 0, 0, 1);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(1, '<lang:report_reason_other>', 'all', 1, 99);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(2, '<lang:report_reason_rules>', 'all', 0, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(3, '<lang:report_reason_bad>', 'all', 0, 2);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(4, '<lang:report_reason_spam>', 'all', 0, 3);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(5, '<lang:report_reason_wrong>', 'post', 0, 4);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(1, 'Smile', ':)', 'images/smilies/smile.png', 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(2, 'Wink', ';)', 'images/smilies/wink.png', 2, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(3, 'Cool', ':cool:', 'images/smilies/cool.png', 3, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(4, 'Big Grin', ':D', 'images/smilies/biggrin.png', 4, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(5, 'Tongue', ':P', 'images/smilies/tongue.png', 5, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(6, 'Rolleyes', ':rolleyes:', 'images/smilies/rolleyes.png', 6, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(7, 'Shy', ':shy:', 'images/smilies/shy.png', 7, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(8, 'Sad', ':(', 'images/smilies/sad.png', 8, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(9, 'At', ':at:', 'images/smilies/at.png', 9, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(10, 'Angel', ':angel:', 'images/smilies/angel.png', 10, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(11, 'Angry', ':@', 'images/smilies/angry.png', 11, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(12, 'Blush', ':blush:', 'images/smilies/blush.png', 12, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(13, 'Confused', ':s', 'images/smilies/confused.png', 13, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(14, 'Dodgy', ':dodgy:', 'images/smilies/dodgy.png', 14, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(15, 'Exclamation', ':exclamation:', 'images/smilies/exclamation.png', 15, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(16, 'Heart', ':heart:', 'images/smilies/heart.png', 16, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(17, 'Huh', ':huh:', 'images/smilies/huh.png', 17, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(18, 'Idea', ':idea:', 'images/smilies/lightbulb.png', 18, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(19, 'Sleepy', ':sleepy:', 'images/smilies/sleepy.png', 19, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(20, 'Undecided', ':-/', 'images/smilies/undecided.png', 20, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(21, 'Cry', ':cry:', 'images/smilies/cry.png', 21, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(22, 'Sick', ':sick:', 'images/smilies/sick.png', 22, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(23, 'Arrow', ':arrow:', 'images/smilies/arrow.png', 23, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(24, 'My', ':my:', 'images/smilies/my.png', 24, 1);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Google','Googlebot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Bing','bingbot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Alexa Internet','ia_archiver');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Ask.com','Teoma');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Baidu','Baiduspider');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Yandex','YandexBot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Facebook','facebookexternalhit');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Twitter','Twitterbot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Internet Archive','archive.org_bot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Discord','Discordbot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Applebot','Applebot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('CheckHost','CheckHost');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Pingdom','Pingdom.com_bot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('DuckDuckGo','DuckDuckBot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('UptimeRobot','UptimeRobot');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('1','calendar','<lang:group_calendar>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('2','editpost','<lang:group_editpost>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('3','forumbit','<lang:group_forumbit>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('4','forumjump','<lang:group_forumjump>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('5','forumdisplay','<lang:group_forumdisplay>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('6','index','<lang:group_index>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('7','error','<lang:group_error>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('8','memberlist','<lang:group_memberlist>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('9','multipage','<lang:group_multipage>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('10','private','<lang:group_private>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('11','portal','<lang:group_portal>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('12','postbit','<lang:group_postbit>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('13','posticons','<lang:group_posticons>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('14','showthread','<lang:group_showthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('15','usercp','<lang:group_usercp>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('16','online','<lang:group_online>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('17','moderation','<lang:group_moderation>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('18','nav','<lang:group_nav>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('19','search','<lang:group_search>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('20','showteam','<lang:group_showteam>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('21','reputation','<lang:group_reputation>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('22','newthread','<lang:group_newthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('23','newreply','<lang:group_newreply>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('24','member','<lang:group_member>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('25','warnings','<lang:group_warning>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('26','global','<lang:group_global>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('27','header','<lang:group_header>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('28','managegroup','<lang:group_managegroup>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('29','misc','<lang:group_misc>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('30','modcp','<lang:group_modcp>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('31','announcement','<lang:group_announcement>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('32','polls','<lang:group_polls>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('33','post','<lang:group_post>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('34','printthread','<lang:group_printthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('35','report','<lang:group_report>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('36','smilieinsert','<lang:group_smilieinsert>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('37','stats','<lang:group_stats>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('38','xmlhttp','<lang:group_xmlhttp>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('39','footer','<lang:group_footer>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('40','video','<lang:group_video>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('41','sendthread','<lang:group_sendthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('42','mycode','<lang:group_mycode>','1');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (1, 0, 'Newbie', 1, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (2, 1, 'Junior Member', 2, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (3, 50, 'Member', 3, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (4, 250, 'Senior Member', 4, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (5, 750, 'Posting Freak', 5, '');";
|
||||
1186
webroot/forum/install/resources/mysql_db_tables.php
Normal file
1186
webroot/forum/install/resources/mysql_db_tables.php
Normal file
File diff suppressed because it is too large
Load Diff
190
webroot/forum/install/resources/output.php
Normal file
190
webroot/forum/install/resources/output.php
Normal file
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
class installerOutput {
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $doneheader;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $openedform;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $script = "index.php";
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $steps = array();
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $title = "MyBB Installation Wizard";
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* @param string $image
|
||||
* @param int $form
|
||||
* @param int $error
|
||||
*/
|
||||
function print_header($title="", $image="welcome", $form=1, $error=0)
|
||||
{
|
||||
global $mybb, $lang;
|
||||
|
||||
if($title == "")
|
||||
{
|
||||
$title = $lang->welcome;
|
||||
}
|
||||
|
||||
if($lang->title)
|
||||
{
|
||||
$this->title = $lang->title;
|
||||
}
|
||||
|
||||
@header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
$this->doneheader = 1;
|
||||
$dbconfig_add = '';
|
||||
if($image == "dbconfig")
|
||||
{
|
||||
$dbconfig_add = "<script type=\"text/javascript\">document.write('<style type=\"text/css\">.db_type { display: none; }</style>');</script>";
|
||||
}
|
||||
echo <<<END
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>{$this->title} > {$title}</title>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
|
||||
<script type="text/javascript" src="../jscripts/jquery.js?ver=1821"></script>
|
||||
<script type="text/javascript" src="../jscripts/general.js?ver=1821"></script>
|
||||
{$dbconfig_add}
|
||||
</head>
|
||||
<body>
|
||||
END;
|
||||
if($form)
|
||||
{
|
||||
echo "\n <form method=\"post\" action=\"".$this->script."\">\n";
|
||||
$this->openedform = 1;
|
||||
}
|
||||
|
||||
echo <<<END
|
||||
<div id="container">
|
||||
<div id="logo">
|
||||
<h1><span class="invisible">MyBB</span></h1>
|
||||
</div>
|
||||
<div id="inner_container">
|
||||
<div id="header">{$this->title}</div>
|
||||
END;
|
||||
if($mybb->version_code >= 1700 && $mybb->version_code < 1800)
|
||||
{
|
||||
echo $lang->development_preview;
|
||||
}
|
||||
if(empty($this->steps))
|
||||
{
|
||||
$this->steps = array();
|
||||
}
|
||||
if(is_array($this->steps))
|
||||
{
|
||||
echo "\n <div id=\"progress\">";
|
||||
echo "\n <ul>\n";
|
||||
foreach($this->steps as $action => $step)
|
||||
{
|
||||
if($action == $mybb->input['action'])
|
||||
{
|
||||
echo " <li class=\"{$action} active\"><strong>{$step}</strong></li>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <li class=\"{$action}\">{$step}</li>\n";
|
||||
}
|
||||
}
|
||||
echo " </ul>";
|
||||
echo "\n </div>";
|
||||
echo "\n <div id=\"content\">\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "\n <div id=\"progress_error\"></div>";
|
||||
echo "\n <div id=\"content_error\">\n";
|
||||
}
|
||||
if($title != "")
|
||||
{
|
||||
echo <<<END
|
||||
<h2 class="{$image}">{$title}</h2>\n
|
||||
END;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $contents
|
||||
*/
|
||||
function print_contents($contents)
|
||||
{
|
||||
echo $contents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
function print_error($message)
|
||||
{
|
||||
global $lang;
|
||||
if(!$this->doneheader)
|
||||
{
|
||||
$this->print_header($lang->error, "", 0, 1);
|
||||
}
|
||||
echo " <div class=\"error\">\n ";
|
||||
echo "<h3>".$lang->error."</h3>";
|
||||
$this->print_contents($message);
|
||||
echo "\n </div>";
|
||||
$this->print_footer();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $nextact
|
||||
*/
|
||||
function print_footer($nextact="")
|
||||
{
|
||||
global $lang, $footer_extra;
|
||||
if($nextact && $this->openedform)
|
||||
{
|
||||
echo "\n <input type=\"hidden\" name=\"action\" value=\"{$nextact}\" />";
|
||||
echo "\n <div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"".$lang->next." »\" /></div><br style=\"clear: both;\" />\n";
|
||||
$formend = "</form>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$formend = "";
|
||||
}
|
||||
|
||||
echo <<<END
|
||||
</div>
|
||||
<div id="footer">
|
||||
END;
|
||||
|
||||
$copyyear = date('Y');
|
||||
echo <<<END
|
||||
<div id="copyright">
|
||||
MyBB © 2002-{$copyyear} MyBB Group
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{$formend}
|
||||
{$footer_extra}
|
||||
</body>
|
||||
</html>
|
||||
END;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
170
webroot/forum/install/resources/pgsql_db_inserts.php
Normal file
170
webroot/forum/install/resources/pgsql_db_inserts.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (1, 'ZIP File', 'application/zip', 'zip', 1024, 'images/attachtypes/zip.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (2, 'JPG Image', 'image/jpeg', 'jpg', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (3, 'Text Document', 'text/plain', 'txt', 200, 'images/attachtypes/txt.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (4, 'GIF Image', 'image/gif', 'gif', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (5, 'Adobe Photoshop File', 'application/x-photoshop', 'psd', 1024, 'images/attachtypes/psd.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (6, 'PHP File', 'application/x-httpd-php', 'php', 500, 'images/attachtypes/php.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (7, 'PNG Image', 'image/png', 'png', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (8, 'Microsoft Word Document', 'application/msword', 'doc', 1024, 'images/attachtypes/doc.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (9, 'HTM File', 'text/html', 'htm', 100, 'images/attachtypes/html.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (10, 'HTML File', 'text/html', 'html', 100, 'images/attachtypes/html.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (11, 'JPEG Image', 'image/jpeg', 'jpeg', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 1);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (12, 'GZIP Compressed File', 'application/x-gzip', 'gz', 1024, 'images/attachtypes/tar.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (13, 'TAR Compressed File', 'application/x-tar', 'tar', 1024, 'images/attachtypes/tar.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (14, 'CSS Stylesheet', 'text/css', 'css', 100, 'images/attachtypes/css.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (15, 'Adobe Acrobat PDF', 'application/pdf', 'pdf', 2048, 'images/attachtypes/pdf.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (16, 'Bitmap Image', 'image/bmp', 'bmp', 500, 'images/attachtypes/image.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (17, 'Microsoft Word 2007 Document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx', 1024, 'images/attachtypes/doc.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (18, 'Microsoft Excel Document', 'application/vnd.ms-excel', 'xls', 1024, 'images/attachtypes/xls.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (19, 'Microsoft Excel 2007 Document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx', 1024, 'images/attachtypes/xls.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (20, 'Microsoft PowerPoint Document', 'application/vnd.ms-powerpoint', 'ppt', 1024, 'images/attachtypes/ppt.png', 1, '-1', '-1', 0);";
|
||||
$inserts[] = "INSERT INTO mybb_attachtypes (atid, name, mimetype, extension, maxsize, icon, enabled, groups, forums, avatarfile) VALUES (21, 'Microsoft PowerPoint 2007 Document', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx', 1024, 'images/attachtypes/ppt.png', 1, '-1', '-1', 0);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_calendars (name,disporder,startofweek,showbirthdays,eventlimit,moderation,allowhtml,allowmycode,allowimgcode,allowvideocode,allowsmilies) VALUES ('Default Calendar',1,0,1,4,0,0,1,1,1,1);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, usepostcounts, usethreadcounts, password, showinjump, style, overridestyle, rulestype, rulestitle, rules) VALUES (1, 'My Category', '', '', 'c', 0, '1', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, '', '');";
|
||||
$inserts[] = "INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowvideocode, allowpicons, allowtratings, usepostcounts, usethreadcounts, password, showinjump, style, overridestyle, rulestype, rulestitle, rules) VALUES (2, 'My Forum', '', '', 'f', 1, '1,2', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, '', '');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (1, 1, 'User Registration', 'Perks and privileges to user registration.', 'Some parts of this forum may require you to be logged in and registered. Registration is free and takes a few minutes to complete.<br />\r\n<br />\r\nYou are encouraged to register; once you register you will be able to post messages, set your own preferences, and maintain a profile.<br />\r\n<br />\r\nSome of the features that generally require registration are subscriptions, changing of styles, accessing of your Personal Pad (simple notepad) and emailing forum members.', 1, 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (2, 1, 'Updating Profile', 'Changing your data currently on record.', 'At some point during your stay, you may decide you need to update some information such as your instant messenger information, your password, or perhaps you need to change your email address. You may change any of this information from your user control panel. To access this control panel, simply click on the link in the upper right hand corner of most any page entitled \"user cp\". From there, simply choose \"Edit Profile\" and change or update any desired items, then proceed to click the submit button located at the bottom of the page for changes to take effect.', 1, 1, 2);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (3, 1, 'Use of Cookies on myBB', 'myBB uses cookies to store certain information about your registration.', 'myBulletinBoard makes use of cookies to store your login information if you are registered, and your last visit if you are not.<br />\r\n<br />\r\nCookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk.<br />\r\n<br />\r\nCookies on this forum also track the specific topics you have read and when you last read them.<br />\r\n<br />\r\nTo clear all cookies set by this forum, you can click <a href=\"misc.php?action=clearcookies&my_post_key={1}\">here</a>.', 1, 1, 3);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (4, 1, 'Logging In and Out', 'How to login and log out.', 'When you login, you set a cookie on your machine so that you can browse the forums without having to enter in your username and password each time. Logging out clears that cookie to ensure nobody else can browse the forum as you.<br />\r\n<br />\r\nTo login, simply click the login link at the top right hand corner of the forum. To log out, click the log out link in the same place. In the event you cannot log out, clearing cookies on your machine will take the same effect.', 1, 1, 4);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (5, 2, 'Posting a New Topic', 'Starting a new thread in a forum.', 'When you go to a forum you are interested in and you wish to create a new topic (or thread), simply choose the button at the top and bottom of the forums entitled \"New topic\". Please take note that you may not have permission to post a new topic in every forum as your administrator may have restricted posting in that forum to staff or archived the forum entirely.', 1, 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (6, 2, 'Posting a Reply', 'Replying to a topic within a forum.', 'During the course of your visit, you may encounter a thread to which you would like to make a reply. To do so, simply click the \"Post reply\" button at the bottom or top of the thread. Please take note that your administrator may have restricted posting to certain individuals in that particular forum.<br />\r\n<br />\r\nAdditionally, a moderator of a forum may have closed a thread meaning that users cannot reply to it. There is no way for a user to open such a thread without the help of a moderator or administrator.', 1, 1, 2);";
|
||||
$inserts[] = "INSERT INTO mybb_helpdocs (hid, sid, name, description, document, usetranslation, enabled, disporder) VALUES (7, 2, 'MyCode', 'Learn how to use MyCode to enhance your posts.', 'You can use MyCode, a simplified version of HTML, in your posts to create certain effects.\r\n<p><br />\r\n[b]This text is bold[/b]<br />\r\n <b>This text is bold</b>\r\n<p>\r\n[i]This text is italicized[/i]<br />\r\n <i>This text is italicized</i>\r\n<p>\r\n[u]This text is underlined[/u]<br />\r\n <u>This text is underlined</u>\r\n<p><br />\r\n[url]http://www.example.com/[/url]<br />\r\n <a href=\"http://www.example.com/\">http://www.example.com/</a>\r\n<p>\r\n[url=http://www.example.com/]Example.com[/url]<br />\r\n <a href=\"http://www.example.com/\">Example.com</a>\r\n<p>\r\n[email]example@example.com[/email]<br />\r\n <a href=\"mailto:example@example.com\">example@example.com</a>\r\n<p>\r\n[email=example@example.com]E-mail Me![/email]<br />\r\n <a href=\"mailto:example@example.com\">E-mail Me!</a>\r\n<p>\r\n[email=example@example.com?subject=spam]E-mail with subject[/email]<br />\r\n <a href=\"mailto:example@example.com?subject=spam\">E-mail with subject</a>\r\n<p><br />\r\n[quote]Quoted text will be here[/quote]<br />\r\n <quote>Quoted text will be here</quote>\r\n<p>\r\n[code]Text with preserved formatting[/code]<br />\r\n <code>Text with preserved formatting</code>\r\n<p><br />\r\n[img]https://secure.php.net/images/php.gif[/img]<br />\r\n <img src=\"https://secure.php.net/images/php.gif\">\r\n<p>\r\n[img=50x50]https://secure.php.net/images/php.gif[/img]<br />\r\n <img src=\"https://secure.php.net/images/php.gif\" width=\"50\" height=\"50\">\r\n<p><br />\r\n[color=red]This text is red[/color]<br />\r\n <font color=\"red\">This text is red</font>\r\n<p>\r\n[size=3]This text is size 3[/size]<br />\r\n <font size=\"3\">This text is size 3</font>\r\n<p>\r\n[font=Tahoma]This font is Tahoma[/font]<br />\r\n <font face=\"Tahoma\">This font is Tahoma</font>\r\n<p><br />\r\n[align=center]This is centered[/align]<div align=\"center\">This is centered</div>\r\n<p>\r\n[align=right]This is right-aligned[/align]<div align=\"right\">This is right-aligned</div>\r\n<p><br />\r\n[list]<br />\r\n[*]List Item #1<br />\r\n[*]List Item #2<br />\r\n[*]List Item #3<br />\r\n[/list]<br />\r\n<ul>\r\n<li>List item #1</li>\r\n<li>List item #2</li>\r\n<li>List Item #3</li>\r\n</ul><p><font size=1>You can make an ordered list by using [list=1] for a numbered, and [list=a] for an alphabetical list.</size>', 1, 1, 3);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_helpsections (sid, name, description, usetranslation, enabled, disporder) VALUES (1, 'User Maintenance', 'Basic instructions for maintaining a forum account.', 1, 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_helpsections (sid, name, description, usetranslation, enabled, disporder) VALUES (2, 'Posting', 'Posting, replying, and basic usage of forum.', 1, 1, 2);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(1, 'Bug', 'images/icons/bug.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(2, 'Exclamation', 'images/icons/exclamation.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(3, 'Question', 'images/icons/question.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(4, 'Smile', 'images/icons/smile.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(5, 'Sad', 'images/icons/sad.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(6, 'Wink', 'images/icons/wink.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(7, 'Big Grin', 'images/icons/biggrin.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(8, 'Tongue', 'images/icons/tongue.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(9, 'Brick', 'images/icons/brick.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(10, 'Heart', 'images/icons/heart.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(11, 'Information', 'images/icons/information.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(12, 'Lightbulb', 'images/icons/lightbulb.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(13, 'Music', 'images/icons/music.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(14, 'Photo', 'images/icons/photo.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(15, 'Rainbow', 'images/icons/rainbow.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(16, 'Shocked', 'images/icons/shocked.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(17, 'Star', 'images/icons/star.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(18, 'Thumbs Down', 'images/icons/thumbsdown.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(19, 'Thumbs Up', 'images/icons/thumbsup.png');";
|
||||
$inserts[] = "INSERT INTO mybb_icons (iid, name, path) VALUES(20, 'Video', 'images/icons/video.png');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_profilefields (fid, name, description, disporder, type, regex, length, maxlength, required, registration, profile, postbit, viewableby, editableby, postnum) VALUES (1, 'Location', 'Where in the world do you live?', 1, 'text', '', 0, 255, 0, 0, 1, 0, -1, -1, 0);";
|
||||
$inserts[] = "INSERT INTO mybb_profilefields (fid, name, description, disporder, type, regex, length, maxlength, required, registration, profile, postbit, viewableby, editableby, postnum) VALUES (2, 'Bio', 'Enter a few short details about yourself, your life story etc.', 2, 'textarea', '', 0, 0, 0, 0, 1, 0, -1, -1, 0);";
|
||||
$inserts[] = "INSERT INTO mybb_profilefields (fid, name, description, disporder, type, regex, length, maxlength, required, registration, profile, postbit, viewableby, editableby, postnum) VALUES (3, 'Sex', 'Please select your sex from the list below.', 3, 'select\nUndisclosed\nMale\nFemale\nOther', '', 0, 0, 0, 0, 1, 0, -1, -1, 0);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_questions (qid, question, answer, shown, correct, incorrect, active) VALUES(1, 'What does 2 + 2 equal?', '4\nFour', 0, 0, 0, 1);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(1, '<lang:report_reason_other>', 'all', 1, 99);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(2, '<lang:report_reason_rules>', 'all', 0, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(3, '<lang:report_reason_bad>', 'all', 0, 2);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(4, '<lang:report_reason_spam>', 'all', 0, 3);";
|
||||
$inserts[] = "INSERT INTO mybb_reportreasons (rid, title, appliesto, extra, disporder) VALUES(5, '<lang:report_reason_wrong>', 'post', 0, 4);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(1, 'Smile', ':)', 'images/smilies/smile.png', 1, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(2, 'Wink', ';)', 'images/smilies/wink.png', 2, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(3, 'Cool', ':cool:', 'images/smilies/cool.png', 3, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(4, 'Big Grin', ':D', 'images/smilies/biggrin.png', 4, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(5, 'Tongue', ':P', 'images/smilies/tongue.png', 5, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(6, 'Rolleyes', ':rolleyes:', 'images/smilies/rolleyes.png', 6, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(7, 'Shy', ':shy:', 'images/smilies/shy.png', 7, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(8, 'Sad', ':(', 'images/smilies/sad.png', 8, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(9, 'At', ':at:', 'images/smilies/at.png', 9, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(10, 'Angel', ':angel:', 'images/smilies/angel.png', 10, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(11, 'Angry', ':@', 'images/smilies/angry.png', 11, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(12, 'Blush', ':blush:', 'images/smilies/blush.png', 12, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(13, 'Confused', ':s', 'images/smilies/confused.png', 13, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(14, 'Dodgy', ':dodgy:', 'images/smilies/dodgy.png', 14, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(15, 'Exclamation', ':exclamation:', 'images/smilies/exclamation.png', 15, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(16, 'Heart', ':heart:', 'images/smilies/heart.png', 16, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(17, 'Huh', ':huh:', 'images/smilies/huh.png', 17, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(18, 'Idea', ':idea:', 'images/smilies/lightbulb.png', 18, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(19, 'Sleepy', ':sleepy:', 'images/smilies/sleepy.png', 19, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(20, 'Undecided', ':-/', 'images/smilies/undecided.png', 20, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(21, 'Cry', ':cry:', 'images/smilies/cry.png', 21, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(22, 'Sick', ':sick:', 'images/smilies/sick.png', 22, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(23, 'Arrow', ':arrow:', 'images/smilies/arrow.png', 23, 1);";
|
||||
$inserts[] = "INSERT INTO mybb_smilies (sid, name, find, image, disporder, showclickable) VALUES(24, 'My', ':my:', 'images/smilies/my.png', 24, 1);";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Google','Googlebot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Bing','bingbot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Alexa Internet','ia_archiver');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Ask.com','Teoma');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Baidu','Baiduspider');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Yandex','YandexBot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Facebook','facebookexternalhit');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Twitter','Twitterbot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Internet Archive','archive.org_bot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Discord','Discordbot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Applebot','Applebot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('CheckHost','CheckHost');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('Pingdom','Pingdom.com_bot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('DuckDuckGo','DuckDuckBot');";
|
||||
$inserts[] = "INSERT INTO mybb_spiders (name,useragent) VALUES ('UptimeRobot','UptimeRobot');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('1','calendar','<lang:group_calendar>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('2','editpost','<lang:group_editpost>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('3','forumbit','<lang:group_forumbit>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('4','forumjump','<lang:group_forumjump>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('5','forumdisplay','<lang:group_forumdisplay>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('6','index','<lang:group_index>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('7','error','<lang:group_error>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('8','memberlist','<lang:group_memberlist>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('9','multipage','<lang:group_multipage>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('10','private','<lang:group_private>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('11','portal','<lang:group_portal>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('12','postbit','<lang:group_postbit>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('13','posticons','<lang:group_posticons>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('14','showthread','<lang:group_showthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('15','usercp','<lang:group_usercp>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('16','online','<lang:group_online>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('17','moderation','<lang:group_moderation>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('18','nav','<lang:group_nav>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('19','search','<lang:group_search>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('20','showteam','<lang:group_showteam>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('21','reputation','<lang:group_reputation>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('22','newthread','<lang:group_newthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('23','newreply','<lang:group_newreply>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('24','member','<lang:group_member>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('25','warnings','<lang:group_warning>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('26','global','<lang:group_global>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('27','header','<lang:group_header>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('28','managegroup','<lang:group_managegroup>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('29','misc','<lang:group_misc>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('30','modcp','<lang:group_modcp>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('31','announcement','<lang:group_announcement>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('32','polls','<lang:group_polls>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('33','post','<lang:group_post>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('34','printthread','<lang:group_printthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('35','report','<lang:group_report>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('36','smilieinsert','<lang:group_smilieinsert>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('37','stats','<lang:group_stats>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('38','xmlhttp','<lang:group_xmlhttp>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('39','footer','<lang:group_footer>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('40','video','<lang:group_video>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('41','sendthread','<lang:group_sendthread>','1');";
|
||||
$inserts[] = "INSERT INTO mybb_templategroups (gid,prefix,title,isdefault) VALUES ('42','mycode','<lang:group_mycode>','1');";
|
||||
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (1, 0, 'Newbie', 1, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (2, 1, 'Junior Member', 2, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (3, 50, 'Member', 3, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (4, 250, 'Senior Member', 4, '');";
|
||||
$inserts[] = "INSERT INTO mybb_usertitles (utid, posts, title, stars, starimage) VALUES (5, 750, 'Posting Freak', 5, '');";
|
||||
1144
webroot/forum/install/resources/pgsql_db_tables.php
Normal file
1144
webroot/forum/install/resources/pgsql_db_tables.php
Normal file
File diff suppressed because it is too large
Load Diff
2566
webroot/forum/install/resources/settings.xml
Normal file
2566
webroot/forum/install/resources/settings.xml
Normal file
File diff suppressed because it is too large
Load Diff
1060
webroot/forum/install/resources/sqlite_db_tables.php
Normal file
1060
webroot/forum/install/resources/sqlite_db_tables.php
Normal file
File diff suppressed because it is too large
Load Diff
159
webroot/forum/install/resources/tasks.xml
Normal file
159
webroot/forum/install/resources/tasks.xml
Normal file
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tasks version="1400" exported="">
|
||||
<task>
|
||||
<title>Hourly Cleanup</title>
|
||||
<description><![CDATA[Cleans out old searches, captcha images, registration questions and expires redirects.]]></description>
|
||||
<file>hourlycleanup</file>
|
||||
<minute>0</minute>
|
||||
<hour>*</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Daily Cleanup</title>
|
||||
<description><![CDATA[Cleans out old sessions and read threads.]]></description>
|
||||
<file>dailycleanup</file>
|
||||
<minute>0</minute>
|
||||
<hour>0</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Half-hourly User Cleanup</title>
|
||||
<description><![CDATA[Automatically expires bans, warnings and posting suspension and moderation times for users.]]></description>
|
||||
<file>usercleanup</file>
|
||||
<minute>30,59</minute>
|
||||
<hour>*</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Weekly Backup</title>
|
||||
<description><![CDATA[Automatically backups your MyBB tables to your backups directory.]]></description>
|
||||
<file>backupdb</file>
|
||||
<minute>0</minute>
|
||||
<hour>0</hour>
|
||||
<day>*</day>
|
||||
<weekday>0</weekday>
|
||||
<month>*</month>
|
||||
<enabled>0</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Promotion System</title>
|
||||
<description><![CDATA[Automatically runs the promotion system every 20 minutes.]]></description>
|
||||
<file>promotions</file>
|
||||
<minute>5,25,45</minute>
|
||||
<hour>*</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Thread Views</title>
|
||||
<description><![CDATA[Automatically updates thread views every 15 minutes. This task will automatically be enabled or disabled when changing the 'Delayed Thread Views' setting.]]></description>
|
||||
<file>threadviews</file>
|
||||
<minute>10,25,40,55</minute>
|
||||
<hour>*</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>0</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Tables Check</title>
|
||||
<description><![CDATA[Automatically runs a table check and attempts to repair any crashed tables.]]></description>
|
||||
<file>checktables</file>
|
||||
<minute>0</minute>
|
||||
<hour>*</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>0</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Log Pruning</title>
|
||||
<description><![CDATA[Automatically cleans up old MyBB log files (administrator, moderator, task, promotion, and mail logs.)]]></description>
|
||||
<file>logcleanup</file>
|
||||
<minute>21</minute>
|
||||
<hour>5</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Mass Mail</title>
|
||||
<description><![CDATA[Automatically sends any queued mass mailings every 15 minutes.]]></description>
|
||||
<file>massmail</file>
|
||||
<minute>10,25,40,55</minute>
|
||||
<hour>*</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>User Pruning</title>
|
||||
<description><![CDATA[Automatically prunes users based on criteria set in the settings every day.]]></description>
|
||||
<file>userpruning</file>
|
||||
<minute>0</minute>
|
||||
<hour>2</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Delayed Moderation</title>
|
||||
<description><![CDATA[Automatically performs delayed moderation actions every 24 hours.]]></description>
|
||||
<file>delayedmoderation</file>
|
||||
<minute>0</minute>
|
||||
<hour>0</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Version Check</title>
|
||||
<description><![CDATA[Automatically checks for news and new versions of MyBB every day.]]></description>
|
||||
<file>versioncheck</file>
|
||||
<minute>0</minute>
|
||||
<hour>0</hour>
|
||||
<day>*</day>
|
||||
<weekday>*</weekday>
|
||||
<month>*</month>
|
||||
<enabled>1</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
<task>
|
||||
<title>Stylesheet Re-Cache</title>
|
||||
<description><![CDATA[Re-caches all stylesheets to the filesystem, including minifying the styles.]]></description>
|
||||
<file>recachestylesheets</file>
|
||||
<minute>0</minute>
|
||||
<hour>0</hour>
|
||||
<day>1</day>
|
||||
<weekday>0</weekday>
|
||||
<month>0</month>
|
||||
<enabled>0</enabled>
|
||||
<logging>1</logging>
|
||||
</task>
|
||||
</tasks>
|
||||
408
webroot/forum/install/resources/upgrade1.php
Normal file
408
webroot/forum/install/resources/upgrade1.php
Normal file
@@ -0,0 +1,408 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: Release Candidate 2
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 1,
|
||||
"revert_all_themes" => 1,
|
||||
"revert_all_settings" => 1,
|
||||
"requires_deactivated_plugins" => 1,
|
||||
);
|
||||
|
||||
function upgrade1_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Changes since Release Candidate 2");
|
||||
|
||||
$contents .= "<p>Making necessary database modifications...";
|
||||
|
||||
if($db->field_exists('regip', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP regid;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE users ADD regip varchar(50) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE banned CHANGE lifted lifted varchar(40) NOT NULL;");
|
||||
|
||||
if($db->field_exists('posthash', "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP posthash;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE attachments ADD posthash varchar(50) NOT NULL AFTER pid;");
|
||||
|
||||
if($db->field_exists('thumbnail', "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP thumbnail;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE attachments ADD thumbnail blob NOT NULL");
|
||||
|
||||
if($db->field_exists('thumbnailsm', "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP thumbnailsm;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE attachments ADD thumbnailsm char(3) NOT NULL;");
|
||||
|
||||
$db->write_query("DELETE FROM attachtypes");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'Compressed Archive','','zip gz tar rar ace cab','1024');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'JPEG Image','','jpg jpe jpeg','500');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'Text Document','text/plain','txt','200');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'GIF Image','image/gif','gif','500');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'Bitmap Image','','bmp','500');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'PHP File','','php phps php3 php4','500');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'PNG Image','image/png image/x-png','png','50');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'Microsoft Word Document','','doc rtf','1024');");
|
||||
$db->write_query("INSERT INTO attachtypes VALUES(NULL,'Executable','','exe com bat','1024');");
|
||||
|
||||
if($db->field_exists('small', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE themes DROP small;");
|
||||
}
|
||||
if($db->field_exists('smallend', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE themes DROP smallend;");
|
||||
}
|
||||
if($db->field_exists('font', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE themes DROP font;");
|
||||
}
|
||||
if($db->field_exists('frontend', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE themes DROP fontend;");
|
||||
}
|
||||
if($db->field_exists('large', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE themes DROP large;");
|
||||
}
|
||||
if($db->field_exists('largeend', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE themes DROP largeend;");
|
||||
}
|
||||
|
||||
if($db->field_exists('smallfont', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP smallfont;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD smallfont varchar(150) NOT NULL;");
|
||||
|
||||
if($db->field_exists('smallfontsize', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP smallfontsize;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD smallfontsize varchar(20) NOT NULL;");
|
||||
|
||||
if($db->field_exists('normalfont', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP normalfont;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD normalfont varchar(150) NOT NULL;");
|
||||
|
||||
if($db->field_exists('normalfontsize', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP normalfontsize;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD normalfontsize varchar(20) NOT NULL;");
|
||||
|
||||
if($db->field_exists('largefont', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP largefont;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD largefont varchar(150) NOT NULL;");
|
||||
|
||||
if($db->field_exists('largefontsize', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP largefontsize;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD largefontsize varchar(20) NOT NULL;");
|
||||
|
||||
if($db->field_exists('menubgcolor', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP menubgcolor;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD menubgcolor varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists('menubgimage', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP menubgimage;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD menubgimage varchar(100) NOT NULL;");
|
||||
|
||||
if($db->field_exists('menucolor', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP menucolor;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD menucolor varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists('menuhoverbgcolor', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP menuhoverbgcolor;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD menuhoverbgcolor varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists('menuhoverbgimage', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP menuhoverbgimage;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD menuhoverbgimage varchar(100) NOT NULL;");
|
||||
|
||||
if($db->field_exists('menuhovercolor', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP menuhovercolor;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD menuhovercolor varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists('panelbgcolor', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP panelbgcolor;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD panelbgcolor varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists('panelbgimage', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP panelbgimage;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD panelbgimage varchar(100) NOT NULL;");
|
||||
|
||||
if($db->field_exists('linkhover', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP linkhover;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD linkhover varchar(15) NOT NULL AFTER link;");
|
||||
|
||||
if($db->field_exists('extracss', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP extracss;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE themes ADD extracss varchar(10) NOT NULL AFTER linkhover;");
|
||||
|
||||
|
||||
$db->write_query("UPDATE themes SET linkhover='#000000'");
|
||||
|
||||
$db->write_query("UPDATE themes SET smallfont='Verdana', smallfontsize='11px', normalfont='Verdana', normalfontsize='13px', largefont='Verdana', largefontsize='20px';");
|
||||
|
||||
$contents .= "done</p>";
|
||||
|
||||
$db->drop_table("settinggroups", false, false);
|
||||
$db->write_query("CREATE TABLE settinggroups (
|
||||
gid smallint(6) NOT NULL auto_increment,
|
||||
name varchar(220) NOT NULL default '',
|
||||
description text NOT NULL,
|
||||
disporder smallint(6) NOT NULL default '0',
|
||||
isdefault char(3) NOT NULL default '',
|
||||
PRIMARY KEY (gid)
|
||||
);");
|
||||
|
||||
$db->drop_table("settings", false, false);
|
||||
$db->write_query("CREATE TABLE settings (
|
||||
sid smallint(6) NOT NULL auto_increment,
|
||||
name varchar(120) NOT NULL default '',
|
||||
title varchar(120) NOT NULL default '',
|
||||
description text NOT NULL,
|
||||
optionscode text NOT NULL,
|
||||
value text NOT NULL,
|
||||
disporder smallint(6) NOT NULL default '0',
|
||||
gid smallint(6) NOT NULL default '0',
|
||||
PRIMARY KEY (sid)
|
||||
);");
|
||||
|
||||
$output->print_contents("$contents<p>Please click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("1_dbchanges2");
|
||||
}
|
||||
function upgrade1_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Changes since Release Candidate 2");
|
||||
|
||||
$db->write_query("DELETE FROM themes");
|
||||
$arr = @file("./resources/theme.mybb");
|
||||
$contents = @implode("", $arr);
|
||||
|
||||
// now we have $contents we can start dealing with the .theme file!
|
||||
$themee = explode("(_!&!_)", $contents);
|
||||
$thver = $themee[0];
|
||||
$thname = "Light";
|
||||
$thcontents = $themee[2];
|
||||
$thtemplates = $themee[3];
|
||||
|
||||
// go through the actual theme part (colours etc)
|
||||
$themefile = explode("|#*^^&&^^*#|", $thcontents);
|
||||
$themeq1 = "";
|
||||
$themeq2 = "";
|
||||
foreach($themefile as $key => $val)
|
||||
{
|
||||
list($item, $value) = explode("|#*!!**!!*#|", $val);
|
||||
if($db->field_exists($item, "themes"))
|
||||
{
|
||||
$themebits[$item] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
// add the theme set
|
||||
$tquery1 = "";
|
||||
$tquery2 = "";
|
||||
unset($themebits['templateset']);
|
||||
foreach($themebits as $key => $val)
|
||||
{
|
||||
if($key && $val)
|
||||
{
|
||||
$tquery1 .= ",$key";
|
||||
$tquery2 .= ",'$val'";
|
||||
}
|
||||
}
|
||||
$db->write_query("INSERT INTO themes (tid,name,templateset$tquery1) VALUES ('','((master))','$sid'$tquery2)");
|
||||
$thetid = $db->write_query("INSERT INTO themes (tid,name,templateset$tquery1) VALUES ('','$thname','$sid2'$tquery2)");
|
||||
$db->write_query("UPDATE themes SET def='1' WHERE tid='$thetid'");
|
||||
|
||||
$output->print_contents("Theme imported<p>Please click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("1_dbchanges3");
|
||||
}
|
||||
function upgrade1_dbchanges3()
|
||||
{
|
||||
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Changes since Release Candidate 2");
|
||||
|
||||
$contents .= "<p>Reinserting all board settings...";
|
||||
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (1, 'General Configuration', 'This section contains various settings such as your board name and url, as well as your website name and url.', 2, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (3, 'Date and Time Formats', 'Here you can specify the different date and time formats used to display dates and times on the forums.', 4, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (7, 'Forum Display Options', 'This section allows you to manage the various settings used on the forum fisplay (forumdisplay.php) of your boards such as enabling and disabling different features.', 6, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (8, 'Show Thread Options', 'This section allows you to manage the various settings used on the thread display page (showthread.php) of your boards such as enabling and disabling different features.', 7, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (10, 'MyCode and Formatting Options', '', 16, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (11, 'Private Messaging', 'Various options with relation to the MyBB Private Messaging system (private.php) can be managed and set here.', 11, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (12, 'Member List', 'This section allows you to control various aspects of the board member listing (memberlist.php), such as how many members to show per page, and which features to enable or disable.', 10, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (13, 'Posting', 'These options control the various elements in relation to posting messages on the forums.', 9, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (14, 'Banning Options', '', 15, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (16, 'Forum Home Options', 'This section allows you to manage the various settings used on the forum home (index.php) of your boards such as enabling and disabling different features.', 5, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (17, 'Calendar', 'The board calendar allows the public and private listing of events and members\' birthdays. This section allows you to control and manage the settings for the Calendar.', 12, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (27, 'Server and Optimization Options', 'These options allow you to set various server and optimization preferences allowing you to reduce the load on your server, and gain better performance on your board.', 3, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (19, 'User Registration and Profile Options', 'Here you can control various settings with relation to user account registration and account management.', 8, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (20, 'Clickable Smilies and BB Code', '', 17, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (21, 'Common Language Bits', '', 18, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (23, 'Who\'s Online', '', 13, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (26, 'Board Online / Offline', 'These settings allow you to globally turn your forums online or offline, and allow you to specify a reason for turning them off.', 1, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (28, 'Control Panel Preferences (Global)', '', 19, 'yes');");
|
||||
$db->write_query("INSERT INTO `settinggroups` (`gid`, `name`, `description`, `disporder`, `isdefault`) VALUES (30, 'Portal Settings', '', 14, 'yes');");
|
||||
|
||||
$db->write_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->write_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->write_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->write_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.mybb.com/community', 2, 1);");
|
||||
$db->write_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->write_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.mybb.com', 4, 1);");
|
||||
$db->write_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->write_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->write_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@mybb.com', 1, 1);");
|
||||
$db->write_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->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (11, 'threadsperpage', 'Threads Per Page', '', 'text', '20', 1, 7);");
|
||||
$db->write_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->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (13, 'hottopic', 'Replys For Hot Topic', 'The number of replies that is needed for a topic to be considered \'hot\'.', 'text', '20', 3, 7);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (14, 'cookiedomain', 'Cookie Domain', 'The domain which cookies should be set to. This can remain blank. It should also start with a . so it covers all subdomains.', 'text', '', 5, 1);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (15, 'cookiepath', 'Cookie Path', 'The path which cookies are set to, we recommend setting this to the full directory path to your forums with a trailing slash.', 'text', '', 6, 1);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (16, 'pollprefix', 'Poll Prefix', 'The prefix on forum display which contain polls.', 'text', '<b>Poll:</b>', 4, 7);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (17, 'postsperpage', 'Posts Per Page:', 'The number of posts to display per page. We recommend its not higher than 20 for people with slower connections.', 'text', '10', 1, 8);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (18, 'regdateformat', 'Registered Date Format', 'The format used on showthread where it shows when the user registered.', 'text', 'M Y', 3, 3);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (19, 'sigmycode', 'Allow MyCode in Signatures', 'Do you want to allow MyCode to be used in users\' signatures?', 'yesno', 'yes', 1, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (20, 'sigsmilies', 'Allow Smilies in Signatures', 'Do you want to allow smilies to be used in users\' signatures?', 'yesno', 'yes', 3, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (21, 'sightml', 'Allow HTML in Signatures', 'Do you want to allow HTML to be used in users\' signatures?', 'yesno', 'no', 4, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (22, 'sigimgcode', 'Allow [img] Code in Signatures', 'Do you want to allow [img] code to be used in users\' signatures?', 'yesno', 'yes', 5, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (23, 'quoteboxstyle', 'Fancy Quote Boxes', 'Selecting yes will cause quotes to be in a table and look more professional. Selecting no will show quotes in the traditional way.', 'yesno', 'yes', 1, 10);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (24, 'codeboxstyle', 'Fancy Code Boxes', 'Selecting yes will cause code to be in a table and look more professional. Selecting no will show code in the traditional way.', 'yesno', 'yes', 2, 10);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (25, 'threadusenetstyle', 'Usenet Style Thread View', 'Selecting yes will cause posts to look similar to how posts look in USENET. No will cause posts to look the modern way.', 'yesno', 'no', 3, 8);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (26, 'pmsallowhtml', 'Allow HTML', 'Selecting yes will allow HTML to be used in private messages.', 'yesno', 'no', 1, 11);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (27, 'pmsallowmycode', 'Allow MyCode', 'Selecting yes will allow MyCode to be used in private messages.', 'yesno', 'yes', 2, 11);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (28, 'pmsallowsmilies', 'Allow Smilies', 'Selecting yes will allow Smilies to be used in private messages.', 'yesno', 'yes', 3, 11);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (29, 'pmsallowimgcode', 'Allow [img] Code', 'Selecting yes will allow [img] Code to be used in private messages.', 'yesno', 'yes', 4, 11);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (30, 'siglength', 'Length limit in Signatures', 'The maximum number of characters a user can place in a signature.', 'text', '255', 6, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (31, 'messagelength', 'Maximum Message Length', 'The maximum number of characters to allow in a message. A setting of 0 allows an unlimited length.', 'text', '0', 1, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (32, 'membersperpage', 'Members Per Page', 'The number of members to show per page on the member list.', 'text', '20', 1, 12);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (33, 'load', '*NIX Load Limiting', 'Limit the maximum server load before myBB rejects people. 0 for none. Recommended limit is 5.0.', 'text', '0', 5, 27);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (34, 'emailkeep', 'Users Keep Email', 'If a current user has an email already registered in your banned list, should he be allowed to keep it.', 'yesno', 'no', 4, 14);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (35, 'ipban', 'Ban by IP', 'Here, you may specify IP addresses or a range of IP addresses. You must separate each IP with a space.', 'textarea', '', 2, 14);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (36, 'emailban', 'Ban by Email', 'You may specify specific email addresses to ban, or you may specify a domain. You must separate email addresses and domains with a space.', 'textarea', '', 3, 14);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (37, 'avatarsize', 'Max Uploaded Avatar Size', 'Maximum file size (in kilobytes) of uploaded avatars.', 'text', '10', 8, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (38, 'avatardir', 'Avatar Directory', 'The directory where your avatars are stored. These are used in the avatar list in the User CP.', 'text', 'images/avatars', 7, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (39, 'showeditedby', 'Show \'edited by\' Messages', 'Once a post is edited by a regular user, do you want to show the edited by message?', 'yesno', 'yes', 6, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (40, 'maxposts', 'Maximum Posts Per Day', 'This is the total number of posts allowed per user per day. 0 for unlimited.', 'text', '0', 2, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (41, 'showeditedbyadmin', 'Show \'edited by\' Message for Forum Staff', 'Do you want to show edited by messages for forum staff when they edit their posts?', 'yesno', 'yes', 7, 13);");
|
||||
$db->write_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->write_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->write_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->write_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@mybb.com', 2, 1);");
|
||||
$db->write_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->write_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->write_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->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (49, 'hideprivateforums', 'Hide Private Forums?', 'You can hide private forums by turning this option on. This option also hides forums on the forum jump and all subforums.', 'yesno', 'yes', 3, 16);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (50, 'showsimilarthreads', 'Show \'Similar Threads\' Table', 'The Similar Threads table shows threads that are relevant to the thread being read. You can set the relevancy below.', 'yesno', 'no', 4, 8);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (51, 'similarityrating', 'Similar Threads Relevancy Rating', 'This allows you to limit similar threads to ones more relevant (0 being not relevant). This number should not be over 10 and should not be set low (<5) for large forums.', 'text', '1', 6, 8);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (52, 'similarlimit', 'Similar Threads Limit', 'Here you can change the total amount of similar threads to be shown in the similar threads table. It is recommended that it is not over 15 for 56k users.', 'text', '10', 7, 8);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (53, 'privateeventcolor', 'Private Events Color', 'The color that private events will be shown in on the main calendar page.', 'text', 'red', 2, 17);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (54, 'publiceventcolor', 'Public Events Color', 'The color that public events will be shown in on the main calendar page.', 'text', 'green', 1, 17);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (55, 'movedprefix', 'Moved Threads Prefix', 'The prefix that threads that have been moved to another forum should have.', 'text', '<b>Moved:</b>', 5, 7);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (56, 'hottopicviews', 'Views For Hot Topic', 'The number of views a thread can have before it is considered \'hot\'.', 'text', '150', 7, 7);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (59, 'logip', 'Log Posting IP Addresses', 'Do you wish to log ip addresses of users who post, and who you want to show ip addresses to.', 'radio\r\nno=Do not log IP\r\nhide=Show to Admins & Mods\r\nshow=Show to all Users', 'hide', 3, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (60, 'statslimit', 'Stats Limit', 'The number of threads to show on the stats page for most replies and most views.', 'text', '15', 5, 1);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (65, 'modlist', 'Forums\' Moderator Listing', 'Here you can turn on or off the listing of moderators for each forum on index.php and forumdisplay.php', 'onoff', 'on', 5, 16);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (66, 'smilieinserter', 'Clickable Smilies Inserter', 'Clickable smilies will appear on the posting pages if this option is set to \'on\'.', 'onoff', 'on', 1, 20);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (67, 'smilieinsertertot', 'No. of Smilies to show', 'Enter the total number of smilies to show on the clickable smilie inserter.', 'text', '20', 2, 20);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (68, 'smilieinsertercols', 'No. of Smilie Cols to Show', 'Enter the number of columns you wish to show on the clickable smilie inserter.', 'text', '4', 3, 20);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (69, 'cantext', '\'Can\' text', 'The text that will be used in templates when the user has permission to perform an action (eg. post new threads).', 'text', '<b>can</b>', 1, 21);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (70, 'canttext', '\'Cannot\' text', 'The text that will be used in templates when the user does not have permission to perform an action (eg. post new threads).', 'text', '<b>cannot</b>', 2, 21);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (71, 'ontext', '\'On\' text', 'The text that will be used when a feature is turned On (eg. BB Code in posts).', 'text', '<b>On</b>', 3, 21);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (72, 'offtext', '\'Off\' text', 'The text that will be used when a feature is turned Off (eg. BB Code in posts).', 'text', '<b>Off</b>', 4, 21);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (73, 'showindexstats', 'Show Small Stats Section', 'Do you want to show the total number of threads, posts, members, and the last member on the forum home?', 'yesno', 'yes', 6, 16);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (74, 'regtype', 'Registration Method', 'Please select the method of registration to use when users register.', 'select\r\ninstant=Instant Activation\r\nverify=Send Email Verification\r\nrandompass=Send Random Password', 'verify', 1, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (75, 'userpppoptions', 'User Selectable Posts Per Page', 'If you would like to allow users to select how many posts are shown per page in a thread, enter the options they should be able to select separated with commas. If this is left blank they will not be able to choose how many posts are shown per page.', 'text', '5,10,20,25,30,40,50', 2, 8);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (76, 'usertppoptions', 'User Selectable Threads Per Page', 'If you would like to allow users to select how many threads per page are shown in a forum, enter the options they should be able to select separated with commas. If this is left blank they will not be able to choose how many threads are shown per page.', 'text', '10,20,25,30,40,50', 6, 7);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (77, 'wolcutoffmins', 'Cut-off Time (mins)', 'The number of minutes before a user is marked offline. Recommended: 15.', 'text', '15', 1, 23);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (78, 'postfloodcheck', 'Post Flood Checking', 'Set to on if you want to enable flood checking for posts. Specifiy the time between posts below.', 'onoff', 'on', 4, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (79, 'postfloodsecs', 'Post Flood Time', 'Set the time (in seconds) users have to wait between posting, to be in effect; the option above must be on.', 'text', '60', 5, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (80, 'gzipoutput', 'Use GZip Page Compression?', 'Do you want to compress pages in GZip format when they are sent to the browser? This means quicker downloads for your visitors, and less traffic usage for you. The level of the compression is set by the server\'s load.', 'yesno', 'yes', 1, 27);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (81, 'standardheaders', 'Send Standard Headers', 'With some web servers, this option can cause problems; with others, it is needed. ', 'yesno', 'no', 2, 27);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (82, 'nocacheheaders', 'Send No Cache Headers', 'With this option you can prevent caching of the page by the browser.', 'yesno', 'no', 3, 27);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (83, 'maxpostimages', 'Maximum Images per Post', 'Enter the maximum number of images (including smilies) a user can put in their post. Set to 0 to disable this.', 'text', '10', 8, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (84, 'maxsigimages', 'Maximum Number of Images per Signature', 'Enter the maximum number of images (including smilies) a user can put in their signature. Set to 0 to disable this.', 'text', '2', 2, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (85, 'browsingthisforum', 'Users Browsing this Forum', 'Here you can turn off the \'users browsing this forum\' feature.', 'onoff', 'on', 9, 7);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (86, 'usereferrals', 'Use Referrals System', 'Do you want to use the user referrals system on these forums?', 'yesno', 'yes', 3, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (87, 'subscribeexcerpt', 'Amount of Characters for Subscription Previews', 'How many characters of the post do you want to send with the email notification of a new reply.', 'text', '100', 9, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (93, 'cpstyle', 'Control Panel Style', 'The Default style that the control panel will use. Styles are inside the styles folder. A folder name inside that folder becomes the style title and style.css inside the style title folder is the css style file.', 'cpstyle', 'Axiom', 1, 28);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (121, 'cplanguage', 'Control Plane Language', 'The language of the control panel.', 'language', 'english', 1, 28);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (94, 'minnamelength', 'Minimum Username Length', 'The minimum number of characters a username can be when a user registers.', 'text', '3', 5, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (95, 'maxnamelength', 'Maximum Username Length', 'The maximum number of characters a username can be when a user registers.', 'text', '30', 6, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (96, 'redirects', 'Friendly Redirection Pages', 'This will enable friendly redirection pages instead of bumping the user directly to the page.', 'onoff', 'on', 4, 27);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (97, 'betweenregstime', 'Time Between Registrations', 'The amount of time (in hours) to disallow registrations for users who have already registered an account under the same ip address.', 'text', '24', 2, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (98, 'maxregsbetweentime', 'Maximum Registrations Per IP Address', 'This option allows you to set the maximum amount of times a certain user can register within the timeframe specified above.', 'text', '2', 4, 19);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (111, 'portal_showstats', 'Show forum statistics', 'Do you want to show the total number of posts, threads, members and the last registered member on the portal page?', 'yesno', 'yes', 5, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (110, 'portal_showpms', 'Show the number of PMs to users', 'Do you want to show the number of private messages the current user has in their pm system.', 'yesno', 'yes', 4, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (109, 'portal_showwelcome', 'Show the Welcome box', 'Do you want to show the welcome box to visitors / users.', 'yesno', 'yes', 3, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (108, 'portal_numannouncements', 'Number of announcements to show', 'Please enter the number of announcements to show on the main page.', 'text', '10', 2, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (103, 'portal_showstats', 'Show forum statistics', 'Do you want to show the total number of posts, threads, members and the last registered member on the portal page?', 'yesno', 'yes', 5, 29);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (104, 'portal_showwol', 'Show Whos Online', 'Do you want to show the \'whos online\' information to users when they visit the portal page?', 'yesno', 'yes', 6, 29);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (107, 'portal_announcementsfid', 'Forum ID to pull announcements from', 'Please enter the forum id (fid) of the forum you wish to pull the announcements from', 'text', '2', 1, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (106, 'portal_showdiscussionsnum', 'Number of latest discussions to show', 'Please enter the number of current forum discussions to show on the portal page.', 'text', '10', 8, 29);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (112, 'portal_showwol', 'Show Who\'s Online', 'Do you want to show the \'Who\'s online\' information to users when they visit the portal page?', 'yesno', 'yes', 6, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (113, 'portal_showsearch', 'Show Search Box', 'Do you want to show the search box, allowing users to quickly search the forums on the portal?', 'yesno', 'yes', 7, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (114, 'portal_showdiscussions', 'Show Latest Discussions', 'Do you wish to show the current forum discussions on the portal page?', 'yesno', 'yes', 8, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (115, 'portal_showdiscussionsnum', 'Number of latest discussions to show', 'Please enter the number of current forum discussions to show on the portal page.', 'text', '10', 9, 30);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (116, 'attachthumbh', 'Attached Thumbnail Maximum Height', 'Enter the width that attached thumbnails should be generated at.', 'text', '60', 12, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (117, 'attachthumbw', 'Attached Thumbnail Maximum Width', 'Enter the width that attached thumbnails should be generated at.', 'text', '60', 13, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (118, 'maxattachments', 'Maximum Attachments Per Post', 'THe maximum number of attachments a user is allowed to upload per post.', 'text', '5', 10, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (119, 'attachthumbnails', 'Show Attached Thumbnails in Posts', 'Do you want to show the generated thumbnails for attached images inside the posts?', 'yesno', 'yes', 11, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (120, 'polloptionlimit', 'Maximum Poll Option Length', 'The maximum length that each poll option can be. (Set to 0 to disable).', 'text', '250', 1, 13);");
|
||||
$db->write_query("INSERT INTO `settings` (`sid`, `name`, `title`, `description`, `optionscode`, `value`, `disporder`, `gid`) VALUES (122, 'timezoneoffset', 'Default Timezone Offset', 'Here you can set the default timezone offset for guests and members using the default offset.', 'text', '+10', 5, 3);");
|
||||
|
||||
$output->print_contents("$contents<p>Please click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("1_done");
|
||||
}
|
||||
39
webroot/forum/install/resources/upgrade10.php
Normal file
39
webroot/forum/install/resources/upgrade10.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.2.7, 1.2.8, or 1.2.9
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade10_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."templates SET version='0' WHERE version=''");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates CHANGE version version int unsigned NOT NULL default '0'");
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("10_done");
|
||||
}
|
||||
|
||||
73
webroot/forum/install/resources/upgrade11.php
Normal file
73
webroot/forum/install/resources/upgrade11.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.2.10 or 1.2.11
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade11_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
|
||||
$query = $db->simple_select("templates", "*", "title IN ('showthread_inlinemoderation','showthread_ratethread','editpost','newreply','usercp_drafts','newthread','usercp_options','forumdisplay_inlinemoderation','report','private_empty','usercp_profile','usercp_attachments','usercp_usergroups_joingroup','usercp_avatar','usercp_avatar_gallery','usercp_usergroups_memberof','managegroup','managegroup_adduser','managegroup_joinrequests','private_send','polls_editpoll','private_archive','calendar_addevent','moderation_inline_deleteposts','private_tracking','moderation_threadnotes','showthread_quickreply','member_emailuser','moderation_reports','member_login','index_loginform','moderation_deletethread','moderation_mergeposts','polls_newpoll','member_register_agreement','usercp_password','usercp_email','reputation_add','moderation_deletepoll','usercp_changeavatar','usercp_notepad','member_resetpassword','member_lostpw','usercp_changename','moderation_deleteposts','moderation_split','sendthread','usercp_editsig','private_read','error_nopermission','private_folders','moderation_move','moderation_merge','member_activate','usercp_editlists','calendar_editevent','member_resendactivation','moderation_inline_deletethreads','moderation_inline_movethreads','moderation_inline_mergeposts','moderation_inline_splitposts','member_register','showthread_moderationoptions','headerinclude','private','forumdisplay_threadlist_inlineedit_js')");
|
||||
while($template = $db->fetch_array($query))
|
||||
{
|
||||
if($template['title'] == "private_read")
|
||||
{
|
||||
$template['template'] = str_replace("private.php?action=delete&pmid={\$pm['pmid']}", "private.php?action=delete&pmid={\$pm['pmid']}&my_post_key={\$mybb->post_code}", $template['template']);
|
||||
}
|
||||
elseif($template['title'] == "showthread_moderationoptions")
|
||||
{
|
||||
$template['template'] = str_replace('<input type="hidden" name="modtype" value="thread" />', '<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
|
||||
<input type="hidden" name="modtype" value="thread" />', $template['template']);
|
||||
|
||||
$template['template'] = str_replace('moderation.php?action=\'+this.options[this.selectedIndex].value+\'&tid={$tid}&modtype=thread', 'moderation.php?action=\'+this.options[this.selectedIndex].value+\'&tid={$tid}&modtype=thread&my_post_key={$mybb->post_code}', $template['template']);
|
||||
}
|
||||
elseif($template['title'] == "headerinclude")
|
||||
{
|
||||
$template['template'] = str_replace('var cookieDomain = "{$mybb->settings[\'cookiedomain\']}";', 'var my_post_key = \'{$mybb->post_code}\';
|
||||
var cookieDomain = "{$mybb->settings[\'cookiedomain\']}";', $template['template']);
|
||||
}
|
||||
elseif($template['title'] == "forumdisplay_threadlist_inlineedit_js")
|
||||
{
|
||||
$template['template'] = str_replace('"xmlhttp.php?action=edit_subject"', '"xmlhttp.php?action=edit_subject&my_post_key="+my_post_key', $template['template']);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove any duplicates
|
||||
$template['template'] = str_replace("<input type=\"hidden\" name=\"my_post_key\" value=\"{\$mybb->post_code}\" />", "", $template['template']);
|
||||
|
||||
$template['template'] = preg_replace("#<form(.*?)method\=\\\"post\\\"(.*?)>#i", "<form$1method=\"post\"$2>\n<input type=\"hidden\" name=\"my_post_key\" value=\"{\$mybb->post_code}\" />", $template['template']);
|
||||
}
|
||||
|
||||
// Update MyBB Javascript versions (to clear cache)
|
||||
$template['template'] = str_replace("?ver=121", "?ver=1212", $template['template']);
|
||||
|
||||
$db->update_query("templates", array('template' => $db->escape_string($template['template']), 'version' => '1212'), "tid='{$template['tid']}'", 1);
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("11_done");
|
||||
}
|
||||
|
||||
1995
webroot/forum/install/resources/upgrade12.php
Normal file
1995
webroot/forum/install/resources/upgrade12.php
Normal file
File diff suppressed because it is too large
Load Diff
237
webroot/forum/install/resources/upgrade13.php
Normal file
237
webroot/forum/install/resources/upgrade13.php
Normal file
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.4 or 1.4.1
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade13_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
if($db->type == "mysql" || $db->type == "mysqli")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminsessions ADD INDEX ( `uid` )");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminsessions ADD INDEX ( `dateline` )");
|
||||
}
|
||||
|
||||
if($db->type != "sqlite")
|
||||
{
|
||||
if($db->index_exists("users", "username"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY username");
|
||||
}
|
||||
|
||||
$query = $db->simple_select("users", "username, uid", "1=1 GROUP BY uid, username HAVING count(*) > 1");
|
||||
while($user = $db->fetch_array($query))
|
||||
{
|
||||
$db->update_query("users", array('username' => $user['username']."_dup".$user['uid']), "uid='{$user['uid']}'", 1);
|
||||
}
|
||||
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD UNIQUE(username)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD UNIQUE KEY username (username)");
|
||||
}
|
||||
}
|
||||
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE longregip longregip int NOT NULL default '0'");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE longlastip longlastip int NOT NULL default '0'");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE longipaddress longipaddress int NOT NULL default '0'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE longregip longregip int(11) NOT NULL default '0'");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE longlastip longlastip int(11) NOT NULL default '0'");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE longipaddress longipaddress int(11) NOT NULL default '0'");
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("13_dbchanges1");
|
||||
}
|
||||
|
||||
function upgrade13_dbchanges1()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Post IP Repair Conversion");
|
||||
|
||||
if(!$_POST['ipspage'])
|
||||
{
|
||||
$ipp = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipp = (int)$_POST['ipspage'];
|
||||
}
|
||||
|
||||
if($_POST['ipstart'])
|
||||
{
|
||||
$startat = (int)$_POST['ipstart'];
|
||||
$upper = $startat+$ipp;
|
||||
$lower = $startat;
|
||||
}
|
||||
else
|
||||
{
|
||||
$startat = 0;
|
||||
$upper = $ipp;
|
||||
$lower = 1;
|
||||
}
|
||||
|
||||
$query = $db->simple_select("posts", "COUNT(pid) AS ipcount");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
if($upper > $cnt['ipcount'])
|
||||
{
|
||||
$upper = $cnt['ipcount'];
|
||||
}
|
||||
|
||||
echo "<p>Repairing ip {$lower} to {$upper} ({$cnt['ipcount']} Total)</p>";
|
||||
flush();
|
||||
|
||||
$ipaddress = false;
|
||||
|
||||
$query = $db->simple_select("posts", "ipaddress, longipaddress, pid", "", array('limit_start' => $lower, 'limit' => $ipp));
|
||||
while($post = $db->fetch_array($query))
|
||||
{
|
||||
// Have we already converted this ip?
|
||||
if(my_ip2long($post['ipaddress']) < 0)
|
||||
{
|
||||
$db->update_query("posts", array('longipaddress' => my_ip2long($post['ipaddress'])), "pid = '{$post['pid']}'");
|
||||
}
|
||||
$ipaddress = true;
|
||||
}
|
||||
|
||||
$remaining = $upper-$cnt['ipcount'];
|
||||
if($remaining && $ipaddress)
|
||||
{
|
||||
$nextact = "13_dbchanges1";
|
||||
$startat = $startat+$ipp;
|
||||
$contents = "<p><input type=\"hidden\" name=\"ipspage\" value=\"$ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Click Next to move on to the next set of post ips.</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$nextact = "13_dbchanges2";
|
||||
$contents = "<p>Done</p><p>All post ips have been converted to the new ip format. Click next to continue.</p>";
|
||||
}
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer($nextact);
|
||||
}
|
||||
|
||||
function upgrade13_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("User IP Repair Conversion");
|
||||
|
||||
if(!$_POST['ipspage'])
|
||||
{
|
||||
$ipp = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipp = (int)$_POST['ipspage'];
|
||||
}
|
||||
|
||||
if($_POST['ipstart'])
|
||||
{
|
||||
$startat = (int)$_POST['ipstart'];
|
||||
$upper = $startat+$ipp;
|
||||
$lower = $startat;
|
||||
}
|
||||
else
|
||||
{
|
||||
$startat = 0;
|
||||
$upper = $ipp;
|
||||
$lower = 1;
|
||||
}
|
||||
|
||||
$query = $db->simple_select("users", "COUNT(uid) AS ipcount");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
if($upper > $cnt['ipcount'])
|
||||
{
|
||||
$upper = $cnt['ipcount'];
|
||||
}
|
||||
|
||||
$contents .= "<p>Repairing ip {$lower} to {$upper} ({$cnt['ipcount']} Total)</p>";
|
||||
|
||||
$ipaddress = false;
|
||||
$update_array = array();
|
||||
|
||||
$query = $db->simple_select("users", "regip, lastip, longlastip, longregip, uid", "", array('limit_start' => $lower, 'limit' => $ipp));
|
||||
while($user = $db->fetch_array($query))
|
||||
{
|
||||
// Have we already converted this ip?
|
||||
if(my_ip2long($user['regip']) < 0)
|
||||
{
|
||||
$update_array['longregip'] = (int)my_ip2long($user['regip']);
|
||||
}
|
||||
|
||||
if(my_ip2long($user['lastip']) < 0)
|
||||
{
|
||||
$update_array['longlastip'] = (int)my_ip2long($user['lastip']);
|
||||
}
|
||||
|
||||
if(!empty($update_array))
|
||||
{
|
||||
$db->update_query("users", $update_array, "uid = '{$user['uid']}'");
|
||||
}
|
||||
|
||||
$update_array = array();
|
||||
$ipaddress = true;
|
||||
}
|
||||
|
||||
$remaining = $upper-$cnt['ipcount'];
|
||||
if($remaining && $ipaddress)
|
||||
{
|
||||
$nextact = "13_dbchanges2";
|
||||
$startat = $startat+$ipp;
|
||||
$contents .= "<p><input type=\"hidden\" name=\"ipspage\" value=\"$ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Click Next to move on to the next set of user ips.</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$nextact = "13_done";
|
||||
$contents .= "<p>Done</p><p>All user ips have been converted to the new ip format. Click next to continue.</p>";
|
||||
}
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer($nextact);
|
||||
}
|
||||
|
||||
216
webroot/forum/install/resources/upgrade14.php
Normal file
216
webroot/forum/install/resources/upgrade14.php
Normal file
@@ -0,0 +1,216 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.4.2 or 1.4.3
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade14_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
// TODO: Need to check for PostgreSQL / SQLite support
|
||||
|
||||
if($db->field_exists('codepress', "adminoptions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP codepress;");
|
||||
}
|
||||
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD codepress int NOT NULL default '1' AFTER cpstyle");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD codepress int(1) NOT NULL default '1' AFTER cpstyle");
|
||||
}
|
||||
|
||||
if($db->type != "sqlite")
|
||||
{
|
||||
$longregip_index = $db->index_exists("users", "longregip");
|
||||
$longlastip_index = $db->index_exists("users", "longlastip");
|
||||
|
||||
if($longlastip_index == true)
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY longlastip");
|
||||
}
|
||||
|
||||
if($longregip_index == true)
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY longregip");
|
||||
}
|
||||
|
||||
$longipaddress_index = $db->index_exists("posts", "longipaddress");
|
||||
if($longipaddress_index == true)
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts DROP KEY longipaddress");
|
||||
}
|
||||
}
|
||||
|
||||
if($db->field_exists('loginattempts', "sessions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions DROP loginattempts;");
|
||||
}
|
||||
|
||||
if($db->field_exists('loginattempts', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP loginattempts;");
|
||||
}
|
||||
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD loginattempts smallint NOT NULL default '1';");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD loginattempts tinyint(2) NOT NULL default '1';");
|
||||
}
|
||||
|
||||
if($db->field_exists('failedlogin', "sessions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions DROP failedlogin;");
|
||||
}
|
||||
|
||||
if($db->field_exists('failedlogin', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP failedlogin;");
|
||||
}
|
||||
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD failedlogin bigint NOT NULL default '0';");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD failedlogin bigint(30) NOT NULL default '0';");
|
||||
}
|
||||
|
||||
if($db->type == "mysql" || $db->type == "mysqli")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD INDEX longregip (longregip)");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD INDEX longlastip (longlastip)");
|
||||
}
|
||||
|
||||
if($db->type == "sqlite")
|
||||
{
|
||||
// Because SQLite 2 nor 3 allows changing a column with a primary key constraint we have to completely rebuild the entire table
|
||||
// *sigh* This is the 21st century, right?
|
||||
$query = $db->simple_select("datacache");
|
||||
while($datacache = $db->fetch_array($query))
|
||||
{
|
||||
$temp_datacache[$datacache['title']] = array('title' => $db->escape_string($datacache['title']), 'cache' => $db->escape_string($datacache['cache']));
|
||||
}
|
||||
|
||||
$db->write_query("DROP TABLE ".TABLE_PREFIX."datacache");
|
||||
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."datacache (
|
||||
title varchar(50) NOT NULL default '' PRIMARY KEY,
|
||||
cache mediumTEXT NOT NULL
|
||||
);");
|
||||
|
||||
reset($temp_datacache);
|
||||
foreach($temp_datacache as $data)
|
||||
{
|
||||
$db->insert_query("datacache", $data);
|
||||
}
|
||||
}
|
||||
else if($db->type == "pgsql")
|
||||
{
|
||||
if(!$db->index_exists("datacache", "title"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."datacache ADD PRIMARY KEY (title)");
|
||||
}
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("14_dbchanges1");
|
||||
}
|
||||
|
||||
function upgrade14_dbchanges1()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
if($db->type == "mysql" || $db->type == "mysqli")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts ADD INDEX longipaddress (longipaddress)");
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("14_dbchanges2");
|
||||
}
|
||||
|
||||
function upgrade14_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Cleaning up old Settings & Groups");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
$db->delete_query("settinggroups", "name='banning' AND isdefault='0'", 1);
|
||||
|
||||
$db->delete_query("settings", "name='bannedusernames'", 1);
|
||||
$db->delete_query("settings", "name='bannedips'", 1);
|
||||
$db->delete_query("settings", "name='bannedemails'", 1);
|
||||
$db->delete_query("settings", "name='publiceventcolor'", 1);
|
||||
$db->delete_query("settings", "name='privateeventcolor'", 1);
|
||||
$db->delete_query("settings", "name='cssmedium'", 1);
|
||||
|
||||
$db->delete_query("templates", "title='usercp_options_timezoneselect' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='moderation_reports' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='moderation_reports_report' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='moderation_reports_multipage' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='moderation_allreports' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='showthread_ratingdisplay' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='moderation_getip_adminoptions' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_eventbit_public' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_daybit_today' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_daybit' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='online_iplookup' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='online_iplookup_adminoptions' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='online_row_ip' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_eventbit_dates' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_eventbit_dates_recurring' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_eventbit_times' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_editevent_normal' AND sid != '-1'");
|
||||
$db->delete_query("templates", "title='calendar_editevent_recurring' AND sid != '-1'");
|
||||
|
||||
$db->update_query("helpdocs", array('document' => $db->escape_string("MyBB makes use of cookies to store your login information if you are registered, and your last visit if you are not.
|
||||
<br /><br />Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk.
|
||||
<br /><br />Cookies on this forum also track the specific topics you have read and when you last read them.
|
||||
<br /><br />To clear all cookies set by this forum, you can click <a href=\"misc.php?action=clearcookies&key={1}\">here</a>.")), "hid='3'", 1);
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("14_done");
|
||||
}
|
||||
|
||||
153
webroot/forum/install/resources/upgrade15.php
Normal file
153
webroot/forum/install/resources/upgrade15.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.4.4
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade15_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb, $cache;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
if($db->type != "pgsql")
|
||||
{
|
||||
$db->update_query("settinggroups", array('isdefault' => '1'), "isdefault='yes'");
|
||||
$db->update_query("settinggroups", array('isdefault' => '0'), "isdefault='no'");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."events CHANGE timezone timezone varchar(4) NOT NULL default '0'");
|
||||
}
|
||||
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."warnings ALTER COLUMN revokereason SET default ''");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."warnings ALTER COLUMN notes SET default ''");
|
||||
}
|
||||
|
||||
$cache->update("internal_settings", array('encryption_key' => random_str(32)));
|
||||
|
||||
if($db->type != "sqlite")
|
||||
{
|
||||
$ip_index = $db->index_exists("sessions", "ip");
|
||||
|
||||
if($ip_index == false)
|
||||
{
|
||||
if($db->type == "pgsql")
|
||||
{
|
||||
$db->write_query("CREATE INDEX ip ON ".TABLE_PREFIX."sessions (ip)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions ADD INDEX (`ip`)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("15_usernameverify");
|
||||
}
|
||||
|
||||
function upgrade15_usernameverify()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p><span style=\"font-size: xx-large\">WARNING - PLEASE READ THE FOLLOWING:</span> The next step of this process will remove <strong>ALL</strong> commas (,) from the <i>usernames</i> of your forum whom contain them. The reason for this change is commas in usernames can make the private messages in MyBB return errors when sending to these users.</p>";
|
||||
flush();
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process once you have read the warning.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("15_usernameupdate");
|
||||
}
|
||||
|
||||
function upgrade15_usernameupdate()
|
||||
{
|
||||
global $db, $output, $mybb, $plugins;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing username updates..</p>";
|
||||
flush();
|
||||
|
||||
require_once MYBB_ROOT."inc/datahandler.php";
|
||||
require_once MYBB_ROOT."inc/datahandlers/user.php";
|
||||
// Load plugin system for datahandler
|
||||
require_once MYBB_ROOT."inc/class_plugins.php";
|
||||
$plugins = new pluginSystem;
|
||||
|
||||
$not_renameable = array();
|
||||
|
||||
// Because commas can cause some problems with private message sending in usernames we have to remove them
|
||||
$query = $db->simple_select("users", "uid, username", "username LIKE '%,%'");
|
||||
while($user = $db->fetch_array($query))
|
||||
{
|
||||
$prefix = '';
|
||||
$userhandler = new UserDataHandler('update');
|
||||
|
||||
do
|
||||
{
|
||||
$username = str_replace(',', '', $user['username']).'_'.$prefix;
|
||||
|
||||
$updated_user = array(
|
||||
"uid" => $user['uid'],
|
||||
"username" => $username
|
||||
);
|
||||
$userhandler->set_data($updated_user);
|
||||
|
||||
++$prefix;
|
||||
}
|
||||
while(!$userhandler->verify_username() || $userhandler->verify_username_exists());
|
||||
|
||||
if(!$userhandler->validate_user())
|
||||
{
|
||||
$not_renameable[] = htmlspecialchars_uni($user['username']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->update_query("users", array('username' => $db->escape_string($username)), "uid='{$user['uid']}'");
|
||||
$db->update_query("posts", array('username' => $db->escape_string($username)), "uid='{$user['uid']}'");
|
||||
$db->update_query("threads", array('username' => $db->escape_string($username)), "uid='{$user['uid']}'");
|
||||
$db->update_query("threads", array('lastposter' => $db->escape_string($username)), "lastposteruid='{$user['uid']}'");
|
||||
$db->update_query("forums", array('lastposter' => $db->escape_string($username)), "lastposteruid='{$user['uid']}'");
|
||||
|
||||
update_stats(array("numusers" => "+0"));
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($not_renameable))
|
||||
{
|
||||
echo "<span style=\"color: red;\">NOTICE:</span> The following users could not be renamed automatically. Please rename these users in the Admin CP manually after the upgrade process has finished completing:<br />
|
||||
<ul>
|
||||
<li>";
|
||||
echo implode('</li>\n<li>', $not_renameable);
|
||||
echo "</li>
|
||||
</ul>";
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("15_done");
|
||||
}
|
||||
|
||||
25
webroot/forum/install/resources/upgrade16.php
Normal file
25
webroot/forum/install/resources/upgrade16.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11 or 1.4.12
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do from 1.4.5 to 1.4.13 */
|
||||
|
||||
961
webroot/forum/install/resources/upgrade17.php
Normal file
961
webroot/forum/install/resources/upgrade17.php
Normal file
@@ -0,0 +1,961 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.4.13 or 1.4.14
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade17_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb, $cache;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
echo "<p>Adding index to private messages table ... ";
|
||||
flush();
|
||||
|
||||
if($db->type == "mysql" || $db->type == "mysqli")
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages ADD INDEX ( `toid` )");
|
||||
}
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("17_dbchanges2");
|
||||
}
|
||||
|
||||
function upgrade17_dbchanges2()
|
||||
{
|
||||
global $db, $output, $mybb, $cache;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
// Update our version history first
|
||||
$version_history = array();
|
||||
$dh = opendir(INSTALL_ROOT."resources");
|
||||
while(($file = readdir($dh)) !== false)
|
||||
{
|
||||
if(preg_match("#upgrade([0-9]+).php$#i", $file, $match))
|
||||
{
|
||||
$version_history[$match[1]] = $match[1];
|
||||
}
|
||||
}
|
||||
sort($version_history, SORT_NUMERIC);
|
||||
|
||||
// This script isn't done yet!
|
||||
unset($version_history['17']);
|
||||
|
||||
$cache->update("version_history", $version_history);
|
||||
|
||||
if($db->field_exists('prefix', 'threads'))
|
||||
{
|
||||
$db->drop_column("threads", "prefix");
|
||||
}
|
||||
|
||||
if($db->field_exists('loginattempts', "adminoptions"))
|
||||
{
|
||||
$db->drop_column("adminoptions", "loginattempts");
|
||||
}
|
||||
|
||||
if($db->field_exists('loginlockoutexpiry', "adminoptions"))
|
||||
{
|
||||
$db->drop_column("adminoptions", "loginlockoutexpiry");
|
||||
}
|
||||
|
||||
if($db->field_exists('canonlyviewownthreads', "forumpermissions"))
|
||||
{
|
||||
$db->drop_column("forumpermissions", "canonlyviewownthreads");
|
||||
}
|
||||
|
||||
if($db->field_exists('isgroup', 'moderators'))
|
||||
{
|
||||
$db->drop_column("moderators", "isgroup");
|
||||
}
|
||||
|
||||
if($db->field_exists('referrals', 'promotions'))
|
||||
{
|
||||
$db->drop_column("promotions", "referrals");
|
||||
}
|
||||
|
||||
if($db->field_exists('referralstype', 'promotions'))
|
||||
{
|
||||
$db->drop_column("promotions", "referralstype");
|
||||
}
|
||||
|
||||
if($db->field_exists('pid', 'reputation'))
|
||||
{
|
||||
$db->drop_column("reputation", "pid");
|
||||
}
|
||||
|
||||
if($db->field_exists('allowvideocode', 'calendars'))
|
||||
{
|
||||
$db->drop_column("calendars", "allowvideocode");
|
||||
}
|
||||
|
||||
if($db->field_exists('allowvideocode', 'forums'))
|
||||
{
|
||||
$db->drop_column("forums", "allowvideocode");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column("threads", "prefix", "smallint NOT NULL default '0' AFTER subject");
|
||||
$db->add_column("adminoptions", "loginattempts", "int NOT NULL default '0'");
|
||||
$db->add_column("adminoptions", "loginlockoutexpiry", "int NOT NULL default '0'");
|
||||
$db->add_column("forumpermissions", "canonlyviewownthreads", "int NOT NULL default '0' AFTER canviewthreads");
|
||||
$db->add_column("moderators", "isgroup", "int NOT NULL default '0'");
|
||||
$db->add_column("promotions", "referrals", "int NOT NULL default '0' AFTER reputationtype");
|
||||
$db->add_column("promotions", "referralstype", "char(2) NOT NULL default '' AFTER referrals");
|
||||
$db->add_column("reputation", "pid", "int NOT NULL default '0'");
|
||||
$db->add_column("calendars", "allowvideocode", "int NOT NULL default '0' AFTER allowimgcode");
|
||||
$db->add_column("forums", "allowvideocode", "int NOT NULL default '0' AFTER allowimgcode");
|
||||
break;
|
||||
case "sqlite":
|
||||
$db->add_column("threads", "prefix", "smallint NOT NULL default '0' AFTER subject");
|
||||
$db->add_column("adminoptions", "loginattempts", "int NOT NULL default '0'");
|
||||
$db->add_column("adminoptions", "loginlockoutexpiry", "int NOT NULL default '0'");
|
||||
$db->add_column("forumpermissions", "canonlyviewownthreads", "int NOT NULL default '0' AFTER canviewthreads");
|
||||
$db->add_column("moderators", "isgroup", "int NOT NULL default '0'");
|
||||
$db->add_column("promotions", "referrals", "int NOT NULL default '0' AFTER reputationtype");
|
||||
$db->add_column("promotions", "referralstype", "varchar(2) NOT NULL default '' AFTER referrals");
|
||||
$db->add_column("reputation", "pid", "int NOT NULL default '0'");
|
||||
$db->add_column("calendars", "allowvideocode", "int(1) NOT NULL default '0' AFTER allowimgcode");
|
||||
$db->add_column("forums", "allowvideocode", "int(1) NOT NULL default '0' AFTER allowimgcode");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("threads", "prefix", "smallint unsigned NOT NULL default '0' AFTER subject");
|
||||
$db->add_column("adminoptions", "loginattempts", "int unsigned NOT NULL default '0'");
|
||||
$db->add_column("adminoptions", "loginlockoutexpiry", "int unsigned NOT NULL default '0'");
|
||||
$db->add_column("forumpermissions", "canonlyviewownthreads", "int(1) NOT NULL default '0' AFTER canviewthreads");
|
||||
$db->add_column("moderators", "isgroup", "int(1) unsigned NOT NULL default '0'");
|
||||
$db->add_column("promotions", "referrals", "int NOT NULL default '0' AFTER reputationtype");
|
||||
$db->add_column("promotions", "referralstype", "varchar(2) NOT NULL default '' AFTER referrals");
|
||||
$db->add_column("reputation", "pid", "int unsigned NOT NULL default '0'");
|
||||
$db->add_column("calendars", "allowvideocode", "int(1) NOT NULL default '0' AFTER allowimgcode");
|
||||
$db->add_column("forums", "allowvideocode", "int(1) NOT NULL default '0' AFTER allowimgcode");
|
||||
}
|
||||
|
||||
$db->update_query("forums", array('allowvideocode' => '1'));
|
||||
$db->update_query("calendars", array('allowvideocode' => '1'));
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("17_dbchanges3");
|
||||
}
|
||||
|
||||
function upgrade17_dbchanges3()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('canundovotes', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "canundovotes");
|
||||
}
|
||||
|
||||
if($db->field_exists('maxreputationsperuser', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "maxreputationsperuser");
|
||||
}
|
||||
|
||||
if($db->field_exists('maxreputationsperthread', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "maxreputationsperthread");
|
||||
}
|
||||
|
||||
if($db->field_exists('receivefrombuddy', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "receivefrombuddy");
|
||||
}
|
||||
|
||||
if($db->field_exists('suspendsignature', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "suspendsignature");
|
||||
}
|
||||
|
||||
if($db->field_exists('suspendsigtime', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "suspendsigtime");
|
||||
}
|
||||
|
||||
if($db->field_exists('loginattempts', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "loginattempts");
|
||||
}
|
||||
|
||||
if($db->field_exists('failedlogin', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "failedlogin");
|
||||
}
|
||||
|
||||
if($db->field_exists('usernotes', "users"))
|
||||
{
|
||||
$db->drop_column("users", "usernotes");
|
||||
}
|
||||
|
||||
if($db->field_exists('referrals', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "referrals");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column("usergroups", "canundovotes", "int NOT NULL default '0' AFTER canvotepolls");
|
||||
$db->add_column("usergroups", "maxreputationsperuser", "bigint NOT NULL default '0' AFTER maxreputationsday");
|
||||
$db->add_column("usergroups", "maxreputationsperthread", "bigint NOT NULL default '0' AFTER maxreputationsperuser");
|
||||
$db->add_column("users", "receivefrombuddy", "int NOT NULL default '0'");
|
||||
$db->add_column("users", "suspendsignature", "int NOT NULL default '0'");
|
||||
$db->add_column("users", "suspendsigtime", "bigint NOT NULL default '0'");
|
||||
$db->add_column("users", "loginattempts", "smallint NOT NULL default '1'");
|
||||
$db->add_column("users", "failedlogin", "bigint NOT NULL default '0'");
|
||||
$db->add_column("users", "usernotes", "text NOT NULL default ''");
|
||||
$db->add_column("users", "referrals", "int NOT NULL default '0' AFTER referrer");
|
||||
break;
|
||||
case "sqlite":
|
||||
$db->add_column("usergroups", "canundovotes", "int NOT NULL default '0' AFTER canvotepolls");
|
||||
$db->add_column("usergroups", "maxreputationsperuser", "bigint NOT NULL default '0' AFTER maxreputationsday");
|
||||
$db->add_column("usergroups", "maxreputationsperthread", "bigint NOT NULL default '0' AFTER maxreputationsperuser");
|
||||
$db->add_column("users", "receivefrombuddy", "int NOT NULL default '0'");
|
||||
$db->add_column("users", "suspendsignature", "int NOT NULL default '0'");
|
||||
$db->add_column("users", "suspendsigtime", "bigint NOT NULL default '0'");
|
||||
$db->add_column("users", "loginattempts", "tinyint NOT NULL default '1'");
|
||||
$db->add_column("users", "failedlogin", "bigint NOT NULL default '0'");
|
||||
$db->add_column("users", "usernotes", "text NOT NULL default ''");
|
||||
$db->add_column("users", "referrals", "int NOT NULL default '0' AFTER referrer");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("usergroups", "canundovotes", "int(1) NOT NULL default '0' AFTER canvotepolls");
|
||||
$db->add_column("usergroups", "maxreputationsperuser", "bigint(30) NOT NULL default '0' AFTER maxreputationsday");
|
||||
$db->add_column("usergroups", "maxreputationsperthread", "bigint(30) NOT NULL default '0' AFTER maxreputationsperuser");
|
||||
$db->add_column("users", "receivefrombuddy", "int(1) NOT NULL default '0'");
|
||||
$db->add_column("users", "suspendsignature", "int(1) NOT NULL default '0'");
|
||||
$db->add_column("users", "suspendsigtime", "bigint(30) NOT NULL default '0'");
|
||||
$db->add_column("users", "loginattempts", "tinyint(2) NOT NULL default '1'");
|
||||
$db->add_column("users", "failedlogin", "bigint(30) NOT NULL default '0'");
|
||||
$db->add_column("users", "usernotes", "text NOT NULL");
|
||||
$db->add_column("users", "referrals", "int unsigned NOT NULL default '0' AFTER referrer");
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer("17_dbchanges4");
|
||||
}
|
||||
|
||||
function upgrade17_dbchanges4()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('remember', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "remember");
|
||||
}
|
||||
|
||||
if($db->type != "pgsql")
|
||||
{
|
||||
// PgSQL doesn't support longtext
|
||||
$db->modify_column("searchlog", "threads", "longtext NOT NULL");
|
||||
$db->modify_column("searchlog", "posts", "longtext NOT NULL");
|
||||
}
|
||||
|
||||
if($db->field_exists("uid", "moderators") && !$db->field_exists("id", "moderators"))
|
||||
{
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->rename_column("moderators", "uid", "id", "int", true, "'0'");
|
||||
break;
|
||||
default:
|
||||
$db->rename_column("moderators", "uid", "id", "int unsigned NOT NULL default '0'");
|
||||
}
|
||||
}
|
||||
|
||||
if($db->table_exists("threadprefixes"))
|
||||
{
|
||||
$db->drop_table("threadprefixes");
|
||||
}
|
||||
|
||||
if($db->table_exists("delayedmoderation"))
|
||||
{
|
||||
$db->drop_table("delayedmoderation");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "sqlite":
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."threadprefixes (
|
||||
rid INTEGER PRIMARY KEY,
|
||||
tid int NOT NULL default '0',
|
||||
uid int NOT NULL default '0',
|
||||
rating smallint NOT NULL default '0',
|
||||
ipaddress varchar(30) NOT NULL default ''
|
||||
);");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."delayedmoderation (
|
||||
did integer PRIMARY KEY,
|
||||
type varchar(30) NOT NULL default '',
|
||||
delaydateline bigint(30) NOT NULL default '0',
|
||||
uid int(10) NOT NULL default '0',
|
||||
fid smallint(5) NOT NULL default '0',
|
||||
tids text NOT NULL,
|
||||
dateline bigint(30) NOT NULL default '0',
|
||||
inputs text NOT NULL
|
||||
);");
|
||||
break;
|
||||
case "pgsql":
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."threadprefixes (
|
||||
pid serial,
|
||||
prefix varchar(120) NOT NULL default '',
|
||||
displaystyle varchar(200) NOT NULL default '',
|
||||
forums text NOT NULL,
|
||||
groups text NOT NULL,
|
||||
PRIMARY KEY(pid)
|
||||
);");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."delayedmoderation (
|
||||
did serial,
|
||||
type varchar(30) NOT NULL default '',
|
||||
delaydateline bigint NOT NULL default '0',
|
||||
uid int NOT NULL default '0',
|
||||
fid smallint NOT NULL default '0',
|
||||
tids text NOT NULL,
|
||||
dateline bigint NOT NULL default '0',
|
||||
inputs text NOT NULL default '',
|
||||
PRIMARY KEY (did)
|
||||
);");
|
||||
break;
|
||||
default:
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."threadprefixes (
|
||||
pid int unsigned NOT NULL auto_increment,
|
||||
prefix varchar(120) NOT NULL default '',
|
||||
displaystyle varchar(200) NOT NULL default '',
|
||||
forums text NOT NULL,
|
||||
`groups` text NOT NULL,
|
||||
PRIMARY KEY(pid)
|
||||
) ENGINE=MyISAM;");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."delayedmoderation (
|
||||
did int unsigned NOT NULL auto_increment,
|
||||
type varchar(30) NOT NULL default '',
|
||||
delaydateline bigint(30) unsigned NOT NULL default '0',
|
||||
uid int(10) unsigned NOT NULL default '0',
|
||||
fid smallint(5) unsigned NOT NULL default '0',
|
||||
tids text NOT NULL,
|
||||
dateline bigint(30) NOT NULL default '0',
|
||||
inputs text NOT NULL,
|
||||
PRIMARY KEY (did)
|
||||
) ENGINE=MyISAM;");
|
||||
}
|
||||
|
||||
$added_tasks = sync_tasks();
|
||||
|
||||
echo "<p>Added {$added_tasks} new tasks.</p>";
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer("17_dbchanges5");
|
||||
}
|
||||
|
||||
function upgrade17_dbchanges5()
|
||||
{
|
||||
global $db, $output, $mybb, $cache;
|
||||
|
||||
if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
|
||||
{
|
||||
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
|
||||
}
|
||||
else if(file_exists(MYBB_ROOT."admin/inc/functions.php"))
|
||||
{
|
||||
require_once MYBB_ROOT."admin/inc/functions.php";
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->print_error("Please make sure your admin directory is uploaded correctly.");
|
||||
}
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
flush();
|
||||
|
||||
$db->update_query("spiders", array('name' => 'Bing'), "name='MSN Search'");
|
||||
$db->update_query("spiders", array('useragent' => 'Googlebot', 'name' => 'Google'), "useragent='google'");
|
||||
$db->update_query("spiders", array('useragent' => 'Teoma', 'name' => 'Ask.com'), "useragent='ask jeeves'");
|
||||
$db->delete_query("spiders", "name='Hot Bot'");
|
||||
$db->update_query("spiders", array('useragent' => 'archive_crawler', 'name' => 'Internet Archive'), "name='Archive.org'");
|
||||
$db->update_query("spiders", array('name' => 'Alexa Internet'), "useragent='ia_archiver'");
|
||||
$db->delete_query("spiders", "useragent='scooter'");
|
||||
$db->update_query("spiders", array('useragent' => 'Slurp'), "name='Yahoo!'");
|
||||
|
||||
$query = $db->simple_select("spiders", "COUNT(*) as numexists", "useragent='twiceler'");
|
||||
if($db->fetch_field($query, "numexists") == 0)
|
||||
{
|
||||
$db->insert_query("spiders", array('name' => "Cuil", 'useragent' => 'twiceler'));
|
||||
}
|
||||
|
||||
$query = $db->simple_select("spiders", "COUNT(*) as numexists", "useragent='Baiduspider'");
|
||||
if($db->fetch_field($query, "numexists") == 0)
|
||||
{
|
||||
$db->insert_query("spiders", array('name' => "Baidu", 'useragent' => 'Baiduspider'));
|
||||
}
|
||||
|
||||
$db->update_query("attachtypes", array('mimetype' => 'application/x-httpd-php'), "extension='php'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'text/html'), "extension='htm'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'text/html'), "extension='html'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'), "extension='docx'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'application/vnd.ms-excel'), "extension='xls'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'), "extension='xlsx'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'application/vnd.ms-powerpoint'), "extension='ppt'");
|
||||
$db->update_query("attachtypes", array('mimetype' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation'), "extension='pptx'");
|
||||
|
||||
$cache->update_moderators();
|
||||
|
||||
$db->update_query("themes", array('allowedgroups' => 'all'), "allowedgroups='' OR allowedgroups IS NULL");
|
||||
|
||||
// Add permissions for all of our new ACP pages
|
||||
change_admin_permission('config', 'thread_prefixes');
|
||||
change_admin_permission('tools', 'file_verification');
|
||||
change_admin_permission('tools', 'statistics');
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer("17_dbchanges6");
|
||||
}
|
||||
|
||||
function upgrade17_dbchanges6()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Post IP Repair Conversion");
|
||||
|
||||
if(!$_POST['ipspage'])
|
||||
{
|
||||
$ipp = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipp = (int)$_POST['ipspage'];
|
||||
}
|
||||
|
||||
if($_POST['ipstart'])
|
||||
{
|
||||
$startat = (int)$_POST['ipstart'];
|
||||
$upper = $startat+$ipp;
|
||||
$lower = $startat;
|
||||
}
|
||||
else
|
||||
{
|
||||
$startat = 0;
|
||||
$upper = $ipp;
|
||||
$lower = 1;
|
||||
}
|
||||
|
||||
$query = $db->simple_select("posts", "COUNT(pid) AS ipcount");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
if($upper > $cnt['ipcount'])
|
||||
{
|
||||
$upper = $cnt['ipcount'];
|
||||
}
|
||||
|
||||
echo "<p>Repairing ip {$lower} to {$upper} ({$cnt['ipcount']} Total)</p>";
|
||||
flush();
|
||||
|
||||
$ipaddress = false;
|
||||
|
||||
$query = $db->simple_select("posts", "ipaddress, pid", "", array('limit_start' => $lower, 'limit' => $ipp));
|
||||
while($post = $db->fetch_array($query))
|
||||
{
|
||||
$db->update_query("posts", array('longipaddress' => (int)my_ip2long($post['ipaddress'])), "pid = '{$post['pid']}'");
|
||||
$ipaddress = true;
|
||||
}
|
||||
|
||||
$remaining = $upper-$cnt['ipcount'];
|
||||
if($remaining && $ipaddress)
|
||||
{
|
||||
$nextact = "17_dbchanges6";
|
||||
$startat = $startat+$ipp;
|
||||
$contents = "<p><input type=\"hidden\" name=\"ipspage\" value=\"$ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Click Next to move on to the next set of post ips.</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$nextact = "17_dbchanges7";
|
||||
$contents = "<p>Done</p><p>All post ips have been successfully repaired. Click next to continue.</p>";
|
||||
}
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer($nextact);
|
||||
}
|
||||
|
||||
function upgrade17_dbchanges7()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("User IP Repair Conversion");
|
||||
|
||||
if(!$_POST['ipspage'])
|
||||
{
|
||||
$ipp = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipp = (int)$_POST['ipspage'];
|
||||
}
|
||||
|
||||
if($_POST['ipstart'])
|
||||
{
|
||||
$startat = (int)$_POST['ipstart'];
|
||||
$upper = $startat+$ipp;
|
||||
$lower = $startat;
|
||||
}
|
||||
else
|
||||
{
|
||||
$startat = 0;
|
||||
$upper = $ipp;
|
||||
$lower = 1;
|
||||
}
|
||||
|
||||
$query = $db->simple_select("users", "COUNT(uid) AS ipcount");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
if($upper > $cnt['ipcount'])
|
||||
{
|
||||
$upper = $cnt['ipcount'];
|
||||
}
|
||||
|
||||
$contents .= "<p>Repairing ip {$lower} to {$upper} ({$cnt['ipcount']} Total)</p>";
|
||||
|
||||
$ipaddress = false;
|
||||
$update_array = array();
|
||||
|
||||
$query = $db->simple_select("users", "regip, lastip, uid", "", array('limit_start' => $lower, 'limit' => $ipp));
|
||||
while($user = $db->fetch_array($query))
|
||||
{
|
||||
$update_array = array(
|
||||
'longregip' => (int)my_ip2long($user['regip']),
|
||||
'longlastip' => (int)my_ip2long($user['lastip'])
|
||||
);
|
||||
|
||||
$db->update_query("users", $update_array, "uid = '{$user['uid']}'");
|
||||
|
||||
$update_array = array();
|
||||
$ipaddress = true;
|
||||
}
|
||||
|
||||
$remaining = $upper-$cnt['ipcount'];
|
||||
if($remaining && $ipaddress)
|
||||
{
|
||||
$nextact = "17_dbchanges7";
|
||||
$startat = $startat+$ipp;
|
||||
$contents .= "<p><input type=\"hidden\" name=\"ipspage\" value=\"$ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Click Next to move on to the next set of user ips.</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$nextact = "17_redoconfig";
|
||||
$contents .= "<p>Done</p><p>All user ips have been successfully repaired. Click next to continue.</p>";
|
||||
}
|
||||
$output->print_contents($contents);
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer($nextact);
|
||||
}
|
||||
|
||||
function upgrade17_redoconfig()
|
||||
{
|
||||
global $db, $output, $orig_config, $mybb;
|
||||
|
||||
$config = $orig_config;
|
||||
|
||||
$output->print_header("Rewriting config.php");
|
||||
|
||||
if(!is_array($config['memcache']))
|
||||
{
|
||||
// Backup our old Config file
|
||||
@copy(MYBB_ROOT."inc/config.php", MYBB_ROOT."inc/config.backup.php");
|
||||
|
||||
$fh = @fopen(MYBB_ROOT."inc/config.php", "w");
|
||||
if(!$fh)
|
||||
{
|
||||
echo "<p><span style=\"color: red; font-weight: bold;\">Unable to open inc/config.php</span><br />Before the upgrade process can continue, you need to changes the permissions of inc/config.php so it is writable.</p>";
|
||||
$output->print_footer("17_redoconfig");
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!$config['memcache_host'])
|
||||
{
|
||||
$config['memcache_host'] = "localhost";
|
||||
}
|
||||
|
||||
if(!$config['memcache_port'])
|
||||
{
|
||||
$config['memcache_port'] = 11211;
|
||||
}
|
||||
|
||||
$comment = "";
|
||||
|
||||
if(!$db->db_encoding || !$config['database']['encoding'])
|
||||
{
|
||||
$comment = " // ";
|
||||
}
|
||||
|
||||
if(!$config['database']['encoding'])
|
||||
{
|
||||
$config['database']['encoding'] = "utf8";
|
||||
}
|
||||
|
||||
// Update SQLite selection. SQLite 2 is depreciated.
|
||||
if($config['database']['type'] == 'sqlite2' || $config['database']['type'] == 'sqlite3')
|
||||
{
|
||||
$config['database']['type'] = 'sqlite';
|
||||
}
|
||||
|
||||
// Do we have a read or a write database?
|
||||
if($config['database']['read'])
|
||||
{
|
||||
$database_config = "\$config['database']['type'] = '{$config['database']['type']}';";
|
||||
foreach(array('read', 'write') as $type)
|
||||
{
|
||||
// Multiple read/write databases?
|
||||
if($config['database'][$type][0]['database'])
|
||||
{
|
||||
$i = 0;
|
||||
foreach($config['database'][$type] as $database_connection)
|
||||
{
|
||||
$database_config .= "
|
||||
\$config['database']['{$type}'][{$i}]['database'] = '{$database_connection['database']}';
|
||||
\$config['database']['{$type}'][{$i}]['table_prefix'] = '{$database_connection['table_prefix']}';
|
||||
\$config['database']['{$type}'][{$i}]['hostname'] = '{$database_connection['hostname']}';
|
||||
\$config['database']['{$type}'][{$i}]['username'] = '{$database_connection['username']}';
|
||||
\$config['database']['{$type}'][{$i}]['password'] = '{$database_connection['password']}';";
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
// Just a single database read/write connection
|
||||
else
|
||||
{
|
||||
$database_config .= "
|
||||
\$config['database']['{$type}']['database'] = '{$config['database'][$type]['database']}';
|
||||
\$config['database']['{$type}']['table_prefix'] = '{$config['database'][$type]['table_prefix']}';
|
||||
|
||||
\$config['database']['{$type}']['hostname'] = '{$config['database'][$type]['hostname']}';
|
||||
\$config['database']['{$type}']['username'] = '{$config['database'][$type]['username']}';
|
||||
\$config['database']['{$type}']['password'] = '{$config['database'][$type]['password']}';";
|
||||
}
|
||||
}
|
||||
}
|
||||
// Standard database connection stuff
|
||||
else
|
||||
{
|
||||
$database_config = "\$config['database']['type'] = '{$config['database']['type']}';
|
||||
\$config['database']['database'] = '{$config['database']['database']}';
|
||||
\$config['database']['table_prefix'] = '{$config['database']['table_prefix']}';
|
||||
|
||||
\$config['database']['hostname'] = '{$config['database']['hostname']}';
|
||||
\$config['database']['username'] = '{$config['database']['username']}';
|
||||
\$config['database']['password'] = '{$config['database']['password']}';
|
||||
";
|
||||
}
|
||||
|
||||
$configdata = "<?php
|
||||
/**
|
||||
* Database configuration
|
||||
*
|
||||
* Please see the MyBB Docs for advanced
|
||||
* database configuration for larger installations
|
||||
* https://docs.mybb.com/
|
||||
*/
|
||||
|
||||
{$database_config}
|
||||
|
||||
/**
|
||||
* Admin CP directory
|
||||
* For security reasons, it is recommended you
|
||||
* rename your Admin CP directory. You then need
|
||||
* to adjust the value below to point to the
|
||||
* new directory.
|
||||
*/
|
||||
|
||||
\$config['admin_dir'] = '{$config['admin_dir']}';
|
||||
|
||||
/**
|
||||
* Hide all Admin CP links
|
||||
* If you wish to hide all Admin CP links
|
||||
* on the front end of the board after
|
||||
* renaming your Admin CP directory, set this
|
||||
* to 1.
|
||||
*/
|
||||
|
||||
\$config['hide_admin_links'] = {$config['hide_admin_links']};
|
||||
|
||||
/**
|
||||
* Data-cache configuration
|
||||
* The data cache is a temporary cache
|
||||
* of the most commonly accessed data in MyBB.
|
||||
* By default, the database is used to store this data.
|
||||
*
|
||||
* If you wish to use the file system (cache/ directory), MemCache, xcache, or eAccelerator
|
||||
* you can change the value below to 'files', 'memcache', 'xcache' or 'eaccelerator' from 'db'.
|
||||
*/
|
||||
|
||||
\$config['cache_store'] = '{$config['cache_store']}';
|
||||
|
||||
/**
|
||||
* Memcache configuration
|
||||
* If you are using memcache as your data-cache,
|
||||
* you need to configure the hostname and port
|
||||
* of your memcache server below.
|
||||
*
|
||||
* If not using memcache, ignore this section.
|
||||
*/
|
||||
|
||||
\$config['memcache']['host'] = '{$config['memcache_host']}';
|
||||
\$config['memcache']['port'] = {$config['memcache_port']};
|
||||
|
||||
/**
|
||||
* Super Administrators
|
||||
* A comma separated list of user IDs who cannot
|
||||
* be edited, deleted or banned in the Admin CP.
|
||||
* The administrator permissions for these users
|
||||
* cannot be altered either.
|
||||
*/
|
||||
|
||||
\$config['super_admins'] = '{$config['super_admins']}';
|
||||
|
||||
/**
|
||||
* Database Encoding
|
||||
* If you wish to set an encoding for MyBB uncomment
|
||||
* the line below (if it isn't already) and change
|
||||
* the current value to the mysql charset:
|
||||
* http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
|
||||
*/
|
||||
|
||||
{$comment}\$config['database']['encoding'] = '{$config['database']['encoding']}';
|
||||
|
||||
/**
|
||||
* Automatic Log Pruning
|
||||
* The MyBB task system can automatically prune
|
||||
* various log files created by MyBB.
|
||||
* To enable this functionality for the logs below, set the
|
||||
* the number of days before each log should be pruned.
|
||||
* If you set the value to 0, the logs will not be pruned.
|
||||
*/
|
||||
|
||||
\$config['log_pruning'] = array(
|
||||
'admin_logs' => {$config['log_pruning']['admin_logs']}, // Administrator logs
|
||||
'mod_logs' => {$config['log_pruning']['mod_logs']}, // Moderator logs
|
||||
'task_logs' => {$config['log_pruning']['task_logs']}, // Scheduled task logs
|
||||
'mail_logs' => {$config['log_pruning']['mail_logs']}, // Mail error logs
|
||||
'user_mail_logs' => {$config['log_pruning']['user_mail_logs']}, // User mail logs
|
||||
'promotion_logs' => {$config['log_pruning']['promotion_logs']} // Promotion logs
|
||||
);
|
||||
|
||||
?".">";
|
||||
fwrite($fh, $configdata);
|
||||
fclose($fh);
|
||||
}
|
||||
echo "<p>The configuration file has been successfully rewritten.</p>";
|
||||
echo "<p>Click next to continue with the upgrade process.</p>";
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer("17_updatecss");
|
||||
}
|
||||
function upgrade17_updatecss()
|
||||
{
|
||||
global $db, $output, $orig_config, $mybb;
|
||||
|
||||
if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php"))
|
||||
{
|
||||
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";
|
||||
}
|
||||
else if(file_exists(MYBB_ROOT."admin/inc/functions_themes.php"))
|
||||
{
|
||||
require_once MYBB_ROOT."admin/inc/functions_themes.php";
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->print_error("Please make sure your admin directory is uploaded correctly.");
|
||||
}
|
||||
|
||||
$output->print_header("Updating CSS");
|
||||
|
||||
$query = $db->simple_select("themestylesheets", "*", "name='global.css' OR name='usercp.css'");
|
||||
while($theme = $db->fetch_array($query))
|
||||
{
|
||||
resync_stylesheet($theme);
|
||||
}
|
||||
|
||||
$query = $db->simple_select("themestylesheets", "*", "name='global.css' OR name='usercp.css'");
|
||||
while($theme = $db->fetch_array($query))
|
||||
{
|
||||
$theme['stylesheet'] = upgrade_css_140_to_160($theme['name'], $theme['stylesheet']);
|
||||
|
||||
// Create stylesheets
|
||||
cache_stylesheet($theme['tid'], $theme['cachefile'], $theme['stylesheet']);
|
||||
|
||||
$update_stylesheet = array(
|
||||
"stylesheet" => $db->escape_string($theme['stylesheet']),
|
||||
"lastmodified" => TIME_NOW
|
||||
);
|
||||
$db->update_query("themestylesheets", $update_stylesheet, "sid='{$theme['sid']}'");
|
||||
}
|
||||
|
||||
echo "<p>The CSS has been successfully updated.</p>";
|
||||
echo "<p>Click next to continue with the upgrade process.</p>";
|
||||
|
||||
global $footer_extra;
|
||||
//$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_footer("17_done");
|
||||
}
|
||||
|
||||
function upgrade_css_140_to_160($name, $css)
|
||||
{
|
||||
// Update our CSS to the new stuff in 1.6
|
||||
$parsed_css = css_to_array($css);
|
||||
|
||||
if($name == "global.css")
|
||||
{
|
||||
if(is_array($parsed_css))
|
||||
{
|
||||
foreach($parsed_css as $class_id => $array)
|
||||
{
|
||||
switch($array['class_name'])
|
||||
{
|
||||
case '.navigation .active':
|
||||
$parsed_css[$class_id]['values'] = str_replace('font-size: small;', 'font-size: 13px;', $array['values']);
|
||||
break;
|
||||
case '.highlight':
|
||||
$parsed_css[$class_id]['values'] = str_replace('padding: 3px;', "padding-top: 3px;\n\tpadding-bottom: 3px;", $array['values']);
|
||||
break;
|
||||
case '.pm_alert':
|
||||
case '.red_alert':
|
||||
$parsed_css[$class_id]['values'] .= "\n\tmargin-bottom: 15px;";
|
||||
break;
|
||||
case '.pagination .pagination_current':
|
||||
$parsed_css[$class_id]['values'] .= "\n\tcolor: #000;";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$to_add = array(
|
||||
md5('#panel .remember_me input') => array("class_name" => '#panel .remember_me input', "values" => "vertical-align: middle;\n\tmargin-top: -1px;"),
|
||||
md5('.hiddenrow') => array("class_name" => '.hiddenrow', "values" => 'display: none;'),
|
||||
md5('.selectall') => array("class_name" => '.selectall', "values" => "background-color: #FFFBD9;\n\tfont-weight: bold;\n\ttext-align: center;"),
|
||||
md5('.repbox') => array("class_name" => '.repbox', "values" => "font-size:16px;\n\tfont-weight: bold;\n\tpadding:5px 7px 5px 7px;"),
|
||||
md5('._neutral') => array("class_name" => '._neutral', "values" => "background-color:#FAFAFA;\n\tcolor: #999999;\n\tborder:1px solid #CCCCCC;"),
|
||||
md5('._minus') => array("class_name" => '._minus', "values" => "background-color: #FDD2D1;\n\tcolor: #CB0200;\n\tborder:1px solid #980201;"),
|
||||
md5('._plus') => array("class_name" => '._plus', "values" => "background-color:#E8FCDC;\n\tcolor: #008800;\n\tborder:1px solid #008800;"),
|
||||
md5('.pagination_breadcrumb') => array("class_name" => '.pagination_breadcrumb', "values" => "background-color: #f5f5f5;\n\tborder: 1px solid #fff;\n\toutline: 1px solid #ccc;\n\tpadding: 5px;\n\tmargin-top: 5px;\n\tfont-weight: normal;"),
|
||||
md5('.pagination_breadcrumb_link') => array("class_name" => '.pagination_breadcrumb_link', "values" => "vertical-align: middle;\n\tcursor: pointer;"),
|
||||
);
|
||||
}
|
||||
else if($name == "usercp.css")
|
||||
{
|
||||
$to_add = array(
|
||||
md5('.usercp_notepad') => array("class_name" => '.usercp_notepad', "values" => "width: 99%;"),
|
||||
md5('.usercp_container') => array("class_name" => '.usercp_container', "values" => "margin: 5px;\n\tpadding: 8px;\n\tborder:1px solid #CCCCCC;"),
|
||||
);
|
||||
}
|
||||
|
||||
foreach($to_add as $class_id => $array)
|
||||
{
|
||||
if($already_parsed[$class_id])
|
||||
{
|
||||
$already_parsed[$class_id]++;
|
||||
$class_id .= "_".$already_parsed[$class_id];
|
||||
}
|
||||
else
|
||||
{
|
||||
$already_parsed[$class_id] = 1;
|
||||
}
|
||||
|
||||
$array['name'] = "";
|
||||
$array['description'] = "";
|
||||
|
||||
$parsed_css[$class_id] = $array;
|
||||
}
|
||||
|
||||
$css = "";
|
||||
foreach($parsed_css as $class_id => $array)
|
||||
{
|
||||
if($array['name'] || $array['description'])
|
||||
{
|
||||
$theme['css'] .= "/* ";
|
||||
if($array['name'])
|
||||
{
|
||||
$array['css'] .= "Name: {$array['name']}";
|
||||
|
||||
if($array['description'])
|
||||
{
|
||||
$array['css'] .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if($array['description'])
|
||||
{
|
||||
$array['css'] .= "Description: {$array['description']}";
|
||||
}
|
||||
|
||||
$array['css'] .= " */\n";
|
||||
}
|
||||
|
||||
$css .= "{$array['class_name']} {\n\t{$array['values']}\n}\n";
|
||||
}
|
||||
|
||||
return $css;
|
||||
}
|
||||
|
||||
58
webroot/forum/install/resources/upgrade18.php
Normal file
58
webroot/forum/install/resources/upgrade18.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.0
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade18_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
|
||||
// Update the usergroup sequence for pgSQL - #1094
|
||||
if($mybb->config['database']['type'] == "pgsql")
|
||||
{
|
||||
$query = $db->simple_select("usergroups", "COUNT(gid) AS group_count");
|
||||
$group_count = $db->fetch_field($query, "group_count");
|
||||
|
||||
++$group_count;
|
||||
$db->query("ALTER SEQUENCE ".$mybb->config['database']['table_prefix']."usergroups_gid_seq RESTART WITH ".$group_count."");
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("18_updatecache");
|
||||
}
|
||||
|
||||
function upgrade18_updatecache()
|
||||
{
|
||||
global $cache, $output;
|
||||
|
||||
$output->print_header("Updating Cache");
|
||||
|
||||
echo "<p>Updating cache...</p>";
|
||||
|
||||
// Update the Moderator cache - #1200
|
||||
$cache->update_moderators();
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("18_done");
|
||||
}
|
||||
24
webroot/forum/install/resources/upgrade19.php
Normal file
24
webroot/forum/install/resources/upgrade19.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.1 or 1.6.2
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.6.1 and 1.6.2 */
|
||||
|
||||
289
webroot/forum/install/resources/upgrade2.php
Normal file
289
webroot/forum/install/resources/upgrade2.php
Normal file
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: Release Candidate 3
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 1,
|
||||
"revert_all_themes" => 1,
|
||||
"revert_all_settings" => 1,
|
||||
"requires_deactivated_plugins" => 1,
|
||||
);
|
||||
|
||||
function upgrade2_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Changes since Release Candidate 3");
|
||||
|
||||
$contents .= "<p>Making necessary database modifications...";
|
||||
|
||||
$db->drop_table("badwords");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."badwords (
|
||||
bid smallint(6) NOT NULL auto_increment,
|
||||
badword varchar(100) NOT NULL,
|
||||
replacement varchar(100) NOT NULL,
|
||||
PRIMARY KEY(bid)
|
||||
);");
|
||||
|
||||
if($db->field_exists("icon", "attachtypes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachtypes DROP icon;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachtypes ADD icon varchar(100) NOT NULL;");
|
||||
|
||||
$db->delete_query("attachtypes");
|
||||
|
||||
$db->write_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->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (2, 'JPEG Image', 'image/jpeg', 'jpg', 500, 'images/attachtypes/image.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (3, 'Text Document', 'text/plain', 'txt', 200, 'images/attachtypes/txt.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (4, 'GIF Image', 'image/gif', 'gif', 500, 'images/attachtypes/image.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (6, 'PHP File', 'application/octet-stream', 'php', 500, 'images/attachtypes/php.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (7, 'PNG Image', 'image/png', 'png', 500, 'images/attachtypes/image.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (8, 'Microsoft Word Document', 'application/msword', 'doc', 1024, 'images/attachtypes/doc.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (9, '', 'application/octet-stream', 'htm', 100, 'images/attachtypes/html.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (10, '', 'application/octet-stream', 'html', 100, 'images/attachtypes/html.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (11, '', 'image/jpeg', 'jpeg', 500, 'images/attachtypes/image.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (12, '', 'application/x-gzip', 'gz', 1024, 'images/attachtypes/tgz.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (13, '', 'application/x-tar', 'tar', 1024, 'images/attachtypes/tar.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (14, '', 'text/css', 'css', 100, 'images/attachtypes/css.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (15, '', 'application/pdf', 'pdf', 2048, 'images/attachtypes/pdf.gif');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."attachtypes (atid, name, mimetype, extension, maxsize, icon) VALUES (16, '', 'image/bmp', 'bmp', 500, 'images/attachtypes/image.gif');");
|
||||
|
||||
if($db->field_exists("outerwidth", "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP outerwidth;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes ADD outerwidth varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists("icon", "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP icon;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes ADD outercolor varchar(15) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes CHANGE body bodybgcolor varchar(15) NOT NULL;");
|
||||
|
||||
if($db->field_exists("bodybgimage", "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP bodybgimage;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes ADD bodybgimage varchar(100) NOT NULL default '' AFTER bodybgcolor;");
|
||||
|
||||
if($db->field_exists("bodybgimageattributes", "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP bodydbimageattributes;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes ADD bodybgimageattributes varchar(100) NOT NULL default '' AFTER bodybgimage;");
|
||||
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."themes SET outerwidth='0', bodybgcolor='#e3e3e3', bodybgimage='images/Light/logo_bg.png', bodybgimageattributes='repeat-x'");
|
||||
|
||||
$db->drop_table("regimages");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."regimages (
|
||||
imagehash varchar(32) NOT NULL,
|
||||
imagestring varchar(8) NOT NULL,
|
||||
dateline bigint(30) NOT NULL
|
||||
);");
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET cpstyle=''");
|
||||
|
||||
if($db->field_exists("language", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP language;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD language varchar(50) NOT NULL;");
|
||||
|
||||
if($db->field_exists("timeonline", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP timeonline;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD timeonline bigint(30) NOT NULL default '0';");
|
||||
|
||||
if($db->field_exists("showcodebuttons", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."user DROP showcodebuttons;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD showcodebuttons int(1) NOT NULL default '1';");
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."users SET language='english', showcodebuttons=1");
|
||||
|
||||
if($db->field_exists("oldgroup", "awaitingactivation"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation DROP oldgroup;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation ADD oldgroup bigint(30) NOT NULL;");
|
||||
|
||||
if($db->field_exists("misc", "awaitingactivation"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation DROP misc;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation ADD misc varchar(255) NOT NULL;");
|
||||
|
||||
$db->write_query("DELETE FROM ".TABLE_PREFIX."awaitingactivation WHERE type='e'");
|
||||
|
||||
$db->drop_table("settings");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settings (
|
||||
sid smallint(6) NOT NULL auto_increment,
|
||||
name varchar(120) NOT NULL default '',
|
||||
title varchar(120) NOT NULL default '',
|
||||
description text NOT NULL,
|
||||
optionscode text NOT NULL,
|
||||
value text NOT NULL,
|
||||
disporder smallint(6) NOT NULL default '0',
|
||||
gid smallint(6) NOT NULL default '0',
|
||||
PRIMARY KEY (sid)
|
||||
);");
|
||||
|
||||
$db->drop_table("reportedposts");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."reportedposts (
|
||||
rid smallint(6) NOT NULL auto_increment,
|
||||
pid smallint(6) NOT NULL,
|
||||
tid smallint(6) NOT NULL,
|
||||
fid smallint(6) NOT NULL,
|
||||
uid smallint(6) NOT NULL,
|
||||
reportstatus int(1) NOT NULL,
|
||||
reason varchar(250) NOT NULL,
|
||||
dateline bigint(30) NOT NULL,
|
||||
PRIMARY KEY (rid)
|
||||
);");
|
||||
|
||||
$db->drop_table("threadsread");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."threadsread (
|
||||
tid smallint(6) NOT NULL,
|
||||
uid smallint(6) NOT NULL,
|
||||
dateline int(10) NOT NULL,
|
||||
UNIQUE KEY tiduid (tid, uid)
|
||||
);");
|
||||
$contents .= "done</p>";
|
||||
|
||||
$output->print_contents("$contents<p>Please click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("2_dbchanges2");
|
||||
}
|
||||
|
||||
function upgrade2_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Changes since Release Candidate 3");
|
||||
$contents .= "<p>Reinserting settings...";
|
||||
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, '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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, '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->write_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->write_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->write_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->write_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', 'https://mybb.com', 4, 1);");
|
||||
$db->write_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->write_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->write_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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'threadsperpage', 'Threads Per Page', '', 'text', '20', 1, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, '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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'hottopic', 'Replys For Hot Topic', 'The number of replies that is needed for a topic to be considered \'hot\'.', 'text', '20', 3, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cookiedomain', 'Cookie Domain', 'The domain which cookies should be set to. This can remain blank. It should also start with a . so it covers all subdomains.', 'text', '', 8, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cookiepath', 'Cookie Path', 'The path which cookies are set to, we recommend setting this to the full directory path to your forums with a trailing slash.', 'text', '', 9, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pollprefix', 'Poll Prefix', 'The prefix on forum display which contain polls.', 'text', '<b>Poll:</b>', 4, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'postsperpage', 'Posts Per Page:', 'The number of posts to display per page. We recommend its not higher than 20 for people with slower connections.', 'text', '10', 1, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'regdateformat', 'Registered Date Format', 'The format used on showthread where it shows when the user registered.', 'text', 'M Y', 3, 3);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sigmycode', 'Allow MyCode in Signatures', 'Do you want to allow MyCode to be used in users\' signatures?', 'yesno', 'yes', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sigsmilies', 'Allow Smilies in Signatures', 'Do you want to allow smilies to be used in users\' signatures?', 'yesno', 'yes', 3, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sightml', 'Allow HTML in Signatures', 'Do you want to allow HTML to be used in users\' signatures?', 'yesno', 'no', 4, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sigimgcode', 'Allow [img] Code in Signatures', 'Do you want to allow [img] code to be used in users\' signatures?', 'yesno', 'yes', 5, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'quoteboxstyle', 'Fancy Quote Boxes', 'Selecting yes will cause quotes to be in a table and look more professional. Selecting no will show quotes in the traditional way.', 'yesno', 'yes', 1, 10);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'codeboxstyle', 'Fancy Code Boxes', 'Selecting yes will cause code to be in a table and look more professional. Selecting no will show code in the traditional way.', 'yesno', 'yes', 2, 10);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'threadusenetstyle', 'Usenet Style Thread View', 'Selecting yes will cause posts to look similar to how posts look in USENET. No will cause posts to look the modern way.', 'yesno', 'no', 4, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowhtml', 'Allow HTML', 'Selecting yes will allow HTML to be used in private messages.', 'yesno', 'no', 1, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowmycode', 'Allow MyCode', 'Selecting yes will allow MyCode to be used in private messages.', 'yesno', 'yes', 2, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowsmilies', 'Allow Smilies', 'Selecting yes will allow Smilies to be used in private messages.', 'yesno', 'yes', 3, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowimgcode', 'Allow [img] Code', 'Selecting yes will allow [img] Code to be used in private messages.', 'yesno', 'yes', 4, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'siglength', 'Length limit in Signatures', 'The maximum number of characters a user can place in a signature.', 'text', '255', 6, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'messagelength', 'Maximum Message Length', 'The maximum number of characters to allow in a message. A setting of 0 allows an unlimited length.', 'text', '0', 1, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'membersperpage', 'Members Per Page', 'The number of members to show per page on the member list.', 'text', '20', 1, 12);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'load', '*NIX Load Limiting', 'Limit the maximum server load before myBB rejects people. 0 for none. Recommended limit is 5.0.', 'text', '0', 5, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'emailkeep', 'Users Keep Email', 'If a current user has an email already registered in your banned list, should he be allowed to keep it.', 'yesno', 'no', 4, 14);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'ipban', 'Ban by IP', 'Here, you may specify IP addresses or a range of IP addresses. You must separate each IP with a space.', 'textarea', '', 2, 14);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'emailban', 'Ban by Email', 'You may specify specific email addresses to ban, or you may specify a domain. You must separate email addresses and domains with a space.', 'textarea', '', 3, 14);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'avatarsize', 'Max Uploaded Avatar Size', 'Maximum file size (in kilobytes) of uploaded avatars.', 'text', '10', 8, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'avatardir', 'Avatar Directory', 'The directory where your avatars are stored. These are used in the avatar list in the User CP.', 'text', 'images/avatars', 7, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showeditedby', 'Show \'edited by\' Messages', 'Once a post is edited by a regular user, do you want to show the edited by message?', 'yesno', 'yes', 6, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxposts', 'Maximum Posts Per Day', 'This is the total number of posts allowed per user per day. 0 for unlimited.', 'text', '0', 2, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showeditedbyadmin', 'Show \'edited by\' Message for Forum Staff', 'Do you want to show edited by messages for forum staff when they edit their posts?', 'yesno', 'yes', 7, 13);");
|
||||
$db->write_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->write_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->write_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->write_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@mybb.com', 6, 1);");
|
||||
$db->write_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->write_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->write_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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'hideprivateforums', 'Hide Private Forums?', 'You can hide private forums by turning this option on. This option also hides forums on the forum jump and all subforums.', 'yesno', 'yes', 3, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showsimilarthreads', 'Show \'Similar Threads\' Table', 'The Similar Threads table shows threads that are relevant to the thread being read. You can set the relevancy below.', 'yesno', 'no', 5, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'similarityrating', 'Similar Threads Relevancy Rating', 'This allows you to limit similar threads to ones more relevant (0 being not relevant). This number should not be over 10 and should not be set low (<5) for large forums.', 'text', '1', 7, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'similarlimit', 'Similar Threads Limit', 'Here you can change the total amount of similar threads to be shown in the similar threads table. It is recommended that it is not over 15 for 56k users.', 'text', '10', 8, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'privateeventcolor', 'Private Events Color', 'The color that private events will be shown in on the main calendar page.', 'text', 'red', 2, 17);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'publiceventcolor', 'Public Events Color', 'The color that public events will be shown in on the main calendar page.', 'text', 'green', 1, 17);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'movedprefix', 'Moved Threads Prefix', 'The prefix that threads that have been moved to another forum should have.', 'text', '<b>Moved:</b>', 5, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'hottopicviews', 'Views For Hot Topic', 'The number of views a thread can have before it is considered \'hot\'.', 'text', '150', 7, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'logip', 'Log Posting IP Addresses', 'Do you wish to log ip addresses of users who post, and who you want to show ip addresses to.', 'radio\r\nno=Do not log IP\r\nhide=Show to Admins & Mods\r\nshow=Show to all Users', 'hide', 3, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'statslimit', 'Stats Limit', 'The number of threads to show on the stats page for most replies and most views.', 'text', '15', 10, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'modlist', 'Forums\' Moderator Listing', 'Here you can turn on or off the listing of moderators for each forum on index.php and forumdisplay.php', 'onoff', 'on', 5, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'smilieinserter', 'Clickable Smilies Inserter', 'Clickable smilies will appear on the posting pages if this option is set to \'on\'.', 'onoff', 'on', 1, 20);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'smilieinsertertot', 'No. of Smilies to show', 'Enter the total number of smilies to show on the clickable smilie inserter.', 'text', '20', 2, 20);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'smilieinsertercols', 'No. of Smilie Cols to Show', 'Enter the number of columns you wish to show on the clickable smilie inserter.', 'text', '4', 3, 20);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showindexstats', 'Show Small Stats Section', 'Do you want to show the total number of threads, posts, members, and the last member on the forum home?', 'yesno', 'yes', 6, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'regtype', 'Registration Method', 'Please select the method of registration to use when users register.', 'select\r\ninstant=Instant Activation\r\nverify=Send Email Verification\r\nrandompass=Send Random Password', 'verify', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'userpppoptions', 'User Selectable Posts Per Page', 'If you would like to allow users to select how many posts are shown per page in a thread, enter the options they should be able to select separated with commas. If this is left blank they will not be able to choose how many posts are shown per page.', 'text', '5,10,20,25,30,40,50', 2, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'usertppoptions', 'User Selectable Threads Per Page', 'If you would like to allow users to select how many threads per page are shown in a forum, enter the options they should be able to select separated with commas. If this is left blank they will not be able to choose how many threads are shown per page.', 'text', '10,20,25,30,40,50', 6, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'wolcutoffmins', 'Cut-off Time (mins)', 'The number of minutes before a user is marked offline. Recommended: 15.', 'text', '15', 1, 23);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'postfloodcheck', 'Post Flood Checking', 'Set to on if you want to enable flood checking for posts. Specifiy the time between posts below.', 'onoff', 'on', 4, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'postfloodsecs', 'Post Flood Time', 'Set the time (in seconds) users have to wait between posting, to be in effect; the option above must be on.', 'text', '60', 5, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'gzipoutput', 'Use GZip Page Compression?', 'Do you want to compress pages in GZip format when they are sent to the browser? This means quicker downloads for your visitors, and less traffic usage for you. The level of the compression is set by the server\'s load.', 'yesno', 'yes', 1, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'standardheaders', 'Send Standard Headers', 'With some web servers, this option can cause problems; with others, it is needed. ', 'yesno', 'no', 2, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'nocacheheaders', 'Send No Cache Headers', 'With this option you can prevent caching of the page by the browser.', 'yesno', 'no', 3, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxpostimages', 'Maximum Images per Post', 'Enter the maximum number of images (including smilies) a user can put in their post. Set to 0 to disable this.', 'text', '10', 8, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxsigimages', 'Maximum Number of Images per Signature', 'Enter the maximum number of images (including smilies) a user can put in their signature. Set to 0 to disable this.', 'text', '2', 2, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'browsingthisforum', 'Users Browsing this Forum', 'Here you can turn off the \'users browsing this forum\' feature.', 'onoff', 'on', 9, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'usereferrals', 'Use Referrals System', 'Do you want to use the user referrals system on these forums?', 'yesno', 'yes', 3, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'subscribeexcerpt', 'Amount of Characters for Subscription Previews', 'How many characters of the post do you want to send with the email notification of a new reply.', 'text', '100', 9, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cpstyle', 'Control Panel Style', 'The Default style that the control panel will use. Styles are inside the styles folder. A folder name inside that folder becomes the style title and style.css inside the style title folder is the css style file.', 'cpstyle', 'Axiom', 2, 28);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cplanguage', 'Control Panel Language', 'The language of the control panel.', 'adminlanguage', 'english', 1, 28);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'minnamelength', 'Minimum Username Length', 'The minimum number of characters a username can be when a user registers.', 'text', '3', 5, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxnamelength', 'Maximum Username Length', 'The maximum number of characters a username can be when a user registers.', 'text', '30', 6, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'redirects', 'Friendly Redirection Pages', 'This will enable friendly redirection pages instead of bumping the user directly to the page.', 'onoff', 'on', 4, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'betweenregstime', 'Time Between Registrations', 'The amount of time (in hours) to disallow registrations for users who have already registered an account under the same ip address.', 'text', '24', 2, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxregsbetweentime', 'Maximum Registrations Per IP Address', 'This option allows you to set the maximum amount of times a certain user can register within the timeframe specified above.', 'text', '2', 4, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showstats', 'Show forum statistics', 'Do you want to show the total number of posts, threads, members and the last registered member on the portal page?', 'yesno', 'yes', 5, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showpms', 'Show the number of PMs to users', 'Do you want to show the number of private messages the current user has in their pm system.', 'yesno', 'yes', 4, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showwelcome', 'Show the Welcome box', 'Do you want to show the welcome box to visitors / users.', 'yesno', 'yes', 3, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_numannouncements', 'Number of announcements to show', 'Please enter the number of announcements to show on the main page.', 'text', '10', 2, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showstats', 'Show forum statistics', 'Do you want to show the total number of posts, threads, members and the last registered member on the portal page?', 'yesno', 'yes', 5, 29);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showwol', 'Show Whos Online', 'Do you want to show the \'whos online\' information to users when they visit the portal page?', 'yesno', 'yes', 6, 29);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_announcementsfid', 'Forum ID to pull announcements from', 'Please enter the forum id (fid) of the forum you wish to pull the announcements from', 'text', '1', 1, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showdiscussionsnum', 'Number of latest discussions to show', 'Please enter the number of current forum discussions to show on the portal page.', 'text', '10', 8, 29);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showwol', 'Show Who\'s Online', 'Do you want to show the \'Who\'s online\' information to users when they visit the portal page?', 'yesno', 'yes', 6, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showsearch', 'Show Search Box', 'Do you want to show the search box, allowing users to quickly search the forums on the portal?', 'yesno', 'yes', 7, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showdiscussions', 'Show Latest Discussions', 'Do you wish to show the current forum discussions on the portal page?', 'yesno', 'yes', 8, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showdiscussionsnum', 'Number of latest discussions to show', 'Please enter the number of current forum discussions to show on the portal page.', 'text', '10', 9, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'attachthumbh', 'Attached Thumbnail Maximum Height', 'Enter the width that attached thumbnails should be generated at.', 'text', '60', 12, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'attachthumbw', 'Attached Thumbnail Maximum Width', 'Enter the width that attached thumbnails should be generated at.', 'text', '60', 13, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxattachments', 'Maximum Attachments Per Post', 'THe maximum number of attachments a user is allowed to upload per post.', 'text', '5', 10, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'attachthumbnails', 'Show Attached Thumbnails in Posts', 'Do you want to show the generated thumbnails for attached images inside the posts?', 'yesno', 'yes', 11, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'polloptionlimit', 'Maximum Poll Option Length', 'The maximum length that each poll option can be. (Set to 0 to disable).', 'text', '250', 1, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'timezoneoffset', 'Default Timezone Offset', 'Here you can set the default timezone offset for guests and members using the default offset.', 'text', '+10', 4, 3);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bblanguage', 'Default Language', 'The default language that MyBB should use for guests and for users without a selected language in their user control panel.', 'language', 'english', 7, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'regimage', 'Antispam Registration Image', 'If yes, and GD is installed, an image will be shown during registration where users are required to enter the text contained within the image to continue with registration.', 'onoff', 'on', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'reportmethod', 'Reported Posts Medium', 'Please select from the list how you want reported posts to be dealt with. Storing them in the database is probably the better of the options listed.', 'radio\r\ndb=Stored in the Database\r\npms=Sent as Private Messages\r\nemail=Sent via Email', 'db', 1, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'threadreadcut', 'Read Threads in Database (Days)', 'The number of days that you wish to keep thread read information in the database. For large boards, we do not recommend a high number as the board will become slower. Set to 0 to disable.', 'text', '7', 3, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'announcementlimit', 'Announcements Limit', 'The number of forum announcements to show in the thread listing on the forum display pages. Set to 0 to show all active announcements.', 'text', '2', 10, 7);");
|
||||
|
||||
$output->print_contents("$contents<p>Please click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("2_done");
|
||||
}
|
||||
51
webroot/forum/install/resources/upgrade20.php
Normal file
51
webroot/forum/install/resources/upgrade20.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.3
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade20_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Repairing Database Sequences");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
|
||||
// Update the sequences for pgSQL - #1094, #1248
|
||||
if($mybb->config['database']['type'] == "pgsql")
|
||||
{
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}attachtypes_atid_seq', (SELECT max(atid) FROM {$mybb->config['database']['table_prefix']}attachtypes));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}forums_fid_seq', (SELECT max(fid) FROM {$mybb->config['database']['table_prefix']}forums));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}helpdocs_hid_seq', (SELECT max(hid) FROM {$mybb->config['database']['table_prefix']}helpdocs));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}helpsections_sid_seq', (SELECT max(sid) FROM {$mybb->config['database']['table_prefix']}helpsections));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}icons_iid_seq', (SELECT max(iid) FROM {$mybb->config['database']['table_prefix']}icons));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}profilefields_fid_seq', (SELECT max(fid) FROM {$mybb->config['database']['table_prefix']}profilefields));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}smilies_sid_seq', (SELECT max(sid) FROM {$mybb->config['database']['table_prefix']}smilies));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}spiders_sid_seq', (SELECT max(sid) FROM {$mybb->config['database']['table_prefix']}spiders));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}templategroups_gid_seq', (SELECT max(gid) FROM {$mybb->config['database']['table_prefix']}templategroups));");
|
||||
$db->query("SELECT setval('{$mybb->config['database']['table_prefix']}usergroups_gid_seq', (SELECT max(gid) FROM {$mybb->config['database']['table_prefix']}usergroups));");
|
||||
}
|
||||
|
||||
$db->add_column("adminviews", "custom_profile_fields", "text NOT NULL AFTER conditions");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("20_done");
|
||||
}
|
||||
|
||||
104
webroot/forum/install/resources/upgrade21.php
Normal file
104
webroot/forum/install/resources/upgrade21.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.4
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade21_dbchanges()
|
||||
{
|
||||
global $cache, $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
|
||||
$db->delete_query("settings", "name = 'standardheaders'");
|
||||
|
||||
if($db->field_exists('showinbirthdaylist', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "showinbirthdaylist");
|
||||
}
|
||||
|
||||
if($db->field_exists('canoverridepm', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "canoverridepm");
|
||||
}
|
||||
|
||||
if($db->field_exists('canusesig', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "canusesig");
|
||||
}
|
||||
|
||||
if($db->field_exists('canusesigxposts', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "canusesigxposts");
|
||||
}
|
||||
|
||||
if($db->field_exists('signofollow', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "signofollow");
|
||||
}
|
||||
|
||||
if($db->field_exists('postnum', 'profilefields'))
|
||||
{
|
||||
$db->drop_column("profilefields", "postnum");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
case "sqlite":
|
||||
$db->add_column("profilefields", "postnum", "bigint NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "showinbirthdaylist", "int NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "canoverridepm", "int NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "canusesig", "int NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "canusesigxposts", "bigint NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "signofollow", "int NOT NULL default '0'");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("profilefields", "postnum", "bigint(30) NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "showinbirthdaylist", "int(1) NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "canoverridepm", "int(1) NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "canusesig", "int(1) NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "canusesigxposts", "bigint(30) NOT NULL default '0'");
|
||||
$db->add_column("usergroups", "signofollow", "int(1) NOT NULL default '0'");
|
||||
break;
|
||||
}
|
||||
|
||||
// Update all usergroups to show in the birthday list
|
||||
$db->update_query("usergroups", array("showinbirthdaylist" => 1));
|
||||
|
||||
// Update our nice usergroups to use a signature
|
||||
$groups = $cache->read("usergroups");
|
||||
|
||||
foreach($groups as $group)
|
||||
{
|
||||
$disallowed_array = array(1, 5, 7);
|
||||
if(in_array($group['gid'], $disallowed_array) || $group['isbannedgroup'] == 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$db->update_query("usergroups", array("canusesig" => 1), "gid = '{$group['gid']}'");
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("21_done");
|
||||
}
|
||||
|
||||
25
webroot/forum/install/resources/upgrade22.php
Normal file
25
webroot/forum/install/resources/upgrade22.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.5
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.6.5 */
|
||||
|
||||
58
webroot/forum/install/resources/upgrade23.php
Normal file
58
webroot/forum/install/resources/upgrade23.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.6
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade23_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
|
||||
if($db->field_exists('canusecustomtools', 'moderators'))
|
||||
{
|
||||
$db->drop_column('moderators', 'canusecustomtools');
|
||||
}
|
||||
|
||||
if($db->field_exists('cansendemailoverride', 'usergroups'))
|
||||
{
|
||||
$db->drop_column('usergroups', 'cansendemailoverride');
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
case "sqlite":
|
||||
$db->add_column('moderators', 'canusecustomtools', "int NOT NULL default '0'");
|
||||
$db->add_column('usergroups', 'cansendemailoverride', "int NOT NULL default '0'");
|
||||
break;
|
||||
default:
|
||||
$db->add_column('moderators', 'canusecustomtools', "int(1) NOT NULL default '0'");
|
||||
$db->add_column('usergroups', 'cansendemailoverride', "int(1) NOT NULL default '0'");
|
||||
break;
|
||||
}
|
||||
|
||||
$db->update_query('moderators', array('canusecustomtools' => 1), "canmanagethreads = '1'");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("23_done");
|
||||
}
|
||||
23
webroot/forum/install/resources/upgrade24.php
Normal file
23
webroot/forum/install/resources/upgrade24.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.7
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.6.7 */
|
||||
23
webroot/forum/install/resources/upgrade25.php
Normal file
23
webroot/forum/install/resources/upgrade25.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.8
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.6.8 */
|
||||
55
webroot/forum/install/resources/upgrade26.php
Normal file
55
webroot/forum/install/resources/upgrade26.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.9
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade26_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
|
||||
$db->update_query("helpdocs", array('usetranslation' => 1));
|
||||
$db->update_query("helpsections", array('usetranslation' => 1));
|
||||
|
||||
if($db->type == 'pgsql')
|
||||
{
|
||||
$db->modify_column("polls", "numvotes", "text", "set");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->modify_column("polls", "numvotes", "text NOT NULL");
|
||||
}
|
||||
|
||||
if($db->field_exists('failedlogin', 'users'))
|
||||
{
|
||||
$db->drop_column("users", "failedlogin");
|
||||
}
|
||||
|
||||
// We don't need the posthash after the post is inserted into the database
|
||||
$db->update_query('attachments', "posthash=''", 'pid!=0');
|
||||
|
||||
// Column will be dropped in MyBB 1.8
|
||||
$db->update_query('posts', "posthash=''");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("26_done");
|
||||
}
|
||||
24
webroot/forum/install/resources/upgrade27.php
Normal file
24
webroot/forum/install/resources/upgrade27.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.10
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
|
||||
/* Nothing to do for 1.6.10 */
|
||||
23
webroot/forum/install/resources/upgrade28.php
Normal file
23
webroot/forum/install/resources/upgrade28.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.11 or 1.6.12
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.6.11 or 1.6.12 */
|
||||
24
webroot/forum/install/resources/upgrade29.php
Normal file
24
webroot/forum/install/resources/upgrade29.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.6.13
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.6.13 */
|
||||
|
||||
826
webroot/forum/install/resources/upgrade3.php
Normal file
826
webroot/forum/install/resources/upgrade3.php
Normal file
@@ -0,0 +1,826 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: Release Candidate 4
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 1,
|
||||
"revert_all_themes" => 1,
|
||||
"revert_all_settings" => 1,
|
||||
"requires_deactivated_plugins" => 1,
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade3_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Attachment Conversion to Files");
|
||||
|
||||
$contents = "<p>The first step of the upgrade process from RC4 is to move your attachments and avatars to the file system.</p>";
|
||||
|
||||
if(!@is_dir("../uploads/"))
|
||||
{
|
||||
$errors = "<p>../uploads/ Does not exist in your forums' directory. Please create this directory.";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!@is_writable("../uploads/"))
|
||||
{
|
||||
@my_chmod("../uploads", '0777');
|
||||
if(!@is_writable("../uploads/"))
|
||||
{
|
||||
$errors = "<p>../uploads/ is not writable! Please chmod this directory so it's writable (766 or 777).";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!@is_dir("../uploads/avatars/"))
|
||||
{
|
||||
$errors .= "<p>../uploads/avatars/ Does not exist. Please create this directory.";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!@is_writable("../uploads/avatars/"))
|
||||
{
|
||||
@my_chmod("../uploads/avatars/", '0777');
|
||||
if(!is_writable("../uploads/avatars/"))
|
||||
{
|
||||
$errors = "<p>../uploads/avatars/ is not writable! Please chmod this directory so it's writable (766 or 777).";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($errors)
|
||||
{
|
||||
$output->print_contents($contents."<p><span style=\"color: red\">To be able to do this you must perform the following:</span></p>$errors");
|
||||
$output->print_footer("3_dbchanges");
|
||||
exit;
|
||||
}
|
||||
|
||||
$contents .= "<p>Okay, we've determined that the specified directory settings have been met.</p>If you wish to change the number of attachments to process per page then you can do so below.</p>";
|
||||
$contents .= "<p><strong>Attachments Per Page:</strong> <input type=\"text\" size=\"3\" value=\"50\" name=\"attachmentspage\" /></p>";
|
||||
$contents .= "<p>Once you're ready, press next to begin the conversion.</p>";
|
||||
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("3_convertattachments");
|
||||
}
|
||||
|
||||
function upgrade3_convertattachments()
|
||||
{
|
||||
global $db, $output, $settings;
|
||||
|
||||
$output->print_header("Attachment Conversion to Files");
|
||||
|
||||
if(!$_POST['attachmentspage'])
|
||||
{
|
||||
$app = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
$app = (int)$_POST['attachmentspage'];
|
||||
}
|
||||
|
||||
if($_POST['attachmentstart'])
|
||||
{
|
||||
$startat = (int)$_POST['attachmentstart'];
|
||||
$upper = $startat+$app;
|
||||
$lower = $startat;
|
||||
}
|
||||
else
|
||||
{
|
||||
$startat = 0;
|
||||
$upper = $app;
|
||||
$lower = 1;
|
||||
}
|
||||
|
||||
require_once MYBB_ROOT."inc/settings.php";
|
||||
|
||||
$query = $db->simple_select("attachments", "COUNT(aid) AS attachcount");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
$contents .= "<p>Converting attachments $lower to $upper (".$cnt['attachcount']." Total)</p>";
|
||||
echo "<p>Converting attachments $lower to $upper (".$cnt['attachcount']." Total)</p>";
|
||||
|
||||
if($db->field_exists("uid", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP uid;");
|
||||
}
|
||||
// Add uid column
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments ADD uid smallint(6) NOT NULL AFTER posthash;");
|
||||
|
||||
|
||||
if($db->field_exists("thumbnail", "attachments"))
|
||||
{
|
||||
// Drop thumbnail column
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP thumbnail");
|
||||
}
|
||||
|
||||
if($db->field_exists("thumbnail", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP thumbnail;");
|
||||
}
|
||||
// Add thumbnail column
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments ADD thumbnail varchar(120) NOT NULL;");
|
||||
|
||||
if($db->field_exists("attachname", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP attachname;");
|
||||
}
|
||||
// Add attachname column
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments ADD attachname varchar(120) NOT NULL AFTER filesize;");
|
||||
|
||||
if(!$db->field_exists("donecon", "attachments"))
|
||||
{
|
||||
// Add temporary column
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments ADD donecon smallint(1) NOT NULL;");
|
||||
}
|
||||
|
||||
$query = $db->query("
|
||||
SELECT a.*, p.uid AS puid, p.dateline
|
||||
FROM ".TABLE_PREFIX."attachments a
|
||||
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
|
||||
WHERE a.donecon != '1'
|
||||
ORDER BY a.aid ASC LIMIT {$app}
|
||||
");
|
||||
while($attachment = $db->fetch_array($query))
|
||||
{
|
||||
$filename = "post_".$attachment['puid']."_".$attachment['dateline'].$attachment['aid'].".attach";
|
||||
$ext = my_strtolower(my_substr(strrchr($attachment['filename'], "."), 1));
|
||||
$fp = fopen("../uploads/".$filename, "wb");
|
||||
if(!$fp)
|
||||
{
|
||||
die("Unable to create file. Please check permissions and refresh page.");
|
||||
}
|
||||
fwrite($fp, $attachment['filedata']);
|
||||
fclose($fp);
|
||||
unset($attachment['filedata']);
|
||||
if($ext == "gif" || $ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "jpe")
|
||||
{
|
||||
require_once MYBB_ROOT."inc/functions_image.php";
|
||||
$thumbname = str_replace(".attach", "_thumb.$ext", $filename);
|
||||
$thumbnail = generate_thumbnail("../uploads/".$filename, "../uploads", $thumbname, $settings['attachthumbh'], $settings['attachthumbw']);
|
||||
if($thumbnail['code'] == 4)
|
||||
{
|
||||
// Image was too small - fake a filename
|
||||
$thumbnail['filename'] = "SMALL";
|
||||
}
|
||||
}
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."attachments SET attachname='".$filename."', donecon='1', uid='".$attachment['puid']."', thumbnail='".$thumbnail['filename']."' WHERE aid='".$attachment['aid']."'");
|
||||
unset($thumbnail);
|
||||
}
|
||||
|
||||
echo "<p>Done.</p>";
|
||||
$query = $db->simple_select("attachments", "COUNT(aid) AS attachrem", "donecon != '1'");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
if($cnt['attachrem'] != 0)
|
||||
{
|
||||
$nextact = "3_convertattachments";
|
||||
$startat = $startat+$app;
|
||||
$contents .= "<p><input type=\"hidden\" name=\"attachmentspage\" value=\"$app\" /><input type=\"hidden\" name=\"attachmentstart\" value=\"$startat\" />Done. Click Next to move on to the next set of attachments.</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($db->field_exists("donecon", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP donecon");
|
||||
}
|
||||
|
||||
if($db->field_exists("filedata", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP filedata");
|
||||
}
|
||||
|
||||
if($db->field_exists("thumbnailsm", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP thumbnailsm");
|
||||
}
|
||||
$nextact = "3_convertavatars";
|
||||
$contents .= "<p>Done</p><p>All attachments have been moved to the file system. The next step is converting avatars to the file system.</p>";
|
||||
$contents .= "<p>If you wish to change the number of uploaded avatars to process per page then you can do so below.</p>";
|
||||
$contents .= "<p><strong>Avatars Per Page:</strong> <input type=\"text\" size=\"3\" value=\"200\" name=\"userspage\" /></p>";
|
||||
$contents .= "<p>Once you're ready, press next to begin the conversion.</p>";
|
||||
}
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer($nextact);
|
||||
}
|
||||
|
||||
function upgrade3_convertavatars()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Avatar Conversion to Files");
|
||||
|
||||
if(!$_POST['userspage'])
|
||||
{
|
||||
$app = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
$app = (int)$_POST['userspage'];
|
||||
}
|
||||
|
||||
if($_POST['avatarstart'])
|
||||
{
|
||||
$startat = (int)$_POST['avatarstart'];
|
||||
$upper = $startat+$app;
|
||||
$lower = $startat;
|
||||
}
|
||||
else
|
||||
{
|
||||
$startat = 0;
|
||||
$upper = $app;
|
||||
$lower = 1;
|
||||
}
|
||||
|
||||
require_once MYBB_ROOT."inc/settings.php";
|
||||
|
||||
$query = $db->simple_select("avatars", "COUNT(uid) AS avatarcount");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
$contents .= "<p>Converting avatars $lower to $upper (".$cnt['avatarcount']." Total)</p>";
|
||||
|
||||
// Add temporary column
|
||||
if(!$db->field_exists("donecon", "avatars"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."avatars ADD donecon smallint(1) NOT NULL;");
|
||||
}
|
||||
|
||||
if($db->field_exists("avatartype", "attachments"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments DROP avatartype;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD avatartype varchar(10) NOT NULL AFTER avatar;");
|
||||
|
||||
$query = $db->simple_select("avatars", "*", "donecon != '1'", array('order_by' => 'uid', 'order_dir' => 'asc', 'limit' => $app));
|
||||
while($avatar = $db->fetch_array($query))
|
||||
{
|
||||
$ext = "";
|
||||
switch($avatar['type'])
|
||||
{
|
||||
case "image/jpeg":
|
||||
case "image/jpg":
|
||||
case "image/pjpeg":
|
||||
$ext = "jpg";
|
||||
break;
|
||||
case "image/x-png":
|
||||
case "image/png":
|
||||
$ext = "png";
|
||||
break;
|
||||
case "image/gif":
|
||||
$ext = "gif";
|
||||
break;
|
||||
}
|
||||
|
||||
if($ext)
|
||||
{
|
||||
$filename = "avatar_".$avatar['uid'].".".$ext;
|
||||
$fp = @fopen("../uploads/avatars/".$filename, "wb");
|
||||
if(!$fp)
|
||||
{
|
||||
die("Unable to create file. Please check permissions and refresh page.");
|
||||
}
|
||||
fwrite($fp, $avatar['avatar']);
|
||||
fclose($fp);
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."avatars SET donecon='1' WHERE uid='".$avatar['uid']."'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."users SET avatar='uploads/avatars/$filename', avatartype='upload' WHERE uid='".$avatar['uid']."'");
|
||||
}
|
||||
}
|
||||
|
||||
echo "<p>Done.</p>";
|
||||
$query = $db->simple_select("avatars", "COUNT(uid) AS avatarsrem", "donecon!='1'");
|
||||
$cnt = $db->fetch_array($query);
|
||||
|
||||
if($cnt['avatarsrem'] != 0)
|
||||
{
|
||||
$nextact = "3_convertavatars";
|
||||
$startat = $startat+$app;
|
||||
$contents .= "<p><input type=\"hidden\" name=\"userspage\" value=\"$app\" /><input type=\"hidden\" name=\"avatarstart\" value=\"$startat\" />Done. Click Next to move on to the next set of avatars.</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->drop_table("avatars");
|
||||
$nextact = "3_dbchanges2";
|
||||
$contents .= "<p>Done</p><p>All avatars have been moved to the file system. The next step is performing the necessary database modifications for MyBB Gold.</p>";
|
||||
}
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer($nextact);
|
||||
}
|
||||
|
||||
function upgrade3_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Changes");
|
||||
|
||||
$contents = "<p>Performing necessary database changes.</p>";
|
||||
|
||||
if($db->field_exists("additionalgroups", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP additionalgroups;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD additionalgroups varchar(200) NOT NULL default '' AFTER usergroup;");
|
||||
|
||||
if($db->field_exists("displaygroup", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP displaygroup;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD displaygroup smallint(6) NOT NULL default '0' AFTER additionalgroups;");
|
||||
|
||||
if($db->field_exists("candisplaygroup", "usergroups"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups DROP candisplaygroup;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups ADD candisplaygroup varchar(3) NOT NULL;");
|
||||
|
||||
if($db->field_exists("reason", "banned"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned DROP reason;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned ADD reason varchar(200) NOT NULL");
|
||||
|
||||
if($db->field_exists("rulestype", "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP rulestype;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD rulestype smallint(1) NOT NULL;");
|
||||
|
||||
if($db->field_exists("rulestitle", "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP rulestitle;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD rulestitle varchar(200) NOT NULL;");
|
||||
|
||||
if($db->field_exists("rules", "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP rules;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD rules text NOT NULL;");
|
||||
|
||||
if($db->field_exists("usetranslation", "helpdocs"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP helpdocs;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpdocs ADD usetranslation CHAR( 3 ) NOT NULL AFTER document;");
|
||||
|
||||
if($db->field_exists("enabled", "helpdocs"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpdocs DROP enabled;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpdocs ADD enabled CHAR( 3 ) NOT NULL AFTER usetranslation;");
|
||||
|
||||
/*
|
||||
|
||||
This will break the upgrade for users who have customised help documents
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."helpdocs SET hid='6' WHERE hid='7'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."helpdocs SET hid='7' WHERE hid='8'");*/
|
||||
|
||||
if($db->field_exists("usetranslation", "helpsections"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpsections DROP usetranslation;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpsections ADD usetranslation CHAR( 3 ) NOT NULL AFTER description;");
|
||||
|
||||
if($db->field_exists("enabled", "helpsections"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpsections DROP enabled;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpsections ADD enabled CHAR( 3 ) NOT NULL AFTER usetranslation;");
|
||||
|
||||
if($db->field_exists("firstpost", "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP firstpost;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads ADD firstpost int unsigned NOT NULL default '0' AFTER dateline;");
|
||||
|
||||
if($db->field_exists("attachquota", "usergroups"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups DROP attachquota;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups ADD attachquota bigint(30) NOT NULL default '0';");
|
||||
|
||||
if($db->field_exists("cancustomtitle", "usergroups"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups DROP cancustomtitle;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups ADD cancustomtitle varchar(3) NOT NULL;");
|
||||
|
||||
|
||||
$db->drop_table("groupleaders");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."groupleaders (
|
||||
lid smallint(6) NOT NULL auto_increment,
|
||||
gid smallint(6) NOT NULL,
|
||||
uid smallint(6) NOT NULL,
|
||||
PRIMARY KEY(lid)
|
||||
);");
|
||||
|
||||
$db->drop_table("joinrequests");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."joinrequests (
|
||||
rid smallint(6) NOT NULL auto_increment,
|
||||
uid smallint(6) NOT NULL,
|
||||
gid smallint(6) NOT NULL,
|
||||
reason varchar(250) NOT NULL,
|
||||
dateline bigint(30) NOT NULL,
|
||||
PRIMARY KEY(rid)
|
||||
);");
|
||||
|
||||
$db->drop_table("online");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."sessions (
|
||||
sid varchar(32) NOT NULL default '',
|
||||
uid int unsigned NOT NULL default '0',
|
||||
ip varchar(40) NOT NULL default '',
|
||||
time bigint(30) NOT NULL default '0',
|
||||
location varchar(150) NOT NULL default '',
|
||||
useragent varchar(100) NOT NULL default '',
|
||||
anonymous int(1) NOT NULL default '0',
|
||||
nopermission int(1) NOT NULL default '0',
|
||||
location1 int(10) NOT NULL default '0',
|
||||
location2 int(10) NOT NULL default '0',
|
||||
PRIMARY KEY(sid),
|
||||
KEY location1 (location1),
|
||||
KEY location2 (location2)
|
||||
);");
|
||||
|
||||
if($db->field_exists("salt", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP salt;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD salt varchar(10) NOT NULL AFTER password;");
|
||||
|
||||
|
||||
if($db->field_exists("loginkey", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP loginkey;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD loginkey varchar(50) NOT NULL AFTER salt;");
|
||||
|
||||
|
||||
if($db->field_exists("pmnotify", "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP pmnotify;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD pmnotify varchar(3) NOT NULL AFTER pmpopup;");
|
||||
|
||||
$collation = $db->build_create_table_collation();
|
||||
|
||||
$db->drop_table("settinggroups");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups (
|
||||
gid smallint(6) NOT NULL auto_increment,
|
||||
name varchar(220) NOT NULL default '',
|
||||
description text NOT NULL,
|
||||
disporder smallint(6) NOT NULL default '0',
|
||||
isdefault char(3) NOT NULL default '',
|
||||
PRIMARY KEY (gid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->drop_table("settings");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."settings (
|
||||
sid smallint(6) NOT NULL auto_increment,
|
||||
name varchar(120) NOT NULL default '',
|
||||
title varchar(120) NOT NULL default '',
|
||||
description text NOT NULL,
|
||||
optionscode text NOT NULL,
|
||||
value text NOT NULL,
|
||||
disporder smallint(6) NOT NULL default '0',
|
||||
gid smallint(6) NOT NULL default '0',
|
||||
PRIMARY KEY (sid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->drop_table("datacache");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."datacache (
|
||||
title varchar(30) NOT NULL default '',
|
||||
cache mediumtext NOT NULL,
|
||||
PRIMARY KEY(title)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$contents .= "<p>Done</p>";
|
||||
$contents .= "<p>Dropping settings and rebuilding them...";
|
||||
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (1, 'General Configuration', 'This section contains various settings such as your board name and url, as well as your website name and url.', 2, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (3, 'Date and Time Formats', 'Here you can specify the different date and time formats used to display dates and times on the forums.', 4, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (7, 'Forum Display Options', 'This section allows you to manage the various settings used on the forum fisplay (forumdisplay.php) of your boards such as enabling and disabling different features.', 6, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (8, 'Show Thread Options', 'This section allows you to manage the various settings used on the thread display page (showthread.php) of your boards such as enabling and disabling different features.', 7, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (11, 'Private Messaging', 'Various options with relation to the MyBB Private Messaging system (private.php) can be managed and set here.', 11, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (12, 'Member List', 'This section allows you to control various aspects of the board member listing (memberlist.php), such as how many members to show per page, and which features to enable or disable.', 10, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (13, 'Posting', 'These options control the various elements in relation to posting messages on the forums.', 9, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (14, 'Banning Options', '', 15, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (16, 'Forum Home Options', 'This section allows you to manage the various settings used on the forum home (index.php) of your boards such as enabling and disabling different features.', 5, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (17, 'Calendar', 'The board calendar allows the public and private listing of events and members'' birthdays. This section allows you to control and manage the settings for the Calendar.', 12, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (27, 'Server and Optimization Options', 'These options allow you to set various server and optimization preferences allowing you to reduce the load on your server, and gain better performance on your board.', 3, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (19, 'User Registration and Profile Options', 'Here you can control various settings with relation to user account registration and account management.', 8, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (20, 'Clickable Smilies and BB Code', '', 17, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (23, 'Who''s Online', '', 13, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (26, 'Board Online / Offline', 'These settings allow you to globally turn your forums online or offline, and allow you to specify a reason for turning them off.', 1, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (28, 'Control Panel Preferences (Global)', '', 19, 'yes');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settinggroups (gid, name, description, disporder, isdefault) VALUES (30, 'Portal Settings', '', 14, 'yes');");
|
||||
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, '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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, '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->write_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', 'Your Forums', 1, 1);");
|
||||
$db->write_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', 'http://', 2, 1);");
|
||||
$db->write_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', 'Your Website', 3, 1);");
|
||||
$db->write_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://', 4, 1);");
|
||||
$db->write_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->write_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', 'root@localhost', 5, 1);");
|
||||
$db->write_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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'threadsperpage', 'Threads Per Page', '', 'text', '20', 1, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'hottopic', 'Replys For Hot Topic', 'The number of replies that is needed for a topic to be considered ''hot''.', 'text', '20', 3, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cookiedomain', 'Cookie Domain', 'The domain which cookies should be set to. This can remain blank. It should also start with a . so it covers all subdomains.', 'text', '', 8, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cookiepath', 'Cookie Path', 'The path which cookies are set to, we recommend setting this to the full directory path to your forums with a trailing slash.', 'text', '', 9, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'postsperpage', 'Posts Per Page:', 'The number of posts to display per page. We recommend its not higher than 20 for people with slower connections.', 'text', '10', 1, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'regdateformat', 'Registered Date Format', 'The format used on showthread where it shows when the user registered.', 'text', 'M Y', 3, 3);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sigmycode', 'Allow MyCode in Signatures', 'Do you want to allow MyCode to be used in users'' signatures?', 'yesno', 'yes', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sigsmilies', 'Allow Smilies in Signatures', 'Do you want to allow smilies to be used in users'' signatures?', 'yesno', 'yes', 3, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sightml', 'Allow HTML in Signatures', 'Do you want to allow HTML to be used in users'' signatures?', 'yesno', 'no', 4, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'sigimgcode', 'Allow [img] Code in Signatures', 'Do you want to allow [img] code to be used in users'' signatures?', 'yesno', 'yes', 5, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'threadusenetstyle', 'Usenet Style Thread View', 'Selecting yes will cause posts to look similar to how posts look in USENET. No will cause posts to look the modern way.', 'yesno', 'no', 4, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowhtml', 'Allow HTML', 'Selecting yes will allow HTML to be used in private messages.', 'yesno', 'no', 1, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowmycode', 'Allow MyCode', 'Selecting yes will allow MyCode to be used in private messages.', 'yesno', 'yes', 2, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowsmilies', 'Allow Smilies', 'Selecting yes will allow Smilies to be used in private messages.', 'yesno', 'yes', 3, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'pmsallowimgcode', 'Allow [img] Code', 'Selecting yes will allow [img] Code to be used in private messages.', 'yesno', 'yes', 4, 11);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'siglength', 'Length limit in Signatures', 'The maximum number of characters a user can place in a signature.', 'text', '255', 6, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'messagelength', 'Maximum Message Length', 'The maximum number of characters to allow in a message. A setting of 0 allows an unlimited length.', 'text', '0', 1, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'membersperpage', 'Members Per Page', 'The number of members to show per page on the member list.', 'text', '20', 1, 12);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'load', '*NIX Load Limiting', 'Limit the maximum server load before myBB rejects people. 0 for none. Recommended limit is 5.0.', 'text', '0', 5, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'emailkeep', 'Users Keep Email', 'If a current user has an email already registered in your banned list, should he be allowed to keep it.', 'yesno', 'no', 4, 14);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'ipban', 'Ban by IP', 'Here, you may specify IP addresses or a range of IP addresses. You must separate each IP with a space.', 'textarea', '', 2, 14);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'emailban', 'Ban by Email', 'You may specify specific email addresses to ban, or you may specify a domain. You must separate email addresses and domains with a space.', 'textarea', '', 3, 14);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'avatarsize', 'Max Uploaded Avatar Size', 'Maximum file size (in kilobytes) of uploaded avatars.', 'text', '10', 8, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'avatardir', 'Avatar Directory', 'The directory where your avatars are stored. These are used in the avatar list in the User CP.', 'text', 'images/avatars', 7, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showeditedby', 'Show ''edited by'' Messages', 'Once a post is edited by a regular user, do you want to show the edited by message?', 'yesno', 'yes', 6, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxposts', 'Maximum Posts Per Day', 'This is the total number of posts allowed per user per day. 0 for unlimited.', 'text', '0', 2, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showeditedbyadmin', 'Show ''edited by'' Message for Forum Staff', 'Do you want to show edited by messages for forum staff when they edit their posts?', 'yesno', 'yes', 7, 13);");
|
||||
$db->write_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', '', 1, 14);");
|
||||
$db->write_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->write_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->write_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', '#', 6, 1);");
|
||||
$db->write_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->write_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->write_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->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'hideprivateforums', 'Hide Private Forums?', 'You can hide private forums by turning this option on. This option also hides forums on the forum jump and all subforums.', 'yesno', 'yes', 3, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showsimilarthreads', 'Show ''Similar Threads'' Table', 'The Similar Threads table shows threads that are relevant to the thread being read. You can set the relevancy below.', 'yesno', 'no', 5, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'similarityrating', 'Similar Threads Relevancy Rating', 'This allows you to limit similar threads to ones more relevant (0 being not relevant). This number should not be over 10 and should not be set low (<5) for large forums.', 'text', '1', 7, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'similarlimit', 'Similar Threads Limit', 'Here you can change the total amount of similar threads to be shown in the similar threads table. It is recommended that it is not over 15 for 56k users.', 'text', '10', 8, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'privateeventcolor', 'Private Events Color', 'The color that private events will be shown in on the main calendar page.', 'text', 'red', 2, 17);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'publiceventcolor', 'Public Events Color', 'The color that public events will be shown in on the main calendar page.', 'text', 'green', 1, 17);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'hottopicviews', 'Views For Hot Topic', 'The number of views a thread can have before it is considered ''hot''.', 'text', '150', 7, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'logip', 'Log Posting IP Addresses', 'Do you wish to log ip addresses of users who post, and who you want to show ip addresses to.', 'radio\r\nno=Do not log IP\r\nhide=Show to Admins & Mods\r\nshow=Show to all Users', 'hide', 3, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'statslimit', 'Stats Limit', 'The number of threads to show on the stats page for most replies and most views.', 'text', '15', 10, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'modlist', 'Forums'' Moderator Listing', 'Here you can turn on or off the listing of moderators for each forum on index.php and forumdisplay.php', 'onoff', 'on', 5, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'smilieinserter', 'Clickable Smilies Inserter', 'Clickable smilies will appear on the posting pages if this option is set to ''on''.', 'onoff', 'on', 1, 20);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'smilieinsertertot', 'No. of Smilies to show', 'Enter the total number of smilies to show on the clickable smilie inserter.', 'text', '20', 2, 20);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'smilieinsertercols', 'No. of Smilie Cols to Show', 'Enter the number of columns you wish to show on the clickable smilie inserter.', 'text', '4', 3, 20);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showindexstats', 'Show Small Stats Section', 'Do you want to show the total number of threads, posts, members, and the last member on the forum home?', 'yesno', 'yes', 6, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'regtype', 'Registration Method', 'Please select the method of registration to use when users register.', 'select\r\ninstant=Instant Activation\r\nverify=Send Email Verification\r\nrandompass=Send Random Password\r\nadmin=Administrator Activation', 'verify', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'userpppoptions', 'User Selectable Posts Per Page', 'If you would like to allow users to select how many posts are shown per page in a thread, enter the options they should be able to select separated with commas. If this is left blank they will not be able to choose how many posts are shown per page.', 'text', '5,10,20,25,30,40,50', 2, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'usertppoptions', 'User Selectable Threads Per Page', 'If you would like to allow users to select how many threads per page are shown in a forum, enter the options they should be able to select separated with commas. If this is left blank they will not be able to choose how many threads are shown per page.', 'text', '10,20,25,30,40,50', 6, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'wolcutoffmins', 'Cut-off Time (mins)', 'The number of minutes before a user is marked offline. Recommended: 15.', 'text', '15', 1, 23);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'postfloodcheck', 'Post Flood Checking', 'Set to on if you want to enable flood checking for posts. Specifiy the time between posts below.', 'onoff', 'on', 4, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'postfloodsecs', 'Post Flood Time', 'Set the time (in seconds) users have to wait between posting, to be in effect; the option above must be on.', 'text', '60', 5, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'gzipoutput', 'Use GZip Page Compression?', 'Do you want to compress pages in GZip format when they are sent to the browser? This means quicker downloads for your visitors, and less traffic usage for you. The level of the compression is set by the server''s load.', 'yesno', 'yes', 1, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'standardheaders', 'Send Standard Headers', 'With some web servers, this option can cause problems; with others, it is needed. ', 'yesno', 'no', 2, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'nocacheheaders', 'Send No Cache Headers', 'With this option you can prevent caching of the page by the browser.', 'yesno', 'no', 3, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxpostimages', 'Maximum Images per Post', 'Enter the maximum number of images (including smilies) a user can put in their post. Set to 0 to disable this.', 'text', '10', 8, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxsigimages', 'Maximum Number of Images per Signature', 'Enter the maximum number of images (including smilies) a user can put in their signature. Set to 0 to disable this.', 'text', '2', 2, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'browsingthisforum', 'Users Browsing this Forum', 'Here you can turn off the ''users browsing this forum'' feature.', 'onoff', 'on', 9, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'usereferrals', 'Use Referrals System', 'Do you want to use the user referrals system on these forums?', 'yesno', 'yes', 3, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'subscribeexcerpt', 'Amount of Characters for Subscription Previews', 'How many characters of the post do you want to send with the email notification of a new reply.', 'text', '100', 9, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cpstyle', 'Control Panel Style', 'The Default style that the control panel will use. Styles are inside the styles folder. A folder name inside that folder becomes the style title and style.css inside the style title folder is the css style file.', 'cpstyle', 'Axiom', 2, 28);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'cplanguage', 'Control Panel Language', 'The language of the control panel.', 'adminlanguage', 'english', 1, 28);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'minnamelength', 'Minimum Username Length', 'The minimum number of characters a username can be when a user registers.', 'text', '3', 5, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxnamelength', 'Maximum Username Length', 'The maximum number of characters a username can be when a user registers.', 'text', '30', 6, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'redirects', 'Friendly Redirection Pages', 'This will enable friendly redirection pages instead of bumping the user directly to the page.', 'onoff', 'on', 4, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'betweenregstime', 'Time Between Registrations', 'The amount of time (in hours) to disallow registrations for users who have already registered an account under the same ip address.', 'text', '24', 2, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxregsbetweentime', 'Maximum Registrations Per IP Address', 'This option allows you to set the maximum amount of times a certain user can register within the timeframe specified above.', 'text', '2', 4, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showstats', 'Show forum statistics', 'Do you want to show the total number of posts, threads, members and the last registered member on the portal page?', 'yesno', 'yes', 5, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showpms', 'Show the number of PMs to users', 'Do you want to show the number of private messages the current user has in their pm system.', 'yesno', 'yes', 4, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showwelcome', 'Show the Welcome box', 'Do you want to show the welcome box to visitors / users.', 'yesno', 'yes', 3, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_numannouncements', 'Number of announcements to show', 'Please enter the number of announcements to show on the main page.', 'text', '10', 2, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showstats', 'Show forum statistics', 'Do you want to show the total number of posts, threads, members and the last registered member on the portal page?', 'yesno', 'yes', 5, 29);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showwol', 'Show Whos Online', 'Do you want to show the ''whos online'' information to users when they visit the portal page?', 'yesno', 'yes', 6, 29);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_announcementsfid', 'Forum ID to pull announcements from', 'Please enter the forum id (fid) of the forum you wish to pull the announcements from', 'text', '1', 1, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showdiscussionsnum', 'Number of latest discussions to show', 'Please enter the number of current forum discussions to show on the portal page.', 'text', '10', 8, 29);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showwol', 'Show Who''s Online', 'Do you want to show the ''Who''s online'' information to users when they visit the portal page?', 'yesno', 'yes', 6, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showsearch', 'Show Search Box', 'Do you want to show the search box, allowing users to quickly search the forums on the portal?', 'yesno', 'yes', 7, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showdiscussions', 'Show Latest Discussions', 'Do you wish to show the current forum discussions on the portal page?', 'yesno', 'yes', 8, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'portal_showdiscussionsnum', 'Number of latest discussions to show', 'Please enter the number of current forum discussions to show on the portal page.', 'text', '10', 9, 30);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'attachthumbh', 'Attached Thumbnail Maximum Height', 'Enter the height that attached thumbnails should be generated at.', 'text', '60', 12, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'attachthumbw', 'Attached Thumbnail Maximum Width', 'Enter the width that attached thumbnails should be generated at.', 'text', '60', 13, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxattachments', 'Maximum Attachments Per Post', 'THe maximum number of attachments a user is allowed to upload per post.', 'text', '5', 10, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'attachthumbnails', 'Show Attached Thumbnails in Posts', 'Do you want to show the generated thumbnails for attached images inside the posts?', 'yesno', 'yes', 11, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'polloptionlimit', 'Maximum <!-- Poll --> Option Length', 'The maximum length that each poll option can be. (Set to 0 to disable).', 'text', '250', 1, 13);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'timezoneoffset', 'Default Timezone Offset', 'Here you can set the default timezone offset for guests and members using the default offset.', 'text', '+10', 4, 3);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'bblanguage', 'Default Language', 'The default language that MyBB should use for guests and for users without a selected language in their user control panel.', 'language', 'english', 7, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'regimage', 'Antispam Registration Image', 'If yes, and GD is installed, an image will be shown during registration where users are required to enter the text contained within the image to continue with registration.', 'onoff', 'on', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'reportmethod', 'Reported Posts Medium', 'Please select from the list how you want reported posts to be dealt with. Storing them in the database is probably the better of the options listed.', 'radio\r\ndb=Stored in the Database\r\npms=Sent as Private Messages\r\nemail=Sent via Email', 'db', 1, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'threadreadcut', 'Read Threads in Database (Days)', 'The number of days that you wish to keep thread read information in the database. For large boards, we do not recommend a high number as the board will become slower. Set to 0 to disable.', 'text', '7', 3, 8);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'announcementlimit', 'Announcements Limit', 'The number of forum announcements to show in the thread listing on the forum display pages. Set to 0 to show all active announcements.', 'text', '2', 10, 7);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'uploadspath', 'Uploads Path', 'The path used for all board uploads. It <b>must be chmod 777</b> (on Unix servers).', 'text', './uploads', 1, 27);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'maxavatardims', 'Maximum Avatar Dimensions', 'The maximum dimensions that an avatar can be, in the format of width<b>x</b>height. If this is left blank then there will be no dimension restriction.', 'text', '10x10', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'avataruploadpath', 'Avatar Upload Path', 'This is the path where custom avatars will be uploaded to. This directory <b>must be chmod 777</b> (writable) for uploads to work.', 'text', './uploads/avatars', 1, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'subforumsindex', 'Subforums to show on Index listing', 'The number of subforums that you wish to show inside forums on the index and forumdisplay pages. Set to 0 to disable this', 'text', '2', 1, 16);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'disableregs', 'Disable Registrations', 'Allows you to turn off the capability for users to register with one click.', 'yesno', 'no', 9, 19);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'decpoint', 'Decimal Point', 'The decimal point you use in your region.', 'text', '.', 1, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'thousandssep', 'Thousands Numeric Separator', 'The punctuation you want to use . (for example, the setting \',\' with the number 1200 will give you a number such as 1,200)', 'text', ',', 1, 1);");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'showvernum', 'Show Version Numbers', 'Allows you to turn off the public display of version numbers in MyBB.', 'onoff', 'off', 1, 1);");
|
||||
|
||||
echo "Done</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("3_dbchanges3");
|
||||
}
|
||||
|
||||
function upgrade3_dbchanges3()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Database Field Size Changes");
|
||||
|
||||
$contents = "<p>Performing necessary database field size changes.</p>";
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminlog CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions CHANGE uid uid int(10) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."announcements CHANGE aid aid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."announcements CHANGE fid fid int(10) NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."announcements CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments CHANGE aid aid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments CHANGE visible visible int(1) NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachments CHANGE downloads downloads int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachtypes CHANGE atid atid int unsigned NOT NULL auto_increment;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation CHANGE aid aid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."awaitingactivation CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."badwords CHANGE bid bid int unsigned NOT NULL auto_increment;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned CHANGE gid gid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned CHANGE oldgroup oldgroup int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned CHANGE admin admin int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."events CHANGE eid eid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."events CHANGE author author int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."favorites CHANGE fid fid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."favorites CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."favorites CHANGE tid tid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumpermissions CHANGE pid pid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumpermissions CHANGE fid fid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumpermissions CHANGE gid gid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums CHANGE fid fid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums CHANGE pid pid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums CHANGE threads threads int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums CHANGE posts posts int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums CHANGE style style smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumsubscriptions CHANGE fsid fsid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumsubscriptions CHANGE fid fid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumsubscriptions CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders CHANGE lid lid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders CHANGE gid gid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpdocs CHANGE hid hid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpdocs CHANGE sid sid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpdocs CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpsections CHANGE sid sid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."helpsections CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."icons CHANGE iid iid smallint unsigned NOT NULL auto_increment;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."joinrequests CHANGE rid rid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."joinrequests CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."joinrequests CHANGE gid gid smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderatorlog CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderatorlog CHANGE fid fid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderatorlog CHANGE tid tid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderatorlog CHANGE pid pid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderators CHANGE mid mid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderators CHANGE fid fid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderators CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."polls CHANGE pid pid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."polls CHANGE tid tid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."polls CHANGE numoptions numoptions smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."polls CHANGE numvotes numvotes smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."pollvotes CHANGE vid vid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."pollvotes CHANGE pid pid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."pollvotes CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."pollvotes CHANGE voteoption voteoption smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE pid pid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE tid tid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE replyto replyto int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE fid fid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE icon icon smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE edituid edituid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts CHANGE visible visible int(1) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages CHANGE pmid pmid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages CHANGE toid toid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages CHANGE fromid fromid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages CHANGE folder folder smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages CHANGE icon icon smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."profilefields CHANGE fid fid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."profilefields CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."profilefields CHANGE length length smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."profilefields CHANGE maxlength maxlength smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reportedposts CHANGE rid rid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reportedposts CHANGE pid pid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reportedposts CHANGE tid tid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reportedposts CHANGE fid fid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reportedposts CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reputation CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reputation CHANGE pid pid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."reputation CHANGE adduid adduid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."searchlog CHANGE sid sid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."searchlog CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."searchlog CHANGE limitto limitto smallint(4) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."settinggroups CHANGE gid gid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."settinggroups CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."settings CHANGE sid sid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."settings CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."settings CHANGE gid gid smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."smilies CHANGE sid sid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."smilies CHANGE disporder disporder smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates CHANGE tid tid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates CHANGE sid sid int(10) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templatesets CHANGE sid sid smallint unsigned NOT NULL auto_increment;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes CHANGE tid tid smallint unsigned NOT NULL auto_increment;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threadratings CHANGE rid rid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threadratings CHANGE tid tid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threadratings CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threadratings CHANGE rating rating smallint unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE tid tid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE fid fid smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE icon icon smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE poll poll int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE uid uid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE replies replies int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE views views int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE sticky sticky int(1) NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE numratings numratings smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE totalratings totalratings smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads CHANGE visible visible int(1) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threadsread CHANGE tid tid int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threadsread CHANGE uid uid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."userfields CHANGE ufid ufid int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups CHANGE gid gid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups CHANGE stars stars smallint(4) NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE uid uid int unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE usergroup usergroup smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE displaygroup displaygroup smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE style style smallint unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE referrer referrer int unsigned NOT NULL;");
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usertitles CHANGE utid utid smallint unsigned NOT NULL auto_increment;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usertitles CHANGE posts posts int unsigned NOT NULL;");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usertitles CHANGE stars stars smallint(4) NOT NULL;");
|
||||
|
||||
echo "Done</p>";
|
||||
|
||||
$contents .= "<span style=\"color: red; font-weight: bold;\">WARNING:</span> The next step will delete any custom themes or templates you have! Please back them up before continuing!</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("3_done");
|
||||
}
|
||||
2511
webroot/forum/install/resources/upgrade30.php
Normal file
2511
webroot/forum/install/resources/upgrade30.php
Normal file
File diff suppressed because it is too large
Load Diff
59
webroot/forum/install/resources/upgrade31.php
Normal file
59
webroot/forum/install/resources/upgrade31.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.0
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade31_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
$query = $db->simple_select("templategroups", "COUNT(*) as numexists", "prefix='sendthread'");
|
||||
if($db->fetch_field($query, "numexists") == 0)
|
||||
{
|
||||
$db->insert_query("templategroups", array('prefix' => 'sendthread', 'title' => '<lang:group_sendthread>', 'isdefault' => '1'));
|
||||
}
|
||||
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'statslimit\', \'maxmultipagelinks\', \'deleteinvites\', \'gziplevel\', \'subforumsindex\', \'showbirthdayspostlimit\', \'threadsperpage\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'hottopic\', \'hottopicviews\', \'announcementlimit\', \'postsperpage\', \'threadreadcut\', \'similarityrating\', \'similarlimit\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'minnamelength\', \'maxnamelength\', \'minpasswordlength\', \'maxpasswordlength\', \'betweenregstime\', \'maxregsbetweentime\', \'failedcaptchalogincount\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'failedlogincount\', \'failedlogintime\', \'regtime\', \'maxsigimages\', \'siglength\', \'avatarsize\', \'customtitlemaxlength\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'minmessagelength\', \'maxmessagelength\', \'postfloodsecs\', \'postmergemins\', \'maxpostimages\', \'maxpostvideos\', \'subscribeexcerpt\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'wordwrap\', \'maxquotedepth\', \'polloptionlimit\', \'maxpolloptions\', \'polltimelimit\', \'maxattachments\', \'attachthumbh\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'attachthumbw\', \'membersperpage\', \'repsperpage\', \'maxreplength\', \'minreplength\', \'maxwarningpoints\', \'pmfloodsecs\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'maxpmquotedepth\', \'wolcutoffmins\', \'refreshwol\', \'prunepostcount\', \'dayspruneregistered\', \'dayspruneunactivated\', \'portal_numannouncements\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'portal_showdiscussionsnum\', \'searchfloodtime\', \'minsearchword\', \'searchhardlimit\', \'smilieinsertertot\', \'smilieinsertercols\', \'maxloginattempts\') AND optionscode=\'text\'');
|
||||
$db->update_query('settings', array('optionscode' => 'numeric'), 'name IN (\'loginattemptstimeout\', \'contact_maxsubjectlength\', \'contact_minmessagelength\', \'contact_maxmessagelength\', \'purgespammerpostlimit\', \'purgespammerbangroup\', \'statscachetime\') AND optionscode=\'text\'');
|
||||
|
||||
// Update help documents
|
||||
$query = $db->simple_select('helpdocs', 'document', 'hid=\'3\'');
|
||||
$helpdoc = $db->fetch_array($query);
|
||||
if(my_strpos($helpdoc['document'], ';key={1}') !== false)
|
||||
{
|
||||
$helpdoc['document'] = str_replace(';key={1}', ';my_post_key={1}', $helpdoc['document']);
|
||||
}
|
||||
$db->update_query('helpdocs', array('document' => $db->escape_string($helpdoc['document'])), 'hid=\'3\'');
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("31_done");
|
||||
}
|
||||
86
webroot/forum/install/resources/upgrade32.php
Normal file
86
webroot/forum/install/resources/upgrade32.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.1, 1.8.2 or 1.8.3
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade32_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
// Unset old ACP cookies from front-end since they're not needed anymore
|
||||
my_unsetcookie('adminsid');
|
||||
my_unsetcookie('acploginattempts');
|
||||
my_unsetcookie('acp_view');
|
||||
my_unsetcookie('inlinemod_useracp');
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('candeletereputations', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "candeletereputations");
|
||||
}
|
||||
|
||||
if($db->field_exists('authsecret', 'adminoptions'))
|
||||
{
|
||||
$db->drop_column("adminoptions", "authsecret");
|
||||
}
|
||||
|
||||
if($db->field_exists('recovery_codes', 'adminoptions'))
|
||||
{
|
||||
$db->drop_column("adminoptions", "recovery_codes");
|
||||
}
|
||||
|
||||
if($db->field_exists('authenticated', 'adminsessions'))
|
||||
{
|
||||
$db->drop_column("adminsessions", "authenticated");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column("usergroups", "candeletereputations", "smallint NOT NULL default '0' AFTER cangivereputations");
|
||||
$db->add_column("adminoptions", "authsecret", "varchar(16) NOT NULL default ''");
|
||||
$db->add_column("adminoptions", "recovery_codes", "varchar(177) NOT NULL default ''");
|
||||
$db->add_column("adminsessions", "authenticated", "smallint NOT NULL default '0'");
|
||||
break;
|
||||
case "sqlite":
|
||||
$db->add_column("usergroups", "candeletereputations", "tinyint(1) NOT NULL default '0'");
|
||||
$db->add_column("adminoptions", "authsecret", "varchar(16) NOT NULL default ''");
|
||||
$db->add_column("adminoptions", "recovery_codes", "varchar(177) NOT NULL default ''");
|
||||
$db->add_column("adminsessions", "authenticated", "tinyint(1) NOT NULL default '0'");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("usergroups", "candeletereputations", "tinyint(1) NOT NULL default '0' AFTER cangivereputations");
|
||||
$db->add_column("adminoptions", "authsecret", "varchar(16) NOT NULL default ''");
|
||||
$db->add_column("adminoptions", "recovery_codes", "varchar(177) NOT NULL default ''");
|
||||
$db->add_column("adminsessions", "authenticated", "tinyint(1) NOT NULL default '0'");
|
||||
break;
|
||||
}
|
||||
|
||||
// Delete forumpermissions belonging to a deleted forum
|
||||
$db->delete_query("forumpermissions", "fid NOT IN(SELECT fid FROM {$db->table_prefix}forums)");
|
||||
|
||||
$db->update_query("settings", array('optionscode' => 'select\r\n0=No CAPTCHA\r\n1=MyBB Default CAPTCHA\r\n2=reCAPTCHA\r\n3=Are You a Human\r\n4=NoCAPTCHA reCAPTCHA'), "name='captchaimage'");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("32_done");
|
||||
}
|
||||
38
webroot/forum/install/resources/upgrade33.php
Normal file
38
webroot/forum/install/resources/upgrade33.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.4
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade33_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('2fasecret', 'adminoptions') && !$db->field_exists('authsecret', 'adminoptions'))
|
||||
{
|
||||
$db->rename_column('adminoptions', '2fasecret', 'authsecret', "varchar(16) NOT NULL default ''");
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("33_done");
|
||||
}
|
||||
23
webroot/forum/install/resources/upgrade34.php
Normal file
23
webroot/forum/install/resources/upgrade34.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.5
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.5 */
|
||||
188
webroot/forum/install/resources/upgrade35.php
Normal file
188
webroot/forum/install/resources/upgrade35.php
Normal file
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.6
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade35_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('subscriptionkey', 'threadsubscriptions'))
|
||||
{
|
||||
$db->drop_column("threadsubscriptions", "subscriptionkey");
|
||||
}
|
||||
|
||||
if($db->type != 'pgsql')
|
||||
{
|
||||
$db->modify_column('adminsessions', 'useragent', "varchar(200) NOT NULL default ''");
|
||||
$db->modify_column('sessions', 'useragent', "varchar(200) NOT NULL default ''");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->modify_column('adminsessions', 'useragent', "varchar(200)", "set", "''");
|
||||
$db->modify_column('sessions', 'useragent', "varchar(200)", "set", "''");
|
||||
}
|
||||
|
||||
// Remove "Are You a Human" captcha
|
||||
$db->update_query('settings', array('value' => '1'), "name='captchaimage' AND value='3'");
|
||||
$db->delete_query('settings', "name IN ('ayahpublisherkey', 'ayahscoringkey')");
|
||||
$db->delete_query('templates', "title IN ('member_register_regimage_ayah', 'post_captcha_ayah')");
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("35_dbchanges2");
|
||||
}
|
||||
|
||||
function upgrade35_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary optimization queries...</p>";
|
||||
flush();
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
// PostgreSQL and SQLite do not support unsigned ints
|
||||
case "pgsql":
|
||||
$db->modify_column("buddyrequests", "uid", "int", "set", "'0'");
|
||||
$db->modify_column("buddyrequests", "touid", "int", "set", "'0'");
|
||||
$db->modify_column("buddyrequests", "date", "int", "set", "'0'");
|
||||
break;
|
||||
case "sqlite":
|
||||
$db->modify_column("threadratings", "rating", "tinyint(1) NOT NULL default '0'");
|
||||
$db->modify_column("buddyrequests", "uid", "int NOT NULL default '0'");
|
||||
$db->modify_column("buddyrequests", "touid", "int NOT NULL default '0'");
|
||||
$db->modify_column("buddyrequests", "date", "int NOT NULL default '0'");
|
||||
break;
|
||||
default:
|
||||
$db->modify_column("adminviews", "perpage", "smallint(4) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("attachments", "filesize", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("attachtypes", "maxsize", "int(15) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("banned", "olddisplaygroup", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("buddyrequests", "uid", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("buddyrequests", "touid", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("buddyrequests", "date", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("calendars", "eventlimit", "smallint(3) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("massemails", "perpage", "smallint(4) unsigned NOT NULL default '50'");
|
||||
$db->modify_column("promotions", "posts", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("promotions", "threads", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("promotions", "registered", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("promotions", "online", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("promotions", "referrals", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("promotions", "warnings", "int unsigned NOT NULL default '0'");
|
||||
$db->modify_column("sessions", "location1", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("sessions", "location2", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("threadratings", "rating", "tinyint(1) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("threads", "views", "int(100) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("threads", "replies", "int(100) unsigned NOT NULL default '0'");
|
||||
break;
|
||||
}
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("35_dbchanges3");
|
||||
}
|
||||
|
||||
function upgrade35_dbchanges3()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary optimization queries...</p>";
|
||||
flush();
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
// PostgreSQL and SQLite do not support unsigned ints
|
||||
case "sqlite":
|
||||
$db->modify_column("usergroups", "type", "tinyint(1) NOT NULL default '2'");
|
||||
$db->modify_column("users", "loginattempts", "smallint(2) NOT NULL default '1'");
|
||||
break;
|
||||
case "mysql":
|
||||
case "mysqli":
|
||||
$db->modify_column("usergroups", "type", "tinyint(1) unsigned NOT NULL default '2'");
|
||||
$db->modify_column("usergroups", "stars", "smallint(4) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("usergroups", "pmquota", "int(3) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("usergroups", "maxpmrecipients", "int(4) unsigned NOT NULL default '5'");
|
||||
$db->modify_column("usergroups", "maxemails", "int(3) unsigned NOT NULL default '5'");
|
||||
$db->modify_column("usergroups", "emailfloodtime", "int(3) unsigned NOT NULL default '5'");
|
||||
$db->modify_column("usergroups", "maxwarningsday", "int(3) unsigned NOT NULL default '3'");
|
||||
$db->modify_column("usergroups", "edittimelimit", "int(4) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("usergroups", "maxposts", "int(4) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "postnum", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "threadnum", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "ppp", "smallint(6) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "tpp", "smallint(6) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "daysprune", "smallint(6) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "totalpms", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "unreadpms", "int(10) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "warningpoints", "int(3) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("users", "loginattempts", "smallint(2) unsigned NOT NULL default '1'");
|
||||
$db->modify_column("usertitles", "stars", "smallint(4) unsigned NOT NULL default '0'");
|
||||
$db->modify_column("warninglevels", "percentage", "smallint(3) unsigned NOT NULL default '0'");
|
||||
break;
|
||||
}
|
||||
|
||||
global $footer_extra;
|
||||
$footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].trigger('submit'); } });</script>";
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("35_dbchanges4");
|
||||
}
|
||||
|
||||
function upgrade35_dbchanges4()
|
||||
{
|
||||
global $mybb, $output;
|
||||
|
||||
$output->print_header("Adding index files");
|
||||
echo "<p>Adding index files to attachment directories...</p>";
|
||||
flush();
|
||||
|
||||
$dir = @opendir('../'.$mybb->settings['uploadspath']);
|
||||
if($dir)
|
||||
{
|
||||
while(($file = @readdir($dir)) !== false)
|
||||
{
|
||||
$filename = "../{$mybb->settings['uploadspath']}/{$file}";
|
||||
$indexfile = "{$filename}/index.html";
|
||||
|
||||
if(preg_match('#^[0-9]{6}$#', $file) && @is_dir($filename) && @is_writable($filename) && !file_exists($indexfile))
|
||||
{
|
||||
$index = @fopen($indexfile, 'w');
|
||||
@fwrite($index, "<html>\n<head>\n<title></title>\n</head>\n<body>\n \n</body>\n</html>");
|
||||
@fclose($index);
|
||||
}
|
||||
}
|
||||
|
||||
@closedir($dir);
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("35_done");
|
||||
}
|
||||
235
webroot/forum/install/resources/upgrade36.php
Normal file
235
webroot/forum/install/resources/upgrade36.php
Normal file
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.7
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade36_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('enabled', 'attachtypes'))
|
||||
{
|
||||
$db->drop_column('attachtypes', 'enabled');
|
||||
}
|
||||
|
||||
if($db->field_exists('groups', 'attachtypes'))
|
||||
{
|
||||
$db->drop_column('attachtypes', 'groups');
|
||||
}
|
||||
|
||||
if($db->field_exists('forums', 'attachtypes'))
|
||||
{
|
||||
$db->drop_column('attachtypes', 'forums');
|
||||
}
|
||||
|
||||
if($db->field_exists('avatarfile', 'attachtypes'))
|
||||
{
|
||||
$db->drop_column('attachtypes', 'avatarfile');
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column('attachtypes', 'enabled', "smallint NOT NULL default '1'");
|
||||
$db->add_column('attachtypes', 'groups', "text NOT NULL default '-1'");
|
||||
$db->add_column('attachtypes', 'forums', "text NOT NULL default '-1'");
|
||||
$db->add_column('attachtypes', 'avatarfile', "smallint NOT NULL default '0'");
|
||||
break;
|
||||
default:
|
||||
$db->add_column('attachtypes', 'enabled', "tinyint(1) NOT NULL default '1'");
|
||||
$db->add_column('attachtypes', 'groups', "TEXT NOT NULL");
|
||||
$db->add_column('attachtypes', 'forums', "TEXT NOT NULL");
|
||||
$db->add_column('attachtypes', 'avatarfile', "tinyint(1) NOT NULL default '0'");
|
||||
|
||||
$db->update_query('attachtypes', array('groups' => '-1', 'forums' => '-1'));
|
||||
break;
|
||||
}
|
||||
|
||||
$db->update_query('attachtypes', array('avatarfile' => 1), "atid IN (2, 4, 7, 11)");
|
||||
|
||||
if($mybb->settings['username_method'] == 1 || $mybb->settings['username_method'] == 2)
|
||||
{
|
||||
$query = $db->simple_select('users', 'email, COUNT(email) AS duplicates', "email!=''", array('group_by' => 'email HAVING duplicates>1'));
|
||||
if($db->num_rows($query))
|
||||
{
|
||||
$db->update_query('settings', array('value' => 0), "name='username_method'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->update_query('settings', array('value' => 0), "name='allowmultipleemails'");
|
||||
}
|
||||
}
|
||||
|
||||
$query = $db->simple_select("templategroups", "COUNT(*) as numexists", "prefix='mycode'");
|
||||
if($db->fetch_field($query, "numexists") == 0)
|
||||
{
|
||||
$db->insert_query("templategroups", array('prefix' => 'mycode', 'title' => '<lang:group_mycode>', 'isdefault' => '1'));
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("36_dbchanges2");
|
||||
}
|
||||
|
||||
function upgrade36_dbchanges2()
|
||||
{
|
||||
global $output, $db, $cache;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('reasonid', 'reportedcontent'))
|
||||
{
|
||||
$db->drop_column("reportedcontent", "reasonid");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
case "sqlite":
|
||||
$db->add_column("reportedcontent", "reasonid", "smallint NOT NULL default '0' AFTER reportstatus");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("reportedcontent", "reasonid", "smallint unsigned NOT NULL default '0' AFTER reportstatus");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if($db->table_exists("reportreasons"))
|
||||
{
|
||||
$db->drop_table("reportreasons");
|
||||
}
|
||||
|
||||
$collation = $db->build_create_table_collation();
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."reportreasons (
|
||||
rid serial,
|
||||
title varchar(250) NOT NULL default '',
|
||||
appliesto varchar(250) NOT NULL default '',
|
||||
extra smallint NOT NULL default '0',
|
||||
disporder smallint NOT NULL default '0',
|
||||
PRIMARY KEY (rid)
|
||||
);");
|
||||
break;
|
||||
case "sqlite":
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."reportreasons (
|
||||
rid INTEGER PRIMARY KEY,
|
||||
title varchar(250) NOT NULL default '',
|
||||
appliesto varchar(250) NOT NULL default '',
|
||||
extra tinyint(1) NOT NULL default '0',
|
||||
disporder smallint NOT NULL default '0',
|
||||
);");
|
||||
break;
|
||||
default:
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."reportreasons (
|
||||
rid int unsigned NOT NULL auto_increment,
|
||||
title varchar(250) NOT NULL default '',
|
||||
appliesto varchar(250) NOT NULL default '',
|
||||
extra tinyint(1) NOT NULL default '0',
|
||||
disporder smallint unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (rid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
break;
|
||||
}
|
||||
|
||||
$reportreasons = array(
|
||||
array(
|
||||
'rid' => 1,
|
||||
'title' => "<lang:report_reason_other>",
|
||||
'appliesto' => "all",
|
||||
'extra' => 1,
|
||||
'disporder' => 99
|
||||
),
|
||||
array(
|
||||
'rid' => 2,
|
||||
'title' => "<lang:report_reason_rules>",
|
||||
'appliesto' => "all",
|
||||
'extra' => 0,
|
||||
'disporder' => 1
|
||||
),
|
||||
array(
|
||||
'rid' => 3,
|
||||
'title' => "<lang:report_reason_bad>",
|
||||
'appliesto' => "all",
|
||||
'extra' => 0,
|
||||
'disporder' => 2
|
||||
),
|
||||
array(
|
||||
'rid' => 4,
|
||||
'title' => "<lang:report_reason_spam>",
|
||||
'appliesto' => "all",
|
||||
'extra' => 0,
|
||||
'disporder' => 3
|
||||
),
|
||||
array(
|
||||
'rid' => 5,
|
||||
'title' => "<lang:report_reason_wrong>",
|
||||
'appliesto' => "post",
|
||||
'extra' => 0,
|
||||
'disporder' => 4
|
||||
)
|
||||
);
|
||||
|
||||
$db->insert_query_multiple('reportreasons', $reportreasons);
|
||||
|
||||
$templang = new MyLanguage();
|
||||
$templang->set_path(MYBB_ROOT."inc/languages");
|
||||
|
||||
$langs = array_keys($templang->get_languages());
|
||||
|
||||
foreach($langs as $langname)
|
||||
{
|
||||
unset($templang);
|
||||
$templang = new MyLanguage();
|
||||
$templang->set_path(MYBB_ROOT."inc/languages");
|
||||
$templang->set_language($langname);
|
||||
$templang->load("report");
|
||||
|
||||
if(!empty($templang->report_reason_rules) && $templang->report_reason_rules != '')
|
||||
{
|
||||
$db->update_query("reportedcontent", array("reasonid" => 2, "reason" => ''), "reason = '".$db->escape_string("\n".$templang->report_reason_rules)."'");
|
||||
}
|
||||
if(!empty($templang->report_reason_bad) && $templang->report_reason_bad != '')
|
||||
{
|
||||
$db->update_query("reportedcontent", array("reasonid" => 3, "reason" => ''), "reason = '".$db->escape_string("\n".$templang->report_reason_bad)."'");
|
||||
}
|
||||
if(!empty($templang->report_reason_spam) && $templang->report_reason_spam != '')
|
||||
{
|
||||
$db->update_query("reportedcontent", array("reasonid" => 4, "reason" => ''), "reason = '".$db->escape_string("\n".$templang->report_reason_spam)."'");
|
||||
}
|
||||
if(!empty($templang->report_reason_wrong) && $templang->report_reason_wrong != '')
|
||||
{
|
||||
$db->update_query("reportedcontent", array("reasonid" => 5, "reason" => ''), "reason = '".$db->escape_string("\n".$templang->report_reason_wrong)."'");
|
||||
}
|
||||
}
|
||||
|
||||
// Any reason not converted is treated as "Other" with extra text specified
|
||||
$db->update_query("reportedcontent", array('reasonid' => 1), "reason != ''");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("36_done");
|
||||
}
|
||||
55
webroot/forum/install/resources/upgrade37.php
Normal file
55
webroot/forum/install/resources/upgrade37.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.8
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade37_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('canviewdeletionnotice', 'usergroups'))
|
||||
{
|
||||
$db->drop_column("usergroups", "canviewdeletionnotice");
|
||||
}
|
||||
|
||||
if($db->field_exists('canviewdeletionnotice', 'forumpermissions'))
|
||||
{
|
||||
$db->drop_column("forumpermissions", "canviewdeletionnotice");
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column("forumpermissions", "canviewdeletionnotice", "smallint NOT NULL default '0' AFTER caneditattachments");
|
||||
$db->add_column("usergroups", "canviewdeletionnotice", "smallint NOT NULL default '0' AFTER caneditattachments");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("forumpermissions", "canviewdeletionnotice", "tinyint(1) NOT NULL default '0' AFTER caneditattachments");
|
||||
$db->add_column("usergroups", "canviewdeletionnotice", "tinyint(1) NOT NULL default '0' AFTER caneditattachments");
|
||||
break;
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("37_done");
|
||||
}
|
||||
23
webroot/forum/install/resources/upgrade38.php
Normal file
23
webroot/forum/install/resources/upgrade38.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.9
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.9 */
|
||||
23
webroot/forum/install/resources/upgrade39.php
Normal file
23
webroot/forum/install/resources/upgrade39.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.10
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.10 */
|
||||
81
webroot/forum/install/resources/upgrade4.php
Normal file
81
webroot/forum/install/resources/upgrade4.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: Preview Release 2
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 1,
|
||||
"requires_deactivated_plugins" => 1,
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade4_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."users SET style='0' WHERE style='-1';");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."users SET displaygroup='0' WHERE displaygroup='-1';");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."forums SET style='0' WHERE style='-1';");
|
||||
$query = $db->simple_select("adminoptions", "uid='0'");
|
||||
$test = $db->fetch_array($query);
|
||||
if(!isset($test['uid']))
|
||||
{
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET uid='0' WHERE uid='-1';");
|
||||
}
|
||||
|
||||
if($db->field_exists('messageindex', "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP messageindex;");
|
||||
}
|
||||
if($db->field_exists('subjectindex', "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP subjectindex;");
|
||||
}
|
||||
if($db->field_exists('moderators', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP moderators;");
|
||||
}
|
||||
|
||||
if($db->field_exists('version', "templates"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates DROP version;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates ADD version varchar(20) NOT NULL default '0';");
|
||||
|
||||
if($db->field_exists('status', "templates"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates DROP status;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates ADD status varchar(10) NOT NULL default '';");
|
||||
|
||||
if($db->field_exists('dateline', "templates"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates DROP dateline;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."templates ADD dateline int(10) NOT NULL default '0';");
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."templates SET version='100.06' WHERE sid>0");
|
||||
|
||||
echo "Done</p>";
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("4_done");
|
||||
}
|
||||
|
||||
23
webroot/forum/install/resources/upgrade40.php
Normal file
23
webroot/forum/install/resources/upgrade40.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.11
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.11 */
|
||||
111
webroot/forum/install/resources/upgrade41.php
Normal file
111
webroot/forum/install/resources/upgrade41.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.12
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
function upgrade41_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
|
||||
// Remove Blekko Spider, Insert Modern Spiders
|
||||
$db->delete_query('spiders', "name IN('Blekko', 'Discord', 'Applebot', 'CheckHost', 'Pingdom', 'DuckDuckGo', 'UptimeRobot')");
|
||||
|
||||
$db->insert_query_multiple('spiders', array(
|
||||
array("name" => "Discord", "useragent" => "Discordbot"),
|
||||
array("name" => "Applebot", "useragent" => "Applebot"),
|
||||
array("name" => "CheckHost", "useragent" => "CheckHost"),
|
||||
array("name" => "Pingdom", "useragent" => "Pingdom.com_bot"),
|
||||
array("name" => "DuckDuckGo", "useragent" => "DuckDuckBot"),
|
||||
array("name" => "UptimeRobot", "useragent" => "UptimeRobot"),
|
||||
));
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("41_dbchanges2");
|
||||
}
|
||||
|
||||
function upgrade41_dbchanges2()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
|
||||
// Remove backslashes from last 1,000 log files.
|
||||
$query = $db->simple_select('moderatorlog', 'tid, action', "action LIKE '%\\\\\\\\%'", array(
|
||||
"order_by" => 'tid',
|
||||
"order_dir" => 'DESC',
|
||||
"limit" => 1000
|
||||
));
|
||||
|
||||
while($row = $db->fetch_array($query))
|
||||
{
|
||||
$original = $row['action'];
|
||||
$stripped = stripslashes($original);
|
||||
|
||||
if($stripped !== $original)
|
||||
{
|
||||
$db->update_query("moderatorlog", array(
|
||||
"action" => $db->escape_string($stripped),
|
||||
), "tid = '".$row['tid']."'");
|
||||
}
|
||||
}
|
||||
|
||||
// Add Google reCAPTCHA invisible
|
||||
$db->update_query("settings", array('optionscode' => 'select\r\n0=No CAPTCHA\r\n1=MyBB Default CAPTCHA\r\n2=reCAPTCHA\r\n3=Are You a Human\r\n4=NoCAPTCHA reCAPTCHA\r\n5=reCAPTCHA invisible'), "name='captchaimage'");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("41_dbchanges3");
|
||||
}
|
||||
|
||||
function upgrade41_dbchanges3()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
$guestlangs = array();
|
||||
$templang = new MyLanguage();
|
||||
$templang->set_path(MYBB_ROOT."inc/languages");
|
||||
$langs = array_keys($templang->get_languages());
|
||||
|
||||
foreach($langs as $langname)
|
||||
{
|
||||
unset($templang);
|
||||
$templang = new MyLanguage();
|
||||
$templang->set_path(MYBB_ROOT."inc/languages");
|
||||
$templang->set_language($langname);
|
||||
$templang->load("global");
|
||||
if(isset($templang->guest))
|
||||
{
|
||||
$guestlangs[] = $db->escape_string($templang->guest);
|
||||
}
|
||||
}
|
||||
|
||||
unset($templang);
|
||||
$guestlangs = implode("', '", $guestlangs);
|
||||
|
||||
$db->update_query('posts', array('username' => ''), "uid = 0 AND username IN ('{$guestlangs}')");
|
||||
$db->update_query('threads', array('username' => ''), "uid = 0 AND username IN ('{$guestlangs}')");
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("41_done");
|
||||
}
|
||||
52
webroot/forum/install/resources/upgrade42.php
Normal file
52
webroot/forum/install/resources/upgrade42.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.13 or 1.8.14
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade42_dbchanges()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($db->field_exists('ipaddress', 'pollvotes'))
|
||||
{
|
||||
$db->drop_column('pollvotes', 'ipaddress');
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column("pollvotes", "ipaddress", "bytea NOT NULL default ''");
|
||||
break;
|
||||
case "sqlite":
|
||||
$db->add_column("pollvotes", "ipaddress", "blob(16) NOT NULL default ''");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("pollvotes", "ipaddress", "varbinary(16) NOT NULL default ''");
|
||||
break;
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("42_done");
|
||||
}
|
||||
90
webroot/forum/install/resources/upgrade43.php
Normal file
90
webroot/forum/install/resources/upgrade43.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2018 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.15
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade43_dbchanges()
|
||||
{
|
||||
global $output, $mybb, $db, $cache;
|
||||
|
||||
$output->print_header("Updating Database");
|
||||
echo "<p>Performing necessary upgrade queries...</p>";
|
||||
flush();
|
||||
|
||||
if($mybb->settings['captchaimage'] == 2)
|
||||
{
|
||||
$db->update_query('settings', array('value' => 1), "name='captchaimage'"); // Reset CAPTCHA to MyBB Default
|
||||
$db->update_query('settings', array('value' => ''), 'name IN (\'captchapublickey\', \'captchaprivatekey\')'); // Clean out stored credential keys
|
||||
}
|
||||
|
||||
if($db->field_exists('aim', 'users'))
|
||||
{
|
||||
$db->drop_column('users', 'aim');
|
||||
}
|
||||
$db->delete_query("settings", "name='allowaimfield'");
|
||||
|
||||
if($db->field_exists('regex', 'badwords'))
|
||||
{
|
||||
$db->drop_column('badwords', 'regex');
|
||||
}
|
||||
|
||||
switch($db->type)
|
||||
{
|
||||
case "pgsql":
|
||||
$db->add_column("badwords", "regex", "smallint NOT NULL default '0'");
|
||||
break;
|
||||
default:
|
||||
$db->add_column("badwords", "regex", "tinyint(1) NOT NULL default '0'");
|
||||
break;
|
||||
}
|
||||
|
||||
$cache->delete("mybb_credits");
|
||||
|
||||
// Add lockout column
|
||||
if(!$db->field_exists("loginlockoutexpiry", "users"))
|
||||
{
|
||||
$db->add_column("users", "loginlockoutexpiry", "int NOT NULL default '0'");
|
||||
}
|
||||
|
||||
// Unescape last 1000 admin logs
|
||||
$query = $db->simple_select('adminlog', 'uid, ipaddress, dateline, data', "", array(
|
||||
"order_by" => 'dateline',
|
||||
"order_dir" => 'DESC',
|
||||
"limit" => 1000
|
||||
));
|
||||
while($row = $db->fetch_array($query))
|
||||
{
|
||||
$original = $row['data'];
|
||||
$unescaped = htmlspecialchars_decode($original);
|
||||
|
||||
$uid = (int) $row['uid'];
|
||||
$ip_address = $db->escape_binary($row['ip_address']);
|
||||
$dateline = (int) $row['dateline'];
|
||||
|
||||
if ($unescaped !== $original) {
|
||||
$db->update_query('adminlog', array(
|
||||
'data' => $db->escape_string($unescaped),
|
||||
), "uid = '".$uid."' AND dateline = '".$dateline."' AND ipaddress = ".$ip_address);
|
||||
}
|
||||
}
|
||||
|
||||
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
|
||||
$output->print_footer("43_done");
|
||||
}
|
||||
23
webroot/forum/install/resources/upgrade44.php
Normal file
23
webroot/forum/install/resources/upgrade44.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.16
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.16 */
|
||||
23
webroot/forum/install/resources/upgrade45.php
Normal file
23
webroot/forum/install/resources/upgrade45.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.17
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.17 */
|
||||
23
webroot/forum/install/resources/upgrade46.php
Normal file
23
webroot/forum/install/resources/upgrade46.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.18
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.18 */
|
||||
23
webroot/forum/install/resources/upgrade47.php
Normal file
23
webroot/forum/install/resources/upgrade47.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.19
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.19 */
|
||||
23
webroot/forum/install/resources/upgrade48.php
Normal file
23
webroot/forum/install/resources/upgrade48.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.8.20
|
||||
*/
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do for 1.8.20 */
|
||||
639
webroot/forum/install/resources/upgrade5.php
Normal file
639
webroot/forum/install/resources/upgrade5.php
Normal file
@@ -0,0 +1,639 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.0.x / 1.1.x
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 1,
|
||||
"revert_all_themes" => 1,
|
||||
"revert_all_settings" => 2,
|
||||
"requires_deactivated_plugins" => 1,
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade5_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE avatartype avatartype varchar(10) NOT NULL;");
|
||||
if($db->field_exists('totalpms', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP totalpms;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD totalpms int(10) NOT NULL default '0' AFTER showcodebuttons;");
|
||||
|
||||
|
||||
if($db->field_exists('newpms', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP newpms;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD newpms int(10) NOT NULL default '0' AFTER totalpms;");
|
||||
|
||||
|
||||
if($db->field_exists('unreadpms', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP unreadpms;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD unreadpms int(10) NOT NULL default '0' AFTER newpms;");
|
||||
|
||||
|
||||
if($db->field_exists('showredirect', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP showredirect;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD showredirect char(3) NOT NULL default '' AFTER showquickreply;");
|
||||
|
||||
|
||||
if($db->field_exists('avatardimensions', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP avatardimensions;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD avatardimensions varchar(10) NOT NULL default '' AFTER avatar;");
|
||||
|
||||
|
||||
if($db->field_exists('unapprovedposts', "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP unapprovedposts;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads ADD unapprovedposts INT(10) unsigned NOT NULL default '0' AFTER visible;");
|
||||
|
||||
|
||||
if($db->field_exists('unapprovedthreads', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP unapprovedthreads;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD unapprovedthreads INT(10) unsigned NOT NULL default '0' AFTER rules;");
|
||||
|
||||
|
||||
if($db->field_exists('unapprovedposts', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP unapprovedposts;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD unapprovedposts INT(10) unsigned NOT NULL default '0' AFTER rules;");
|
||||
|
||||
|
||||
if($db->field_exists('defaultdatecut', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP defaultdatecut;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD defaultdatecut smallint(4) unsigned NOT NULL default '0' AFTER unapprovedposts;");
|
||||
|
||||
|
||||
if($db->field_exists('defaultsortby', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP defaultsortby;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD defaultsortby varchar(10) NOT NULL default '' AFTER defaultdatecut;");
|
||||
|
||||
|
||||
if($db->field_exists('defaultsortorder', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP defaultsortorder;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD defaultsortorder varchar(4) NOT NULL default '' AFTER defaultsortby;");
|
||||
|
||||
|
||||
if($db->field_exists('lastposteruid', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP lastposteruid;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD lastposteruid int(10) unsigned NOT NULL default '0' AFTER lastposter;");
|
||||
|
||||
|
||||
if($db->field_exists('lastpostsubject', "forums"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP lastpostsubject;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forums ADD lastpostsubject varchar(120) NOT NULL default '' AFTER lastposttid");
|
||||
|
||||
|
||||
if($db->field_exists('lastposteruid', "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP lastposteruid;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads ADD lastposteruid int unsigned NOT NULL default '0' AFTER lastposter");
|
||||
|
||||
|
||||
if($db->field_exists('canmanagemembers', "groupleaders"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders DROP canmanagemembers;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders ADD canmanagemembers char(3) NOT NULL default '' AFTER uid;");
|
||||
|
||||
|
||||
if($db->field_exists('canmanagerequests', "groupleaders"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders DROP canmanagerequests;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."groupleaders ADD canmanagerequests char(3) NOT NULL default '' AFTER canmanagemembers;");
|
||||
|
||||
|
||||
if($db->field_exists('caneditlangs', "adminoptions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP caneditlangs;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD caneditlangs char(3) NOT NULL default '' AFTER canedithelp;");
|
||||
|
||||
|
||||
if($db->field_exists('canrundbtools', "adminoptions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP canrundbtools;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD canrundbtools char(3) NOT NULL default ''");
|
||||
|
||||
|
||||
if($db->field_exists('allowedgroups', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP allowedgroups;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes ADD allowedgroups text NOT NULL AFTER extracss;");
|
||||
|
||||
|
||||
if($db->field_exists('canmovetononmodforum', "moderators"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderators DROP canmovetononmodforum;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderators ADD canmovetononmodforum char(3) NOT NULL default '' AFTER canmanagethreads;");
|
||||
|
||||
|
||||
if($db->field_exists('csscached', "themes"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes DROP csscached;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."themes ADD csscached bigint(30) NOT NULL default '0'");
|
||||
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET caneditlangs='yes' WHERE canrunmaint='yes'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET caneditlangs='no' WHERE canrunmaint='no'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET canrundbtools='yes' WHERE canrunmaint='yes'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET canrundbtools='no' WHERE canrunmaint='no'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET optionscode='select\r\ninstant=Instant Activation\r\nverify=Send Email Verification\r\nrandompass=Send Random Password\r\nadmin=Administrator Activation' WHERE name = 'regtype'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."users SET totalpms='-1', newpms='-1', unreadpms='-1'");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET name='maxmessagelength' WHERE name='messagelength'");
|
||||
|
||||
$collation = $db->build_create_table_collation();
|
||||
|
||||
$db->drop_table("mycode");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."mycode (
|
||||
cid int unsigned NOT NULL auto_increment,
|
||||
title varchar(100) NOT NULL default '',
|
||||
description text NOT NULL,
|
||||
regex text NOT NULL,
|
||||
replacement text NOT NULL,
|
||||
active char(3) NOT NULL default '',
|
||||
PRIMARY KEY(cid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->drop_table("templategroups");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."templategroups (
|
||||
gid int unsigned NOT NULL auto_increment,
|
||||
prefix varchar(50) NOT NULL default '',
|
||||
title varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (gid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('1','calendar','<lang:group_calendar>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('2','editpost','<lang:group_editpost>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('3','email','<lang:group_email>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('4','emailsubject','<lang:group_emailsubject>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('5','forumbit','<lang:group_forumbit>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('6','forumjump','<lang:group_forumjump>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('7','forumdisplay','<lang:group_forumdisplay>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('8','index','<lang:group_index>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('9','error','<lang:group_error>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('10','memberlist','<lang:group_memberlist>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('11','multipage','<lang:group_multipage>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('12','private','<lang:group_private>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('13','portal','<lang:group_portal>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('14','postbit','<lang:group_postbit>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('15','redirect','<lang:group_redirect>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('16','showthread','<lang:group_showthread>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('17','usercp','<lang:group_usercp>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('18','online','<lang:group_online>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('19','moderation','<lang:group_moderation>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('20','nav','<lang:group_nav>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('21','search','<lang:group_search>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('22','showteam','<lang:group_showteam>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('23','reputation','<lang:group_reputation>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('24','newthread','<lang:group_newthread>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('25','newreply','<lang:group_newreply>');");
|
||||
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('26','member','<lang:group_member>');");
|
||||
|
||||
$db->drop_table("searchlog");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."searchlog (
|
||||
sid varchar(32) NOT NULL default '',
|
||||
uid int unsigned NOT NULL default '0',
|
||||
dateline bigint(30) NOT NULL default '0',
|
||||
ipaddress varchar(120) NOT NULL default '',
|
||||
threads text NOT NULL,
|
||||
posts text NOT NULL,
|
||||
searchtype varchar(10) NOT NULL default '',
|
||||
resulttype varchar(10) NOT NULL default '',
|
||||
querycache text NOT NULL,
|
||||
keywords text NOT NULL,
|
||||
PRIMARY KEY (sid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET name='bannedemails' WHERE name='emailban' LIMIT 1");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."settings SET name='bannedips' WHERE name='ipban' LIMIT 1");
|
||||
|
||||
$query = $db->simple_select("settings", "value", "name='bannedusernames'");
|
||||
$bannedusernames = $db->fetch_field($query, 'sid');
|
||||
$bannedusernames = explode(" ", $bannedusernames);
|
||||
$bannedusernames = implode(",", $bannedusernames);
|
||||
$query = $db->write_query("UPDATE ".TABLE_PREFIX."settings SET value='".$db->escape_string($bannedusernames)."' WHERE name='bannedusernames'");
|
||||
|
||||
$query = $db->simple_select("settings", "value", "name='bannedemails'");
|
||||
$bannedemails = $db->fetch_field($query, 'sid');
|
||||
$bannedemails = explode(" ", $bannedemails);
|
||||
$bannedemails = implode(",", $bannedemails);
|
||||
$query = $db->write_query("UPDATE ".TABLE_PREFIX."settings SET value='".$db->escape_string($bannedemails)."' WHERE name='bannedemails'");
|
||||
|
||||
$query = $db->simple_select("settings", "value", "name='bannedips'");
|
||||
$bannedips = $db->fetch_field($query, 'sid');
|
||||
$bannedips = explode(" ", $bannedips);
|
||||
$bannedips = implode(",", $bannedips);
|
||||
$db->update_query("settings", array('value' => $db->escape_string($bannedips)), "name='bannedips'");
|
||||
|
||||
$db->drop_table("reputation");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."reputation (
|
||||
rid int unsigned NOT NULL auto_increment,
|
||||
uid int unsigned NOT NULL default '0',
|
||||
adduid int unsigned NOT NULL default '0',
|
||||
reputation bigint(30) NOT NULL default '0',
|
||||
dateline bigint(30) NOT NULL default '0',
|
||||
comments text NOT NULL,
|
||||
PRIMARY KEY(rid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->drop_table("mailqueue");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."mailqueue (
|
||||
mid int unsigned NOT NULL auto_increment,
|
||||
mailto varchar(200) NOT NULL,
|
||||
mailfrom varchar(200) NOT NULL,
|
||||
subject varchar(200) NOT NULL,
|
||||
message text NOT NULL,
|
||||
headers text NOT NULL,
|
||||
PRIMARY KEY(mid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->update_query("users", array('reputation' => 0));
|
||||
|
||||
$db->update_query("usergroups", array('reputationpower' => 1));
|
||||
$db->update_query("usergroups", array('reputationpower' => 2), "cancp='yes'");
|
||||
|
||||
if($db->field_exists('rating', "users"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP rating;");
|
||||
}
|
||||
|
||||
if($db->field_exists('attachmentcount', "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP attachmentcount;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads ADD attachmentcount int(10) unsigned NOT NULL default '0'");
|
||||
|
||||
|
||||
if($db->field_exists('posthash', "posts"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts DROP posthash;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts ADD posthash varchar(32) NOT NULL default '' AFTER visible");
|
||||
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."attachtypes CHANGE extension extension varchar(10) NOT NULL;");
|
||||
|
||||
if($db->field_exists('deletetime', "threads"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP deletetime;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."threads ADD deletetime int(10) unsigned NOT NULL default '0' AFTER attachmentcount");
|
||||
|
||||
|
||||
if($db->field_exists('loginattempts', "sessions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions DROP loginattempts;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions ADD loginattempts tinyint(2) NOT NULL default '1'");
|
||||
|
||||
|
||||
if($db->field_exists('failedlogin', "sessions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions DROP failedlogin;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions ADD failedlogin bigint(30) NOT NULL default '0'");
|
||||
|
||||
|
||||
if($db->field_exists('canviewthreads', "usergroups"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups DROP canviewthreads;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups ADD canviewthreads char(3) NOT NULL default '' AFTER canview");
|
||||
|
||||
|
||||
if($db->field_exists('canviewthreads', "forumpermissions"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumpermissions DROP canviewthreads;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."forumpermissions ADD canviewthreads char(3) NOT NULL default '' AFTER canview");
|
||||
|
||||
|
||||
$db->drop_table("captcha");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."captcha (
|
||||
imagehash varchar(32) NOT NULL default '',
|
||||
imagestring varchar(8) NOT NULL default '',
|
||||
dateline bigint(30) NOT NULL default '0'
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
if($db->field_exists('data', "moderatorlog"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderatorlog DROP data;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."moderatorlog ADD data text NOT NULL AFTER action;");
|
||||
|
||||
|
||||
$db->drop_table("adminsessions");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."adminsessions (
|
||||
sid varchar(32) NOT NULL default '',
|
||||
uid int unsigned NOT NULL default '0',
|
||||
loginkey varchar(50) NOT NULL default '',
|
||||
ip varchar(40) NOT NULL default '',
|
||||
dateline bigint(30) NOT NULL default '0',
|
||||
lastactive bigint(30) NOT NULL default '0'
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
$db->drop_table("modtools");
|
||||
$db->write_query("CREATE TABLE ".TABLE_PREFIX."modtools (
|
||||
tid smallint unsigned NOT NULL auto_increment,
|
||||
name varchar(200) NOT NULL,
|
||||
description text NOT NULL,
|
||||
forums text NOT NULL,
|
||||
type char(1) NOT NULL default '',
|
||||
postoptions text NOT NULL,
|
||||
threadoptions text NOT NULL,
|
||||
PRIMARY KEY (tid)
|
||||
) ENGINE=MyISAM{$collation};");
|
||||
|
||||
if($db->field_exists('disporder', "usergroups"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups DROP disporder;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."usergroups ADD disporder smallint(6) NOT NULL default '0' AFTER image");
|
||||
|
||||
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."usergroups SET canviewthreads=canview");
|
||||
$db->write_query("UPDATE ".TABLE_PREFIX."forumpermissions SET canviewthreads=canview");
|
||||
|
||||
$contents .= "Done</p>";
|
||||
$contents .= "<p>Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("5_redoconfig");
|
||||
}
|
||||
|
||||
function upgrade5_redoconfig()
|
||||
{
|
||||
global $db, $output, $config, $mybb;
|
||||
$output->print_header("Rewriting config.php");
|
||||
|
||||
$uid = 0;
|
||||
if($mybb->input['username'] != '' && !$mybb->input['uid'])
|
||||
{
|
||||
$user = get_user_by_username($mybb->input['username']);
|
||||
|
||||
$uid = (int)$user['uid'];
|
||||
|
||||
if(!$uid)
|
||||
{
|
||||
echo "<p><span style=\"color: red; font-weight: bold;\">The username you entered could not be found.</span><br />Please ensure you corectly enter a valid username.</p>";
|
||||
}
|
||||
}
|
||||
else if($mybb->input['uid'])
|
||||
{
|
||||
$uid = $mybb->input['uid'];
|
||||
}
|
||||
|
||||
if(!$uid)
|
||||
{
|
||||
echo "<p>Please enter your primary administrator username. The user ID of the username you enter here will be written in to the new configuration file which will prevent this account from being banned, edited or deleted.</p>";
|
||||
echo "<p>Username:</p>";
|
||||
echo "<p><input type=\"text\" name=\"username\" value=\"\" />";
|
||||
$output->print_footer("5_redoconfig");
|
||||
exit;
|
||||
}
|
||||
|
||||
$fh = @fopen(MYBB_ROOT."inc/config.php", "w");
|
||||
if(!$fh)
|
||||
{
|
||||
echo "<p><span style=\"color: red; font-weight: bold;\">Unable to open inc/config.php</span><br />Before the upgrade process can continue, you need to changes the permissions of inc/config.php so it is writable.</p><input type=\"hidden\" name=\"uid\" value=\"{$uid}\" />";
|
||||
$output->print_footer("5_redoconfig");
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!$config['admindir'])
|
||||
{
|
||||
$config['admindir'] = "admin";
|
||||
}
|
||||
|
||||
if(!$config['cachestore'])
|
||||
{
|
||||
$config['cachestore'] = "db";
|
||||
}
|
||||
$configdata = "<?php
|
||||
/**
|
||||
* Database configuration
|
||||
*/
|
||||
|
||||
\$config['dbtype'] = '{$config['database']['type']}';
|
||||
\$config['hostname'] = '{$config['database']['hostname']}';
|
||||
\$config['username'] = '{$config['database']['username']}';
|
||||
\$config['password'] = '{$config['database']['password']}';
|
||||
\$config['database'] = '{$config['database']['database']}';
|
||||
\$config['table_prefix'] = '{$config['database']['table_prefix']}';
|
||||
|
||||
/**
|
||||
* Admin CP directory
|
||||
* For security reasons, it is recommended you
|
||||
* rename your Admin CP directory. You then need
|
||||
* to adjust the value below to point to the
|
||||
* new directory.
|
||||
*/
|
||||
|
||||
\$config['admin_dir'] = '{$config['admindir']}';
|
||||
|
||||
/**
|
||||
* Hide all Admin CP links
|
||||
* If you wish to hide all Admin CP links
|
||||
* on the front end of the board after
|
||||
* renaming your Admin CP directory, set this
|
||||
* to 1.
|
||||
*/
|
||||
|
||||
\$config['hide_admin_links'] = 0;
|
||||
|
||||
/**
|
||||
* Data-cache configuration
|
||||
* The data cache is a temporary cache
|
||||
* of the most commonly accessed data in MyBB.
|
||||
* By default, the database is used to store this data.
|
||||
*
|
||||
* If you wish to use the file system (cache/ directory)
|
||||
* you can change the value below to 'files' from 'db'.
|
||||
*/
|
||||
|
||||
\$config['cache_store'] = '{$config['cachestore']}';
|
||||
|
||||
/**
|
||||
* Super Administrators
|
||||
* A comma separated list of user IDs who cannot
|
||||
* be edited, deleted or banned in the Admin CP.
|
||||
* The administrator permissions for these users
|
||||
* cannot be altered either.
|
||||
*/
|
||||
|
||||
\$config['super_admins'] = '{$uid}';
|
||||
|
||||
?".">";
|
||||
|
||||
fwrite($fh, $configdata);
|
||||
fclose($fh);
|
||||
echo "<p>The configuration file has successfully been rewritten.</p>";
|
||||
echo "<p>Click next to continue with the upgrade process.</p>";
|
||||
$output->print_footer("5_lastposts");
|
||||
|
||||
}
|
||||
|
||||
function upgrade5_lastposts()
|
||||
{
|
||||
global $db, $output;
|
||||
$output->print_header("Rebuilding Last Post Columns");
|
||||
|
||||
if(!$_POST['tpp'])
|
||||
{
|
||||
echo "<p>The next step in the upgrade process involves rebuilding the last post information for every thread in your forum. Below, please enter the number of threads to process per page.</p>";
|
||||
echo "<p><strong>Threads Per Page:</strong> <input type=\"text\" size=\"3\" value=\"200\" name=\"tpp\" /></p>";
|
||||
echo "<p>Once you're ready, press next to begin the rebuild process.</p>";
|
||||
$output->print_footer("5_lastposts");
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = $db->simple_select("threads", "COUNT(*) as num_threads", "closed NOT LIKE 'moved|%'");
|
||||
$num_threads = $db->fetch_field($query, 'num_threads');
|
||||
$tpp = (int)$_POST['tpp'];
|
||||
$start = (int)$_POST['start'];
|
||||
$end = $start+$tpp;
|
||||
if($end > $num_threads)
|
||||
{
|
||||
$end = $num_threads;
|
||||
}
|
||||
echo "<p>Updating {$start} to {$end} of {$num_threads}...</p>";
|
||||
|
||||
$query = $db->simple_select("threads", "tid, firstpost", "closed NOT LIKE 'moved|%'", array("order_by" => "tid", "order_dir" => "asc", "limit" => $tpp, "limit_start" => $start));
|
||||
|
||||
while($thread = $db->fetch_array($query))
|
||||
{
|
||||
$recount_thread = get_thread($thread['tid']);
|
||||
$count = array();
|
||||
|
||||
$query = $db->simple_select("posts", "COUNT(pid) AS replies", "tid='{$thread['tid']}' AND pid!='{$recount_thread['firstpost']}' AND visible='1'");
|
||||
$count['replies'] = $db->fetch_field($query, "replies");
|
||||
|
||||
// Unapproved posts
|
||||
$query = $db->simple_select("posts", "COUNT(pid) AS unapprovedposts", "tid='{$thread['tid']}' AND pid != '{$recount_thread['firstpost']}' AND visible='0'");
|
||||
$count['unapprovedposts'] = $db->fetch_field($query, "unapprovedposts");
|
||||
|
||||
// Attachment count
|
||||
$query = $db->query("
|
||||
SELECT COUNT(aid) AS attachment_count
|
||||
FROM ".TABLE_PREFIX."attachments a
|
||||
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)
|
||||
WHERE p.tid='{$thread['tid']}' AND a.visible=1
|
||||
");
|
||||
$count['attachmentcount'] = $db->fetch_field($query, "attachment_count");
|
||||
|
||||
$db->update_query("threads", $count, "tid='{$thread['tid']}'");
|
||||
update_thread_data($thread['tid']);
|
||||
|
||||
if($thread['firstpost'] == 0)
|
||||
{
|
||||
update_first_post($thread['tid']);
|
||||
}
|
||||
}
|
||||
echo "<p>Done</p>";
|
||||
if($end >= $num_threads)
|
||||
{
|
||||
echo "<p>The rebuild process has completed successfully. Click next to continue with the upgrade.";
|
||||
$output->print_footer("5_forumlastposts");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<p>Click Next to continue with the build process.</p>";
|
||||
echo "<input type=\"hidden\" name=\"tpp\" value=\"{$tpp}\" />";
|
||||
echo "<input type=\"hidden\" name=\"start\" value=\"{$end}\" />";
|
||||
$output->print_footer("5_lastposts");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function upgrade5_forumlastposts()
|
||||
{
|
||||
global $db, $output;
|
||||
$output->print_header("Rebuilding Forum Last Posts");
|
||||
echo "<p>Rebuilding last post information for forums..</p>";
|
||||
$query = $db->simple_select("forums", "fid");
|
||||
while($forum = $db->fetch_array($query))
|
||||
{
|
||||
update_forum_lastpost($forum['fid']);
|
||||
}
|
||||
echo "<p>Done";
|
||||
echo "<p>Click next to continue with the upgrade process.</p>";
|
||||
$output->print_footer("5_indexes");
|
||||
}
|
||||
|
||||
function upgrade5_indexes()
|
||||
{
|
||||
global $db, $output;
|
||||
|
||||
$output->print_header("Indexing");
|
||||
echo "<p>Checking and creating fulltext database indexes..</p>";
|
||||
|
||||
|
||||
if($db->is_fulltext("threads", "subject"))
|
||||
{
|
||||
$db->drop_index("threads", "subject");
|
||||
}
|
||||
if($db->is_fulltext("threads", "subject_2"))
|
||||
{
|
||||
$db->drop_index("threads", "subject_2");
|
||||
}
|
||||
|
||||
if($db->supports_fulltext("threads"))
|
||||
{
|
||||
$db->create_fulltext_index("threads", "subject");
|
||||
}
|
||||
if($db->supports_fulltext_boolean("posts"))
|
||||
{
|
||||
if(!$db->is_fulltext("posts", "message"))
|
||||
{
|
||||
$db->create_fulltext_index("posts", "message");
|
||||
}
|
||||
}
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("5_done");
|
||||
}
|
||||
41
webroot/forum/install/resources/upgrade6.php
Normal file
41
webroot/forum/install/resources/upgrade6.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.2
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0,
|
||||
"requires_deactivated_plugins" => 0,
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade6_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."mycode CHANGE regex regex text NOT NULL");
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."mycode CHANGE replacement replacement text NOT NULL");
|
||||
|
||||
$contents = "Done</p>";
|
||||
$contents .= "<p>Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("6_done");
|
||||
}
|
||||
|
||||
26
webroot/forum/install/resources/upgrade7.php
Normal file
26
webroot/forum/install/resources/upgrade7.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.2.1
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0,
|
||||
"requires_deactivated_plugins" => 0,
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do from 1.2.1 to 1.2.2 */
|
||||
|
||||
50
webroot/forum/install/resources/upgrade8.php
Normal file
50
webroot/forum/install/resources/upgrade8.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.2.2
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0,
|
||||
"requires_deactivated_plugins" => 0,
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
function upgrade8_dbchanges()
|
||||
{
|
||||
global $db, $output, $mybb;
|
||||
|
||||
$output->print_header("Performing Queries");
|
||||
|
||||
echo "<p>Performing necessary upgrade queries..</p>";
|
||||
|
||||
if($db->field_exists('oldadditionalgroups', "banned"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned DROP oldadditionalgroups;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned ADD oldadditionalgroups TEXT NOT NULL AFTER oldgroup");
|
||||
|
||||
|
||||
if($db->field_exists('olddisplaygroup', "banned"))
|
||||
{
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned DROP olddisplaygroup;");
|
||||
}
|
||||
$db->write_query("ALTER TABLE ".TABLE_PREFIX."banned ADD olddisplaygroup int NOT NULL default '0' AFTER oldadditionalgroups");
|
||||
|
||||
$contents .= "Click next to continue with the upgrade process.</p>";
|
||||
$output->print_contents($contents);
|
||||
$output->print_footer("8_done");
|
||||
}
|
||||
|
||||
25
webroot/forum/install/resources/upgrade9.php
Normal file
25
webroot/forum/install/resources/upgrade9.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* MyBB 1.8
|
||||
* Copyright 2014 MyBB Group, All Rights Reserved
|
||||
*
|
||||
* Website: http://www.mybb.com
|
||||
* License: http://www.mybb.com/about/license
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrade Script: 1.2.3, 1.2.4, 1.2.5 or 1.2.6
|
||||
*/
|
||||
|
||||
|
||||
$upgrade_detail = array(
|
||||
"revert_all_templates" => 0,
|
||||
"revert_all_themes" => 0,
|
||||
"revert_all_settings" => 0
|
||||
);
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
/* Nothing to do from 1.2.3 to 1.2.7 */
|
||||
|
||||
641
webroot/forum/install/resources/usergroups.xml
Normal file
641
webroot/forum/install/resources/usergroups.xml
Normal file
@@ -0,0 +1,641 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<usergroups version="1700" exported="1166106966">
|
||||
<usergroup>
|
||||
<gid><![CDATA[1]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Guests]]></title>
|
||||
<description><![CDATA[The default group that all visitors are assigned to unless they're logged in.]]></description>
|
||||
<namestyle><![CDATA[{username}]]></namestyle>
|
||||
<usertitle><![CDATA[Unregistered]]></usertitle>
|
||||
<stars><![CDATA[0]]></stars>
|
||||
<starimage><![CDATA[]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[0]]></isbannedgroup>
|
||||
<canview><![CDATA[1]]></canview>
|
||||
<canviewthreads><![CDATA[1]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[1]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[0]]></candlattachments>
|
||||
<canpostthreads><![CDATA[0]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[0]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[0]]></canpostattachments>
|
||||
<canratethreads><![CDATA[0]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[0]]></caneditposts>
|
||||
<candeleteposts><![CDATA[0]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[0]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[0]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[0]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[0]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[0]]></canvotepolls>
|
||||
<canundovotes><![CDATA[0]]></canundovotes>
|
||||
<canusepms><![CDATA[0]]></canusepms>
|
||||
<cansendpms><![CDATA[0]]></cansendpms>
|
||||
<cantrackpms><![CDATA[0]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[0]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[0]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[5]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[0]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[5]]></maxemails>
|
||||
<emailfloodtime><![CDATA[5]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[1]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[1]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[0]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[0]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[0]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[1]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[0]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[0]]></canviewonlineips>
|
||||
<cancp><![CDATA[0]]></cancp>
|
||||
<issupermod><![CDATA[0]]></issupermod>
|
||||
<cansearch><![CDATA[1]]></cansearch>
|
||||
<canusercp><![CDATA[0]]></canusercp>
|
||||
<canuploadavatars><![CDATA[0]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[0]]></canratemembers>
|
||||
<canchangename><![CDATA[0]]></canchangename>
|
||||
<canbereported><![CDATA[0]]></canbereported>
|
||||
<canchangewebsite><![CDATA[0]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[0]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[0]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[0]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[0]]></candeletereputations>
|
||||
<reputationpower><![CDATA[0]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[0]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[0]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[0]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[0]]></canreceivewarnings>
|
||||
<canmodcp><![CDATA[0]]></canmodcp>
|
||||
<maxwarningsday><![CDATA[0]]></maxwarningsday>
|
||||
<showinbirthdaylist><![CDATA[0]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[0]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[0]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[0]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[0]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[0]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[0]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[0]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[0]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[0]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[0]]></canuseipsearch>
|
||||
</usergroup>
|
||||
<usergroup>
|
||||
<gid><![CDATA[2]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Registered]]></title>
|
||||
<description><![CDATA[After registration, all users are placed in this group by default.]]></description>
|
||||
<namestyle><![CDATA[{username}]]></namestyle>
|
||||
<usertitle><![CDATA[]]></usertitle>
|
||||
<stars><![CDATA[0]]></stars>
|
||||
<starimage><![CDATA[images/star.png]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[0]]></isbannedgroup>
|
||||
<canview><![CDATA[1]]></canview>
|
||||
<canviewthreads><![CDATA[1]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[1]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[1]]></candlattachments>
|
||||
<canpostthreads><![CDATA[1]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[1]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[1]]></canpostattachments>
|
||||
<canratethreads><![CDATA[1]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[1]]></caneditposts>
|
||||
<candeleteposts><![CDATA[1]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[1]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[1]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[1]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[1]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[1]]></canvotepolls>
|
||||
<canundovotes><![CDATA[0]]></canundovotes>
|
||||
<canusepms><![CDATA[1]]></canusepms>
|
||||
<cansendpms><![CDATA[1]]></cansendpms>
|
||||
<cantrackpms><![CDATA[1]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[1]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[200]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[5]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[1]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[5]]></maxemails>
|
||||
<emailfloodtime><![CDATA[5]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[1]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[1]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[1]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[0]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[0]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[1]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[0]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[0]]></canviewonlineips>
|
||||
<cancp><![CDATA[0]]></cancp>
|
||||
<issupermod><![CDATA[0]]></issupermod>
|
||||
<cansearch><![CDATA[1]]></cansearch>
|
||||
<canusercp><![CDATA[1]]></canusercp>
|
||||
<canuploadavatars><![CDATA[1]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[1]]></canratemembers>
|
||||
<canchangename><![CDATA[0]]></canchangename>
|
||||
<canbereported><![CDATA[1]]></canbereported>
|
||||
<canchangewebsite><![CDATA[1]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[0]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[1]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[1]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[1]]></candeletereputations>
|
||||
<reputationpower><![CDATA[1]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[5]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[1]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[0]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[1]]></canreceivewarnings>
|
||||
<maxwarningsday><![CDATA[0]]></maxwarningsday>
|
||||
<canmodcp><![CDATA[0]]></canmodcp>
|
||||
<showinbirthdaylist><![CDATA[1]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[1]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[1]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[0]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[0]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[0]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[0]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[0]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[0]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[0]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[0]]></canuseipsearch>
|
||||
</usergroup>
|
||||
<usergroup>
|
||||
<gid><![CDATA[3]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Super Moderators]]></title>
|
||||
<description><![CDATA[These users can moderate any forum.]]></description>
|
||||
<namestyle><![CDATA[<span style="color: #CC00CC;"><strong>{username}</strong></span>]]></namestyle>
|
||||
<usertitle><![CDATA[Super Moderator]]></usertitle>
|
||||
<stars><![CDATA[6]]></stars>
|
||||
<starimage><![CDATA[images/star.png]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[0]]></isbannedgroup>
|
||||
<canview><![CDATA[1]]></canview>
|
||||
<canviewthreads><![CDATA[1]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[1]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[1]]></candlattachments>
|
||||
<canpostthreads><![CDATA[1]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[1]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[1]]></canpostattachments>
|
||||
<canratethreads><![CDATA[1]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[1]]></caneditposts>
|
||||
<candeleteposts><![CDATA[1]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[1]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[1]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[1]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[1]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[1]]></canvotepolls>
|
||||
<canundovotes><![CDATA[1]]></canundovotes>
|
||||
<canusepms><![CDATA[1]]></canusepms>
|
||||
<cansendpms><![CDATA[1]]></cansendpms>
|
||||
<cantrackpms><![CDATA[1]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[1]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[250]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[5]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[1]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[10]]></maxemails>
|
||||
<emailfloodtime><![CDATA[5]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[1]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[1]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[1]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[1]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[1]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[1]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[1]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[1]]></canviewonlineips>
|
||||
<cancp><![CDATA[0]]></cancp>
|
||||
<issupermod><![CDATA[1]]></issupermod>
|
||||
<cansearch><![CDATA[1]]></cansearch>
|
||||
<canusercp><![CDATA[1]]></canusercp>
|
||||
<canuploadavatars><![CDATA[1]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[1]]></canratemembers>
|
||||
<canchangename><![CDATA[1]]></canchangename>
|
||||
<canbereported><![CDATA[0]]></canbereported>
|
||||
<canchangewebsite><![CDATA[1]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[1]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[1]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[1]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[1]]></candeletereputations>
|
||||
<reputationpower><![CDATA[1]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[10]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[1]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[1]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[1]]></canreceivewarnings>
|
||||
<maxwarningsday><![CDATA[3]]></maxwarningsday>
|
||||
<canmodcp><![CDATA[1]]></canmodcp>
|
||||
<showinbirthdaylist><![CDATA[1]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[1]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[1]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[1]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[1]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[1]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[1]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[1]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[1]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[1]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[1]]></canuseipsearch>
|
||||
</usergroup>
|
||||
<usergroup>
|
||||
<gid><![CDATA[4]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Administrators]]></title>
|
||||
<description><![CDATA[The group all administrators belong to.]]></description>
|
||||
<namestyle><![CDATA[<span style="color: green;"><strong><em>{username}</em></strong></span>]]></namestyle>
|
||||
<usertitle><![CDATA[Administrator]]></usertitle>
|
||||
<stars><![CDATA[7]]></stars>
|
||||
<starimage><![CDATA[images/star.png]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[0]]></isbannedgroup>
|
||||
<canview><![CDATA[1]]></canview>
|
||||
<canviewthreads><![CDATA[1]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[1]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[1]]></candlattachments>
|
||||
<canviewboardclosed><![CDATA[1]]></canviewboardclosed>
|
||||
<canpostthreads><![CDATA[1]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[1]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[1]]></canpostattachments>
|
||||
<canratethreads><![CDATA[1]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[1]]></caneditposts>
|
||||
<candeleteposts><![CDATA[1]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[1]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[1]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[1]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[1]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[1]]></canvotepolls>
|
||||
<canundovotes><![CDATA[1]]></canundovotes>
|
||||
<canusepms><![CDATA[1]]></canusepms>
|
||||
<cansendpms><![CDATA[1]]></cansendpms>
|
||||
<cantrackpms><![CDATA[1]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[1]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[0]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[0]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[1]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[0]]></maxemails>
|
||||
<emailfloodtime><![CDATA[0]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[1]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[1]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[1]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[1]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[1]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[1]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[1]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[1]]></canviewonlineips>
|
||||
<cancp><![CDATA[1]]></cancp>
|
||||
<issupermod><![CDATA[1]]></issupermod>
|
||||
<cansearch><![CDATA[1]]></cansearch>
|
||||
<canusercp><![CDATA[1]]></canusercp>
|
||||
<canuploadavatars><![CDATA[1]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[1]]></canratemembers>
|
||||
<canchangename><![CDATA[1]]></canchangename>
|
||||
<canbereported><![CDATA[0]]></canbereported>
|
||||
<canchangewebsite><![CDATA[1]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[1]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[1]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[1]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[1]]></candeletereputations>
|
||||
<reputationpower><![CDATA[2]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[0]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[1]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[1]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[1]]></canreceivewarnings>
|
||||
<maxwarningsday><![CDATA[0]]></maxwarningsday>
|
||||
<canmodcp><![CDATA[1]]></canmodcp>
|
||||
<showinbirthdaylist><![CDATA[1]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[1]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[1]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[1]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[1]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[1]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[1]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[1]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[1]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[1]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[1]]></canuseipsearch>
|
||||
</usergroup>
|
||||
<usergroup>
|
||||
<gid><![CDATA[5]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Awaiting Activation]]></title>
|
||||
<description><![CDATA[Users that have not activated their account by email or manually been activated yet.]]></description>
|
||||
<namestyle><![CDATA[{username}]]></namestyle>
|
||||
<usertitle><![CDATA[Account not Activated]]></usertitle>
|
||||
<stars><![CDATA[0]]></stars>
|
||||
<starimage><![CDATA[images/star.png]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[0]]></isbannedgroup>
|
||||
<canview><![CDATA[1]]></canview>
|
||||
<canviewthreads><![CDATA[1]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[1]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[0]]></candlattachments>
|
||||
<canpostthreads><![CDATA[0]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[0]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[0]]></canpostattachments>
|
||||
<canratethreads><![CDATA[0]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[0]]></caneditposts>
|
||||
<candeleteposts><![CDATA[0]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[0]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[0]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[0]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[0]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[0]]></canvotepolls>
|
||||
<canundovotes><![CDATA[0]]></canundovotes>
|
||||
<canusepms><![CDATA[0]]></canusepms>
|
||||
<cansendpms><![CDATA[0]]></cansendpms>
|
||||
<cantrackpms><![CDATA[0]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[0]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[20]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[5]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[0]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[5]]></maxemails>
|
||||
<emailfloodtime><![CDATA[5]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[1]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[1]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[0]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[0]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[0]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[1]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[0]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[0]]></canviewonlineips>
|
||||
<cancp><![CDATA[0]]></cancp>
|
||||
<issupermod><![CDATA[0]]></issupermod>
|
||||
<cansearch><![CDATA[1]]></cansearch>
|
||||
<canusercp><![CDATA[1]]></canusercp>
|
||||
<canuploadavatars><![CDATA[0]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[0]]></canratemembers>
|
||||
<canchangename><![CDATA[0]]></canchangename>
|
||||
<canbereported><![CDATA[1]]></canbereported>
|
||||
<canchangewebsite><![CDATA[0]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[0]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[0]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[0]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[0]]></candeletereputations>
|
||||
<reputationpower><![CDATA[0]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[0]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[0]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[0]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[0]]></canreceivewarnings>
|
||||
<maxwarningsday><![CDATA[0]]></maxwarningsday>
|
||||
<canmodcp><![CDATA[0]]></canmodcp>
|
||||
<showinbirthdaylist><![CDATA[1]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[0]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[1]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[0]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[0]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[0]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[0]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[0]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[0]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[0]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[0]]></canuseipsearch>
|
||||
</usergroup>
|
||||
<usergroup>
|
||||
<gid><![CDATA[6]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Moderators]]></title>
|
||||
<description><![CDATA[These users moderate specific forums.]]></description>
|
||||
<namestyle><![CDATA[<span style="color: #CC00CC;"><strong>{username}</strong></span>]]></namestyle>
|
||||
<usertitle><![CDATA[Moderator]]></usertitle>
|
||||
<stars><![CDATA[5]]></stars>
|
||||
<starimage><![CDATA[images/star.png]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[0]]></isbannedgroup>
|
||||
<canview><![CDATA[1]]></canview>
|
||||
<canviewthreads><![CDATA[1]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[1]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[1]]></candlattachments>
|
||||
<canpostthreads><![CDATA[1]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[1]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[1]]></canpostattachments>
|
||||
<canratethreads><![CDATA[1]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[1]]></caneditposts>
|
||||
<candeleteposts><![CDATA[1]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[1]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[1]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[1]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[1]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[1]]></canvotepolls>
|
||||
<canundovotes><![CDATA[0]]></canundovotes>
|
||||
<canusepms><![CDATA[1]]></canusepms>
|
||||
<cansendpms><![CDATA[1]]></cansendpms>
|
||||
<cantrackpms><![CDATA[1]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[1]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[250]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[5]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[1]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[5]]></maxemails>
|
||||
<emailfloodtime><![CDATA[5]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[1]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[1]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[0]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[0]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[0]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[1]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[0]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[0]]></canviewonlineips>
|
||||
<cancp><![CDATA[0]]></cancp>
|
||||
<issupermod><![CDATA[0]]></issupermod>
|
||||
<cansearch><![CDATA[1]]></cansearch>
|
||||
<canusercp><![CDATA[1]]></canusercp>
|
||||
<canuploadavatars><![CDATA[1]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[1]]></canratemembers>
|
||||
<canchangename><![CDATA[1]]></canchangename>
|
||||
<canbereported><![CDATA[0]]></canbereported>
|
||||
<canchangewebsite><![CDATA[1]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[1]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[1]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[1]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[1]]></candeletereputations>
|
||||
<reputationpower><![CDATA[1]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[10]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[1]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[1]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[1]]></canreceivewarnings>
|
||||
<maxwarningsday><![CDATA[3]]></maxwarningsday>
|
||||
<canmodcp><![CDATA[1]]></canmodcp>
|
||||
<showinbirthdaylist><![CDATA[1]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[1]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[1]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[1]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[1]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[1]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[1]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[1]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[1]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[1]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[1]]></canuseipsearch>
|
||||
</usergroup>
|
||||
<usergroup>
|
||||
<gid><![CDATA[7]]></gid>
|
||||
<type><![CDATA[1]]></type>
|
||||
<title><![CDATA[Banned]]></title>
|
||||
<description><![CDATA[The default user group to which members that are banned are moved to.]]></description>
|
||||
<namestyle><![CDATA[<s>{username}</s>]]></namestyle>
|
||||
<usertitle><![CDATA[Banned]]></usertitle>
|
||||
<stars><![CDATA[0]]></stars>
|
||||
<starimage><![CDATA[images/star.png]]></starimage>
|
||||
<image><![CDATA[]]></image>
|
||||
<disporder><![CDATA[0]]></disporder>
|
||||
<isbannedgroup><![CDATA[1]]></isbannedgroup>
|
||||
<canview><![CDATA[0]]></canview>
|
||||
<canviewthreads><![CDATA[0]]></canviewthreads>
|
||||
<canviewprofiles><![CDATA[0]]></canviewprofiles>
|
||||
<candlattachments><![CDATA[0]]></candlattachments>
|
||||
<canpostthreads><![CDATA[0]]></canpostthreads>
|
||||
<canpostreplys><![CDATA[0]]></canpostreplys>
|
||||
<canpostattachments><![CDATA[0]]></canpostattachments>
|
||||
<canratethreads><![CDATA[0]]></canratethreads>
|
||||
<modposts><![CDATA[0]]></modposts>
|
||||
<modthreads><![CDATA[0]]></modthreads>
|
||||
<mod_edit_posts><![CDATA[0]]></mod_edit_posts>
|
||||
<modattachments><![CDATA[0]]></modattachments>
|
||||
<caneditposts><![CDATA[0]]></caneditposts>
|
||||
<candeleteposts><![CDATA[0]]></candeleteposts>
|
||||
<candeletethreads><![CDATA[0]]></candeletethreads>
|
||||
<caneditattachments><![CDATA[0]]></caneditattachments>
|
||||
<canviewdeletionnotice><![CDATA[0]]></canviewdeletionnotice>
|
||||
<canpostpolls><![CDATA[0]]></canpostpolls>
|
||||
<canvotepolls><![CDATA[0]]></canvotepolls>
|
||||
<canundovotes><![CDATA[0]]></canundovotes>
|
||||
<canusepms><![CDATA[1]]></canusepms>
|
||||
<cansendpms><![CDATA[0]]></cansendpms>
|
||||
<cantrackpms><![CDATA[0]]></cantrackpms>
|
||||
<candenypmreceipts><![CDATA[0]]></candenypmreceipts>
|
||||
<pmquota><![CDATA[0]]></pmquota>
|
||||
<maxpmrecipients><![CDATA[0]]></maxpmrecipients>
|
||||
<cansendemail><![CDATA[0]]></cansendemail>
|
||||
<cansendemailoverride><![CDATA[0]]></cansendemailoverride>
|
||||
<maxemails><![CDATA[5]]></maxemails>
|
||||
<emailfloodtime><![CDATA[5]]></emailfloodtime>
|
||||
<canviewmemberlist><![CDATA[0]]></canviewmemberlist>
|
||||
<canviewcalendar><![CDATA[0]]></canviewcalendar>
|
||||
<canaddevents><![CDATA[0]]></canaddevents>
|
||||
<canbypasseventmod><![CDATA[0]]></canbypasseventmod>
|
||||
<canmoderateevents><![CDATA[0]]></canmoderateevents>
|
||||
<canviewonline><![CDATA[0]]></canviewonline>
|
||||
<canviewwolinvis><![CDATA[0]]></canviewwolinvis>
|
||||
<canviewonlineips><![CDATA[0]]></canviewonlineips>
|
||||
<cancp><![CDATA[0]]></cancp>
|
||||
<issupermod><![CDATA[0]]></issupermod>
|
||||
<cansearch><![CDATA[0]]></cansearch>
|
||||
<canusercp><![CDATA[0]]></canusercp>
|
||||
<canuploadavatars><![CDATA[0]]></canuploadavatars>
|
||||
<canratemembers><![CDATA[0]]></canratemembers>
|
||||
<canchangename><![CDATA[0]]></canchangename>
|
||||
<canbereported><![CDATA[0]]></canbereported>
|
||||
<canchangewebsite><![CDATA[0]]></canchangewebsite>
|
||||
<showforumteam><![CDATA[0]]></showforumteam>
|
||||
<usereputationsystem><![CDATA[0]]></usereputationsystem>
|
||||
<cangivereputations><![CDATA[0]]></cangivereputations>
|
||||
<candeletereputations><![CDATA[0]]></candeletereputations>
|
||||
<reputationpower><![CDATA[0]]></reputationpower>
|
||||
<maxreputationsperthread><![CDATA[0]]></maxreputationsperthread>
|
||||
<maxreputationsperuser><![CDATA[0]]></maxreputationsperuser>
|
||||
<maxreputationsday><![CDATA[0]]></maxreputationsday>
|
||||
<candisplaygroup><![CDATA[1]]></candisplaygroup>
|
||||
<attachquota><![CDATA[0]]></attachquota>
|
||||
<cancustomtitle><![CDATA[0]]></cancustomtitle>
|
||||
<canwarnusers><![CDATA[0]]></canwarnusers>
|
||||
<canreceivewarnings><![CDATA[0]]></canreceivewarnings>
|
||||
<maxwarningsday><![CDATA[0]]></maxwarningsday>
|
||||
<canmodcp><![CDATA[0]]></canmodcp>
|
||||
<showinbirthdaylist><![CDATA[0]]></showinbirthdaylist>
|
||||
<canoverridepm><![CDATA[0]]></canoverridepm>
|
||||
<canusesig><![CDATA[0]]></canusesig>
|
||||
<canusesigxposts><![CDATA[0]]></canusesigxposts>
|
||||
<signofollow><![CDATA[0]]></signofollow>
|
||||
<edittimelimit><![CDATA[0]]></edittimelimit>
|
||||
<maxposts><![CDATA[0]]></maxposts>
|
||||
<showmemberlist><![CDATA[1]]></showmemberlist>
|
||||
<canmanageannounce><![CDATA[0]]></canmanageannounce>
|
||||
<canmanagemodqueue><![CDATA[0]]></canmanagemodqueue>
|
||||
<canmanagereportedcontent><![CDATA[0]]></canmanagereportedcontent>
|
||||
<canviewmodlogs><![CDATA[0]]></canviewmodlogs>
|
||||
<caneditprofiles><![CDATA[0]]></caneditprofiles>
|
||||
<canbanusers><![CDATA[0]]></canbanusers>
|
||||
<canviewwarnlogs><![CDATA[0]]></canviewwarnlogs>
|
||||
<canuseipsearch><![CDATA[0]]></canuseipsearch>
|
||||
</usergroup>
|
||||
</usergroups>
|
||||
Reference in New Issue
Block a user