diff --git a/integrations/SockChat.php b/integrations/SockChat.php deleted file mode 100644 index 836ade5..0000000 --- a/integrations/SockChat.php +++ /dev/null @@ -1,81 +0,0 @@ -permission(Site::DEACTIVATED) || $user->permission(Site::RESTRICTED)) { - Auth::Deny(); - Auth::Serve(); - exit; - } - - // Set the user's data - Auth::SetUserData( - $user->id(), - $user->username(), - $user->colour() - ); - - // Set the common permissions - Auth::SetCommonPermissions( - Rank::construct($user->mainRank())->hierarchy(), - $user->permission(Manage::USE_MANAGE, Perms::MANAGE) ? 1 : 0, - $user->permission(Site::CREATE_BACKGROUND) ? 1 : 0, - $user->permission(Site::CHANGE_USERNAME) ? 1 : 0, - $user->permission(Site::MULTIPLE_GROUPS) ? 2 : ( - $user->permission(Site::CREATE_GROUP) ? 1 : 0 - ) - ); - - Auth::Accept(); - } else { - Auth::Deny(); - } -} - -// Serve the authentication data -Auth::Serve(); diff --git a/public/content/data/yuuno/js/yuuno.js b/public/content/data/yuuno/js/yuuno.js index 158ab9a..d9b7ec0 100644 --- a/public/content/data/yuuno/js/yuuno.js +++ b/public/content/data/yuuno/js/yuuno.js @@ -72,6 +72,8 @@ function notifyUI(content) { // Append sound.appendChild(mp3); sound.appendChild(ogg); + // Less loud + sound.volume = 0.5; // And play sound.play(); } diff --git a/public/content/data/yuuno/js/yuuno.ts b/public/content/data/yuuno/js/yuuno.ts index 3fecd39..9ae9051 100644 --- a/public/content/data/yuuno/js/yuuno.ts +++ b/public/content/data/yuuno/js/yuuno.ts @@ -95,6 +95,9 @@ function notifyUI(content: Notification): void { sound.appendChild(mp3); sound.appendChild(ogg); + // Less loud + sound.volume = 0.5; + // And play sound.play(); } diff --git a/public/settings.php b/public/settings.php index 265a098..4d45421 100644 --- a/public/settings.php +++ b/public/settings.php @@ -1388,6 +1388,11 @@ if (Users::checkLogin()) { case 'account.username': $renderData['difference'] = $currentUser->getUsernameHistory() ? Main::timeElapsed($currentUser->getUsernameHistory()[0]['change_time']) : 0; break; + + // Sessions + case 'advanced.sessions': + $renderData['sessions'] = Database::fetch('sessions', true, ['user_id' => [$currentUser->id(), '=']]); + break; } // Set parse variables diff --git a/public/support.php b/public/support.php index 5c91fad..4797875 100644 --- a/public/support.php +++ b/public/support.php @@ -65,7 +65,7 @@ if (isset($_REQUEST['mode']) $total, $itemName, Config::get('sitename') . ' Premium Purchase', - 'http://' . Config::get('url_main') . $urls->format('SITE_PREMIUM') + 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . Config::get('url_main') . $urls->format('SITE_PREMIUM') )) { // Store the amount of months in the global session array $_SESSION['premiumMonths'] = (int) $_POST['months']; diff --git a/sakura.php b/sakura.php index d537c7d..223c673 100644 --- a/sakura.php +++ b/sakura.php @@ -8,9 +8,9 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20160110'); -define('SAKURA_VLABEL', 'Eminence'); -define('SAKURA_COLOUR', '#6C3082'); +define('SAKURA_VERSION', '20160114'); +define('SAKURA_VLABEL', 'Amethyst'); +define('SAKURA_COLOUR', '#9966CC'); // Define Sakura Path define('ROOT', __DIR__ . '/'); @@ -125,8 +125,6 @@ if (!defined('SAKURA_NO_TPL')) { 'sakura' => [ 'versionInfo' => [ 'version' => SAKURA_VERSION, - 'label' => SAKURA_VLABEL, - 'colour' => SAKURA_COLOUR, ], 'dev' => [ @@ -148,7 +146,7 @@ if (!defined('SAKURA_NO_TPL')) { 'siteDesc' => Config::get('sitedesc'), 'siteTags' => json_decode(Config::get('sitetags'), true), 'dateFormat' => Config::get('date_format'), - 'currentPage' => '//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], + 'currentPage' => (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null), 'referrer' => (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null), 'onlineTimeout' => Config::get('max_online_time'), 'announcementImage' => Config::get('header_announcement_image'), diff --git a/templates/yuuno/main/profile.twig b/templates/yuuno/main/profile.twig index cf80e83..ed415fd 100644 --- a/templates/yuuno/main/profile.twig +++ b/templates/yuuno/main/profile.twig @@ -67,30 +67,44 @@ {% if profile.dates.birth != '0000-00-00' and profile.dates.birth|split('-')[0] > 0 %}
Age {{ profile.elapsed(' old').birth }} {% endif %} - {% if profile.profileFields %} + {% if profile.profileFields or user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')) %}
{% if session.checkLogin %} {% for name,field in profile.profileFields %} - - - + + - + + {% endfor %} + {% if user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')) %} + + + + + + + + + + + + + {% endif %}
- {{ field.name }} - - {% if name == 'youtube' %} - {% if field.youtubetype == true %}{{ profile.username }}'s Channel{% else %}{{ field.value }}{% endif %} - {% else %} - {% if field.islink %} - +
+ {{ field.name }} + + {% if name == 'youtube' %} + {% if field.youtubetype == true %}{{ profile.username }}'s Channel{% else %}{{ field.value }}{% endif %} + {% else %} + {% if field.islink %} + + {% endif %} + {{ field.value }} + {% if field.islink %} + + {% endif %} {% endif %} - {{ field.value }} - {% if field.islink %} - - {% endif %} - {% endif %} -
E-mail address{{ profile.email }}
Register IP{{ profile.ip(false) }}
Last IP{{ profile.ip(true) }}
{% else %} Log in to view the full profile! diff --git a/templates/yuuno/settings/advanced.sessions.twig b/templates/yuuno/settings/advanced.sessions.twig index e69de29..06ca2fd 100644 --- a/templates/yuuno/settings/advanced.sessions.twig +++ b/templates/yuuno/settings/advanced.sessions.twig @@ -0,0 +1,13 @@ + + + + + + + + + {% for session in sessions %} + + {% endfor %} + +
IPUseragentLogin time
IPUseragentLogin time
diff --git a/templates/yuuno/settings/general.home.twig b/templates/yuuno/settings/general.home.twig index ee3aa91..16ae40c 100644 --- a/templates/yuuno/settings/general.home.twig +++ b/templates/yuuno/settings/general.home.twig @@ -17,12 +17,4 @@
  • Manage Active Sessions
  • Change Password
  • -
    -

    Personal Statistics

    -