From 50805c253f38ad33dbe443d489351963fd5c9df8 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 10 Aug 2015 22:04:22 +0200 Subject: [PATCH] cleanup --- _sakura/changelog.json | 10 ++ _sakura/templates/yuuno/main/profile.tpl | 2 +- _sakura/templates/yuuno/main/settings.tpl | 19 +++ _sakura/templates/yuuno/settings/avatar.tpl | 45 +++----- .../templates/yuuno/settings/background.tpl | 45 +++----- .../templates/yuuno/settings/deactivate.tpl | 17 --- _sakura/templates/yuuno/settings/email.tpl | 17 --- .../yuuno/settings/friendlisting.tpl | 78 +++++-------- .../yuuno/settings/friendrequests.tpl | 80 ++++++------- _sakura/templates/yuuno/settings/groups.tpl | 18 --- _sakura/templates/yuuno/settings/home.tpl | 108 ++++++++---------- _sakura/templates/yuuno/settings/notfound.tpl | 18 +-- .../yuuno/settings/notifications.tpl | 90 ++++++--------- _sakura/templates/yuuno/settings/password.tpl | 17 --- _sakura/templates/yuuno/settings/profile.tpl | 58 ++++------ _sakura/templates/yuuno/settings/ranks.tpl | 17 --- _sakura/templates/yuuno/settings/regkeys.tpl | 17 --- _sakura/templates/yuuno/settings/sessions.tpl | 19 --- _sakura/templates/yuuno/settings/username.tpl | 18 --- _sakura/templates/yuuno/settings/userpage.tpl | 67 ++++------- .../templates/yuuno/settings/usertitle.tpl | 17 --- main/settings.php | 42 +++---- 22 files changed, 273 insertions(+), 546 deletions(-) create mode 100644 _sakura/templates/yuuno/main/settings.tpl diff --git a/_sakura/changelog.json b/_sakura/changelog.json index 54d1aee..2b55114 100644 --- a/_sakura/changelog.json +++ b/_sakura/changelog.json @@ -1956,6 +1956,16 @@ "type": "REM", "change": "Removed old userpages code.", "user": "Flashwave" + }, + { + "type": "FIX", + "change": "Fixed usage of wrong variable to check if user is online on the profiles.", + "user": "Flashwave" + }, + { + "type": "UPD", + "change": "Clean settings templates up.", + "user": "Flashwave" } ] diff --git a/_sakura/templates/yuuno/main/profile.tpl b/_sakura/templates/yuuno/main/profile.tpl index 99b0448..58c79d3 100644 --- a/_sakura/templates/yuuno/main/profile.tpl +++ b/_sakura/templates/yuuno/main/profile.tpl @@ -15,7 +15,7 @@
- {{ profile.user.username }}'s Avatar
+ {{ profile.user.username }}'s Avatar
{% if profile.user.rank_main > 1 and profile.ban_check|length < 1 %} {{ profile.ranktitle }}

{{ profile.user.username }}

