r20151224

we're not dead!!

Signed-off-by: Julian van de Groep <me@flash.moe>
This commit is contained in:
Pachira 2015-12-24 17:04:49 +01:00
parent 1aa449fcc7
commit 6fc3d9e349
7 changed files with 762 additions and 374 deletions

11
Sakura.phpproj.user Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<StartAction>SpecificPage</StartAction>
<SpecificPageValue>index.php</SpecificPageValue>
<StartUrlValue />
<PHPDebugging>True</PHPDebugging>
<JsDebugging>False</JsDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
</PropertyGroup>
</Project>

10
composer.lock generated
View file

@ -94,16 +94,16 @@
},
{
"name": "paypal/rest-api-sdk-php",
"version": "v1.6.2",
"version": "v1.6.3",
"source": {
"type": "git",
"url": "https://github.com/paypal/PayPal-PHP-SDK.git",
"reference": "7493e7aa5e384e897636d6073493ef0a865695ea"
"reference": "0993a6450e7ad7bd4bd7b4f7409784b6ff86873d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paypal/PayPal-PHP-SDK/zipball/7493e7aa5e384e897636d6073493ef0a865695ea",
"reference": "7493e7aa5e384e897636d6073493ef0a865695ea",
"url": "https://api.github.com/repos/paypal/PayPal-PHP-SDK/zipball/0993a6450e7ad7bd4bd7b4f7409784b6ff86873d",
"reference": "0993a6450e7ad7bd4bd7b4f7409784b6ff86873d",
"shasum": ""
},
"require": {
@ -138,7 +138,7 @@
"rest",
"sdk"
],
"time": "2015-11-16 19:40:00"
"time": "2015-12-07 21:31:49"
},
{
"name": "phpmailer/phpmailer",

View file

@ -1,192 +1,219 @@
-- Adminer 4.2.2 MySQL dump
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 24, 2015 at 04:59 PM
-- Server version: 5.7.10-log
-- PHP Version: 7.0.1
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `sakura-development`
--
CREATE DATABASE IF NOT EXISTS `sakura-development` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
USE `sakura-development`;
INSERT INTO `sakura_bbcodes` (`bbcode_id`, `bbcode_regex`, `bbcode_replace`, `bbcode_title`, `bbcode_description`, `bbcode_display`) VALUES
(1, '/\\[b\\](.*?)\\[\\/b\\]/is', '<b>$1</b>', 'Bold', 'Make text bold. Usage: [b]text[/b].', 1),
(2, '/\\[i\\](.*?)\\[\\/i\\]/is', '<i>$1</i>', 'Italics', 'Make text italic. Usage: [i]text[/i].', 1),
(3, '/\\[u\\](.*?)\\[\\/u\\]/is', '<u>$1</u>', 'Underline', 'Make text underlined. Usage: [u]text[/u].', 1),
(4, '/\\[s\\](.*?)\\[\\/s\\]/is', '<del>$1</del>', 'Strikethrough', 'Put a line through text. Usage: [s]text[/s].', 1),
(5, '/\\[img\\]([a-zA-Z0-9\\.\\$\\-\\_\\.\\+\\*\\!\\\'\\(\\)\\/\\:\\#]+)\\[\\/img\\]/is', '<img src=\"$1\" alt=\"Image\" />', 'Image', 'Embed an image. Usage: [img]url[/img]', 1),
(6, '/\\[url=([a-zA-Z0-9\\.\\$\\-\\_\\.\\+\\*\\!\\\'\\(\\)\\/\\:\\#]+)\\](.*?)\\[\\/url\\]/is', '<a href=\"$1\" target=\"_blank\">$2</a>', 'Link', 'Embed a URL. Usage: [url=http://google.com]Link to google![/url]', 0),
(7, '/\\[url\\]([a-zA-Z0-9\\.\\$\\-\\_\\.\\+\\*\\!\\\'\\(\\)\\/\\:\\#]+)\\[\\/url\\]/is', '<a href=\"$1\" target=\"_blank\">$1</a>', 'Link', 'Make a link clickable (if the automatic algorithm doesn\'t do it already). Usage: [url]http://google.com[/url]', 1),
(8, '/\\[quote\\=\\\"(.+)\\\"\\](.+)\\[\\/quote]/is', '<div class=\"quote\"><div class=\"quotee\">$1 wrote:</div><div class=\"text\">$2</div></div>', 'Quote', 'Quote a user\'s post. Usage: [quote=Flashwave]nookls is pretty[/quote]', 0),
(9, '/\\[quote\\](.+)\\[\\/quote]/is', '<div class=\"quote\"><div class=\"quotee\">Quote:</div><div class=\"text\">$1</div></div>', 'Quote', 'Quote a user\'s post. Usage: [quote]nookls is pretty[/quote]', 1)
ON DUPLICATE KEY UPDATE `bbcode_id` = VALUES(`bbcode_id`), `bbcode_regex` = VALUES(`bbcode_regex`), `bbcode_replace` = VALUES(`bbcode_replace`), `bbcode_title` = VALUES(`bbcode_title`), `bbcode_description` = VALUES(`bbcode_description`), `bbcode_display` = VALUES(`bbcode_display`);
--
-- Dumping data for table `sakura_config`
--
INSERT INTO `sakura_config` (`config_name`, `config_value`) VALUES
('recaptcha_public', ''),
('recaptcha_private', ''),
('admin_email', 'sakura@localhost'),
('alumni_rank_id', '9'),
('avatar_max_fsize', '2097152'),
('avatar_max_height', '512'),
('avatar_max_width', '512'),
('avatar_min_height', '20'),
('avatar_min_width', '20'),
('background_max_fsize', '5242880'),
('background_max_height', '1440'),
('background_max_width', '2560'),
('background_min_height', '16'),
('background_min_width', '16'),
('banned_avatar_img', 'public/content/data/{{ TPL }}/images/banned-av.png'),
('charset', 'utf-8'),
('cookie_prefix', 'sakura_'),
('cookie_domain', 'sakura.dev'),
('comment_max_length', '500'),
('comment_min_length', '1'),
('content_path', '/content'),
('cookie_domain', 'flashii.test'),
('cookie_path', '/'),
('site_style', 'yuuno'),
('manage_style', 'broomcloset'),
('smtp_server', ''),
('smtp_auth', '0'),
('smtp_secure', ''),
('smtp_port', ''),
('smtp_username', ''),
('smtp_password', ''),
('smtp_replyto_mail', ''),
('smtp_replyto_name', ''),
('smtp_from_email', ''),
('smtp_from_name', ''),
('sitename', 'Sakura'),
('recaptcha', '0'),
('require_activation', '0'),
('require_registration_code', '0'),
('disable_registration', '0'),
('max_reg_keys', '5'),
('mail_signature', ''),
('cookie_prefix', 'sakura_'),
('date_format', 'D Y-m-d H:i:s T'),
('deactivated_avatar_img', 'public/content/data/{{ TPL }}/images/deactivated-av.png'),
('disable_registration', '0'),
('enable_tpl_cache', '0'),
('forum_text_max', '60000'),
('forum_text_min', '1'),
('forum_title_max', '128'),
('forum_title_min', '4'),
('front_page_news_posts', '3'),
('header_announcement_image', ''),
('header_announcement_link', ''),
('lock_authentication', '0'),
('mail_signature', 'Team Flashii'),
('max_online_time', '120'),
('max_reg_keys', '5'),
('members_per_page', '30'),
('min_entropy', '1'),
('sitedesc', 'The script that powers Flashii.'),
('sitetags', ''),
('username_min_length', '3'),
('username_max_length', '16'),
('site_closed', '0'),
('site_closed_reason', ''),
('use_gzip', '0'),
('enable_tpl_cache', '0'),
('paypal_client_id', ''),
('paypal_secret', ''),
('news_posts_per_page', '3'),
('no_avatar_img', 'public/content/data/{{ TPL }}/images/no-av.png'),
('no_background_img', 'public/content/pixel.png'),
('no_cron_interval', '30'),
('no_cron_last', '1450972327'),
('no_cron_service', '1'),
('no_header_img', 'public/content/images/default_header.png'),
('old_username_reserve', '90'),
('paypal_client_id', ''),
('paypal_secret', ''),
('pixel_img', 'public/content/pixel.png'),
('premium_amount_max', '24'),
('premium_price_per_month', '1.49'),
('premium_rank_id', '8'),
('premium_amount_max', '24'),
('alumni_rank_id', '9'),
('url_main', 'sakura.dev'),
('front_page_news_posts', '3'),
('date_format', 'D Y-m-d H:i:s T'),
('news_posts_per_page', '3'),
('avatar_min_width', '20'),
('avatar_min_height', '20'),
('avatar_max_height', '512'),
('avatar_max_width', '512'),
('avatar_max_fsize', '2097152'),
('url_api', 'api.sakura.dev'),
('content_path', '/content'),
('user_uploads', 'uploads'),
('no_background_img', 'public/content/pixel.png'),
('no_header_img', 'public/content/images/triangles.png'),
('pixel_img', 'public/content/pixel.png'),
('background_max_fsize', '5242880'),
('background_max_width', '2560'),
('background_max_height', '1440'),
('background_min_height', '16'),
('background_min_width', '16'),
('max_online_time', '500'),
('no_avatar_img', 'public/content/data/{{ TPL }}/images/no-av.png'),
('deactivated_avatar_img', 'public/content/data/{{ TPL }}/images/deactivated-av.png'),
('banned_avatar_img', 'public/content/data/{{ TPL }}/images/banned-av.png'),
('session_check', '4'),
('recaptcha', '0'),
('recaptcha_private', ''),
('recaptcha_public', ''),
('require_activation', '0'),
('require_registration_code', '0'),
('session_check', '4'),
('site_closed', '0'),
('site_closed_reason', 'meow'),
('site_news_category', 'site-news'),
('site_style', 'yuuno'),
('sitedesc', 'Live development environment for the script that powers Flashii.net called Sakura.'),
('sitelogo', ''),
('sitename', 'Sakura'),
('sitetags', ''),
('smtp_auth', '1'),
('smtp_from_email', 'sakura@localhost'),
('smtp_from_name', 'Sakura No Reply'),
('smtp_password', ''),
('smtp_port', '587'),
('smtp_replyto_mail', 'sakura@localhost'),
('smtp_replyto_name', 'Sakura'),
('smtp_secure', 'tls'),
('smtp_server', ''),
('smtp_username', 'sakura@localhost'),
('url_main', 'flashii.test'),
('url_rewrite', '1'),
('members_per_page', '30'),
('admin_email', 'admin@sakura.dev'),
('site_news_category', 'site-news'),
('no_cron_service', '1'),
('no_cron_interval', '30'),
('no_cron_last', '1444511632'),
('old_username_reserve', '90'),
('comment_max_length', '500'),
('comment_min_length', '1'),
('sitelogo', '')
ON DUPLICATE KEY UPDATE `config_name` = VALUES(`config_name`), `config_value` = VALUES(`config_value`);
('use_gzip', '1'),
('user_uploads', 'uploads'),
('username_max_length', '16'),
('username_min_length', '3');
--
-- Dumping data for table `sakura_emoticons`
--
INSERT INTO `sakura_emoticons` (`emote_string`, `emote_path`) VALUES
(':amu:', '/content/images/emoticons/amu.png'),
(':angrier:', '/content/images/emoticons/angrier.png'),
(':angriest:', '/content/images/emoticons/angriest.png'),
(':amu:', '/content/images/emoticons/amu.png'),
(':angrier:', '/content/images/emoticons/angrier.png'),
(':angriest:', '/content/images/emoticons/angriest.png'),
(':angry:', '/content/images/emoticons/angry.gif'),
(':blank:', '/content/images/emoticons/blank.png'),
(':childish:', '/content/images/emoticons/childish.png'),
(':congrats:', '/content/images/emoticons/congrats.png'),
(':crying:', '/content/images/emoticons/crying.gif'),
(':childish:', '/content/images/emoticons/childish.png'),
(':congrats:', '/content/images/emoticons/congrats.png'),
(':crying:', '/content/images/emoticons/crying.gif'),
(':dizzy:', '/content/images/emoticons/dizzy.gif'),
(':eat:', '/content/images/emoticons/eat.gif'),
(':evil:', '/content/images/emoticons/evil.png'),
(':extreme:', '/content/images/emoticons/extreme.png'),
(':eat:', '/content/images/emoticons/eat.gif'),
(':evil:', '/content/images/emoticons/evil.png'),
(':extreme:', '/content/images/emoticons/extreme.png'),
(':glare:', '/content/images/emoticons/glare.gif'),
(':happy:', '/content/images/emoticons/happy.gif'),
(':horror:', '/content/images/emoticons/horror.gif'),
(':huh:', '/content/images/emoticons/huh.png'),
(':idea:', '/content/images/emoticons/idea.png'),
(':jew:', '/content/images/emoticons/jew.png'),
(':kiss:', '/content/images/emoticons/kiss.gif'),
(':lmao:', '/content/images/emoticons/lmao.gif'),
(':lol:', '/content/images/emoticons/lol.gif'),
(':love:', '/content/images/emoticons/love.png'),
(':meow:', '/content/images/emoticons/meow.png'),
(':omg:', '/content/images/emoticons/omg.gif'),
(':ouch:', '/content/images/emoticons/ouch.gif'),
(':puke:', '/content/images/emoticons/puke.gif'),
(':ruse:', '/content/images/emoticons/ruse.png'),
(':sad:', '/content/images/emoticons/sad.png'),
(':sigh:', '/content/images/emoticons/sigh.gif'),
(':suspicious:', '/content/images/emoticons/suspicious.gif'),
(':horror:', '/content/images/emoticons/horror.gif'),
(':huh:', '/content/images/emoticons/huh.png'),
(':idea:', '/content/images/emoticons/idea.png'),
(':jew:', '/content/images/emoticons/jew.png'),
(':kiss:', '/content/images/emoticons/kiss.gif'),
(':lmao:', '/content/images/emoticons/lmao.gif'),
(':lol:', '/content/images/emoticons/lol.gif'),
(':love:', '/content/images/emoticons/love.png'),
(':meow:', '/content/images/emoticons/meow.png'),
(':omg:', '/content/images/emoticons/omg.gif'),
(':ouch:', '/content/images/emoticons/ouch.gif'),
(':puke:', '/content/images/emoticons/puke.gif'),
(':ruse:', '/content/images/emoticons/ruse.png'),
(':sad:', '/content/images/emoticons/sad.png'),
(':sigh:', '/content/images/emoticons/sigh.gif'),
(':suspicious:', '/content/images/emoticons/suspicious.gif'),
(':sweat:', '/content/images/emoticons/sweat.gif'),
(':tired:', '/content/images/emoticons/tired.gif'),
(':yay:', '/content/images/emoticons/vhappy.gif'),
(':yay:', '/content/images/emoticons/vhappy.gif'),
(':winxp:', '/content/images/emoticons/winxp.png'),
(':wtf:', '/content/images/emoticons/wtf.gif'),
(':wtf:', '/content/images/emoticons/wtf.gif'),
(':sleep:', '/content/images/emoticons/zzz.gif'),
(':what:', '/content/images/emoticons/what.png'),
(':smug:', '/content/images/emoticons/smug.png')
ON DUPLICATE KEY UPDATE `emote_string` = VALUES(`emote_string`), `emote_path` = VALUES(`emote_path`);
(':what:', '/content/images/emoticons/what.png'),
(':smug:', '/content/images/emoticons/smug.png');
--
-- Dumping data for table `sakura_optionfields`
--
INSERT INTO `sakura_optionfields` (`option_id`, `option_name`, `option_description`, `option_type`, `option_permission`) VALUES
('disableProfileParallax', 'Disable Parallaxing', 'This will stop your background from responding to your mouse movement, this will only affect your background.', 'checkbox', 'CHANGE_BACKGROUND'),
('profileBackgroundSiteWide', 'Display profile background site wide', 'This will make the profile background you set on your profile appear on the entire site (except on other profiles).', 'checkbox', 'CREATE_BACKGROUND'),
('useMisaki', 'Use the testing style', 'This will make the site use the new Misaki style instead of Yuuno.', 'checkbox', 'ALTER_PROFILE')
ON DUPLICATE KEY UPDATE `option_id` = VALUES(`option_id`), `option_name` = VALUES(`option_name`), `option_description` = VALUES(`option_description`), `option_type` = VALUES(`option_type`), `option_permission` = VALUES(`option_permission`);
('disableProfileParallax', 'Disable Parallaxing', 'This will stop your background from responding to your mouse movement, this will only affect your background.', 'checkbox', 'CHANGE_BACKGROUND'),
('profileBackgroundSiteWide', 'Display profile background site wide', 'This will make the profile background you set on your profile appear on the entire site (except on other profiles).', 'checkbox', 'CREATE_BACKGROUND'),
('useMisaki', 'Use the testing style', 'This will make the site use the new Misaki style instead of Yuuno.', 'checkbox', 'ALTER_PROFILE');
--
-- Dumping data for table `sakura_permissions`
--
INSERT INTO `sakura_permissions` (`rank_id`, `user_id`, `permissions_site`, `permissions_manage`, `permissions_forums`, `permissions_inherit`) VALUES
(1, 0, '00000000000000000000000000000001', '00', '0', '000'),
(2, 0, '11110000111111111100111101101100', '00', '1', '000'),
(3, 0, '11110001111111111111111111111100', '11', '1', '000'),
(4, 0, '11111111111111111111111111111100', '11', '1', '000'),
(5, 0, '11110001111111111111111111111100', '11', '1', '000'),
(6, 0, '11110000111111111100111101101100', '00', '0', '000'),
(7, 0, '11110001111111111111111111111100', '01', '1', '000'),
(8, 0, '11110001111111111111111111111100', '00', '1', '000'),
(9, 0, '11110001111111111111111111111100', '00', '1', '000'),
(10, 0, '11110000000011010100101000100010', '00', '0', '000'),
(11, 0, '11110000111111111100111101101100', '00', '1', '000')
ON DUPLICATE KEY UPDATE `rank_id` = VALUES(`rank_id`), `user_id` = VALUES(`user_id`), `permissions_site` = VALUES(`permissions_site`), `permissions_manage` = VALUES(`permissions_manage`), `permissions_forums` = VALUES(`permissions_forums`), `permissions_inherit` = VALUES(`permissions_inherit`);
(1, 0, '00000000000000000000000000000001', '00', '0', '000'),
(2, 0, '11110000111111111100111101101100', '00', '1', '000'),
(3, 0, '11110001111111111111111111111100', '11', '1', '000'),
(4, 0, '11110111111111111111111111111100', '11', '1', '000'),
(5, 0, '11110001111111111111111111111100', '11', '1', '000'),
(6, 0, '11110000111111111100111101101100', '00', '0', '000'),
(7, 0, '11110001111111111111111111111100', '01', '1', '000'),
(8, 0, '11110001111111111111111111111100', '00', '1', '000'),
(9, 0, '11110001111111111111111111111100', '00', '1', '000'),
(10, 0, '11110000000011010100101000100010', '00', '0', '000'),
(11, 0, '11110000111111111100111101101100', '00', '1', '000');
--
-- Dumping data for table `sakura_profilefields`
--
INSERT INTO `sakura_profilefields` (`field_id`, `field_name`, `field_type`, `field_link`, `field_linkformat`, `field_description`, `field_additional`) VALUES
(1, 'Website', 'url', 1, '{{ VAL }}', 'URL to your website', ''),
(2, 'Twitter', 'text', 1, 'https://twitter.com/{{ VAL }}', 'Your @twitter Username', ''),
(3, 'BitBucket', 'text', 1, 'https://bitbucket.org/{{ VAL }}', 'Your BitBucket Username', ''),
(4, 'Skype', 'text', 1, 'skype:{{ VAL }}?userinfo', 'Your Skype Username', ''),
(5, 'YouTube', 'text', 0, '', 'ID or Username excluding http://youtube.com/*/', '{\"youtubetype\": [\"checkbox\", \"I <b>do not</b> have a Channel Username (url looks like https://www.youtube.com/channel/UCXZcw5hw5C7Neto-T_nRXBQ).\"]}'),
(6, 'SoundCloud', 'text', 1, 'https://soundcloud.com/{{ VAL }}', 'Your SoundCloud username', ''),
(7, 'Steam', 'text', 1, 'https://steamcommunity.com/id/{{ VAL }}', 'Your Steam Community Username (may differ from login username)', ''),
(8, 'osu!', 'text', 1, 'https://osu.ppy.sh/u/{{ VAL }}', 'Your osu! Username', ''),
(9, 'Origin', 'text', 0, '', 'Your Origin User ID', ''),
(10, 'Xbox Live', 'text', 1, 'https://account.xbox.com/en-GB/Profile?Gamertag={{ VAL }}', 'Your Xbox User ID', ''),
(11, 'PSN', 'text', 1, 'http://psnprofiles.com/{{ VAL }}', 'Your PSN User ID', ''),
(12, 'Last.fm', 'text', 1, 'http://last.fm/user/{{ VAL }}', 'Your Last.fm username', '')
ON DUPLICATE KEY UPDATE `field_id` = VALUES(`field_id`), `field_name` = VALUES(`field_name`), `field_type` = VALUES(`field_type`), `field_link` = VALUES(`field_link`), `field_linkformat` = VALUES(`field_linkformat`), `field_description` = VALUES(`field_description`), `field_additional` = VALUES(`field_additional`);
(1, 'Website', 'url', 1, '{{ VAL }}', 'URL to your website', ''),
(2, 'Twitter', 'text', 1, 'https://twitter.com/{{ VAL }}', 'Your @twitter Username', ''),
(3, 'BitBucket', 'text', 1, 'https://bitbucket.org/{{ VAL }}', 'Your BitBucket Username', ''),
(4, 'Skype', 'text', 1, 'skype:{{ VAL }}?userinfo', 'Your Skype Username', ''),
(5, 'YouTube', 'text', 0, '', 'ID or Username excluding http://youtube.com/*/', '{"youtubetype": ["checkbox", "I <b>do not</b> have a Channel Username (url looks like https://www.youtube.com/channel/UCXZcw5hw5C7Neto-T_nRXBQ)."]}'),
(6, 'SoundCloud', 'text', 1, 'https://soundcloud.com/{{ VAL }}', 'Your SoundCloud username', ''),
(7, 'Steam', 'text', 1, 'https://steamcommunity.com/id/{{ VAL }}', 'Your Steam Community Username (may differ from login username)', ''),
(8, 'osu!', 'text', 1, 'https://osu.ppy.sh/u/{{ VAL }}', 'Your osu! Username', ''),
(9, 'Origin', 'text', 0, '', 'Your Origin User ID', ''),
(10, 'Xbox Live', 'text', 1, 'https://account.xbox.com/en-GB/Profile?Gamertag={{ VAL }}', 'Your Xbox User ID', ''),
(11, 'PSN', 'text', 1, 'http://psnprofiles.com/{{ VAL }}', 'Your PSN User ID', ''),
(12, 'Last.fm', 'text', 1, 'http://last.fm/user/{{ VAL }}', 'Your Last.fm username', '');
--
-- Dumping data for table `sakura_ranks`
--
INSERT INTO `sakura_ranks` (`rank_id`, `rank_hierarchy`, `rank_name`, `rank_multiple`, `rank_hidden`, `rank_colour`, `rank_description`, `rank_title`) VALUES
(1, 0, 'Deactivated', '', 1, '#555', 'Users that are yet to be activated or that deactivated their own account.', 'Deactivated'),
(2, 1, 'Regular user', 's', 0, 'inherit', 'Regular users with regular permissions.', 'Regular user'),
(3, 3, 'Site moderator', 's', 0, '#0A0', 'Users with special permissions like being able to ban and modify users if needed.', 'Staff'),
(4, 4, 'Administrator', 's', 0, '#C00', 'Users that manage the server and everything around that.', 'Administrator'),
(5, 3, 'Developer', 's', 0, '#824CA0', 'Users that either create or test new features of the site.', 'Staff'),
(6, 1, 'Bot', 's', 1, '#9E8DA7', 'Reserved user accounts for services.', 'Bot'),
(7, 2, 'Chat moderator', 's', 0, '#09F', 'Moderators of the chat room.', 'Staff'),
(8, 1, 'Tenshi', '', 0, '#EE9400', 'Users that bought premium to help us keep the site and its services alive!', 'Tenshi'),
(9, 1, 'Alumnii', '', 0, '#FF69B4', 'People who have contributed to the community but have moved on or resigned.', 'Alumnii'),
(10, 0, 'Restricted', 's', 1, '#333', 'Users that are restricted.', 'Restricted'),
(11, 1, 'Early Supporter', 's', 0, '#0049EE', 'User that donated before the premium system.', 'Early Supporter')
ON DUPLICATE KEY UPDATE `rank_id` = VALUES(`rank_id`), `rank_hierarchy` = VALUES(`rank_hierarchy`), `rank_name` = VALUES(`rank_name`), `rank_multiple` = VALUES(`rank_multiple`), `rank_hidden` = VALUES(`rank_hidden`), `rank_colour` = VALUES(`rank_colour`), `rank_description` = VALUES(`rank_description`), `rank_title` = VALUES(`rank_title`);
(1, 0, 'Deactivated', '', 1, '#555', 'Users that are yet to be activated or that deactivated their own account.', 'Deactivated'),
(2, 1, 'Regular user', 's', 0, 'inherit', 'Regular users with regular permissions.', 'Regular user'),
(3, 3, 'Site moderator', 's', 0, '#FA3703', 'Users with special permissions like being able to ban and modify users if needed.', 'Moderator'),
(4, 4, 'Administrator', 's', 0, '#824CA0', 'Users that manage the server and everything around that.', 'Administrator'),
(5, 3, 'Developer', 's', 0, '#6EAC0A', 'Users that either create or test new features of the site.', 'Developer'),
(6, 1, 'Bot', 's', 1, '#9E8DA7', 'Reserved user accounts for services.', 'Bot'),
(7, 2, 'Chat moderator', 's', 0, '#09F', 'Moderators of the chat room.', 'Moderator'),
(8, 1, 'Tenshi', '', 0, '#EE9400', 'Users that bought premium to help us keep the site and its services alive!', 'Tenshi'),
(9, 1, 'Alumnii', '', 0, '#FF69B4', 'People who have made big contributions to the community but have moved on.', 'Alumni'),
(10, 0, 'Restricted', '', 1, '#666', 'Users that are restricted.', 'Restricted'),
(11, 1, 'Early Supporter', 's', 0, '#0049EE', 'User that donated before the premium system.', 'Early Supporter');
-- 2015-10-10 21:15:55
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View file

@ -1,77 +1,92 @@
-- Adminer 4.2.2 MySQL dump
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 24, 2015 at 04:58 PM
-- Server version: 5.7.10-log
-- PHP Version: 7.0.1
SET NAMES utf8;
SET time_zone = '+00:00';
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `sakura-development`
--
CREATE DATABASE IF NOT EXISTS `sakura-development` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
USE `sakura-development`;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_actioncodes`
--
DROP TABLE IF EXISTS `sakura_actioncodes`;
CREATE TABLE `sakura_actioncodes` (
`id` bigint(255) NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`id` bigint(255) NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`action` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Action identifier so the backend knows what to do.',
`userid` bigint(255) NOT NULL COMMENT 'ID of the user that would be affected by this action',
`actkey` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The URL key for using this code.',
`instruction` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Things the backend should do upon using this code',
PRIMARY KEY (`id`)
`instruction` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Things the backend should do upon using this code'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
DROP TABLE IF EXISTS `sakura_apikeys`;
CREATE TABLE `sakura_apikeys` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`owner` bigint(128) unsigned NOT NULL COMMENT 'ID of user that owns this API key.',
`apikey` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'The API key.',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `sakura_bans`
--
DROP TABLE IF EXISTS `sakura_bans`;
CREATE TABLE `sakura_bans` (
`ban_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'ID of user that was banned, 0 for just an IP ban.',
`ban_begin` int(11) unsigned NOT NULL COMMENT 'Timestamp when the user was banned.',
`ban_end` int(11) unsigned NOT NULL COMMENT 'Timestamp when the user should regain access to the site.',
`ban_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of user that was banned, 0 for just an IP ban.',
`ban_begin` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp when the user was banned.',
`ban_end` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp when the user should regain access to the site.',
`ban_reason` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT 'Reason given for the ban.',
`ban_moderator` bigint(255) unsigned NOT NULL COMMENT 'ID of moderator that banned this user,',
PRIMARY KEY (`ban_id`),
KEY `uid` (`user_id`),
KEY `mod_id` (`ban_moderator`),
CONSTRAINT `sakura_bans_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `sakura_bans_ibfk_2` FOREIGN KEY (`ban_moderator`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
`ban_moderator` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of moderator that banned this user,'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
DROP TABLE IF EXISTS `sakura_bbcodes`;
CREATE TABLE `sakura_bbcodes` (
`bbcode_id` int(64) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`bbcode_regex` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Regular expression string for the BBCode.',
`bbcode_replace` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'What to replace it with.',
`bbcode_title` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'Button title for this bbcode.',
`bbcode_description` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'Description of what this does.',
`bbcode_display` tinyint(1) unsigned NOT NULL COMMENT 'Set if this bbcode is displayed on the posting page.',
PRIMARY KEY (`bbcode_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `sakura_comments`
--
DROP TABLE IF EXISTS `sakura_comments`;
CREATE TABLE `sakura_comments` (
`comment_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`comment_id` bigint(255) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`comment_category` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'Comment category.',
`comment_timestamp` int(11) unsigned NOT NULL COMMENT 'Timestamp of when this comment was posted.',
`comment_poster` bigint(255) unsigned NOT NULL COMMENT 'User ID of the poster.',
`comment_reply_to` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the comment this comment is a reply to',
`comment_text` text COLLATE utf8_bin NOT NULL COMMENT 'Content of the comment.',
PRIMARY KEY (`comment_id`)
`comment_timestamp` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp of when this comment was posted.',
`comment_poster` bigint(255) UNSIGNED NOT NULL COMMENT 'User ID of the poster.',
`comment_reply_to` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the comment this comment is a reply to',
`comment_text` text COLLATE utf8_bin NOT NULL COMMENT 'Content of the comment.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_comment_votes`
--
DROP TABLE IF EXISTS `sakura_comment_votes`;
CREATE TABLE `sakura_comment_votes` (
`vote_comment` bigint(255) unsigned NOT NULL COMMENT 'ID of the comment that was voted on.',
`vote_user` bigint(255) unsigned NOT NULL COMMENT 'ID of the voter.',
`vote_state` tinyint(1) unsigned NOT NULL COMMENT '0 = dislike, 1 = like.'
`vote_comment` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the comment that was voted on.',
`vote_user` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the voter.',
`vote_state` tinyint(1) UNSIGNED NOT NULL COMMENT '0 = dislike, 1 = like.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_config`
--
DROP TABLE IF EXISTS `sakura_config`;
CREATE TABLE `sakura_config` (
@ -79,6 +94,11 @@ CREATE TABLE `sakura_config` (
`config_value` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The value, obviously.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_emoticons`
--
DROP TABLE IF EXISTS `sakura_emoticons`;
CREATE TABLE `sakura_emoticons` (
@ -86,63 +106,87 @@ CREATE TABLE `sakura_emoticons` (
`emote_path` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Path to the image file relative to the content domain.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_error_log`
--
DROP TABLE IF EXISTS `sakura_error_log`;
CREATE TABLE `sakura_error_log` (
`error_id` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'An ID that is created when an error occurs.',
`error_timestamp` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'A datestring from when the error occurred.',
`error_revision` int(16) unsigned NOT NULL COMMENT 'Sakura Revision number.',
`error_type` int(16) unsigned NOT NULL COMMENT 'The PHP error type of this error.',
`error_line` int(32) unsigned NOT NULL COMMENT 'The line that caused this error.',
`error_revision` int(16) UNSIGNED NOT NULL COMMENT 'Sakura Revision number.',
`error_type` int(16) UNSIGNED NOT NULL COMMENT 'The PHP error type of this error.',
`error_line` int(32) UNSIGNED NOT NULL COMMENT 'The line that caused this error.',
`error_string` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'PHP''s description of this error.',
`error_file` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'The file in which this error occurred.',
`error_backtrace` text COLLATE utf8_bin NOT NULL COMMENT 'A full base64 and json encoded backtrace containing all environment data.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_faq`
--
DROP TABLE IF EXISTS `sakura_faq`;
CREATE TABLE `sakura_faq` (
`faq_id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`faq_id` bigint(128) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`faq_shorthand` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Used for linking directly to a question.',
`faq_question` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The question.',
`faq_answer` text COLLATE utf8_bin NOT NULL COMMENT 'The answer.',
PRIMARY KEY (`faq_id`)
`faq_answer` text COLLATE utf8_bin NOT NULL COMMENT 'The answer.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_forums`
--
DROP TABLE IF EXISTS `sakura_forums`;
CREATE TABLE `sakura_forums` (
`forum_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`forum_id` bigint(255) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`forum_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display name of the forum.',
`forum_desc` text COLLATE utf8_bin NOT NULL COMMENT 'Description of the forum.',
`forum_link` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'If set forum will display as a link.',
`forum_category` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the category this forum falls under.',
`forum_type` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT 'Forum type, 0 for regular board, 1 for category and 2 for link.',
`forum_icon` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display icon for the forum.',
PRIMARY KEY (`forum_id`)
`forum_category` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the category this forum falls under.',
`forum_type` tinyint(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Forum type, 0 for regular board, 1 for category and 2 for link.',
`forum_icon` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display icon for the forum.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
DROP TABLE IF EXISTS `sakura_forum_permissions`;
CREATE TABLE `sakura_forum_permissions` (
`forum_id` bigint(255) unsigned NOT NULL COMMENT 'Forum ID',
`rank_id` bigint(128) unsigned NOT NULL COMMENT 'Rank ID, leave 0 for a user',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'User ID, leave 0 for a rank',
--
-- Table structure for table `sakura_forums_permissions`
--
DROP TABLE IF EXISTS `sakura_forums_permissions`;
CREATE TABLE `sakura_forums_permissions` (
`forum_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Forum ID',
`rank_id` bigint(128) UNSIGNED NOT NULL COMMENT 'Rank ID, leave 0 for a user',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'User ID, leave 0 for a rank',
`forum_perms` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Forum action permission string'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_friends`
--
DROP TABLE IF EXISTS `sakura_friends`;
CREATE TABLE `sakura_friends` (
`user_id` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that added the friend.',
`friend_id` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that was added as a friend.',
`friend_timestamp` int(11) unsigned NOT NULL COMMENT 'Timestamp of action.',
KEY `uid` (`user_id`),
KEY `fid` (`friend_id`),
CONSTRAINT `sakura_friends_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `sakura_friends_ibfk_2` FOREIGN KEY (`friend_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user that added the friend.',
`friend_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user that was added as a friend.',
`friend_timestamp` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp of action.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_infopages`
--
DROP TABLE IF EXISTS `sakura_infopages`;
CREATE TABLE `sakura_infopages` (
@ -151,69 +195,80 @@ CREATE TABLE `sakura_infopages` (
`page_content` text COLLATE utf8_bin NOT NULL COMMENT 'Content of the page'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
DROP TABLE IF EXISTS `sakura_logs`;
CREATE TABLE `sakura_logs` (
`id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`uid` bigint(255) unsigned NOT NULL COMMENT 'User ID of user that took this action.',
`action` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Action identifier.',
`attribs` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Optional attributes, vsprintf() style.',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
CONSTRAINT `sakura_logs_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `sakura_login_attempts`
--
DROP TABLE IF EXISTS `sakura_login_attempts`;
CREATE TABLE `sakura_login_attempts` (
`attempt_id` bigint(255) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`attempt_success` tinyint(1) UNSIGNED NOT NULL COMMENT 'Success boolean.',
`attempt_timestamp` int(11) UNSIGNED NOT NULL COMMENT 'Unix timestamp of the event.',
`attempt_ip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP that made this attempt.',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user that was attempted to log in to.'
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `sakura_logtypes`;
CREATE TABLE `sakura_logtypes` (
`id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Identifier of action (has to match things in the logs table).',
`string` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'String to format using vsprintf and the attributes in the logs table.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_messages`
--
DROP TABLE IF EXISTS `sakura_messages`;
CREATE TABLE `sakura_messages` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`from_user` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that sent this message.',
`to_user` bigint(255) unsigned NOT NULL COMMENT 'ID of user that should receive this message.',
`id` bigint(128) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`from_user` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user that sent this message.',
`to_user` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of user that should receive this message.',
`read` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IDs of users who read this message.',
`deleted` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Indicator if one of the parties deleted the message, if it is already 1 the script will remove this row.',
`timestamp` int(11) unsigned NOT NULL COMMENT 'Timestamp of the time this message was sent',
`timestamp` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp of the time this message was sent',
`subject` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title of the message',
`content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the message.',
PRIMARY KEY (`id`)
`content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the message.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_news`
--
DROP TABLE IF EXISTS `sakura_news`;
CREATE TABLE `sakura_news` (
`news_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`news_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`news_category` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Category ID.',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'ID of user who posted this news message.',
`news_timestamp` int(11) unsigned NOT NULL COMMENT 'News post timestamp.',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of user who posted this news message.',
`news_timestamp` int(11) UNSIGNED NOT NULL COMMENT 'News post timestamp.',
`news_title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title of the post.',
`news_content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the post',
PRIMARY KEY (`news_id`)
`news_content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the post'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_notifications`
--
DROP TABLE IF EXISTS `sakura_notifications`;
CREATE TABLE `sakura_notifications` (
`alert_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`user_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID this notification is intended for.',
`alert_timestamp` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Timestamp when this notification was created.',
`alert_read` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Toggle for unread and read.',
`alert_sound` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Toggle if a sound should be played upon receiving the notification.',
`alert_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`user_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'User ID this notification is intended for.',
`alert_timestamp` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Timestamp when this notification was created.',
`alert_read` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Toggle for unread and read.',
`alert_sound` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Toggle if a sound should be played upon receiving the notification.',
`alert_title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title displayed on the notification.',
`alert_text` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Text displayed.',
`alert_link` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'Link (empty for no link).',
`alert_img` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Image path, prefix with font: to use a font class instead of an image.',
`alert_timeout` int(16) unsigned NOT NULL DEFAULT '0' COMMENT 'How long the notification should stay on screen in milliseconds, 0 for forever.',
PRIMARY KEY (`alert_id`),
KEY `uid` (`user_id`),
CONSTRAINT `sakura_notifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
`alert_timeout` int(16) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'How long the notification should stay on screen in milliseconds, 0 for forever.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_optionfields`
--
DROP TABLE IF EXISTS `sakura_optionfields`;
CREATE TABLE `sakura_optionfields` (
@ -221,210 +276,508 @@ CREATE TABLE `sakura_optionfields` (
`option_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Description of the field in a proper way.',
`option_description` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Longer description of the option.',
`option_type` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Type attribute in the input element.',
`option_permission` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The minimum permission level this option requires.',
UNIQUE KEY `id` (`option_id`)
`option_permission` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The minimum permission level this option requires.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_permissions`
--
DROP TABLE IF EXISTS `sakura_permissions`;
CREATE TABLE `sakura_permissions` (
`rank_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the rank this permissions set is used for.',
`user_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the user this permissions set is used for.',
`rank_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the rank this permissions set is used for.',
`user_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the user this permissions set is used for.',
`permissions_site` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '0' COMMENT 'Site permissions.',
`permissions_manage` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '0' COMMENT 'Site management permissions',
`permissions_forums` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '0' COMMENT 'Forum permissions.',
`permissions_inherit` varchar(4) COLLATE utf8_bin NOT NULL DEFAULT '0' COMMENT 'Rank inheritance, only used when user specific.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_posts`
--
DROP TABLE IF EXISTS `sakura_posts`;
CREATE TABLE `sakura_posts` (
`post_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`topic_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of topic this post is a part of.',
`forum_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of forum this was posted in.',
`poster_id` bigint(255) unsigned DEFAULT '0' COMMENT 'ID of poster of this post.',
`post_id` bigint(255) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`topic_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of topic this post is a part of.',
`forum_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of forum this was posted in.',
`poster_id` bigint(255) UNSIGNED DEFAULT '0' COMMENT 'ID of poster of this post.',
`poster_ip` varchar(40) COLLATE utf8_bin NOT NULL COMMENT 'IP of poster.',
`post_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Time this post was made.',
`post_parse` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Switch the type of parser that''s used.',
`post_signature` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'Toggle if signature should be shown.',
`post_emotes` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'Toggle if emoticons should be parsed.',
`post_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Time this post was made.',
`post_signature` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Toggle if signature should be shown.',
`post_subject` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Subject of the post.',
`post_text` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the post.',
`post_edit_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Time this post was last edited.',
`post_edit_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Time this post was last edited.',
`post_edit_reason` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'Reason this was edited.',
`post_edit_user` int(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of user that edited.',
PRIMARY KEY (`post_id`),
KEY `topic_id` (`topic_id`),
KEY `forum_id` (`forum_id`),
KEY `poster_id` (`poster_id`),
CONSTRAINT `sakura_posts_ibfk_1` FOREIGN KEY (`topic_id`) REFERENCES `sakura_topics` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `sakura_posts_ibfk_2` FOREIGN KEY (`forum_id`) REFERENCES `sakura_forums` (`forum_id`) ON DELETE CASCADE ON UPDATE CASCADE
`post_edit_user` int(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of user that edited.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_premium`
--
DROP TABLE IF EXISTS `sakura_premium`;
CREATE TABLE `sakura_premium` (
`user_id` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that purchased Tenshi.',
`premium_start` int(11) unsigned NOT NULL COMMENT 'Timestamp of first purchase.',
`premium_expire` int(11) unsigned NOT NULL COMMENT 'Expiration timestamp.',
UNIQUE KEY `uid` (`user_id`),
CONSTRAINT `sakura_premium_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user that purchased Tenshi.',
`premium_start` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp of first purchase.',
`premium_expire` int(11) UNSIGNED NOT NULL COMMENT 'Expiration timestamp.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_premium_log`
--
DROP TABLE IF EXISTS `sakura_premium_log`;
CREATE TABLE `sakura_premium_log` (
`transaction_id` int(16) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'User ID of purchaser',
`transaction_id` int(16) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'User ID of purchaser',
`transaction_amount` float NOT NULL COMMENT 'Amount that was transferred.',
`transaction_date` int(11) unsigned NOT NULL COMMENT 'Date when the purchase was made.',
`transaction_comment` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'A short description of the action taken.',
PRIMARY KEY (`transaction_id`)
`transaction_date` int(11) UNSIGNED NOT NULL COMMENT 'Date when the purchase was made.',
`transaction_comment` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'A short description of the action taken.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_profilefields`
--
DROP TABLE IF EXISTS `sakura_profilefields`;
CREATE TABLE `sakura_profilefields` (
`field_id` int(64) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID used for ordering on the userpage.',
`field_id` int(64) UNSIGNED NOT NULL COMMENT 'ID used for ordering on the userpage.',
`field_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Name of the field.',
`field_type` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Type attribute in the input element.',
`field_link` tinyint(1) unsigned NOT NULL COMMENT 'Set if this value should be put in a href.',
`field_link` tinyint(1) UNSIGNED NOT NULL COMMENT 'Set if this value should be put in a href.',
`field_linkformat` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'If the form is a link how should it be formatted? {{ VAL }} gets replace with the value.',
`field_description` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Description of the field displayed in the control panel.',
`field_additional` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Undocumented JSON array containing special options if needed (probably only going to be used for the YouTube field).',
PRIMARY KEY (`field_id`)
`field_additional` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Undocumented JSON array containing special options if needed (probably only going to be used for the YouTube field).'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_ranks`
--
DROP TABLE IF EXISTS `sakura_ranks`;
CREATE TABLE `sakura_ranks` (
`rank_id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`rank_hierarchy` int(11) unsigned NOT NULL COMMENT 'Rank hierarchy.',
`rank_id` bigint(128) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`rank_hierarchy` int(11) UNSIGNED NOT NULL COMMENT 'Rank hierarchy.',
`rank_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display name of the rank.',
`rank_multiple` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT 'Used when addressing this rank as a multiple',
`rank_hidden` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Don''t show any public links to this rank.',
`rank_hidden` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Don''t show any public links to this rank.',
`rank_colour` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Colour used for the username of a member of this rank.',
`rank_description` text COLLATE utf8_bin NOT NULL COMMENT 'A description of what a user of this rank can do/is supposed to do.',
`rank_title` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Default user title if user has none set.',
PRIMARY KEY (`rank_id`)
`rank_title` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Default user title if user has none set.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
DROP TABLE IF EXISTS `sakura_regcodes`;
CREATE TABLE `sakura_regcodes` (
`id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`code` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'Randomly generated registration key.',
`created_by` bigint(255) unsigned NOT NULL COMMENT 'ID of user who generated this code.',
`used_by` bigint(255) unsigned NOT NULL COMMENT 'ID of user who used this code.',
`key_used` tinyint(1) unsigned NOT NULL COMMENT 'Boolean for setting this key as used.',
PRIMARY KEY (`id`),
KEY `created_by` (`created_by`),
CONSTRAINT `sakura_regcodes_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `sakura_reports`
--
DROP TABLE IF EXISTS `sakura_reports`;
CREATE TABLE `sakura_reports` (
`id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`type` int(32) unsigned NOT NULL COMMENT 'Report type, entirely handled on the script side.',
`issuer` bigint(255) unsigned NOT NULL COMMENT 'ID of the person who issued this report.',
`subject` bigint(255) unsigned NOT NULL COMMENT 'ID pointing out what was reported (a more accurate description isn''t possible due to the type column).',
`id` bigint(255) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`type` int(32) UNSIGNED NOT NULL COMMENT 'Report type, entirely handled on the script side.',
`issuer` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the person who issued this report.',
`subject` bigint(255) UNSIGNED NOT NULL COMMENT 'ID pointing out what was reported (a more accurate description isn''t possible due to the type column).',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'A quick description of this report.',
`description` text COLLATE utf8_bin NOT NULL COMMENT 'And a detailed description.',
`reviewed` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the moderator that reviewed this report.',
PRIMARY KEY (`id`)
`reviewed` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the moderator that reviewed this report.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_sessions`
--
DROP TABLE IF EXISTS `sakura_sessions`;
CREATE TABLE `sakura_sessions` (
`session_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'ID of the user this session is spawned for. ',
`session_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management. ',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user this session is spawned for. ',
`user_ip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP of the user this session is spawned for.',
`user_agent` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'User agent of the user this session is spawned for.',
`session_key` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Session key, allow direct access to the user''s account. ',
`session_start` int(16) unsigned NOT NULL COMMENT 'The timestamp for when the session was started. ',
`session_expire` int(16) unsigned NOT NULL COMMENT 'The timestamp for when this session should end, -1 for permanent. ',
`session_remember` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'If set to 1 session will be extended each time a page is loaded.',
PRIMARY KEY (`session_id`),
KEY `userid` (`user_id`)
`session_start` int(16) UNSIGNED NOT NULL COMMENT 'The timestamp for when the session was started. ',
`session_expire` int(16) UNSIGNED NOT NULL COMMENT 'The timestamp for when this session should end, -1 for permanent. ',
`session_remember` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'If set to 1 session will be extended each time a page is loaded.'
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_topics`
--
DROP TABLE IF EXISTS `sakura_topics`;
CREATE TABLE `sakura_topics` (
`topic_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`forum_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of forum this topic was created in.',
`topic_hidden` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Boolean to set the topic as hidden.',
`topic_id` bigint(255) UNSIGNED NOT NULL COMMENT 'MySQL Generated ID used for sorting.',
`forum_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of forum this topic was created in.',
`topic_hidden` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Boolean to set the topic as hidden.',
`topic_title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title of the topic.',
`topic_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Timestamp when the topic was created.',
`topic_time_limit` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'After how long a topic should be locked.',
`topic_last_reply` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Last time a post was posted in this topic.',
`topic_views` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'Amount of times the topic has been viewed.',
`topic_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Status of topic.',
`topic_status_change` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Date the topic status was changed (used for deletion cooldown as well).',
`topic_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Type of the topic.',
PRIMARY KEY (`topic_id`),
KEY `forum_id` (`forum_id`),
CONSTRAINT `sakura_topics_ibfk_1` FOREIGN KEY (`forum_id`) REFERENCES `sakura_forums` (`forum_id`) ON DELETE CASCADE ON UPDATE CASCADE
`topic_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Timestamp when the topic was created.',
`topic_time_limit` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'After how long a topic should be locked.',
`topic_views` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Amount of times the topic has been viewed.',
`topic_status` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Status of topic.',
`topic_status_change` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Date the topic status was changed (used for deletion cooldown as well).',
`topic_type` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Type of the topic.',
`topic_last_reply` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Timestamp of when the last reply made to this thread.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_topics_track`
--
DROP TABLE IF EXISTS `sakura_topics_track`;
CREATE TABLE `sakura_topics_track` (
`user_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the user this row applies to.',
`topic_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the thread in question.',
`forum_id` bigint(255) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of the forum in question.',
`mark_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Timestamp of the event.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_username_history`
--
DROP TABLE IF EXISTS `sakura_username_history`;
CREATE TABLE `sakura_username_history` (
`change_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`change_time` int(11) unsigned NOT NULL COMMENT 'Timestamp of change',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'User ID',
`change_id` int(11) UNSIGNED NOT NULL COMMENT 'Identifier',
`change_time` int(11) UNSIGNED NOT NULL COMMENT 'Timestamp of change',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'User ID',
`username_new` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'New username',
`username_new_clean` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Clean new username',
`username_old` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Old username',
`username_old_clean` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Clean old username',
PRIMARY KEY (`change_id`)
`username_old_clean` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Clean old username'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_users`
--
DROP TABLE IF EXISTS `sakura_users`;
CREATE TABLE `sakura_users` (
`user_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management. ',
`username` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Username set at registration.',
`username_clean` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'A more cleaned up version of the username for backend usage.',
`password_hash` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Hashing algo used for the password hash.',
`password_salt` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Salt used for the password hash.',
`password_algo` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Algorithm used for the password hash.',
`password_iter` int(11) unsigned NOT NULL COMMENT 'Password hash iterations.',
`password_chan` int(11) unsigned NOT NULL COMMENT 'Last time the user changed their password.',
`password_new` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'Field with array containing new password data beit that they requested a password change.',
`password_iter` int(11) UNSIGNED NOT NULL COMMENT 'Password hash iterations.',
`password_chan` int(11) UNSIGNED NOT NULL COMMENT 'Last time the user changed their password.',
`email` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'E-mail of the user for password restoring etc.',
`rank_main` mediumint(4) unsigned NOT NULL DEFAULT '0' COMMENT 'Main rank of the user.',
`rank_main` mediumint(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Main rank of the user.',
`user_ranks` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '[0]' COMMENT 'Array containing the ranks the user is part of.',
`user_colour` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'Additional name colour, when empty colour defaults to group colour.',
`register_ip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP used for the creation of this account.',
`last_ip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Last IP that was used to log into this account.',
`user_title` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'Custom user title of the user, when empty reverts to their derault group name.',
`user_registered` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Timestamp of account creation.',
`user_last_online` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Last time anything was done on this account.',
`user_registered` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Timestamp of account creation.',
`user_last_online` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Last time anything was done on this account.',
`user_birthday` date NOT NULL COMMENT 'Birthdate of the user.',
`user_country` char(2) COLLATE utf8_bin NOT NULL COMMENT 'Contains ISO 3166 country code of user''s registration location.',
`user_data` text COLLATE utf8_bin COMMENT 'All additional profile data.',
PRIMARY KEY (`user_id`),
UNIQUE KEY `username_clean` (`username_clean`)
`user_data` text COLLATE utf8_bin COMMENT 'All additional profile data.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sakura_warnings`
--
DROP TABLE IF EXISTS `sakura_warnings`;
CREATE TABLE `sakura_warnings` (
`warning_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`user_id` bigint(255) unsigned NOT NULL COMMENT 'ID of user that was warned.',
`moderator_id` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that issued the warning.',
`warning_issued` int(16) unsigned NOT NULL COMMENT 'Timestamp of the date the warning was issued.',
`warning_expire` int(16) unsigned NOT NULL COMMENT 'Timstamp when the warning should expire, 0 for a permanent warning.',
`warning_reason` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT 'Reason for the warning.',
PRIMARY KEY (`warning_id`),
KEY `uid` (`user_id`),
KEY `iid` (`moderator_id`),
CONSTRAINT `sakura_warnings_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `sakura_warnings_ibfk_2` FOREIGN KEY (`moderator_id`) REFERENCES `sakura_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
`warning_id` bigint(255) UNSIGNED NOT NULL COMMENT 'Automatically generated ID by MySQL for management.',
`user_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of user that was warned.',
`moderator_id` bigint(255) UNSIGNED NOT NULL COMMENT 'ID of the user that issued the warning.',
`warning_issued` int(16) UNSIGNED NOT NULL COMMENT 'Timestamp of the date the warning was issued.',
`warning_expires` int(16) UNSIGNED NOT NULL COMMENT 'Timstamp when the warning should expire, 0 for a permanent warning.',
`warning_action` tinyint(1) UNSIGNED DEFAULT NULL COMMENT 'Action taken.',
`warning_reason` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT 'Reason for the warning.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Indexes for dumped tables
--
-- 2015-10-10 21:14:40
--
-- Indexes for table `sakura_actioncodes`
--
ALTER TABLE `sakura_actioncodes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sakura_bans`
--
ALTER TABLE `sakura_bans`
ADD PRIMARY KEY (`ban_id`),
ADD KEY `uid` (`user_id`),
ADD KEY `mod_id` (`ban_moderator`);
--
-- Indexes for table `sakura_bbcodes`
--
ALTER TABLE `sakura_bbcodes`
ADD PRIMARY KEY (`bbcode_id`);
--
-- Indexes for table `sakura_comments`
--
ALTER TABLE `sakura_comments`
ADD PRIMARY KEY (`comment_id`);
--
-- Indexes for table `sakura_config`
--
ALTER TABLE `sakura_config`
ADD UNIQUE KEY `config_name` (`config_name`);
--
-- Indexes for table `sakura_faq`
--
ALTER TABLE `sakura_faq`
ADD PRIMARY KEY (`faq_id`);
--
-- Indexes for table `sakura_forums`
--
ALTER TABLE `sakura_forums`
ADD PRIMARY KEY (`forum_id`);
--
-- Indexes for table `sakura_friends`
--
ALTER TABLE `sakura_friends`
ADD KEY `uid` (`user_id`),
ADD KEY `fid` (`friend_id`);
--
-- Indexes for table `sakura_login_attempts`
--
ALTER TABLE `sakura_login_attempts`
ADD PRIMARY KEY (`attempt_id`);
--
-- Indexes for table `sakura_messages`
--
ALTER TABLE `sakura_messages`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sakura_news`
--
ALTER TABLE `sakura_news`
ADD PRIMARY KEY (`news_id`);
--
-- Indexes for table `sakura_notifications`
--
ALTER TABLE `sakura_notifications`
ADD PRIMARY KEY (`alert_id`),
ADD KEY `uid` (`user_id`);
--
-- Indexes for table `sakura_optionfields`
--
ALTER TABLE `sakura_optionfields`
ADD UNIQUE KEY `id` (`option_id`);
--
-- Indexes for table `sakura_posts`
--
ALTER TABLE `sakura_posts`
ADD PRIMARY KEY (`post_id`),
ADD KEY `topic_id` (`topic_id`),
ADD KEY `forum_id` (`forum_id`),
ADD KEY `poster_id` (`poster_id`);
--
-- Indexes for table `sakura_premium`
--
ALTER TABLE `sakura_premium`
ADD UNIQUE KEY `uid` (`user_id`);
--
-- Indexes for table `sakura_premium_log`
--
ALTER TABLE `sakura_premium_log`
ADD PRIMARY KEY (`transaction_id`);
--
-- Indexes for table `sakura_profilefields`
--
ALTER TABLE `sakura_profilefields`
ADD PRIMARY KEY (`field_id`);
--
-- Indexes for table `sakura_ranks`
--
ALTER TABLE `sakura_ranks`
ADD PRIMARY KEY (`rank_id`);
--
-- Indexes for table `sakura_reports`
--
ALTER TABLE `sakura_reports`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sakura_sessions`
--
ALTER TABLE `sakura_sessions`
ADD PRIMARY KEY (`session_id`),
ADD KEY `userid` (`user_id`);
--
-- Indexes for table `sakura_topics`
--
ALTER TABLE `sakura_topics`
ADD PRIMARY KEY (`topic_id`),
ADD KEY `forum_id` (`forum_id`);
--
-- Indexes for table `sakura_username_history`
--
ALTER TABLE `sakura_username_history`
ADD PRIMARY KEY (`change_id`);
--
-- Indexes for table `sakura_users`
--
ALTER TABLE `sakura_users`
ADD PRIMARY KEY (`user_id`),
ADD UNIQUE KEY `username_clean` (`username_clean`);
--
-- Indexes for table `sakura_warnings`
--
ALTER TABLE `sakura_warnings`
ADD PRIMARY KEY (`warning_id`),
ADD KEY `uid` (`user_id`),
ADD KEY `iid` (`moderator_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `sakura_actioncodes`
--
ALTER TABLE `sakura_actioncodes`
MODIFY `id` bigint(255) NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.';
--
-- AUTO_INCREMENT for table `sakura_bans`
--
ALTER TABLE `sakura_bans`
MODIFY `ban_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.';
--
-- AUTO_INCREMENT for table `sakura_bbcodes`
--
ALTER TABLE `sakura_bbcodes`
MODIFY `bbcode_id` int(64) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `sakura_comments`
--
ALTER TABLE `sakura_comments`
MODIFY `comment_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=90;
--
-- AUTO_INCREMENT for table `sakura_faq`
--
ALTER TABLE `sakura_faq`
MODIFY `faq_id` bigint(128) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `sakura_forums`
--
ALTER TABLE `sakura_forums`
MODIFY `forum_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `sakura_login_attempts`
--
ALTER TABLE `sakura_login_attempts`
MODIFY `attempt_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `sakura_messages`
--
ALTER TABLE `sakura_messages`
MODIFY `id` bigint(128) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `sakura_news`
--
ALTER TABLE `sakura_news`
MODIFY `news_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `sakura_notifications`
--
ALTER TABLE `sakura_notifications`
MODIFY `alert_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', AUTO_INCREMENT=92;
--
-- AUTO_INCREMENT for table `sakura_posts`
--
ALTER TABLE `sakura_posts`
MODIFY `post_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=304;
--
-- AUTO_INCREMENT for table `sakura_premium_log`
--
ALTER TABLE `sakura_premium_log`
MODIFY `transaction_id` int(16) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=157;
--
-- AUTO_INCREMENT for table `sakura_profilefields`
--
ALTER TABLE `sakura_profilefields`
MODIFY `field_id` int(64) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID used for ordering on the userpage.', AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `sakura_ranks`
--
ALTER TABLE `sakura_ranks`
MODIFY `rank_id` bigint(128) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `sakura_reports`
--
ALTER TABLE `sakura_reports`
MODIFY `id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.';
--
-- AUTO_INCREMENT for table `sakura_sessions`
--
ALTER TABLE `sakura_sessions`
MODIFY `session_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ', AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `sakura_topics`
--
ALTER TABLE `sakura_topics`
MODIFY `topic_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', AUTO_INCREMENT=120;
--
-- AUTO_INCREMENT for table `sakura_username_history`
--
ALTER TABLE `sakura_username_history`
MODIFY `change_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Identifier', AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `sakura_users`
--
ALTER TABLE `sakura_users`
MODIFY `user_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ', AUTO_INCREMENT=32;
--
-- AUTO_INCREMENT for table `sakura_warnings`
--
ALTER TABLE `sakura_warnings`
MODIFY `warning_id` bigint(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.';
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View file

@ -21,7 +21,6 @@ class User
'password_algo' => 'nologin',
'password_iter' => 0,
'password_chan' => 0,
'password_new' => '',
'email' => 'sakura@localhost',
'rank_main' => 0,
'user_ranks' => '[0]',

View file

@ -11,10 +11,8 @@ require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . 'sakura.php
// Add page specific things
$renderData['page'] = [
'title' => 'Frequently Asked Questions',
'questions' => Main::getFaqData(),
];
// Initialise templating engine

View file

@ -8,7 +8,7 @@
namespace Sakura;
// Define Sakura version
define('SAKURA_VERSION', '20151216');
define('SAKURA_VERSION', '20151224');
define('SAKURA_VLABEL', 'Eminence');
define('SAKURA_COLOUR', '#6C3082');