r20151012
Signed-off-by: Flashwave <me@flash.moe>
This commit is contained in:
parent
c996de34c3
commit
a28cfd6e69
7 changed files with 146 additions and 115 deletions
|
@ -3107,6 +3107,42 @@
|
||||||
"user": "Flashwave"
|
"user": "Flashwave"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
"20151012": [
|
||||||
|
|
||||||
|
"eminence",
|
||||||
|
{
|
||||||
|
"type": "FIX",
|
||||||
|
"change": "Fixed Misaki template tags.",
|
||||||
|
"user": "Flashwave"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ADD",
|
||||||
|
"change": "Readded code for testing style.",
|
||||||
|
"user": "Flashwave"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "FIX",
|
||||||
|
"change": "Fixed broken ternary in the testing style switching code.",
|
||||||
|
"user": "Flashwave"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "FIX",
|
||||||
|
"change": "Display comment counts in Misaki.",
|
||||||
|
"user": "Flashwave"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UPD",
|
||||||
|
"change": "Redid the markup of Misaki profiles.",
|
||||||
|
"user": "Flashwave"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "REM",
|
||||||
|
"change": "Removed LIKE SELECT statement from the User class.",
|
||||||
|
"user": "Flashwave"
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,17 +26,6 @@ class User
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if anything like the username exists
|
|
||||||
if (empty($this->data)) {
|
|
||||||
$this->data = Database::fetch(
|
|
||||||
'users',
|
|
||||||
false,
|
|
||||||
[
|
|
||||||
'username_clean' => ['%' . Main::cleanString($uid, true) . '%', 'LIKE'],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the user actually exists
|
// Check if the user actually exists
|
||||||
if (empty($this->data)) {
|
if (empty($this->data)) {
|
||||||
// If not assign as the fallback user
|
// If not assign as the fallback user
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
namespace Sakura;
|
namespace Sakura;
|
||||||
|
|
||||||
// Define Sakura version
|
// Define Sakura version
|
||||||
define('SAKURA_VERSION', '20151011');
|
define('SAKURA_VERSION', '20151012');
|
||||||
define('SAKURA_VLABEL', 'Eminence');
|
define('SAKURA_VLABEL', 'Eminence');
|
||||||
define('SAKURA_COLOUR', '#6C3082');
|
define('SAKURA_COLOUR', '#6C3082');
|
||||||
define('SAKURA_STABLE', false);
|
define('SAKURA_STABLE', false);
|
||||||
|
@ -105,12 +105,14 @@ $templateName =
|
||||||
defined('SAKURA_MANAGE') ?
|
defined('SAKURA_MANAGE') ?
|
||||||
Configuration::getConfig('manage_style') :
|
Configuration::getConfig('manage_style') :
|
||||||
(
|
(
|
||||||
|
(
|
||||||
isset($currentUser->data['user_data']['userOptions']['useMisaki']) &&
|
isset($currentUser->data['user_data']['userOptions']['useMisaki']) &&
|
||||||
$currentUser->data['user_data']['userOptions']['useMisaki'] &&
|
$currentUser->data['user_data']['userOptions']['useMisaki'] &&
|
||||||
$currentUser->checkPermission('SITE', 'ALTER_PROFILE')
|
$currentUser->checkPermission('SITE', 'ALTER_PROFILE')
|
||||||
) ?
|
) ?
|
||||||
'misaki' :
|
'misaki' :
|
||||||
Configuration::getConfig('site_style');
|
Configuration::getConfig('site_style')
|
||||||
|
);
|
||||||
|
|
||||||
if (!defined('SAKURA_NO_TPL')) {
|
if (!defined('SAKURA_NO_TPL')) {
|
||||||
// Initialise templating engine
|
// Initialise templating engine
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<a class="news-title floatLeft" href="{{ urls.format('SITE_NEWS_POST', [post.news_id]) }}">{{ post.news_title }}</a>
|
<a class="news-title floatLeft" href="{{ urls.format('SITE_NEWS_POST', [post.news_id]) }}">{{ post.news_title }}</a>
|
||||||
<div class="news-details floatRight">
|
<div class="news-details floatRight">
|
||||||
<div>{{ post.news_timestamp|date(sakura.dateFormat) }}</div>
|
<div>{{ post.news_timestamp|date(sakura.dateFormat) }}</div>
|
||||||
<div>Posted by <a class="username" style="color: {{ post.news_poster.colour }};" href="{{ urls.format('USER_PROFILE', [post.news_poster.data.user_id]) }}">{{ post.news_poster.data.username }}</a>{% if posts|length > 1 %} / <a class="default" href="{{ urls.format('SITE_NEWS_POST', [post.news_id]) }}#comments">View comments</a>{% endif %}</div>
|
<div>Posted by <a class="username" style="color: {{ post.news_poster.colour }};" href="{{ urls.format('USER_PROFILE', [post.news_poster.data.user_id]) }}">{{ post.news_poster.data.username }}</a>{% if not (viewPost and postExists) %} / <a class="default" href="{{ urls.format('SITE_NEWS_POST', [post.news_id]) }}#comments">{{ post.news_comments.count }} comment{% if post.news_comments.count != 1 %}s{% endif %}</a>{% endif %}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,26 +22,24 @@
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="profile" id="u{{ profile.data.user_id }}">
|
<div class="profile" id="u{{ profile.data.user_id }}">
|
||||||
<div class="profileHeader" style="background-image: url('{{ urls.format('IMAGE_HEADER', [profile.data.user_id]) }}');">
|
<div class="profileHeaderContent profileHeader" style="background-image: linear-gradient(0deg, transparent 0%, transparent 12%, rgba(0, 0, 0, .7) 30%, transparent 76%, transparent 100%), url('{{ urls.format('IMAGE_HEADER', [profile.data.user_id]) }}');">
|
||||||
<div class="profileFade"></div>
|
<div class="userAvatar" style="background-image: url('{{ urls.format('IMAGE_AVATAR', [profile.data.user_id]) }}');">{{ profile.data.username }}'s Avatar</div>
|
||||||
<div class="headerLeft">
|
|
||||||
<img class="userAvatar" src="{{ urls.format('IMAGE_AVATAR', [profile.data.user_id]) }}" alt="{{ profile.data.username }}'s Avatar" />
|
|
||||||
<div class="userData">
|
<div class="userData">
|
||||||
|
<div class="headerLeft">
|
||||||
<div class="profileUsername" style="color: {{ profile.colour }};"{% if profile.getUsernameHistory %} title="Known as {{ profile.getUsernameHistory[0]['username_old'] }} before {{ profile.getUsernameHistory[0]['change_time']|date(sakura.dateFormat) }}."{% endif %}>
|
<div class="profileUsername" style="color: {{ profile.colour }};"{% if profile.getUsernameHistory %} title="Known as {{ profile.getUsernameHistory[0]['username_old'] }} before {{ profile.getUsernameHistory[0]['change_time']|date(sakura.dateFormat) }}."{% endif %}>
|
||||||
{{ profile.data.username }}
|
{{ profile.data.username }}
|
||||||
</div>
|
</div>
|
||||||
<div class="profileUsertitle">
|
<div class="profileUserTitle">
|
||||||
{{ profile.userTitle }}
|
{{ profile.userTitle }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="headerRight">
|
||||||
<div class="joinedLast">
|
|
||||||
<div>Joined <span title="{{ profile.data.user_registered|date(sakura.dateFormat) }}">{{ profile.elapsed.joined }}</span></div>
|
<div>Joined <span title="{{ profile.data.user_registered|date(sakura.dateFormat) }}">{{ profile.elapsed.joined }}</span></div>
|
||||||
<div>{% if profile.data.user_last_online < 1 %}User hasn't logged in yet.{% else %}Last Active <span title="{{ profile.data.user_last_online|date(sakura.dateFormat) }}">{{ profile.elapsed.lastOnline }}</span>{% endif %}</div>
|
<div>{% if profile.data.user_last_online < 1 %}User hasn't logged in yet.{% else %}Last Active <span title="{{ profile.data.user_last_online|date(sakura.dateFormat) }}">{{ profile.elapsed.lastOnline }}</span>{% endif %}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="profileContent">
|
</div>
|
||||||
|
<div class="profileContainer profileContent">
|
||||||
<div class="userDataBar">
|
<div class="userDataBar">
|
||||||
{% if not profile.checkPermission('SITE', 'DEACTIVATED') and (profile.checkPremium[0] or profile.checkPermission('MANAGE', 'USE_MANAGE')) %}
|
{% if not profile.checkPermission('SITE', 'DEACTIVATED') and (profile.checkPremium[0] or profile.checkPermission('MANAGE', 'USE_MANAGE')) %}
|
||||||
<div class="profilePlatform hierarchyContainer">
|
<div class="profilePlatform hierarchyContainer">
|
||||||
|
@ -121,32 +119,56 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="userPage">
|
<div class="profileMain">
|
||||||
{% if not profile.checkPermission('SITE', 'DEACTIVATED') %}
|
{% if not profile.checkPermission('SITE', 'DEACTIVATED') %}
|
||||||
<div class="statsRow">
|
<div class="statsRow">
|
||||||
|
{% if profileView != (noUserpage ? 'comments' : 'index') %}
|
||||||
<div class="profilePlatform">
|
<div class="profilePlatform">
|
||||||
<a class="inner" href="{{ urls.format('USER_FRIENDS', [profile.data.user_id]) }}">
|
<a class="inner" title="Userpage" href="{{ urls.format('USER_PROFILE', [profile.data.user_id]) }}">
|
||||||
<div>Friends</div>
|
<div class="fa fa-user"></div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if profileView != 'friends' %}
|
||||||
|
<div class="profilePlatform">
|
||||||
|
<a class="inner" title="Friends" href="{{ urls.format('USER_FRIENDS', [profile.data.user_id]) }}">
|
||||||
|
<div class="fa fa-user-plus"></div>
|
||||||
<div class="count">{{ profile.getFriends|length }}</div>
|
<div class="count">{{ profile.getFriends|length }}</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if profileView != 'groups' %}
|
||||||
<div class="profilePlatform">
|
<div class="profilePlatform">
|
||||||
<a class="inner" href="{{ urls.format('USER_GROUPS', [profile.data.user_id]) }}">
|
<a class="inner" title="Groups" href="{{ urls.format('USER_GROUPS', [profile.data.user_id]) }}">
|
||||||
<div>Groups</div>
|
<div class="fa fa-users"></div>
|
||||||
<div class="count">n/a</div>
|
<div class="count">0</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="profilePlatform forumStats">
|
{% endif %}
|
||||||
<div class="inner">
|
{% if profileView != 'comments' %}
|
||||||
<div class="forumStatTitle">Forum stats</div>
|
<div class="profilePlatform">
|
||||||
<div class="forumStatCount">
|
<a class="inner" title="Comments" href="{{ urls.format('USER_COMMENTS', [profile.data.user_id]) }}">
|
||||||
<a class="posts" href="{{ urls.format('USER_POSTS', [profile.data.user_id]) }}">{{ profile.forumStats.posts }} post{% if profile.forumStats.posts != 1 %}s{% endif %}</a>
|
<div class="fa fa-comments"></div>
|
||||||
<a class="threads" href="{{ urls.format('USER_THREADS', [profile.data.user_id]) }}">{% if profile.forumStats.topics %}{{ profile.forumStats.topics }}{% else %}0{% endif %} thread{% if profile.forumStats.topics != 1 %}s{% endif %}</a>
|
<div class="count">{{ profile.profileComments.count }}</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
{% endif %}
|
||||||
|
{% if profileView != 'threads' %}
|
||||||
|
<div class="profilePlatform">
|
||||||
|
<a class="inner" title="Threads" href="{{ urls.format('USER_THREADS', [profile.data.user_id]) }}">
|
||||||
|
<div class="fa fa-list"></div>
|
||||||
|
<div class="count">{{ profile.forumStats.topics }}</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if profileView != 'posts' %}
|
||||||
|
<div class="profilePlatform">
|
||||||
|
<a class="inner" title="Posts" href="{{ urls.format('USER_POSTS', [profile.data.user_id]) }}">
|
||||||
|
<div class="fa fa-reply"></div>
|
||||||
|
<div class="count">{{ profile.forumStats.posts }}</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="userPage profilePlatform">
|
<div class="userPage profilePlatform">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -155,7 +177,6 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
0
_sakura/templates/misaki/profile/comments.tpl
Normal file
0
_sakura/templates/misaki/profile/comments.tpl
Normal file
|
@ -379,15 +379,23 @@ a:active {
|
||||||
.profile {
|
.profile {
|
||||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, .75);
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, .75);
|
||||||
font-family: "Exo2-0-LightItalic", sans-serif;
|
font-family: "Exo2-0-LightItalic", sans-serif;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-content: stretch;
|
||||||
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -35px;
|
top: -35px;
|
||||||
|
margin-bottom: -35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile .profileContainer {
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile .profilePlatform {
|
.profile .profilePlatform {
|
||||||
background: rgba(148, 117, 178, .2);
|
background: rgba(148, 117, 178, .2);
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, .75);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, .75);
|
||||||
margin-left: 10px;
|
margin: 0 0 10px 10px;
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile .profilePlatform > .inner {
|
.profile .profilePlatform > .inner {
|
||||||
|
@ -403,61 +411,57 @@ a:active {
|
||||||
|
|
||||||
.profile > .profileHeader {
|
.profile > .profileHeader {
|
||||||
height: 250px;
|
height: 250px;
|
||||||
float: left;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileHeader > .profileFade {
|
.profile > .profileHeader > .userAvatar {
|
||||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .7) 30%, rgba(0, 0, 0, 0) 100%);
|
font-size: 0;
|
||||||
height: 160px;
|
background: transparent no-repeat scroll left center / contain;
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
top: 60px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile > .profileHeader > .headerLeft > .userAvatar {
|
|
||||||
height: 200px;
|
height: 200px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
position: relative;
|
|
||||||
top: -100px;
|
|
||||||
z-index: 2;
|
|
||||||
margin-left: 10px;
|
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, .75);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, .75);
|
||||||
float: left;
|
margin: 10px;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileHeader > .headerLeft > .userData {
|
.profile > .profileHeader > .userData {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -16px;
|
top: -55px;
|
||||||
float: left;
|
width: 100%;
|
||||||
margin: 0 10px;
|
|
||||||
z-index: 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileHeader > .headerLeft > .userData > .profileUsername {
|
.profile > .profileHeader > .userData > .headerLeft {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile > .profileHeader > .userData > .headerLeft > .profileUsername {
|
||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
line-height: .8em;
|
line-height: .8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileHeader > .headerLeft > .userData > .profileUsertitle {
|
.profile > .profileHeader > .userData > .headerLeft > .profileUserTitle {
|
||||||
margin-left: 12px;
|
padding-left: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileHeader > .joinedLast {
|
.profile > .profileHeader > .userData > .headerRight {
|
||||||
position: relative;
|
|
||||||
top: -10px;
|
|
||||||
z-index: 3;
|
|
||||||
float: right;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-right: 10px;
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile > .profileContent {
|
||||||
|
margin: 10px 10px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userDataBar {
|
.profile > .profileContent > .userDataBar {
|
||||||
float: left;
|
|
||||||
width: 210px;
|
width: 210px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userDataBar > .hierarchyContainer > .inner > .hierarchies {
|
.profile > .profileContent > .userDataBar > .hierarchyContainer > .inner > .hierarchies {
|
||||||
|
@ -539,53 +543,32 @@ a:active {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userPage {
|
.profile > .profileContent > .profileMain {
|
||||||
float: left;
|
width: 100%;
|
||||||
width: 800px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > div {
|
.profile > .profileContent > .profileMain > .statsRow {
|
||||||
float: left;
|
width: 100%;
|
||||||
width: 200px;
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile > .profileContent > .profileMain > .statsRow > div {
|
||||||
font-size: 2.5em;
|
font-size: 2.5em;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
|
flex-basis: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > div > .inner > .count {
|
.profile > .profileContent > .profileMain > .statsRow .inner > .count {
|
||||||
font-size: 1.2em;
|
|
||||||
line-height: 1em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > .forumStats {
|
|
||||||
width: 370px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > .forumStats > .inner > .forumStatTitle {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > .forumStats > .inner > .forumStatCount {
|
|
||||||
float: right;
|
float: right;
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > .forumStats > .inner > .forumStatCount > a {
|
.profile > .profileContent > .profileMain > .statsRow .inner a {
|
||||||
display: block;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > .forumStats > .inner > .forumStatCount > .posts {
|
|
||||||
font-size: .8em;
|
|
||||||
line-height: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile > .profileContent > .userPage > .statsRow > .forumStats > .inner > .forumStatCount > .threads {
|
|
||||||
font-size: 1.2em;
|
|
||||||
line-height: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* User Background
|
* User Background
|
||||||
*/
|
*/
|
||||||
|
|
Reference in a new issue