diff --git a/_sakura/templates/yuuno/main/settings.tpl b/_sakura/templates/yuuno/main/settings.tpl new file mode 100644 index 0000000..d84b15b --- /dev/null +++ b/_sakura/templates/yuuno/main/settings.tpl @@ -0,0 +1,19 @@ +{% include 'global/header.tpl' %} +
+
+ {% include 'elements/settingsNav.tpl' %} +
+
+
+ {{ page.title }} +
+
+ {% for descline in page.description %} +
{{ include(template_from_string(descline)) }}
+ {% endfor %} +
+ {% include 'settings/' ~ current ~ '.tpl' %} +
+
+
+{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/avatar.tpl b/_sakura/templates/yuuno/settings/avatar.tpl index 3c86b52..50794ec 100644 --- a/_sakura/templates/yuuno/settings/avatar.tpl +++ b/_sakura/templates/yuuno/settings/avatar.tpl @@ -1,34 +1,17 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} +
+ + + + +
+
+ Your Avatar
-
-
- {{ page.title }} -
-
-
Your avatar which is displayed all over the site and on your profile.
-
Maximum image size is {{ avatar.max_width }}x{{ avatar.max_height }}, minimum image size is {{ avatar.min_width }}x{{ avatar.min_height }}, maximum file size is {{ avatar.max_size_view }}.
-
- - - - - -
-
- Your Avatar -
-
- -
-
- -
-
- +
+ +
+
+
-
-{% include 'global/footer.tpl' %} + diff --git a/_sakura/templates/yuuno/settings/background.tpl b/_sakura/templates/yuuno/settings/background.tpl index b8ccf19..ed6b475 100644 --- a/_sakura/templates/yuuno/settings/background.tpl +++ b/_sakura/templates/yuuno/settings/background.tpl @@ -1,34 +1,17 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} +
+ + + + +
+
+ Your Background
-
-
- {{ page.title }} -
-
-
The background that is displayed on your profile.
-
Maximum image size is {{ background.max_width }}x{{ background.max_height }}, minimum image size is {{ background.min_width }}x{{ background.min_height }}, maximum file size is {{ background.max_size_view }}.
-
- - - - - -
-
- Your Background -
-
- -
-
- -
-
- +
+ +
+
+
-
-{% include 'global/footer.tpl' %} + diff --git a/_sakura/templates/yuuno/settings/deactivate.tpl b/_sakura/templates/yuuno/settings/deactivate.tpl index 0f05061..e69de29 100644 --- a/_sakura/templates/yuuno/settings/deactivate.tpl +++ b/_sakura/templates/yuuno/settings/deactivate.tpl @@ -1,17 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- You can deactivate your account here if you want to leave :(. -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/email.tpl b/_sakura/templates/yuuno/settings/email.tpl index b5af069..e69de29 100644 --- a/_sakura/templates/yuuno/settings/email.tpl +++ b/_sakura/templates/yuuno/settings/email.tpl @@ -1,17 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- You e-mail address is used for password recovery and stuff like that, we won't spam you ;). -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/friendlisting.tpl b/_sakura/templates/yuuno/settings/friendlisting.tpl index c3bc416..5b373b6 100644 --- a/_sakura/templates/yuuno/settings/friendlisting.tpl +++ b/_sakura/templates/yuuno/settings/friendlisting.tpl @@ -1,51 +1,35 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
-
Manage your friends.
-
- {% if friends|length %} -
- {% for friend in friends[page.currentPage] %} - - {% endfor %} +{% if friends|length %} +
+ {% for friend in friends[page.currentPage] %} +
+ + {{ friend.user.username }} +
{{ friend.user.username }}
+
+
+
- {% if friends|length > 1 %} -
- -
-
- {% endif %} - {% else %} -

You don't have any friends yet!

- {% endif %} -
+
+ {% endfor %}
-{% include 'global/footer.tpl' %} + {% if friends|length > 1 %} +
+ +
+
+ {% endif %} +{% else %} +

You don't have any friends yet!

+{% endif %} diff --git a/_sakura/templates/yuuno/settings/friendrequests.tpl b/_sakura/templates/yuuno/settings/friendrequests.tpl index 0139680..d3fb199 100644 --- a/_sakura/templates/yuuno/settings/friendrequests.tpl +++ b/_sakura/templates/yuuno/settings/friendrequests.tpl @@ -1,52 +1,36 @@ -{% 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 %} +
+ {% for friend in friends[page.currentPage] %} +
+ + {{ friend.user.username }} +
{{ friend.user.username }}
+
+
+ +
- {% if friends|length > 1 %} -
- -
-
- {% endif %} - {% else %} -

You don't have any pending requests!

- {% endif %} -
+
+ {% endfor %}
-{% include 'global/footer.tpl' %} + {% if friends|length > 1 %} +
+ +
+
+ {% endif %} +{% else %} +

You don't have any pending requests!

+{% endif %} diff --git a/_sakura/templates/yuuno/settings/groups.tpl b/_sakura/templates/yuuno/settings/groups.tpl index 5793039..e69de29 100644 --- a/_sakura/templates/yuuno/settings/groups.tpl +++ b/_sakura/templates/yuuno/settings/groups.tpl @@ -1,18 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
-
The background that is displayed on your profile.
-
Maximum image size is 2560x1440, minimum image size is 20x20, maximum file size is 10 MB.
-
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/home.tpl b/_sakura/templates/yuuno/settings/home.tpl index 0fd1a95..deb67d7 100644 --- a/_sakura/templates/yuuno/settings/home.tpl +++ b/_sakura/templates/yuuno/settings/home.tpl @@ -1,62 +1,46 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- Welcome to the Settings Panel. From here you can monitor, view and update your profile and preferences. -
-
-

Common Tasks

-

Profile

- -

Messaging

- -

Account

- -
-

Personal Statistics

-
    -
  • You joined on {{ user.data.regdate|date(sakura.date_format) }}.
  • -
  • You have made {{ settings.forum_stats.posts }} forum post{% if settings.forum_stats.posts != 1 %}s{% endif %} and started {{ settings.forum_stats.topics }} forum thread{% if settings.forum_stats.topics != 1 %}s{% endif %}.
  • -
  • You have x warnings.
  • -
  • You have {{ settings.friends|length - (settings.friends.online ? 1 : 0) - (settings.friends.offline ? 1 : 0) }} friend{% if settings.friends|length - (settings.friends.online ? 1 : 0) - (settings.friends.offline ? 1 : 0) != 1 %}s{% endif %}.
  • -
-
-

Friends

-

Online

- {% if settings.friends.online %} - {% for key,friend in settings.friends.online %} - {{ friend.user.username }}{% if key + 1 != settings.friends.online|length %},{% endif %} - {% endfor %} - {% else %} -

No friends are online.

- {% endif %} -

Offline

- {% if settings.friends.offline %} - {% for key,friend in settings.friends.offline %} - {{ friend.user.username }}{% if key + 1 != settings.friends.offline|length %},{% endif %} - {% endfor %} - {% else %} -

No friends are offline.

- {% endif %} -
-
-
-
-{% include 'global/footer.tpl' %} +
+

Common Tasks

+

Profile

+ +

Messaging

+ +

Account

+ +
+

Personal Statistics

+
    +
  • You joined on {{ user.data.regdate|date(sakura.date_format) }}.
  • +
  • You have made {{ settings.forum_stats.posts }} forum post{% if settings.forum_stats.posts != 1 %}s{% endif %} and started {{ settings.forum_stats.topics }} forum thread{% if settings.forum_stats.topics != 1 %}s{% endif %}.
  • +
  • You have x warnings.
  • +
  • You have {{ settings.friends|length - (settings.friends.online ? 1 : 0) - (settings.friends.offline ? 1 : 0) }} friend{% if settings.friends|length - (settings.friends.online ? 1 : 0) - (settings.friends.offline ? 1 : 0) != 1 %}s{% endif %}.
  • +
+
+

Friends

+

Online

+{% if settings.friends.online %} + {% for key,friend in settings.friends.online %} + {{ friend.user.username }}{% if key + 1 != settings.friends.online|length %},{% endif %} + {% endfor %} +{% else %} +

No friends are online.

+{% endif %} +

Offline

+{% if settings.friends.offline %} + {% for key,friend in settings.friends.offline %} + {{ friend.user.username }}{% if key + 1 != settings.friends.offline|length %},{% endif %} + {% endfor %} +{% else %} +

No friends are offline.

+{% endif %} +
diff --git a/_sakura/templates/yuuno/settings/notfound.tpl b/_sakura/templates/yuuno/settings/notfound.tpl index bcb5af8..cfb0ada 100644 --- a/_sakura/templates/yuuno/settings/notfound.tpl +++ b/_sakura/templates/yuuno/settings/notfound.tpl @@ -1,17 +1 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- This is an error. -
-

Could not find what you were looking for.

-
-
-
-{% include 'global/footer.tpl' %} +

Could not find what you were looking for.

diff --git a/_sakura/templates/yuuno/settings/notifications.tpl b/_sakura/templates/yuuno/settings/notifications.tpl index e2b0c22..8b002c4 100644 --- a/_sakura/templates/yuuno/settings/notifications.tpl +++ b/_sakura/templates/yuuno/settings/notifications.tpl @@ -1,59 +1,43 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} +
+ {% for notif in notifs[page.currentPage] %} + +
+ {% if 'FONT:' in notif.notif_img %} +
+ {% else %} + Notification + {% endif %}
-
-
- {{ page.title }} -
-
- This is the history of notifications that have been sent to you. -
-
- {% if notifs|length > 1 %} -
- -
+
+
+
+ {{ notif.notif_title }}
+
+ {{ notif.notif_text }} +
+
+
+ {{ notif.timestamp|date(sakura.date_format) }} +
+
+
+ + {% endfor %} +
+{% if notifs|length > 1 %} +
+
-{% include 'global/footer.tpl' %} +{% endif %} diff --git a/_sakura/templates/yuuno/settings/password.tpl b/_sakura/templates/yuuno/settings/password.tpl index 70b57e7..e69de29 100644 --- a/_sakura/templates/yuuno/settings/password.tpl +++ b/_sakura/templates/yuuno/settings/password.tpl @@ -1,17 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- Used to authenticate with the site and certain related services. -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/profile.tpl b/_sakura/templates/yuuno/settings/profile.tpl index f0b9aea..31ebcc7 100644 --- a/_sakura/templates/yuuno/settings/profile.tpl +++ b/_sakura/templates/yuuno/settings/profile.tpl @@ -1,43 +1,27 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} +
+ + + + {% for field in profile.fields %} +
+
+

{{ field.name }}

-
- These are the external account links etc. on your profile, shouldn't need any additional explanation for this one. +
+
- - - - - {% for field in profile.fields %} -
-
-

{{ field.name }}

-
-
- -
- {% if field.addit %} - {% for id,addit in field.addit %} -
- - -
- {% endfor %} - {% endif %} + {% if field.addit %} + {% for id,addit in field.addit %} +
+ +
{% endfor %} -
- - -
- + {% endif %}
-
+ {% endfor %} +
+ +
-{% include 'global/footer.tpl' %} + diff --git a/_sakura/templates/yuuno/settings/ranks.tpl b/_sakura/templates/yuuno/settings/ranks.tpl index 636742a..e69de29 100644 --- a/_sakura/templates/yuuno/settings/ranks.tpl +++ b/_sakura/templates/yuuno/settings/ranks.tpl @@ -1,17 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- Manage what ranks you're in and what is set as your main rank. Your main rank is highlighted. You get the permissions of all of the ranks you're in combined. -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/regkeys.tpl b/_sakura/templates/yuuno/settings/regkeys.tpl index 8cb7959..e69de29 100644 --- a/_sakura/templates/yuuno/settings/regkeys.tpl +++ b/_sakura/templates/yuuno/settings/regkeys.tpl @@ -1,17 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- Sometimes we activate the registration key system which means that users can only register using your "referer" keys, this means we can keep unwanted people from registering. Each user can generate 5 of these keys, bans and deactivates render these keys useless. -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/sessions.tpl b/_sakura/templates/yuuno/settings/sessions.tpl index 278f163..e69de29 100644 --- a/_sakura/templates/yuuno/settings/sessions.tpl +++ b/_sakura/templates/yuuno/settings/sessions.tpl @@ -1,19 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- Session keys are a way of identifying yourself with the system without keeping your password in memory. - If someone finds one of your session keys they could possibly compromise your account, if you see any sessions here that shouldn't be here hit the Kill button to kill the selected session. - If you get logged out after clicking one you've most likely killed your current session, to make it easier to avoid this from happening your current session is highlighted. -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/username.tpl b/_sakura/templates/yuuno/settings/username.tpl index 6d90489..e69de29 100644 --- a/_sakura/templates/yuuno/settings/username.tpl +++ b/_sakura/templates/yuuno/settings/username.tpl @@ -1,18 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
-
Probably the biggest part of your identity on a site.
-
You can only change this once every 30 days so choose wisely.
-
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/_sakura/templates/yuuno/settings/userpage.tpl b/_sakura/templates/yuuno/settings/userpage.tpl index a84d881..58815d3 100644 --- a/_sakura/templates/yuuno/settings/userpage.tpl +++ b/_sakura/templates/yuuno/settings/userpage.tpl @@ -1,43 +1,26 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
-
The custom text that is displayed on your profile.
- -
- {# - {% if preview %} -
- {{ preview|raw }} -
-
- {% endif %} -
- - - -
-
-

Parse mode

- - - -
-
- - - -
-
- #} -

Redoing this bc garbage.

-
-
+{# +{% if preview %} +
+ {{ preview|raw }}
-{% include 'global/footer.tpl' %} +
+{% endif %} +
+ + + +
+
+

Parse mode

+ + + +
+
+ + + +
+
+#} +

Redoing this bc garbage.

diff --git a/_sakura/templates/yuuno/settings/usertitle.tpl b/_sakura/templates/yuuno/settings/usertitle.tpl index e0715e0..e69de29 100644 --- a/_sakura/templates/yuuno/settings/usertitle.tpl +++ b/_sakura/templates/yuuno/settings/usertitle.tpl @@ -1,17 +0,0 @@ -{% include 'global/header.tpl' %} -
-
- {% include 'elements/settingsNav.tpl' %} -
-
-
- {{ page.title }} -
-
- That little piece of text displayed under your username on your profile. -
- -
-
-
-{% include 'global/footer.tpl' %} diff --git a/main/settings.php b/main/settings.php index 5befd32..85d7250 100644 --- a/main/settings.php +++ b/main/settings.php @@ -567,33 +567,35 @@ if(Users::checkLogin()) { // Settings page list $pages = [ - 'home' => ['General', 'Home'], - 'profile' => ['General', 'Edit Profile'], - 'groups' => ['General', 'Groups'], - 'friendlisting' => ['Friends', 'List'], - 'friendrequests' => ['Friends', 'Requests'], - 'notifications' => ['Notifications', 'History'], - 'avatar' => ['Aesthetics', 'Avatar'], - 'background' => ['Aesthetics', 'Background'], - 'userpage' => ['Aesthetics', 'Userpage'], - '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', ['Welcome to the Settings Panel. From here you can monitor, view and update your profile and preferences.']], + 'profile' => ['General', 'Edit Profile', ['These are the external account links etc. on your profile, shouldn\'t need any additional explanation for this one.']], + 'groups' => ['General', 'Groups', []], + 'friendlisting' => ['Friends', 'List', ['Manage your friends.']], + 'friendrequests' => ['Friends', 'Requests', ['Handle friend requests.']], + 'notifications' => ['Notifications', 'History', ['This is the history of notifications that have been sent to you.']], + 'avatar' => ['Aesthetics', 'Avatar', ['Your avatar which is displayed all over the site and on your profile.', 'Maximum image size is {{ avatar.max_width }}x{{ avatar.max_height }}, minimum image size is {{ avatar.min_width }}x{{ avatar.min_height }}, maximum file size is {{ avatar.max_size_view }}.']], + 'background' => ['Aesthetics', 'Background', ['The background that is displayed on your profile.', 'Maximum image size is {{ background.max_width }}x{{ background.max_height }}, minimum image size is {{ background.min_width }}x{{ background.min_height }}, maximum file size is {{ background.max_size_view }}.']], + 'userpage' => ['Aesthetics', 'Userpage', ['The custom text that is displayed on your profile.', 'Click here if you don\'t know how to markdown!']], + 'email' => ['Account', 'E-mail Address', ['You e-mail address is used for password recovery and stuff like that, we won\'t spam you ;).']], + 'username' => ['Account', 'Username', ['Probably the biggest part of your identity on a site.', 'You can only change this once every 30 days so choose wisely.']], + 'usertitle' => ['Account', 'User Title', ['That little piece of text displayed under your username on your profile.']], + 'password' => ['Account', 'Password', ['Used to authenticate with the site and certain related services.']], + 'ranks' => ['Account', 'Ranks', ['Manage what ranks you\'re in and what is set as your main rank. Your main rank is highlighted. You get the permissions of all of the ranks you\'re in combined.']], + 'sessions' => ['Danger zone', 'Sessions', ['Session keys are a way of identifying yourself with the system without keeping your password in memory.', 'If someone finds one of your session keys they could possibly compromise your account, if you see any sessions here that shouldn\'t be here hit the Kill button to kill the selected session.', 'If you get logged out after clicking one you\'ve most likely killed your current session, to make it easier to avoid this from happening your current session is highlighted.']], + 'regkeys' => ['Danger zone', 'Registration Keys', ['Sometimes we activate the registration key system which means that users can only register using your "referer" keys, this means we can keep unwanted people from registering.', 'Each user can generate 5 of these keys, bans and deactivates render these keys useless.']], + 'deactivate' => ['Danger zone', 'Deactivate Account', ['You can deactivate your account here if you want to leave :(.']], + 'notfound' => ['Settings', '404', ['This is an error.']] ]; // Current settings page $currentPage = isset($_GET['mode']) ? (array_key_exists($_GET['mode'], $pages) ? $_GET['mode'] : 'notfound') : 'home'; // Render data + $renderData['current'] = $currentPage; $renderData['page'] = [ 'title' => $pages[$currentPage][0] .' / '. $pages[$currentPage][1], - 'currentPage' => isset($_GET['page']) && ($_GET['page'] - 1) >= 0 ? $_GET['page'] - 1 : 0 + 'currentPage' => isset($_GET['page']) && ($_GET['page'] - 1) >= 0 ? $_GET['page'] - 1 : 0, + 'description' => $pages[$currentPage][2] ]; // Section specific @@ -651,7 +653,7 @@ if(Users::checkLogin()) { } // Print page contents - print Templates::render('settings/'. $currentPage .'.tpl', $renderData); + print Templates::render('main/settings.tpl', $renderData); } else {