This commit is contained in:
flash 2015-08-10 22:04:22 +02:00
parent b1391f3d4d
commit 50805c253f
22 changed files with 273 additions and 546 deletions

View file

@ -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"
}
]

View file

@ -15,7 +15,7 @@
<div class="content profile">
<div class="{% if profile.userPage|length > 1 %}content-right {% endif %}content-column">
<div style="text-align: center;">
<img src="/a/{{ profile.user.id }}" alt="{{ profile.user.username }}'s Avatar" class="default-avatar-setting" style="box-shadow: 0 3px 7px #{% if profile.online %}484{% else %}844{% endif %};" /><br />
<img src="/a/{{ profile.user.id }}" alt="{{ profile.user.username }}'s Avatar" class="default-avatar-setting" style="box-shadow: 0 3px 7px #{% if profile.is_online %}484{% else %}844{% endif %};" /><br />
{% if profile.user.rank_main > 1 and profile.ban_check|length < 1 %}
<span style="font-size: .8em;">{{ profile.ranktitle }}</span>
<h1 style="color: {{ profile.colour }}; text-shadow: 0 0 7px #888; padding: 0 0 2px;">{{ profile.user.username }}</h1>

View file

@ -0,0 +1,19 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
{% for descline in page.description %}
<div>{{ include(template_from_string(descline)) }}</div>
{% endfor %}
</div>
{% include 'settings/' ~ current ~ '.tpl' %}
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,34 +1,17 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="avatar" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ avatar.max_size }}" />
<div style="text-align: center;">
<div>
<img src="/a/{{ user.data.id }}" alt="Your Avatar" class="default-avatar-setting" />
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>Your avatar which is displayed all over the site and on your profile.</div>
<div>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 }}.</div>
</div>
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="avatar" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ avatar.max_size }}" />
<div style="text-align: center;">
<div>
<img src="/a/{{ user.data.id }}" alt="Your Avatar" class="default-avatar-setting" />
</div>
<div>
<input type="file" name="avatar" />
</div>
<div>
<input type="submit" value="Submit" name="submit" class="inputStyling" />
</div>
</div>
</form>
<div>
<input type="file" name="avatar" />
</div>
<div>
<input type="submit" value="Submit" name="submit" class="inputStyling" />
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
</form>

View file

@ -1,34 +1,17 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="background" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}" />
<div style="text-align: center;">
<div>
<img src="/bg/{{ user.data.id }}" alt="Your Background" class="default-avatar-setting" style="max-width: 90%; max-height: 90%;" />
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>The background that is displayed on your profile.</div>
<div>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 }}.</div>
</div>
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="background" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}" />
<div style="text-align: center;">
<div>
<img src="/bg/{{ user.data.id }}" alt="Your Background" class="default-avatar-setting" style="max-width: 90%; max-height: 90%;" />
</div>
<div>
<input type="file" name="background" />
</div>
<div>
<input type="submit" value="Submit" name="submit" class="inputStyling" />
</div>
</div>
</form>
<div>
<input type="file" name="background" />
</div>
<div>
<input type="submit" value="Submit" name="submit" class="inputStyling" />
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
</form>

View file

