the bread of the future

This commit is contained in:
flash 2015-05-24 22:06:53 +00:00
parent 1cd487248f
commit 03f66078e1
17 changed files with 516 additions and 349 deletions

View file

@ -5,21 +5,25 @@ SET time_zone = '+00:00';
SET foreign_key_checks = 0; SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
USE `flashiidev`;
DROP TABLE IF EXISTS `fii_actioncodes`; DROP DATABASE IF EXISTS `sakura-development`;
CREATE TABLE `fii_actioncodes` ( CREATE DATABASE `sakura-development` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
USE `sakura-development`;
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 AUTO_INCREMENT 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.', `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', `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.', `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', `instruction` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Things the backend should do upon using this code',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_apikeys`; DROP TABLE IF EXISTS `sakura_apikeys`;
CREATE TABLE `fii_apikeys` ( CREATE TABLE `sakura_apikeys` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `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.', `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.', `apikey` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'The API key.',
@ -27,8 +31,8 @@ CREATE TABLE `fii_apikeys` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_bans`; DROP TABLE IF EXISTS `sakura_bans`;
CREATE TABLE `fii_bans` ( CREATE TABLE `sakura_bans` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`uid` bigint(128) unsigned NOT NULL COMMENT 'ID of user that was banned, 0 for just an IP ban.', `uid` bigint(128) unsigned NOT NULL COMMENT 'ID of user that was banned, 0 for just an IP ban.',
`ip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP to disallow access to the site.', `ip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP to disallow access to the site.',
@ -42,14 +46,13 @@ CREATE TABLE `fii_bans` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_config`; DROP TABLE IF EXISTS `sakura_config`;
CREATE TABLE `fii_config` ( CREATE TABLE `sakura_config` (
`config_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Array key for configuration value', `config_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Array key for configuration value',
`config_value` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The value, obviously.' `config_value` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The value, obviously.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
TRUNCATE `fii_config`; INSERT INTO `sakura_config` (`config_name`, `config_value`) VALUES
INSERT INTO `fii_config` (`config_name`, `config_value`) VALUES
('recaptcha_public', ''), ('recaptcha_public', ''),
('recaptcha_private', ''), ('recaptcha_private', ''),
('charset', 'utf-8'), ('charset', 'utf-8'),
@ -60,37 +63,40 @@ INSERT INTO `fii_config` (`config_name`, `config_value`) VALUES
('manage_style', 'broomcloset'), ('manage_style', 'broomcloset'),
('allow_registration', '0'), ('allow_registration', '0'),
('smtp_server', ''), ('smtp_server', ''),
('smtp_auth', '1'), ('smtp_auth', '0'),
('smtp_secure', ''), ('smtp_secure', ''),
('smtp_port', ''), ('smtp_port', '25'),
('smtp_username', ''), ('smtp_username', ''),
('smtp_password', ''), ('smtp_password', ''),
('smtp_replyto_mail', ''), ('smtp_replyto_mail', ''),
('smtp_replyto_name', ''), ('smtp_replyto_name', ''),
('smtp_from_email', ''), ('smtp_from_email', ''),
('smtp_from_name', ''), ('smtp_from_name', 'Sakura No Reply'),
('sitename', 'Sakura'), ('sitename', 'Sakura'),
('recaptcha', '0'), ('recaptcha', '1'),
('require_activation', '1'), ('require_activation', '1'),
('require_registration_code', '0'), ('require_registration_code', '0'),
('disable_registration', '0'), ('disable_registration', '0'),
('max_reg_keys', '5'), ('max_reg_keys', '5'),
('mail_signature', 'Team Flashii'), ('mail_signature', 'Circlestorm'),
('lock_authentication', '0'), ('lock_authentication', '0'),
('min_entropy', '96'); ('min_entropy', '96'),
('sitedesc', 'Live development environment for the script that powers Flashii.net called Sakura.'),
('sitetags', '[\"Flashii\",\"Media\",\"Flashwave\",\"Circle\",\"Zeniea\",\"MalwareUp\",\"Cybernetics\",\"Saibateku\",\"Community\",\"osu!\",\"osu\"]');
DROP TABLE IF EXISTS `fii_faq`;
CREATE TABLE `fii_faq` ( DROP TABLE IF EXISTS `sakura_faq`;
CREATE TABLE `sakura_faq` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`short` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Used for linking directly to a question.', `short` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Used for linking directly to a question.',
`question` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The question.', `question` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'The question.',
`answer` text COLLATE utf8_bin NOT NULL COMMENT 'The answer.', `answer` text COLLATE utf8_bin NOT NULL COMMENT 'The answer.',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_forums`; DROP TABLE IF EXISTS `sakura_forums`;
CREATE TABLE `fii_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 AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.',
`forum_name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display name of the forum.', `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_desc` text COLLATE utf8_bin NOT NULL COMMENT 'Description of the forum.',
@ -103,44 +109,69 @@ CREATE TABLE `fii_forums` (
`forum_last_poster_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of last poster in forum.', `forum_last_poster_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of last poster in forum.',
`forum_icon` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display icon for the forum.', `forum_icon` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display icon for the forum.',
PRIMARY KEY (`forum_id`) PRIMARY KEY (`forum_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_infopages`; DROP TABLE IF EXISTS `sakura_friends`;
CREATE TABLE `fii_infopages` ( CREATE TABLE `sakura_friends` (
`uid` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that added the friend.',
`fid` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that was added as a friend.',
`timestamp` int(11) unsigned NOT NULL COMMENT 'Timestamp of action.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `sakura_infopages`;
CREATE TABLE `sakura_infopages` (
`shorthand` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Name used for calling this page up in the /r/URL', `shorthand` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Name used for calling this page up in the /r/URL',
`pagetitle` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title displayed on the top of the page', `pagetitle` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title displayed on the top of the page',
`content` text COLLATE utf8_bin NOT NULL COMMENT 'Content of the page' `content` text COLLATE utf8_bin NOT NULL COMMENT 'Content of the page'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_messages`; DROP TABLE IF EXISTS `sakura_logs`;
CREATE TABLE `fii_messages` ( 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`)
) ENGINE=InnoDB 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;
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.', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`fromUser` bigint(128) unsigned NOT NULL COMMENT 'ID of the user that sent this message.', `from_user` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that sent this message.',
`toUsers` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IDs of users that should "receive" this message.', `to_user` bigint(255) unsigned NOT NULL COMMENT 'ID of user that should receive this message.',
`readBy` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IDs of users who read this message.', `read` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IDs of users who read this message.',
`deletedBy` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IDs of users who deleted this message, if all are set to true delete database entry.', `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.',
`date` int(64) 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',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title of the message', `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.', `content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the message.',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_news`; DROP TABLE IF EXISTS `sakura_news`;
CREATE TABLE `fii_news` ( CREATE TABLE `sakura_news` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`uid` bigint(128) unsigned NOT NULL COMMENT 'ID of user who posted this news message.', `uid` bigint(128) unsigned NOT NULL COMMENT 'ID of user who posted this news message.',
`date` int(64) unsigned NOT NULL COMMENT 'News post timestamp.', `date` int(64) unsigned NOT NULL COMMENT 'News post timestamp.',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title of the post.', `title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Title of the post.',
`content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the post', `content` text COLLATE utf8_bin NOT NULL COMMENT 'Contents of the post',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_notifications`; DROP TABLE IF EXISTS `sakura_notifications`;
CREATE TABLE `fii_notifications` ( CREATE TABLE `sakura_notifications` (
`id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`uid` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID this notification is intended for.', `uid` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID this notification is intended for.',
`timestamp` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Timestamp when this notification was created.', `timestamp` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Timestamp when this notification was created.',
@ -152,11 +183,11 @@ CREATE TABLE `fii_notifications` (
`notif_img` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Image path, prefix with font: to use a font class instead of an image.', `notif_img` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Image path, prefix with font: to use a font class instead of an image.',
`notif_timeout` int(16) unsigned NOT NULL DEFAULT '0' COMMENT 'How long the notification should stay on screen in milliseconds, 0 for forever.', `notif_timeout` int(16) unsigned NOT NULL DEFAULT '0' COMMENT 'How long the notification should stay on screen in milliseconds, 0 for forever.',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_posts`; DROP TABLE IF EXISTS `sakura_posts`;
CREATE TABLE `fii_posts` ( CREATE TABLE `sakura_posts` (
`post_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', `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.', `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.', `forum_id` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of forum this was posted in.',
@ -174,8 +205,8 @@ CREATE TABLE `fii_posts` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_profilefields`; DROP TABLE IF EXISTS `sakura_profilefields`;
CREATE TABLE `fii_profilefields` ( CREATE TABLE `sakura_profilefields` (
`id` int(64) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID used for ordering on the userpage.', `id` int(64) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID used for ordering on the userpage.',
`name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Name of the field.', `name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Name of the field.',
`formtype` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Type attribute in the input element.', `formtype` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Type attribute in the input element.',
@ -184,11 +215,24 @@ CREATE TABLE `fii_profilefields` (
`description` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Description of the field displayed in the control panel.', `description` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Description of the field displayed in the control panel.',
`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).', `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 (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_ranks`; INSERT INTO `sakura_profilefields` (`id`, `name`, `formtype`, `islink`, `linkformat`, `description`, `additional`) VALUES
CREATE TABLE `fii_ranks` ( (1, 'Website', 'url', 1, '{{ VAL }}', 'URL to your website', ''),
(2, 'Twitter', 'text', 1, 'https://twitter.com/{{ VAL }}', 'Your @twitter Username', ''),
(3, 'GitHub', 'text', 1, 'https://github.com/{{ VAL }}', 'Your GitHub 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', '');
DROP TABLE IF EXISTS `sakura_ranks`;
CREATE TABLE `sakura_ranks` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display name of the rank.', `name` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Display name of the rank.',
`multi` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Can the rank name have an s at the end?', `multi` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Can the rank name have an s at the end?',
@ -197,33 +241,22 @@ CREATE TABLE `fii_ranks` (
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Default user title if user has none set.', `title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Default user title if user has none set.',
`is_premium` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Flag to set if the user group is a premium group.', `is_premium` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Flag to set if the user group is a premium group.',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
TRUNCATE `fii_ranks`;
INSERT INTO `fii_ranks` (`id`, `name`, `multi`, `colour`, `description`, `title`, `is_premium`) VALUES
(1, 'Deactivated', 0, '#555', 'Users that are yet to be activated or that deactivated their own account.', 'Deactivated', 0),
(2, 'Regular user', 1, 'inherit', 'Regular users with regular permissions.', 'Regular user', 0),
(3, 'Site moderator', 1, '#0A0', 'Users with special permissions like being able to ban and modify users if needed.', 'Staff', 1),
(4, 'Administrator', 1, '#C00', 'Users that manage the server and everything around that.', 'Administrator', 1),
(5, 'Developer', 1, '#824CA0', 'Users that either create or test new features of the site.', 'Staff', 1),
(6, 'Bot', 1, '#9E8DA7', 'Reserved user accounts for services.', 'Bot', 0),
(7, 'Chat moderator', 1, '#09F', 'Moderators of the chat room.', 'Staff', 1),
(8, 'Tenshi', 0, '#EE9400', 'Users that donated $5.00 or more in order to keep the site and it\'s services alive!', 'Tenshi', 1),
(9, 'Alumnii', 0, '#FF69B4', 'People who have contributed to the community but have moved on or resigned.', 'Alumnii', 1);
DROP TABLE IF EXISTS `fii_regcodes`; DROP TABLE IF EXISTS `sakura_regcodes`;
CREATE TABLE `fii_regcodes` ( CREATE TABLE `sakura_regcodes` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(128) 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.', `code` varchar(32) COLLATE utf8_bin NOT NULL COMMENT 'Randomly generated registration key.',
`created_by` bigint(128) unsigned NOT NULL COMMENT 'ID of user who generated this code.', `created_by` bigint(128) unsigned NOT NULL COMMENT 'ID of user who generated this code.',
`used_by` bigint(128) unsigned NOT NULL COMMENT 'ID of user who used this code.', `used_by` bigint(128) 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.', `key_used` tinyint(1) unsigned NOT NULL COMMENT 'Boolean for setting this key as used.',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_sessions`; DROP TABLE IF EXISTS `sakura_sessions`;
CREATE TABLE `fii_sessions` ( CREATE TABLE `sakura_sessions` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ',
`userip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP of the user this session is spawned for.', `userip` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP of the user this session is spawned for.',
`useragent` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'User agent of the user this session is spawned for.', `useragent` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'User agent of the user this session is spawned for.',
@ -233,18 +266,17 @@ CREATE TABLE `fii_sessions` (
`expire` int(64) unsigned NOT NULL COMMENT 'The timestamp for when this session should end, -1 for permanent. ', `expire` int(64) unsigned NOT NULL COMMENT 'The timestamp for when this session should end, -1 for permanent. ',
`remember` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'If set to 1 session will be extended each time a page is loaded.', `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 (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_sock_perms`; DROP TABLE IF EXISTS `sakura_sock_perms`;
CREATE TABLE `fii_sock_perms` ( CREATE TABLE `sakura_sock_perms` (
`rid` bigint(128) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of rank that this permission counts for (set to 0 if user).', `rid` bigint(128) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of rank that this permission counts for (set to 0 if user).',
`uid` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the user this permission counts for (set to 0 if rank).', `uid` bigint(255) unsigned NOT NULL DEFAULT '0' COMMENT 'ID of the user this permission counts for (set to 0 if rank).',
`perms` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '1,0,0,0,0,0' COMMENT 'Permission data (has access, in-chat rank, user type, log access, nick access, channel creation)' `perms` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '1,0,0,0,0,0' COMMENT 'Permission data (has access, in-chat rank, user type, log access, nick access, channel creation)'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
TRUNCATE `fii_sock_perms`; INSERT INTO `sakura_sock_perms` (`rid`, `uid`, `perms`) VALUES
INSERT INTO `fii_sock_perms` (`rid`, `uid`, `perms`) VALUES
(1, 0, '0,0,0,0,0,0'), (1, 0, '0,0,0,0,0,0'),
(2, 0, '1,0,0,0,0,0'), (2, 0, '1,0,0,0,0,0'),
(3, 0, '1,3,1,1,1,1'), (3, 0, '1,3,1,1,1,1'),
@ -254,10 +286,10 @@ INSERT INTO `fii_sock_perms` (`rid`, `uid`, `perms`) VALUES
(7, 0, '1,2,1,1,1,1'), (7, 0, '1,2,1,1,1,1'),
(8, 0, '1,1,0,1,1,1'), (8, 0, '1,1,0,1,1,1'),
(9, 0, '1,1,0,1,1,1'), (9, 0, '1,1,0,1,1,1'),
(0, 1, '1,945,1,1,1,2');
DROP TABLE IF EXISTS `fii_tenshi`;
CREATE TABLE `fii_tenshi` ( DROP TABLE IF EXISTS `sakura_tenshi`;
CREATE TABLE `sakura_tenshi` (
`id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`startdate` int(64) unsigned NOT NULL COMMENT 'Purchase timestamp.', `startdate` int(64) unsigned NOT NULL COMMENT 'Purchase timestamp.',
`uid` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that purchased Tenshi.', `uid` bigint(255) unsigned NOT NULL COMMENT 'ID of the user that purchased Tenshi.',
@ -266,8 +298,8 @@ CREATE TABLE `fii_tenshi` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_topics`; DROP TABLE IF EXISTS `sakura_topics`;
CREATE TABLE `fii_topics` ( CREATE TABLE `sakura_topics` (
`topic_id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'MySQL Generated ID used for sorting.', `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.', `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_hidden` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Boolean to set the topic as hidden.',
@ -288,8 +320,8 @@ CREATE TABLE `fii_topics` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_users`; DROP TABLE IF EXISTS `sakura_users`;
CREATE TABLE `fii_users` ( CREATE TABLE `sakura_users` (
`id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ', `id` bigint(255) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management. ',
`username` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'Username set at registration.', `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.', `username_clean` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'A more cleaned up version of the username for backend usage.',
@ -318,11 +350,11 @@ CREATE TABLE `fii_users` (
`profile_data` text COLLATE utf8_bin NOT NULL COMMENT 'Modular array containing profile data.', `profile_data` text COLLATE utf8_bin NOT NULL COMMENT 'Modular array containing profile data.',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `username_clean` (`username_clean`) UNIQUE KEY `username_clean` (`username_clean`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
DROP TABLE IF EXISTS `fii_warnings`; DROP TABLE IF EXISTS `sakura_warnings`;
CREATE TABLE `fii_warnings` ( CREATE TABLE `sakura_warnings` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Automatically generated ID by MySQL for management.',
`uid` bigint(128) unsigned NOT NULL COMMENT 'ID of user that was warned.', `uid` bigint(128) unsigned NOT NULL COMMENT 'ID of user that was warned.',
`iid` bigint(128) unsigned NOT NULL COMMENT 'ID of the user that issued the warning.', `iid` bigint(128) unsigned NOT NULL COMMENT 'ID of the user that issued the warning.',
@ -330,7 +362,7 @@ CREATE TABLE `fii_warnings` (
`expire` int(64) unsigned NOT NULL COMMENT 'Timstamp when the warning should expire, 0 for a permanent warning.', `expire` int(64) unsigned NOT NULL COMMENT 'Timstamp when the warning should expire, 0 for a permanent warning.',
`reason` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'Reason for the warning.', `reason` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'Reason for the warning.',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- 2015-05-09 00:57:52 -- 2015-05-24 14:34:25

View file

@ -12,7 +12,8 @@
"20150509", "20150509",
"20150509.1", "20150509.1",
"20150512", "20150512",
"20150523" "20150523",
"20150524"
] ]
@ -1061,6 +1062,47 @@
"change": "Fixed broken links because of the domainset changes." "change": "Fixed broken links because of the domainset changes."
} }
],
"20150524": [
{
"type": "UPD",
"change": "Move site description and tags to the config."
},
{
"type": "UPD",
"change": "Export SQL structure."
},
{
"type": "UPD",
"change": "Added new favicon."
},
{
"type": "UPD",
"change": "Moved Members button to the user part of the header menu and added a link to search."
},
{
"type": "UPD",
"change": "Redid scroll to top button and added a cute little animation to it."
},
{
"type": "REM",
"change": "Removed unused code for error logging."
},
{
"type": "ADD",
"change": "Added flag to login function that doesn't set cookies."
},
{
"type": "ADD",
"change": "Added a method to checkLogin to bypass cookies."
},
{
"type": "UPD",
"change": "Made the manage footer sticky to the bottom."
}
] ]
} }

View file

@ -555,4 +555,18 @@ class Main {
} }
// Convert a number to a hexadecimal value
public static function toHex($num) {
// Convert $num to an int if not yet
$num = intval($num);
// Check if it's within the proper range
if($num < 0 || $num > 255)
return 00;
}
} }

View file

@ -48,27 +48,34 @@ class Users {
]; ];
// Check if a user is logged in // Check if a user is logged in
public static function checkLogin() { public static function checkLogin($uid = null, $sid = null, $bypassCookies = false) {
// Set $uid and $sid if they're null
if($uid == null)
$uid = Session::$userId;
// ^
if($sid == null)
$sid = Session::$sessionId;
// Check if cookie bypass is false
if(!$bypassCookies) {
// Check if the cookies are set // Check if the cookies are set
if( if(!isset($_COOKIE[Configuration::getConfig('cookie_prefix') .'id']) || !isset($_COOKIE[Configuration::getConfig('cookie_prefix') .'session']))
!isset($_COOKIE[Configuration::getConfig('cookie_prefix') .'id']) ||
!isset($_COOKIE[Configuration::getConfig('cookie_prefix') .'session'])
)
return false; return false;
}
// Check if the session exists // Check if the session exists
if(!$session = Session::checkSession( if(!$session = Session::checkSession($uid, $sid))
Session::$userId,
Session::$sessionId
))
return false; return false;
// Extend the cookie times if the remember flag is set // Extend the cookie times if the remember flag is set
if($session == 2) { if($session == 2 && !$bypassCookies) {
setcookie(Configuration::getConfig('cookie_prefix') .'id', Session::$userId, time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain')); setcookie(Configuration::getConfig('cookie_prefix') .'id', $uid, time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain'));
setcookie(Configuration::getConfig('cookie_prefix') .'session', Session::$sessionId, time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain')); setcookie(Configuration::getConfig('cookie_prefix') .'session', $sid, time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain'));
} }
@ -78,12 +85,12 @@ class Users {
'lastdate' => time() 'lastdate' => time()
], ],
[ [
'id' => [Session::$userId, '='] 'id' => [$uid, '=']
] ]
]); ]);
// Redirect people that need to change their password to the new format // Redirect people that need to change their password to the new format
if(self::getUser(Session::$userId)['password_algo'] == 'legacy' && $_SERVER['PHP_SELF'] != '/authenticate.php' && $_SERVER['PHP_SELF'] != '/imageserve.php') if(self::getUser($uid)['password_algo'] == 'legacy' && $_SERVER['PHP_SELF'] != '/authenticate.php' && $_SERVER['PHP_SELF'] != '/imageserve.php')
header('Location: /authenticate.php?legacy=true'); header('Location: /authenticate.php?legacy=true');
// If everything went through return true // If everything went through return true
@ -92,7 +99,7 @@ class Users {
} }
// Log a user in // Log a user in
public static function login($username, $password, $remember = false) { public static function login($username, $password, $remember = false, $cookies = true) {
// Check if authentication is disallowed // Check if authentication is disallowed
if(Configuration::getConfig('lock_authentication')) if(Configuration::getConfig('lock_authentication'))
@ -135,9 +142,13 @@ class Users {
$sessionKey = Session::newSession($user['id'], $remember); $sessionKey = Session::newSession($user['id'], $remember);
// Set cookies // Set cookies
if($cookies) {
setcookie(Configuration::getConfig('cookie_prefix') .'id', $user['id'], time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain')); setcookie(Configuration::getConfig('cookie_prefix') .'id', $user['id'], time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain'));
setcookie(Configuration::getConfig('cookie_prefix') .'session', $sessionKey, time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain')); setcookie(Configuration::getConfig('cookie_prefix') .'session', $sessionKey, time() + 604800, Configuration::getConfig('cookie_path'), Configuration::getConfig('cookie_domain'));
}
// Successful login! (also has a thing for the legacy password system) // Successful login! (also has a thing for the legacy password system)
return [1, ($user['password_algo'] == 'legacy' ? 'LEGACY_SUCCESS' : 'LOGIN_SUCESS')]; return [1, ($user['password_algo'] == 'legacy' ? 'LEGACY_SUCCESS' : 'LOGIN_SUCESS')];
@ -1034,4 +1045,11 @@ class Users {
} }
// Checking bans
public static function checkBan($uid) {
}
} }

View file

@ -1,6 +1,6 @@
<?php <?php
/* /*
* Sakura C/PMS * Sakura Community Management System
* (c)Flashwave/Flashii.net 2013-2015 <http://flash.moe> * (c)Flashwave/Flashii.net 2013-2015 <http://flash.moe>
*/ */
@ -8,7 +8,7 @@
namespace Sakura; namespace Sakura;
// Define Sakura version // Define Sakura version
define('SAKURA_VERSION', '20150523'); define('SAKURA_VERSION', '20150524');
define('SAKURA_VLABEL', 'Eminence'); define('SAKURA_VLABEL', 'Eminence');
define('SAKURA_VTYPE', 'Development'); define('SAKURA_VTYPE', 'Development');
define('SAKURA_COLOUR', '#6C3082'); define('SAKURA_COLOUR', '#6C3082');
@ -18,8 +18,6 @@ define('ROOT', str_replace(basename(__DIR__), '', dirname(__FILE__)));
// Error Reporting: 0 for production and -1 for testing // Error Reporting: 0 for production and -1 for testing
error_reporting(-1); error_reporting(-1);
ini_set('log_errors', 1);
ini_set('error_log', ROOT .'errors.log');
// Start output buffering // Start output buffering
ob_start(); ob_start();
@ -73,6 +71,8 @@ $renderData = array(
'requireregcodes' => Configuration::getConfig('require_registration_code'), 'requireregcodes' => Configuration::getConfig('require_registration_code'),
'requireactiveate' => Configuration::getConfig('require_activation'), 'requireactiveate' => Configuration::getConfig('require_activation'),
'sitename' => Configuration::getConfig('sitename'), 'sitename' => Configuration::getConfig('sitename'),
'sitedesc' => Configuration::getConfig('sitedesc'),
'sitetags' => implode(", ", json_decode(Configuration::getConfig('sitetags'), true)),
'cookieprefix' => Configuration::getConfig('cookie_prefix'), 'cookieprefix' => Configuration::getConfig('cookie_prefix'),
'cookiedomain' => Configuration::getConfig('cookie_domain'), 'cookiedomain' => Configuration::getConfig('cookie_domain'),
'cookiepath' => Configuration::getConfig('cookie_path') 'cookiepath' => Configuration::getConfig('cookie_path')

View file

@ -106,7 +106,7 @@
<div class="footer"> <div class="footer">
<a href="http://flash.moe">Flashwave</a> / <a href="http://flash.moe">Flashwave</a> /
<a href="http://sakura.flashii.net">Sakura</a> / <a href="http://sakura.flashii.net">Sakura</a> /
<a href="http://github.com/flashii/Sakura">GitHub</a> <a href="http://github.com/circlestorm/Sakura">GitHub</a>
</div> </div>
</body> </body>
</html> </html>

View file

@ -68,7 +68,7 @@
<div class="error"> <div class="error">
{{ error }} {{ error }}
</div> </div>
<p>If you have an account on <a href="https://github.com/" target="_blank">GitHub</a> please go to the <a href="https://github.com/flashii/Sakura/issues" target="_blank">issues section</a> and report the error listed above (do a check to see if it hasn't been reported yet as well).</p> <p>If you have an account on <a href="https://github.com/" target="_blank">GitHub</a> please go to the <a href="https://github.com/circlestorm/Sakura/issues" target="_blank">issues section</a> and report the error listed above (do a check to see if it hasn't been reported yet as well).</p>
</div> </div>
<div class="contact"> <div class="contact">
Contact the System Operator at <a href="mailto:me@flash.moe">me@flash.moe</a> or check our <a href="http://status.flashii.net/" target="_blank">Status Page</a> and <a href="http://twitter.com/_flashii" target="_blank">Twitter Account</a> to see if anything is going on. Contact the System Operator at <a href="mailto:me@flash.moe">me@flash.moe</a> or check our <a href="http://status.flashii.net/" target="_blank">Status Page</a> and <a href="http://twitter.com/_flashii" target="_blank">Twitter Account</a> to see if anything is going on.

View file

@ -1,8 +1,8 @@
<a id="gotop" class="gotop hidden" href="#top"></a> <a id="gotop" class="gotop fa fa-angle-double-up hidden" href="#top"></a>
</div> </div>
<div class="footer"> <div class="footer">
<div class="ftsections"> <div class="ftsections">
<div class="copycentre">Copyright &copy; 2013-2015 <a href="//flash.moe/" target="_blank">Flashwave</a>, <a href="//{{ sakura.urls.main }}/credits">et al</a>.</div> <div class="copycentre">Copyright &copy; 2013-2015 <a href="//flash.moe/" target="_blank">Flashwave</a> &amp; <a href="http://circlestorm.net/" target="_blank">Circlestorm</a>, <a href="//{{ sakura.urls.main }}/credits">et al</a>.</div>
<ul class="ftsection"> <ul class="ftsection">
<li class="fthead">General</li> <li class="fthead">General</li>
<li><a href="//{{ sakura.urls.main }}/" title="Flashii Frontpage">Home</a></li> <li><a href="//{{ sakura.urls.main }}/" title="Flashii Frontpage">Home</a></li>
@ -15,9 +15,9 @@
<ul class="ftsection"> <ul class="ftsection">
<li class="fthead">Search, Status &amp; Social</li> <li class="fthead">Search, Status &amp; Social</li>
<li><a href="//{{ sakura.urls.main }}/search" title="Do full-site search requests">Search</a></li> <li><a href="//{{ sakura.urls.main }}/search" title="Do full-site search requests">Search</a></li>
<li><a href="//status.flashii.net" target="_blank" title="Check the status on the Flashii Server and related services">Server Status</a></li> <li><a href="http://status.flashii.net" target="_blank" title="Check the status on the Flashii Server and related services">Server Status</a></li>
<li><a href="//twitter.com/_flashii" target="_blank" title="Follow us on Twitter for news messages that are too short for the news page">Twitter</a></li> <li><a href="https://twitter.com/_flashii" target="_blank" title="Follow us on Twitter for news messages that are too short for the news page">Twitter</a></li>
<li><a href="//youtube.com/user/flashiinet" target="_blank" title="Our YouTube page where stuff barely ever gets uploaded, mainly used to archive community creations">YouTube</a></li> <li><a href="https://youtube.com/user/flashiinet" target="_blank" title="Our YouTube page where stuff barely ever gets uploaded, mainly used to archive community creations">YouTube</a></li>
<li><a href="//steamcommunity.com/groups/flashiinet" target="_blank" title="Our Steam group, play games with other members on the site">Steam</a></li> <li><a href="//steamcommunity.com/groups/flashiinet" target="_blank" title="Our Steam group, play games with other members on the site">Steam</a></li>
</ul> </ul>
<ul class="ftsection"> <ul class="ftsection">
@ -25,7 +25,7 @@
<li><a href="//{{ sakura.urls.main }}/changelog" title="All the changes made to Sakura are listed here">Changelog</a></li> <li><a href="//{{ sakura.urls.main }}/changelog" title="All the changes made to Sakura are listed here">Changelog</a></li>
<li><a href="//{{ sakura.urls.main }}/credits" title="Here everyone who's helped Flashii get to where it is now is listed">Credits</a></li> <li><a href="//{{ sakura.urls.main }}/credits" title="Here everyone who's helped Flashii get to where it is now is listed">Credits</a></li>
<li><a href="//{{ sakura.urls.main }}/feedback" target="_blank" title="Give us feedback on what to do">Feedback &amp; Suggestions</a></li> <li><a href="//{{ sakura.urls.main }}/feedback" target="_blank" title="Give us feedback on what to do">Feedback &amp; Suggestions</a></li>
<li><a href="//github.com/flashii" target="_blank" title="Our Open Source repository thing">Github</a></li> <li><a href="https://github.com/circlestorm" target="_blank" title="Our Open Source repository thing">Github</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -4,8 +4,8 @@
<!-- META --> <!-- META -->
<meta charset="{{ sakura.charset }}" /> <meta charset="{{ sakura.charset }}" />
<title>{{ page.title }}</title> <title>{{ page.title }}</title>
<meta name="description" content="Any community that gets its laughs by pretending to be idiots will eventually be flooded by actual idiots who mistakenly believe that they're in good company. Welcome to Flashii." /> <meta name="description" content="{{ sakura.sitedesc }}" />
<meta name="keywords" content="Flashii, Media, Flashwave, Circle, Zeniea, MalwareUp, Cybernetics, Saibateku, Community" /> <meta name="keywords" content="{{ sakura.sitetags }}" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
{% if page.redirect %} {% if page.redirect %}
<meta http-equiv="refresh" content="3; URL={{ page.redirect }}" /> <meta http-equiv="refresh" content="3; URL={{ page.redirect }}" />
@ -174,8 +174,8 @@
<a class="menu-item" href="//{{ sakura.urls.main }}/news" title="Here you can read updates on Flashii">News</a> <a class="menu-item" href="//{{ sakura.urls.main }}/news" title="Here you can read updates on Flashii">News</a>
<a class="menu-item" href="//{{ sakura.urls.chat }}/" title="Chat with other Flashii members">Chat</a> <a class="menu-item" href="//{{ sakura.urls.chat }}/" title="Chat with other Flashii members">Chat</a>
<a class="menu-item" href="//{{ sakura.urls.main }}/forum" title="Discuss things with other members but static">Forums</a> <a class="menu-item" href="//{{ sakura.urls.main }}/forum" title="Discuss things with other members but static">Forums</a>
<a class="menu-item" href="//{{ sakura.urls.main }}/search" title="Search on Flashii">Search</a>
{% if user.checklogin %} {% if user.checklogin %}
<a class="menu-item" href="//{{ sakura.urls.main }}/members" title="View a list with all the activated user accounts">Members</a>
<a class="menu-item menu-donate" href="//{{ sakura.urls.main }}/support" title="Give us money to keep the site (and other services) up and running">Support us</a> <a class="menu-item menu-donate" href="//{{ sakura.urls.main }}/support" title="Give us money to keep the site (and other services) up and running">Support us</a>
{% endif %} {% endif %}
</div> </div>
@ -183,6 +183,7 @@
<!-- User menu, displayed on right side of the bar. --> <!-- User menu, displayed on right side of the bar. -->
{% if user.checklogin %} {% if user.checklogin %}
<a class="menu-item avatar" href="//{{ sakura.urls.main }}/u/{{ user.data.id }}" title="View and edit your own profile" style="background-image: url('//{{ sakura.urls.main }}/a/{{ user.data.id }}'); width: auto; color: {{ user.colour }}; font-weight: 700;">{{ user.data.username }}</a> <a class="menu-item avatar" href="//{{ sakura.urls.main }}/u/{{ user.data.id }}" title="View and edit your own profile" style="background-image: url('//{{ sakura.urls.main }}/a/{{ user.data.id }}'); width: auto; color: {{ user.colour }}; font-weight: 700;">{{ user.data.username }}</a>
<a class="menu-item" href="//{{ sakura.urls.main }}/members" title="View a list with all the activated user accounts">Members</a>
<a class="menu-item" href="//{{ sakura.urls.main }}/messages" title="Read your private message">Messages</a> <a class="menu-item" href="//{{ sakura.urls.main }}/messages" title="Read your private message">Messages</a>
<a class="menu-item" href="//{{ sakura.urls.main }}/manage" title="Manage the site">Manage</a> <a class="menu-item" href="//{{ sakura.urls.main }}/manage" title="Manage the site">Manage</a>
<a class="menu-item" href="//{{ sakura.urls.main }}/settings" title="Change your settings">Settings</a> <a class="menu-item" href="//{{ sakura.urls.main }}/settings" title="Change your settings">Settings</a>

BIN
api/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -102,4 +102,13 @@ a:active {
padding-top: 1px; padding-top: 1px;
margin-top: 10px; margin-top: 10px;
box-shadow: 0 0 1em #222; box-shadow: 0 0 1em #222;
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
/* Page content */
#contentwrapper {
padding-bottom: 50px;
} }

View file

@ -121,7 +121,7 @@ a.default:active {
} }
a.gotop { a.gotop {
display: inline-block; display: inline-block;
background: url('../images/arrow.png') #111; background: #111;
color: #FFF; color: #FFF;
width: 60px; width: 60px;
height: 60px; height: 60px;
@ -135,15 +135,27 @@ a.gotop {
bottom: 0; bottom: 0;
right: 5px; right: 5px;
z-index: 2; z-index: 2;
line-height: 60px;
text-align: center;
font-size: 5em;
text-shadow: 0 0 5px #FFF;
} }
a.gotop:hover { a.gotop:hover {
opacity: .8; opacity: .8;
box-shadow: 0 0 1em #FFF inset; box-shadow: 0 0 7px #FFF inset;
text-shadow: 0 0 7px #FFF;
} }
a.gotop:active { a.gotop:active {
box-shadow: 0 0 1em #FFF inset; box-shadow: 0 0 15px #FFF inset;
text-shadow: 0 0 10px #FFF;
opacity: .9; opacity: .9;
} }
a.gotop.enter {
animation: slideInFromRight 1 .6s;
}
a.gotop.exit {
animation: slideOutToBottom 1 .6s;
}
/* Keyframe Elements */ /* Keyframe Elements */
@keyframes spin { @keyframes spin {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -54,21 +54,6 @@ function mobileMenu(mode) {
} }
// Event watcher for the scroll-to-top button
window.onscroll = function() {
// Assign the gotop button to a variable
var gotop = document.getElementById('gotop');
// If the vertical offset of the page is below 112px (just below the header) keep the button hidden
if(this.pageYOffset < 112) {
if(gotop.getAttribute('class').indexOf('hidden') < 0)
gotop.setAttribute('class', gotop.getAttribute('class') + ' hidden');
} else if(this.pageYOffset > 112) // Else show it
gotop.setAttribute('class', gotop.getAttribute('class').replace(' hidden', ''));
};
// Get the current unix/epoch timestamp // Get the current unix/epoch timestamp
function epochTime() { function epochTime() {
@ -622,3 +607,57 @@ function convertParallaxPositionValue(pos, dir, neg) {
return position; return position;
} }
// Smooth scrolling
function scrollTop() {
// Get the current position
var windowY = window.pageYOffset;
alert(windowY);
}
// Event watcher for the scroll-to-top button
window.onscroll = function() {
// Assign the gotop button to a variable
var gotop = document.getElementById('gotop');
// If the vertical offset of the page is below 112px (just below the header) keep the button hidden
if(this.pageYOffset < 112) {
// Check if the "exit" is in the classes and if it isn't continue
if(gotop.className.indexOf('exit') < 0) {
// Replace the enter with exit (for the animation)
gotop.className = gotop.className.replace('enter', '');
gotop.className = gotop.className + ' exit';
// Check if hidden is set and if not continue
if(gotop.className.indexOf('hidden') < 0) {
// Set a timeout to add the hidden class after 600ms
setTimeout(function() {
gotop.className = gotop.className + ' hidden';
}, 600);
}
}
// Else show the button
} else if(this.pageYOffset > 112) {
// Check if enter is set
if(gotop.className.indexOf('enter') < 0) {
// Remove the hidden and exit classes and add the enter class
gotop.className = gotop.className.replace('hidden', '');
gotop.className = gotop.className.replace('exit', '');
gotop.className = gotop.className + ' enter';
}
}
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB