diff --git a/_sakura/changelog.json b/_sakura/changelog.json index b8366ba..1748fb0 100644 --- a/_sakura/changelog.json +++ b/_sakura/changelog.json @@ -36,7 +36,8 @@ "20150707", "20150725", "20150728", - "20150730" + "20150730", + "20150731" ] @@ -1569,6 +1570,55 @@ "change": "Added draft for posting page." } + ], + + "20150731": [ + + { + "type": "UPD", + "change": "Redid footer links and styling." + }, + { + "type": "FIX", + "change": "Fixed an issue with linking to people's websites on the credits page." + }, + { + "type": "ADD", + "change": "Added pagination to news page." + }, + { + "type": "FIX", + "change": "Put pagination in own class." + }, + { + "type": "UPD", + "change": "Implemented global pagination style on member list page." + }, + { + "type": "REM", + "change": "Removed mention of Flashii in news page title." + }, + { + "type": "FIX", + "change": "Fixed positioning bug on the notification history page." + }, + { + "type": "ADD", + "change": "Added pagination to notification history page." + }, + { + "type": "ADD", + "change": "Added friend management page." + }, + { + "type": "FIX", + "change": "Fixed removing a friend not removing the request." + }, + { + "type": "FIX", + "change": "Fixed pending friend requests function returning mutual friends instead of requests." + } + ] } diff --git a/_sakura/components/Users.php b/_sakura/components/Users.php index 86256e5..1d98f55 100644 --- a/_sakura/components/Users.php +++ b/_sakura/components/Users.php @@ -1297,7 +1297,7 @@ class Users { } // Get friends - public static function getFriends($uid = null, $timestamps = false) { + public static function getFriends($uid = null, $timestamps = false, $getData = false) { // Assign $uid if(!$uid) @@ -1315,7 +1315,12 @@ class Users { foreach($getFriends as $key => $friend) { // Add friend to array - $friends[($timestamps ? $friend['fid'] : $key)] = $friend[($timestamps ? 'timestamp' : 'fid')]; + $friends[($timestamps ? $friend['fid'] : $key)] = $getData ? ([ + + 'user' => ($_UDATA = self::getUser($friend['fid'])), + 'rank' => self::getRank($_UDATA['rank_main']) + + ]) : $friend[($timestamps ? 'timestamp' : 'fid')]; } @@ -1325,7 +1330,7 @@ class Users { } // Get non-mutual friends - public static function getPendingFriends($uid = null) { + public static function getPendingFriends($uid = null, $getData = false) { // Assign $of automatically if it's not set if(!$uid) @@ -1343,8 +1348,16 @@ class Users { foreach($friends as $friend) { // Check if the friend is mutual - if(!self::checkFriend($friend, $uid)) - $pending[] = $friend; + if(!self::checkFriend($friend['uid'], $uid)) { + + $pending[] = $getData ? ([ + + 'user' => ($_UDATA = self::getUser($friend['uid'])), + 'rank' => self::getRank($_UDATA['rank_main']) + + ]) : $friend; + + } } @@ -1403,7 +1416,7 @@ class Users { } // Removing a friend - public static function removeFriend($uid) { + public static function removeFriend($uid, $deleteRequest = false) { // Check if the user has this user a friend if(!Database::fetch('friends', false, ['fid' => [$uid, '='], 'uid' => [Session::$userId, '=']])) @@ -1415,6 +1428,16 @@ class Users { 'fid' => [$uid, '='] ]); + // Attempt to remove the request + if($deleteRequest) { + + Database::delete('friends', [ + 'fid' => [Session::$userId, '='], + 'uid' => [$uid, '='] + ]); + + } + // Return true because yay return [1, 'REMOVED']; diff --git a/_sakura/sakura.php b/_sakura/sakura.php index d6a164a..e275e79 100644 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -8,10 +8,10 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20150730'); +define('SAKURA_VERSION', '20150731'); define('SAKURA_VLABEL', 'Eminence'); -define('SAKURA_STABLE', false); define('SAKURA_COLOUR', '#6C3082'); +define('SAKURA_STABLE', false); // Define Sakura Path define('ROOT', str_replace(basename(__DIR__), '', dirname(__FILE__))); diff --git a/_sakura/templates/yuuno/elements/newsPost.tpl b/_sakura/templates/yuuno/elements/newsPost.tpl index 809bbd2..c07a9df 100644 --- a/_sakura/templates/yuuno/elements/newsPost.tpl +++ b/_sakura/templates/yuuno/elements/newsPost.tpl @@ -1,4 +1,4 @@ -{% if newsPosts|length > 1 %}{{ newsPost.title }}{% endif %} +{% if not page.view_post %}{{ newsPost.title }}{% endif %}
@@ -12,5 +12,5 @@
- Posted on {{ newsPost.date|date(sakura.date_format) }}{% if newsPosts|length > 1 %} View comments{% endif %} + Posted on {{ newsPost.date|date(sakura.date_format) }}{% if not page.view_post %} View comments{% endif %}
diff --git a/_sakura/templates/yuuno/elements/settingsNav.tpl b/_sakura/templates/yuuno/elements/settingsNav.tpl index 193106e..e81847f 100644 --- a/_sakura/templates/yuuno/elements/settingsNav.tpl +++ b/_sakura/templates/yuuno/elements/settingsNav.tpl @@ -5,8 +5,10 @@
General
Home Edit Profile - Friends Groups +
Friends
+ List + Requests
Messages
Inbox Sent diff --git a/_sakura/templates/yuuno/forum/forumBtns.tpl b/_sakura/templates/yuuno/forum/forumBtns.tpl index 2c1dfc4..657bec6 100644 --- a/_sakura/templates/yuuno/forum/forumBtns.tpl +++ b/_sakura/templates/yuuno/forum/forumBtns.tpl @@ -1,4 +1,4 @@ -
+ \ No newline at end of file +
diff --git a/_sakura/templates/yuuno/forum/viewtopic.tpl b/_sakura/templates/yuuno/forum/viewtopic.tpl index 5b935ae..b3d0b78 100644 --- a/_sakura/templates/yuuno/forum/viewtopic.tpl +++ b/_sakura/templates/yuuno/forum/viewtopic.tpl @@ -18,7 +18,7 @@ {% else %} {% if post.is_friend != 0 %}{% endif %} - + {% endif %} {% else %} diff --git a/_sakura/templates/yuuno/global/footer.tpl b/_sakura/templates/yuuno/global/footer.tpl index ef5cc68..5c444f4 100644 --- a/_sakura/templates/yuuno/global/footer.tpl +++ b/_sakura/templates/yuuno/global/footer.tpl @@ -7,25 +7,26 @@
  • General
  • Home
  • News
  • -
  • Contact
  • -
  • Terms of Service
  • -
  • Rules and Information
  • -
  • Frequently Asked Questions
  • +
  • Search
  • +
  • Contact
  • +
  • Changelog
  • +
  • Feedback
  • diff --git a/_sakura/templates/yuuno/global/header.tpl b/_sakura/templates/yuuno/global/header.tpl index 487d31d..9432d1f 100644 --- a/_sakura/templates/yuuno/global/header.tpl +++ b/_sakura/templates/yuuno/global/header.tpl @@ -213,6 +213,7 @@ Forums Search {% if user.checklogin %} + Members Support us {% endif %} @@ -220,7 +221,6 @@ {% if user.checklogin %} {{ user.data.username }} - Members Messages Manage Settings diff --git a/_sakura/templates/yuuno/main/credits.tpl b/_sakura/templates/yuuno/main/credits.tpl index 2871acf..57ca5d8 100644 --- a/_sakura/templates/yuuno/main/credits.tpl +++ b/_sakura/templates/yuuno/main/credits.tpl @@ -13,7 +13,7 @@ {% for contribname, contributor in contributors %} - {{ contribname }} + {{ contribname }} {{ contributor[0] }} {% endfor %} diff --git a/_sakura/templates/yuuno/main/memberlist.tpl b/_sakura/templates/yuuno/main/memberlist.tpl index 6b76c56..b2502ff 100644 --- a/_sakura/templates/yuuno/main/memberlist.tpl +++ b/_sakura/templates/yuuno/main/memberlist.tpl @@ -84,11 +84,17 @@ {% endif %} {% if page.users|length > 1 %} -

    [ +

    + {% if page.page + 1 < page.users|length %} + + {% endif %} + {% endif %} {% else %} diff --git a/_sakura/templates/yuuno/main/news.tpl b/_sakura/templates/yuuno/main/news.tpl index be165c7..209fa99 100644 --- a/_sakura/templates/yuuno/main/news.tpl +++ b/_sakura/templates/yuuno/main/news.tpl @@ -1,11 +1,33 @@ {% include 'global/header.tpl' %}
    -
    {% if newsPosts|length == 1 %}{{ newsPosts[0].title }}{% elseif newsPosts|length < 1 %}Post does not exist!{% else %}News {% endif %}
    +
    {% if page.view_post %}{{ newsPosts[0].title }}{% elseif newsPosts|length < 1 %}Post does not exist!{% else %}News {% endif %}
    {% if newsPosts|length >= 1 %} - {% for newsPost in newsPosts %} - {% include 'elements/newsPost.tpl' %} - {% endfor %} + {% if page.view_post %} + {% for newsPost in newsPosts %} + {% include 'elements/newsPost.tpl' %} + {% endfor %} + {% else %} + {% for newsPost in newsPosts[page.currentPage] %} + {% include 'elements/newsPost.tpl' %} + {% endfor %} + {% endif %} + {% if not page.view_post and newsPosts|length > 1 %} +
    + +
    +
    + {% endif %} {% else %}

    The requested news post does not exist!

    @@ -17,20 +39,7 @@
    {% endif %}
    - {% if newsPosts|length > 1 %} - - {% elseif newsPosts|length == 1 %} + {% if page.view_post %}
    comments powered by Disqus + {% else %} + {% endif %}
    diff --git a/_sakura/templates/yuuno/settings/friendrequests.tpl b/_sakura/templates/yuuno/settings/friendrequests.tpl new file mode 100644 index 0000000..21aec13 --- /dev/null +++ b/_sakura/templates/yuuno/settings/friendrequests.tpl @@ -0,0 +1,52 @@ +{% include 'global/header.tpl' %} +
    +
    + {% include 'elements/settingsNav.tpl' %} +
    +
    +
    + {{ page.title }} +
    +
    +
    Handle friend requests.
    +
    + {% if friends|length %} +
    + {% for friend in friends[page.currentPage] %} + + {% endfor %} +
    +
    + {% if friends|length > 1 %} +
    + +
    +
    + {% endif %} + {% else %} +

    You don't have any pending requests!

    + {% endif %} +
    +
    +
    +{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/friends.tpl b/_sakura/templates/yuuno/settings/friends.tpl index 722dc95..763bf1f 100644 --- a/_sakura/templates/yuuno/settings/friends.tpl +++ b/_sakura/templates/yuuno/settings/friends.tpl @@ -1,5 +1,5 @@ {% include 'global/header.tpl' %} -
    +
    {% include 'elements/settingsNav.tpl' %}
    @@ -10,7 +10,41 @@
    Manage your friends.
    - + {% if friends|length %} +
    + {% for friend in friends[page.currentPage] %} + + {% endfor %} +
    +
    + {% if friends|length > 1 %} +
    + +
    +
    + {% endif %} + {% else %} +

    You don't have any friends yet!

    + {% endif %}
    diff --git a/_sakura/templates/yuuno/settings/notifications.tpl b/_sakura/templates/yuuno/settings/notifications.tpl index 7d61d07..e2b0c22 100644 --- a/_sakura/templates/yuuno/settings/notifications.tpl +++ b/_sakura/templates/yuuno/settings/notifications.tpl @@ -11,8 +11,8 @@ This is the history of notifications that have been sent to you.
    - {% for notif in notifs %} -
    + {% for notif in notifs[page.currentPage] %} +
    {% if 'FONT:' in notif.notif_img %}
    @@ -21,25 +21,38 @@ {% endif %}
    -
    + {% endfor %}
    + {% if notifs|length > 1 %} +
    + +
    +
    + {% endif %}
    diff --git a/content/data/yuuno/css/yuuno.css b/content/data/yuuno/css/yuuno.css index cdf56dd..eb4a0f8 100644 --- a/content/data/yuuno/css/yuuno.css +++ b/content/data/yuuno/css/yuuno.css @@ -120,30 +120,8 @@ body { padding-bottom: 220px; } -@media (max-width: 642px) { - - #contentwrapper { - padding-bottom: 335px; - } - -} - -@media (max-width: 426px) { - - #contentwrapper { - padding-bottom: 450px; - } - -} -@media (max-width: 400px) { - - #contentwrapper { - padding-bottom: 450px; - } - -} - -@media (max-width: 300px) { +/* Can't be bothered to figure this out since it'll spazz out anyway */ +@media (max-width: 650px) { .footer { display: none; @@ -762,21 +740,24 @@ a.gotop.exit { text-align: left; display: inline-block; width: 200px; - list-style-type: none; + list-style: square; } .footer .ftsections .ftsection li { - margin: 2px; + margin: 2px 2px 2px 16px; } .footer .ftsections .ftsection li.fthead { - margin-bottom: 5px; + margin: 2px 2px 5px; font-weight: 700; + list-style: none; } -.footer .sections .copycentre { +.footer .ftsections .copycentre { text-align: center; width: 100%; + font-size: .9em; + line-height: 1.8em; } /* @@ -973,7 +954,7 @@ a.gotop.exit { text-align: right; } -#notifications > div { +#notifications > div { cursor: pointer; text-align: left; display: inline-block; @@ -1310,13 +1291,14 @@ a.gotop.exit { overflow: auto; } -.settings .notification-history > div { +.settings .notification-history > a { border: 1px solid #507; margin: 5px; background: rgba(113, 74, 150, .3); + display: block; } -.settings .notification-history > div > .notif-hist-icon { +.settings .notification-history > a > .notif-hist-icon { float: left; width: 80px; height: 80px; @@ -1327,11 +1309,11 @@ a.gotop.exit { color: #FFF; } -.settings .notification-history > div > .notif-hist-icon > .font-icon { +.settings .notification-history > a > .notif-hist-icon > .font-icon { margin: .34em 0; } -.settings .notification-history > div > .notif-hist-content > .notif-hist-time { +.settings .notification-history > a > .notif-hist-content > .notif-hist-time { font-style: italic; text-align: right; float: right; @@ -1339,19 +1321,87 @@ a.gotop.exit { font-size: .8em; } -.settings .notification-history > div > .notif-hist-content > .notif-hist-inside { +.settings .notification-history > a > .notif-hist-content > .notif-hist-inside { float: left; margin-left: 2px; padding-left: 8px; } -.settings .notification-history > div > .notif-hist-content > .notif-hist-inside > .notif-hist-title { +.settings .notification-history > a > .notif-hist-content > .notif-hist-inside > .notif-hist-title { font-family: "SegoeUI", "Segoe UI", sans-serif; font-weight: 300; font-size: 1.7em; margin-top: 1em; } +.settings .friends-list > div:not(:last-child) { + display: block; + border: 1px solid #9475B2; + text-align: center; + width: 220px; + margin: 0 2px 40px; + float: left; + border-radius: 3px; +} + +.settings .friends-list > div:not(:last-child):hover { + margin-bottom: 6px; + background: #C2AFFE; +} + +.settings .friends-list > div > .friends-list-data { + display: block; +} + +.settings .friends-list > div > .friends-list-data > .friends-list-name { + font-size: 1.2em; + line-height: 1.5em; + padding-bottom: 4px; +} + +.settings .friends-list > div > .friends-list-actions { + display: none; + background: linear-gradient(0deg, #9475B2, #C2AFFE) #9475B2; +} + +.settings .friends-list > div > .friends-list-actions > a { + color: #222; + font-size: 2em; + line-height: 1em; + text-decoration: none; + transition: .2s; + padding: 5px 0; + float: left; +} + +.settings .friends-list > div:hover > .friends-list-actions { + display: block; +} + +.settings .friends-list > div > .friends-list-actions > .remove:hover { + color: #D00; +} + +.settings .friends-list > div > .friends-list-actions > .remove:active { + color: #A00; +} + +.settings .friends-list > div > .friends-list-actions > .add:hover { + color: #0D0; +} + +.settings .friends-list > div > .friends-list-actions > .add:active { + color: #0A0; +} + +.settings .friends-list > div > .friends-list-actions > a { + width: 50%; +} + +.settings .friends-list > div > .friends-list-actions > .fill { + width: 100%; +} + /* * Support page Styling */ @@ -1658,26 +1708,6 @@ textarea.inputStyling { text-align: center; } -.forum .forumbtn { - background: linear-gradient(0deg, #9475B2 10%, #C2AFFE 90%); - color: #306; - padding: 4px 8px; - text-decoration: none; - border-radius: 2px; - margin: 4px 2px; - display: inline-block; - font-size: 1.3em; - border: 1px solid #9475B2; -} - -.forum .forumbtn:hover { - background: linear-gradient(0deg, #9475B2 30%, #C2AFFE 70%); -} - -.forum .forumbtn:active { - background: linear-gradient(180deg, #9475B2 30%, #C2AFFE 70%); -} - .forum.viewtopic .posts { width: 100%; border-spacing: 0; @@ -1827,6 +1857,33 @@ textarea.inputStyling { float: right; } +/* + * Pagination + */ +.pagination a { + background: linear-gradient(0deg, #9475B2 10%, #C2AFFE 90%); + color: #306; + padding: 4px 8px; + text-decoration: none; + border-radius: 2px; + margin: 4px 2px; + display: inline-block; + font-size: 1.3em; + border: 1px solid #9475B2; +} + +.pagination a.current { + background: linear-gradient(0deg, #A586C3, #D3BFFF); +} + +.pagination a:hover { + background: linear-gradient(0deg, #9475B2 30%, #C2AFFE 70%); +} + +.pagination a:active { + background: linear-gradient(180deg, #9475B2 30%, #C2AFFE 70%); +} + /* * Ban page styling */ diff --git a/main/.htaccess b/main/.htaccess index b93faf5..ce4af2b 100644 --- a/main/.htaccess +++ b/main/.htaccess @@ -29,12 +29,14 @@ RewriteRule ^r/([a-z]+)$ infopage.php?r=$1 [L,QSA] # News RewriteRule ^news/?$ news.php [L,QSA] +RewriteRule ^news/p([0-9]+)$ news.php?page=$1 [L,QSA] RewriteRule ^news/([0-9]+)$ news.php?id=$1 [L,QSA] RewriteRule ^news.xml$ news.php?xml [L,QSA] # Settings RewriteRule ^settings/?$ settings.php [L,QSA] RewriteRule ^settings/([a-z]+)/?$ settings.php?mode=$1 [L,QSA] +RewriteRule ^settings/([a-z]+)/p([0-9]+)/?$ settings.php?mode=$1&page=$2 [L,QSA] RewriteRule ^friends/?$ settings.php?friend-action=true [L,QSA] # Private Messages diff --git a/main/news.php b/main/news.php index 7085a24..32586a4 100644 --- a/main/news.php +++ b/main/news.php @@ -27,8 +27,10 @@ $disqus_data = [ // Add page specific things $renderData['newsPosts'] = Main::getNewsPosts((isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id'])) ? $_GET['id'] : null, (isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id']))); $renderData['page'] = [ - 'title' => (isset($_GET['id']) ? (count($renderData['newsPosts']) ? $renderData['newsPosts'][0]['title'] : 'Post does not exist!') : 'Flashii News'), - 'disqus_sso' => (($disqus_message = base64_encode(json_encode($disqus_data))) .' '. Main::dsqHmacSha1($disqus_message .' '. time(), Configuration::getConfig('disqus_api_secret')) .' '. time()) + 'title' => (isset($_GET['id']) ? (count($renderData['newsPosts']) ? $renderData['newsPosts'][0]['title'] : 'Post does not exist!') : 'News'), + 'disqus_sso' => (($disqus_message = base64_encode(json_encode($disqus_data))) .' '. Main::dsqHmacSha1($disqus_message .' '. time(), Configuration::getConfig('disqus_api_secret')) .' '. time()), + 'view_post' => isset($_GET['id']) && count($renderData['newsPosts']), + 'currentPage' => 0 ]; // News XML feed @@ -133,5 +135,14 @@ if(isset($_GET['xml'])) { } +// If we're not using the XML feed and we're not viewing a single post create pages +if(!isset($_GET['id'])) { + + // Create the current page + $renderData['newsPosts'] = array_chunk($renderData['newsPosts'], Configuration::getConfig('news_posts_per_page'), true); + $renderData['page']['currentPage'] = isset($_GET['page']) && ($_GET['page'] - 1) >= 0 ? $_GET['page'] - 1 : 0; + +} + // Print page contents print Templates::render('main/news.tpl', $renderData); diff --git a/main/settings.php b/main/settings.php index e8e7c47..b9746a6 100644 --- a/main/settings.php +++ b/main/settings.php @@ -133,7 +133,7 @@ if(isset($_REQUEST['request-notifications']) && $_REQUEST['request-notifications if($continue) { // Execute the action - $action = (isset($_REQUEST['add']) ? Users::addFriend($_REQUEST['add']) : Users::removeFriend($_REQUEST['remove'])); + $action = (isset($_REQUEST['add']) ? Users::addFriend($_REQUEST['add']) : Users::removeFriend($_REQUEST['remove'], true)); // Set the messages $messages = [ @@ -180,6 +180,13 @@ if(isset($_REQUEST['request-notifications']) && $_REQUEST['request-notifications } + if(isset($_REQUEST['direct']) && $_REQUEST['direct'] && !isset($_REQUEST['ajax'])) { + + header('Location: '. $renderData['page']['redirect']); + exit; + + } + // Print page contents or if the AJAX request is set only display the render data print isset($_REQUEST['ajax']) ? ( @@ -200,23 +207,24 @@ if(Users::checkLogin()) { // Settings page list $pages = [ - 'home' => ['General', 'Home'], - 'profile' => ['General', 'Edit Profile'], - 'friends' => ['General', 'Friends'], - 'groups' => ['General', 'Groups'], - 'notifications' => ['Notifications', 'History'], - 'avatar' => ['Aesthetics', 'Avatar'], - 'background' => ['Aesthetics', 'Background'], - 'page' => ['Aesthetics', 'Profile Page'], - 'email' => ['Account', 'E-mail Address'], - 'username' => ['Account', 'Username'], - 'usertitle' => ['Account', 'User Title'], - 'password' => ['Account', 'Password'], - 'ranks' => ['Account', 'Ranks'], - 'sessions' => ['Danger zone', 'Sessions'], - 'regkeys' => ['Danger zone', 'Registration Keys'], - 'deactivate' => ['Danger zone', 'Deactivate Account'], - 'notfound' => ['Settings', '404'] + 'home' => ['General', 'Home'], + 'profile' => ['General', 'Edit Profile'], + 'groups' => ['General', 'Groups'], + 'friends' => ['Friends', 'List'], + 'friendrequests' => ['Friends', 'Requests'], + 'notifications' => ['Notifications', 'History'], + 'avatar' => ['Aesthetics', 'Avatar'], + 'background' => ['Aesthetics', 'Background'], + 'page' => ['Aesthetics', 'Profile Page'], + 'email' => ['Account', 'E-mail Address'], + 'username' => ['Account', 'Username'], + 'usertitle' => ['Account', 'User Title'], + 'password' => ['Account', 'Password'], + 'ranks' => ['Account', 'Ranks'], + 'sessions' => ['Danger zone', 'Sessions'], + 'regkeys' => ['Danger zone', 'Registration Keys'], + 'deactivate' => ['Danger zone', 'Deactivate Account'], + 'notfound' => ['Settings', '404'] ]; // Current settings page @@ -224,7 +232,8 @@ if(Users::checkLogin()) { // Render data $renderData['page'] = [ - 'title' => $pages[$currentPage][0] .' / '. $pages[$currentPage][1] + 'title' => $pages[$currentPage][0] .' / '. $pages[$currentPage][1], + 'currentPage' => isset($_GET['page']) && ($_GET['page'] - 1) >= 0 ? $_GET['page'] - 1 : 0 ]; // Section specific @@ -240,12 +249,17 @@ if(Users::checkLogin()) { // Friends case 'friends': - $renderData['friends'] = Users::getFriends(); + $renderData['friends'] = array_chunk(array_reverse(Users::getFriends(null, true, true)), 12, true); + break; + + // Pending Friend Requests + case 'friendrequests': + $renderData['friends'] = array_chunk(array_reverse(Users::getPendingFriends(null, true)), 12, true); break; // Notification history case 'notifications': - $renderData['notifs'] = array_reverse(Users::getNotifications(null, 0, false, true)); + $renderData['notifs'] = array_chunk(array_reverse(Users::getNotifications(null, 0, false, true)), 10, true); break; }