@ -1,17 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
You can deactivate your account here if you want to leave :(.
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,17 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
You e-mail address is used for password recovery and stuff like that, we won't spam you ;).
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,51 +1,35 @@
{% include 'global/header.tpl' %}
<div class="content settings">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>Manage your friends.</div>
</div>
{% if friends|length %}
<div class="friends-list">
{% for friend in friends[page.currentPage] %}
<div class="friend-container" id="friend-{{ friend.user.id }}">
<a class="friends-list-data clean" href="/u/{{ friend.user.id }}">
<img src="/a/{{ friend.user.id }}" alt="{{ friend.user.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;" />
<div class="friends-list-name" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %};">{{ friend.user.username }}</div>
</a>
<div class="friends-list-actions">
<a class="remove fill fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.user.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}&amp;redirect=/settings/friends&amp;direct=true"></a>
<div class="clear"></div>
</div>
</div>
{% endfor %}
{% if friends|length %}
<div class="friends-list">
{% for friend in friends[page.currentPage] %}
<div class="friend-container" id="friend-{{ friend.user.id }}">
<a class="friends-list-data clean" href="/u/{{ friend.user.id }}">
<img src="/a/{{ friend.user.id }}" alt="{{ friend.user.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;" />
<div class="friends-list-name" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %};">{{ friend.user.username }}</div>
</a>
<div class="friends-list-actions">
<a class="remove fill fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.user.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}&amp;redirect=/settings/friends&amp;direct=true"></a>
<div class="clear"></div>
</div>
{% if friends|length > 1 %}
<div>
<div class="pagination" style="float: right;">
{% if page.currentPage > 0 %}
<a href="/settings/friends/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
{% endif %}
{% for id,npage in friends %}
<a href="/settings/friends/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
{% endfor %}
{% if page.currentPage + 1 < friends|length %}
<a href="/settings/friends/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
{% endif %}
</div>
<div class="clear"></div>
</div>
{% endif %}
{% else %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any friends yet!</h1>
{% endif %}
</div>
</div>
{% endfor %}
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
{% if friends|length > 1 %}
<div>
<div class="pagination" style="float: right;">
{% if page.currentPage > 0 %}
<a href="/settings/friends/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
{% endif %}
{% for id,npage in friends %}
<a href="/settings/friends/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
{% endfor %}
{% if page.currentPage + 1 < friends|length %}
<a href="/settings/friends/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
{% endif %}
</div>
<div class="clear"></div>
</div>
{% endif %}
{% else %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any friends yet!</h1>
{% endif %}

View file

@ -1,52 +1,36 @@
{% include 'global/header.tpl' %}
<div class="content settings">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>Handle friend requests.</div>
</div>
{% if friends|length %}
<div class="friends-list">
{% for friend in friends[page.currentPage] %}
<div class="friend-container" id="friend-{{ friend.user.id }}">
<a class="friends-list-data clean" href="/u/{{ friend.user.id }}">
<img src="/a/{{ friend.user.id }}" alt="{{ friend.user.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;" />
<div class="friends-list-name" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %};">{{ friend.user.username }}</div>
</a>
<div class="friends-list-actions">
<a class="add fa fa-check" title="Add friend" href="/friends?add={{ friend.user.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}&amp;redirect=/settings/friendrequests&amp;direct=true"></a>
<a class="remove fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.user.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}&amp;redirect=/settings/friendrequests&amp;direct=true"></a>
<div class="clear"></div>
</div>
</div>
{% endfor %}
{% if friends|length %}
<div class="friends-list">
{% for friend in friends[page.currentPage] %}
<div class="friend-container" id="friend-{{ friend.user.id }}">
<a class="friends-list-data clean" href="/u/{{ friend.user.id }}">
<img src="/a/{{ friend.user.id }}" alt="{{ friend.user.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;" />
<div class="friends-list-name" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %};">{{ friend.user.username }}</div>
</a>
<div class="friends-list-actions">
<a class="add fa fa-check" title="Add friend" href="/friends?add={{ friend.user.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}&amp;redirect=/settings/friendrequests&amp;direct=true"></a>
<a class="remove fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.user.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}&amp;redirect=/settings/friendrequests&amp;direct=true"></a>
<div class="clear"></div>
</div>
{% if friends|length > 1 %}
<div>
<div class="pagination" style="float: right;">
{% if page.currentPage > 0 %}
<a href="/settings/friends/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
{% endif %}
{% for id,npage in friends %}
<a href="/settings/friends/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
{% endfor %}
{% if page.currentPage + 1 < friends|length %}
<a href="/settings/friends/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
{% endif %}
</div>
<div class="clear"></div>
</div>
{% endif %}
{% else %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any pending requests!</h1>
{% endif %}
</div>
</div>
{% endfor %}
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
{% if friends|length > 1 %}
<div>
<div class="pagination" style="float: right;">
{% if page.currentPage > 0 %}
<a href="/settings/friends/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
{% endif %}
{% for id,npage in friends %}
<a href="/settings/friends/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
{% endfor %}
{% if page.currentPage + 1 < friends|length %}
<a href="/settings/friends/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
{% endif %}
</div>
<div class="clear"></div>
</div>
{% endif %}
{% else %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any pending requests!</h1>
{% endif %}

View file

@ -1,18 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>The background that is displayed on your profile.</div>
<div>Maximum image size is 2560x1440, minimum image size is 20x20, maximum file size is 10 MB.</div>
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,62 +1,46 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
Welcome to the Settings Panel. From here you can monitor, view and update your profile and preferences.
</div>
<div style="margin: 5px;">
<h1 class="stylised">Common Tasks</h1>
<h2>Profile</h2>
<ul>
<li><a href="/settings/avatar" class="default">Change Avatar</a></li>
<li><a href="/settings/userpage" class="default">Change Userpage</a></li>
<li><a href="/settings/signature" class="default">Change Signature</a></li>
<li><a href="/settings/profile" class="default">Change Profile Details</a></li>
</ul>
<h2>Messaging</h2>
<ul>
<li><a href="/messages/index" class="default">View Inbox</a></li>
<li><a href="/messages/compose" class="default">Send PM</a></li>
</ul>
<h2>Account</h2>
<ul>
<li><a href="/settings/sessions" class="default">Manage Active Sessions</a></li>
<li><a href="/settings/password" class="default">Change Password</a></li>
</ul>
<br />
<h1 class="stylised">Personal Statistics</h1>
<ul>
<li>You joined on <b>{{ user.data.regdate|date(sakura.date_format) }}</b>.</li>
<li>You have made <b>{{ settings.forum_stats.posts }} forum post{% if settings.forum_stats.posts != 1 %}s{% endif %}</b> and started <b>{{ settings.forum_stats.topics }} forum thread{% if settings.forum_stats.topics != 1 %}s{% endif %}</b>.</li>
<li>You have <b>x</b> warnings.</li>
<li>You have <b>{{ 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 %}</b>.</li>
</ul>
<br />
<h1 class="stylised"><a class="clean" href="/settings/friendlisting">Friends</a></h1>
<h2 style="color: #080;">Online</h2>
{% if settings.friends.online %}
{% for key,friend in settings.friends.online %}
<a href="/u/{{ friend.user.username }}" class="default" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %}">{{ friend.user.username }}</a>{% if key + 1 != settings.friends.online|length %},{% endif %}
{% endfor %}
{% else %}
<h4>No friends are online.</h4>
{% endif %}
<h2 style="color: #800;">Offline</h2>
{% if settings.friends.offline %}
{% for key,friend in settings.friends.offline %}
<a href="/u/{{ friend.user.username }}" class="default" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %}">{{ friend.user.username }}</a>{% if key + 1 != settings.friends.offline|length %},{% endif %}
{% endfor %}
{% else %}
<h4>No friends are offline.</h4>
{% endif %}
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
<div style="margin: 5px;">
<h1 class="stylised">Common Tasks</h1>
<h2>Profile</h2>
<ul>
<li><a href="/settings/avatar" class="default">Change Avatar</a></li>
<li><a href="/settings/userpage" class="default">Change Userpage</a></li>
<li><a href="/settings/signature" class="default">Change Signature</a></li>
<li><a href="/settings/profile" class="default">Change Profile Details</a></li>
</ul>
<h2>Messaging</h2>
<ul>
<li><a href="/messages/index" class="default">View Inbox</a></li>
<li><a href="/messages/compose" class="default">Send PM</a></li>
</ul>
<h2>Account</h2>
<ul>
<li><a href="/settings/sessions" class="default">Manage Active Sessions</a></li>
<li><a href="/settings/password" class="default">Change Password</a></li>
</ul>
<br />
<h1 class="stylised">Personal Statistics</h1>
<ul>
<li>You joined on <b>{{ user.data.regdate|date(sakura.date_format) }}</b>.</li>
<li>You have made <b>{{ settings.forum_stats.posts }} forum post{% if settings.forum_stats.posts != 1 %}s{% endif %}</b> and started <b>{{ settings.forum_stats.topics }} forum thread{% if settings.forum_stats.topics != 1 %}s{% endif %}</b>.</li>
<li>You have <b>x</b> warnings.</li>
<li>You have <b>{{ 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 %}</b>.</li>
</ul>
<br />
<h1 class="stylised"><a class="clean" href="/settings/friendlisting">Friends</a></h1>
<h2 style="color: #080;">Online</h2>
{% if settings.friends.online %}
{% for key,friend in settings.friends.online %}
<a href="/u/{{ friend.user.username }}" class="default" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %}">{{ friend.user.username }}</a>{% if key + 1 != settings.friends.online|length %},{% endif %}
{% endfor %}
{% else %}
<h4>No friends are online.</h4>
{% endif %}
<h2 style="color: #800;">Offline</h2>
{% if settings.friends.offline %}
{% for key,friend in settings.friends.offline %}
<a href="/u/{{ friend.user.username }}" class="default" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %}">{{ friend.user.username }}</a>{% if key + 1 != settings.friends.offline|length %},{% endif %}
{% endfor %}
{% else %}
<h4>No friends are offline.</h4>
{% endif %}
</div>

