diff --git a/_sakura/changelog.json b/_sakura/changelog.json index 78c1356..ea58e9a 100755 --- a/_sakura/changelog.json +++ b/_sakura/changelog.json @@ -3107,6 +3107,42 @@ "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" + } + ] } diff --git a/_sakura/components/User.php b/_sakura/components/User.php index 41fb65c..e0c363b 100755 --- a/_sakura/components/User.php +++ b/_sakura/components/User.php @@ -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 if (empty($this->data)) { // If not assign as the fallback user diff --git a/_sakura/sakura.php b/_sakura/sakura.php index 1cd2ecd..ffb43ba 100755 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20151011'); +define('SAKURA_VERSION', '20151012'); define('SAKURA_VLABEL', 'Eminence'); define('SAKURA_COLOUR', '#6C3082'); define('SAKURA_STABLE', false); @@ -105,12 +105,14 @@ $templateName = defined('SAKURA_MANAGE') ? Configuration::getConfig('manage_style') : ( - isset($currentUser->data['user_data']['userOptions']['useMisaki']) && - $currentUser->data['user_data']['userOptions']['useMisaki'] && - $currentUser->checkPermission('SITE', 'ALTER_PROFILE') -) ? -'misaki' : -Configuration::getConfig('site_style'); + ( + isset($currentUser->data['user_data']['userOptions']['useMisaki']) && + $currentUser->data['user_data']['userOptions']['useMisaki'] && + $currentUser->checkPermission('SITE', 'ALTER_PROFILE') + ) ? + 'misaki' : + Configuration::getConfig('site_style') +); if (!defined('SAKURA_NO_TPL')) { // Initialise templating engine diff --git a/_sakura/templates/misaki/elements/newsPost.tpl b/_sakura/templates/misaki/elements/newsPost.tpl index c5a10e3..ff12a4b 100755 --- a/_sakura/templates/misaki/elements/newsPost.tpl +++ b/_sakura/templates/misaki/elements/newsPost.tpl @@ -3,7 +3,7 @@ {{ post.news_title }}
{{ post.news_timestamp|date(sakura.dateFormat) }}
-
Posted by {{ post.news_poster.data.username }}{% if posts|length > 1 %} / View comments{% endif %}
+
Posted by {{ post.news_poster.data.username }}{% if not (viewPost and postExists) %} / {{ post.news_comments.count }} comment{% if post.news_comments.count != 1 %}s{% endif %}{% endif %}
diff --git a/_sakura/templates/misaki/main/profile.tpl b/_sakura/templates/misaki/main/profile.tpl index 6e3fe64..64aa1b9 100755 --- a/_sakura/templates/misaki/main/profile.tpl +++ b/_sakura/templates/misaki/main/profile.tpl @@ -22,26 +22,24 @@ {% else %}
-
-
-
- {{ profile.data.username }}'s Avatar -
+
+
{{ profile.data.username }}'s Avatar
+
+
{{ profile.data.username }}
-
+
{{ profile.userTitle }}
+
+
Joined {{ profile.elapsed.joined }}
+
{% if profile.data.user_last_online < 1 %}User hasn't logged in yet.{% else %}Last Active {{ profile.elapsed.lastOnline }}{% endif %}
+
-
-
Joined {{ profile.elapsed.joined }}
-
{% if profile.data.user_last_online < 1 %}User hasn't logged in yet.{% else %}Last Active {{ profile.elapsed.lastOnline }}{% endif %}
-
-
-
+
{% if not profile.checkPermission('SITE', 'DEACTIVATED') and (profile.checkPremium[0] or profile.checkPermission('MANAGE', 'USE_MANAGE')) %}
@@ -121,32 +119,56 @@
-
+
{% if not profile.checkPermission('SITE', 'DEACTIVATED') %}
+ {% if profileView != (noUserpage ? 'comments' : 'index') %} +
+ +
+
+
+ {% endif %} + {% if profileView != 'friends' %} + {% endif %} + {% if profileView != 'groups' %} -
@@ -155,7 +177,6 @@
{% endif %}
-
{% endif %} diff --git a/_sakura/templates/misaki/profile/comments.tpl b/_sakura/templates/misaki/profile/comments.tpl new file mode 100644 index 0000000..e69de29 diff --git a/public/content/data/misaki/css/misaki.css b/public/content/data/misaki/css/misaki.css index 4de4489..fab45f4 100755 --- a/public/content/data/misaki/css/misaki.css +++ b/public/content/data/misaki/css/misaki.css @@ -379,15 +379,23 @@ a:active { .profile { text-shadow: 1px 1px 2px rgba(0, 0, 0, .75); font-family: "Exo2-0-LightItalic", sans-serif; + display: flex; + flex-direction: column; + align-content: stretch; + width: 100%; position: relative; top: -35px; + margin-bottom: -35px; +} + +.profile .profileContainer { + display: flex; } .profile .profilePlatform { background: rgba(148, 117, 178, .2); box-shadow: 0 2px 6px rgba(0, 0, 0, .75); - margin-left: 10px; - margin-top: 10px; + margin: 0 0 10px 10px; } .profile .profilePlatform > .inner { @@ -403,61 +411,57 @@ a:active { .profile > .profileHeader { height: 250px; - float: left; width: 100%; + display: flex; + align-items: flex-end; } -.profile > .profileHeader > .profileFade { - background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .7) 30%, rgba(0, 0, 0, 0) 100%); - height: 160px; - width: 100%; - position: relative; - top: 60px; - z-index: 1; -} - -.profile > .profileHeader > .headerLeft > .userAvatar { +.profile > .profileHeader > .userAvatar { + font-size: 0; + background: transparent no-repeat scroll left center / contain; height: 200px; width: 200px; - position: relative; - top: -100px; - z-index: 2; - margin-left: 10px; border-radius: 2px; 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; - top: -16px; - float: left; - margin: 0 10px; - z-index: 3; + top: -55px; + width: 100%; } -.profile > .profileHeader > .headerLeft > .userData > .profileUsername { +.profile > .profileHeader > .userData > .headerLeft { + flex-grow: 1; +} + +.profile > .profileHeader > .userData > .headerLeft > .profileUsername { font-size: 3em; line-height: .8em; } -.profile > .profileHeader > .headerLeft > .userData > .profileUsertitle { - margin-left: 12px; +.profile > .profileHeader > .userData > .headerLeft > .profileUserTitle { + padding-left: 12px; } -.profile > .profileHeader > .joinedLast { - position: relative; - top: -10px; - z-index: 3; - float: right; +.profile > .profileHeader > .userData > .headerRight { text-align: right; - margin-right: 10px; + padding-right: 12px; +} + +.profile > .profileContent { + margin: 10px 10px 0 0; } .profile > .profileContent > .userDataBar { - float: left; width: 210px; margin-top: 10px; + flex-shrink: 0; } .profile > .profileContent > .userDataBar > .hierarchyContainer > .inner > .hierarchies { @@ -539,53 +543,32 @@ a:active { text-align: center; } -.profile > .profileContent > .userPage { - float: left; - width: 800px; +.profile > .profileContent > .profileMain { + width: 100%; } -.profile > .profileContent > .userPage > .statsRow > div { - float: left; - width: 200px; +.profile > .profileContent > .profileMain > .statsRow { + width: 100%; + display: flex; +} + +.profile > .profileContent > .profileMain > .statsRow > div { font-size: 2.5em; line-height: 1em; + flex-basis: 0; + flex-grow: 1; + flex-shrink: 0; } -.profile > .profileContent > .userPage > .statsRow > div > .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 { +.profile > .profileContent > .profileMain > .statsRow .inner > .count { float: right; - text-align: right; } -.profile > .profileContent > .userPage > .statsRow > .forumStats > .inner > .forumStatCount > a { - display: block; +.profile > .profileContent > .profileMain > .statsRow .inner a { text-decoration: none; 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 */