View file

@ -1,17 +1 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
This is an error.
</div>
<h1 class="stylised" style="margin: 2em auto; text-align: center;">Could not find what you were looking for.</h1>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">Could not find what you were looking for.</h1>

View file

@ -1,59 +1,43 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
<div class="notification-history">
{% for notif in notifs[page.currentPage] %}
<a id="notif-hist-{{ notif.id }}" class="clean {% if notif.notif_read %}read{% endif %}"{% if notif.notif_link %} href="{{ notif.notif_link }}"{% endif %}>
<div class="notif-hist-icon">
{% if 'FONT:' in notif.notif_img %}
<div class="font-icon fa {{ notif.notif_img|replace({'FONT:': ''}) }} fa-4x"></div>
{% else %}
<img src="{{ notif.notif_img }}" alt="Notification" />
{% endif %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
This is the history of notifications that have been sent to you.
</div>
<div class="notification-history">
{% for notif in notifs[page.currentPage] %}
<a id="notif-hist-{{ notif.id }}" class="clean {% if notif.notif_read %}read{% endif %}"{% if notif.notif_link %} href="{{ notif.notif_link }}"{% endif %}>
<div class="notif-hist-icon">
{% if 'FONT:' in notif.notif_img %}
<div class="font-icon fa {{ notif.notif_img|replace({'FONT:': ''}) }} fa-4x"></div>
{% else %}
<img src="{{ notif.notif_img }}" alt="Notification" />
{% endif %}
</div>
<div class="notif-hist-content">
<div class="notif-hist-inside">
<div class="notif-hist-title">
{{ notif.notif_title }}
</div>
<div class="notif-hist-text">
{{ notif.notif_text }}
</div>
</div>
<div class="notif-hist-time">
{{ notif.timestamp|date(sakura.date_format) }}
</div>
</div>
<div class="clear"></div>
</a>
{% endfor %}
</div>
{% if notifs|length > 1 %}
<div>
<div class="pagination" style="float: right;">
{% if page.currentPage > 0 %}
<a href="/settings/notifications/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
{% endif %}
{% for id,npage in notifs %}
<a href="/settings/notifications/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
{% endfor %}
{% if page.currentPage + 1 < notifs|length %}
<a href="/settings/notifications/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
{% endif %}
</div>
<div class="clear"></div>
<div class="notif-hist-content">
<div class="notif-hist-inside">
<div class="notif-hist-title">
{{ notif.notif_title }}
</div>
<div class="notif-hist-text">
{{ notif.notif_text }}
</div>
</div>
<div class="notif-hist-time">
{{ notif.timestamp|date(sakura.date_format) }}
</div>
</div>
<div class="clear"></div>
</a>
{% endfor %}
</div>
{% if notifs|length > 1 %}
<div>
<div class="pagination" style="float: right;">
{% if page.currentPage > 0 %}
<a href="/settings/notifications/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
{% endif %}
{% for id,npage in notifs %}
<a href="/settings/notifications/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
{% endfor %}
{% if page.currentPage + 1 < notifs|length %}
<a href="/settings/notifications/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
{% endif %}
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}
{% endif %}

View file

@ -1,17 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
Used to authenticate with the site and certain related services.
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,43 +1,27 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentpage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="profile" />
{% for field in profile.fields %}
<div class="profile-field">
<div>
<h2>{{ field.name }}</h2>
</div>
<div class="settings-explanation">
These are the external account links etc. on your profile, shouldn't need any additional explanation for this one.
<div>
<input type="{{ field.formtype }}" name="profile_{{ field.ident }}" class="inputStyling" placeholder="{{ field.description }}"{% if profile.user[field.ident].value %} value="{{ profile.user[field.ident].value }}"{% endif %} />
</div>
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentpage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="profile" />
{% for field in profile.fields %}
<div class="profile-field">
<div>
<h2>{{ field.name }}</h2>
</div>
<div>
<input type="{{ field.formtype }}" name="profile_{{ field.ident }}" class="inputStyling" placeholder="{{ field.description }}"{% if profile.user[field.ident].value %} value="{{ profile.user[field.ident].value }}"{% endif %} />
</div>
{% if field.addit %}
{% for id,addit in field.addit %}
<div>
<input type="{{ addit[0] }}" id="{{ id }}" name="profile_additional_{{ id }}" />
<label for="{{ id }}" style="font-size: 10px;">{{ addit[1]|raw }}</label>
</div>
{% endfor %}
{% endif %}
{% if field.addit %}
{% for id,addit in field.addit %}
<div>
<input type="{{ addit[0] }}" id="{{ id }}" name="profile_additional_{{ id }}" />
<label for="{{ id }}" style="font-size: 10px;">{{ addit[1]|raw }}</label>
</div>
{% endfor %}
<div class="profile-save">
<input type="submit" value="Save" name="submit" class="inputStyling" />
<input type="reset" value="Reset" name="reset" class="inputStyling" />
</div>
</form>
{% endif %}
</div>
<div class="clear"></div>
{% endfor %}
<div class="profile-save">
<input type="submit" value="Save" name="submit" class="inputStyling" />
<input type="reset" value="Reset" name="reset" class="inputStyling" />
</div>
{% include 'global/footer.tpl' %}
</form>

View file

@ -1,17 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
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.
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,17 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
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.
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,19 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
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.
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,18 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>Probably the biggest part of your identity on a site.</div>
<div style="font-weight: bold;">You can only change this once every 30 days so choose wisely.</div>
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -1,43 +1,26 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
<div>The custom text that is displayed on your profile.</div>
<div><a href="/r/markdown" class="default">Click here if you don't know how to markdown!</a></div>
</div>
{#
{% if preview %}
<div class="markdown" style="max-height: 600px;overflow-y:auto;">
{{ preview|raw }}
</div>
<hr class="default" />
{% endif %}
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentpage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="userpage" />
<div><textarea name="userpage" placeholder="# Welcome to my profile page!" class="inputStyling" style="width: calc(100% - 12px); height: 500px;" />{{ userPage.content }}</textarea></div>
<div>
<h2>Parse mode</h2>
<input type="radio" name="parse" value="bbcode" id="bbcode"{% if userPage.parse == 1 %} checked="checked"{% endif %} /> <label for="bbcode">BBCodes</label>
<input type="radio" name="parse" value="markdown" id="markdown"{% if userPage.parse == 2 %} checked="checked"{% endif %} /> <label for="markdown">Markdown</label>
<input type="radio" name="parse" value="plain" id="plain"{% if userPage.parse == 0 %} checked="checked"{% endif %} /> <label for="plain">Plain Text</label>
</div>
<div class="profile-save">
<input type="submit" value="Save" name="submit" class="inputStyling" />
<input type="submit" value="Preview" name="preview" class="inputStyling" />
<input type="reset" value="Reset" name="reset" class="inputStyling" />
</div>
</form>
#}
<h1 class="stylised">Redoing this bc garbage.</h1>
</div>
<div class="clear"></div>
{#
{% if preview %}
<div class="markdown" style="max-height: 600px;overflow-y:auto;">
{{ preview|raw }}
</div>
{% include 'global/footer.tpl' %}
<hr class="default" />
{% endif %}
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentpage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="mode" value="userpage" />
<div><textarea name="userpage" placeholder="# Welcome to my profile page!" class="inputStyling" style="width: calc(100% - 12px); height: 500px;" />{{ userPage.content }}</textarea></div>
<div>
<h2>Parse mode</h2>
<input type="radio" name="parse" value="bbcode" id="bbcode"{% if userPage.parse == 1 %} checked="checked"{% endif %} /> <label for="bbcode">BBCodes</label>
<input type="radio" name="parse" value="markdown" id="markdown"{% if userPage.parse == 2 %} checked="checked"{% endif %} /> <label for="markdown">Markdown</label>
<input type="radio" name="parse" value="plain" id="plain"{% if userPage.parse == 0 %} checked="checked"{% endif %} /> <label for="plain">Plain Text</label>
</div>
<div class="profile-save">
<input type="submit" value="Save" name="submit" class="inputStyling" />
<input type="submit" value="Preview" name="preview" class="inputStyling" />
<input type="reset" value="Reset" name="reset" class="inputStyling" />
</div>
</form>
#}
<h1 class="stylised">Redoing this bc garbage.</h1>

View file

@ -1,17 +0,0 @@
{% include 'global/header.tpl' %}
<div class="content settings messages">
<div class="content-right content-column">
{% include 'elements/settingsNav.tpl' %}
</div>
<div class="content-left content-column">
<div class="head">
{{ page.title }}
</div>
<div class="settings-explanation">
That little piece of text displayed under your username on your profile.
</div>
</div>
<div class="clear"></div>
</div>
{% include 'global/footer.tpl' %}

View file

@ -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.', '<a href="/r/markdown" class="default">Click here if you don\'t know how to markdown!</a>']],
'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.', '<b>You can only change this once every 30 days so choose wisely.</b>']],
'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 {