2016-01-04 20:14:09 +00:00
{% extends 'global/master.twig' %}
2015-10-06 21:05:39 +00:00
2015-12-31 14:51:01 +00:00
{% set profileHidden = profile .permission ( constant ( 'Sakura\\Perms\\Site::DEACTIVATED' ) ) or ( profile .permission ( constant ( 'Sakura\\Perms\\Site::RESTRICTED' ) ) and ( user .id != profile .id and not user .permission ( constant ( 'Sakura\\Perms\\Manage::USE_MANAGE' ) , constant ( 'Sakura\\Perms::MANAGE' ) ) ) ) %}
2015-10-06 21:05:39 +00:00
2015-10-10 15:51:24 +00:00
{% set noUserpage = profile .userPage | length < 1 %}
{% set profileView = noUserpage and profileView == 'index' ? 'comments' : profileView %}
2015-10-06 21:05:39 +00:00
2015-11-07 22:58:02 +00:00
{% block title %} {% if profileHidden %} User not found! {% else %} Profile of {{ profile .username }} {% endif %} {% endblock %}
2015-10-06 21:05:39 +00:00
{% block content %}
{% if profileHidden %}
2015-12-31 14:51:01 +00:00
<div class="content standalone">
<div style="padding: 20px;">
<h1>The requested user does not exist!</h1>
There are a few possible reasons for this:
<ul style="padding-left: 40px;">
<li>They changed their username.</li>
<li>They may have been <a href=" {{ urls .format ( 'SITE_FAQ' ) }} #abyss" class="default">abyss'd</a>.</li>
<li>You made a typo.</li>
<li>They never existed.</li>
</ul>
</div>
2015-10-11 23:37:54 +00:00
</div>
2015-10-06 21:05:39 +00:00
{% else %}
<div class="content profile">
2015-10-10 15:51:24 +00:00
<div class="content-right content-column">
2016-01-17 01:58:31 +00:00
<div style="text-align: center; {% if profile .header %} background: url( {{ urls .format ( 'IMAGE_HEADER' , [ profile .id ] ) }} ) no-repeat center top; background-size: 336px; {% endif %} ">
2016-01-17 02:04:33 +00:00
<img src=" {{ urls .format ( 'IMAGE_AVATAR' , [ profile .id ] ) }} " alt=" {{ profile .username }} 's Avatar" class="default-avatar-setting" style="box-shadow: 0 3px 7px # {% if profile .isOnline %} 484 {% else %} 844 {% endif %} ;" /><br />
2016-01-17 01:58:31 +00:00
{% if profile .mainRankId > 1 and profile .checkBan | length < 1 %}
2016-01-17 12:07:24 +00:00
<span style="font-size: .8em;"> {{ profile .title }} </span>
2016-01-20 23:06:21 +00:00
<h1 style="color: {{ profile .colour }} ; text-shadow: 0 0 7px {% if profile .colour != 'inherit' %} {{ profile .colour }} {% else %} #222 {% endif %} ; padding: 0 0 2px;" {% if profile .getUsernameHistory %} title="Known as {{ profile .getUsernameHistory [ 0 ] [ 'username_old' ] }} before {{ profile .getUsernameHistory [ 0 ] [ 'change_time' ] | date ( sakura .dateFormat ) }} ." {% endif %} > {{ profile .username }} </h1>
2016-01-17 12:07:24 +00:00
{% if profile .isPremium [ 0 ] %} <img src=" {{ sakura .contentPath }} /images/tenshi.png" alt="Tenshi" style="vertical-align: middle;" /> {% endif %} <img src=" {{ sakura .contentPath }} /images/flags/ {{ profile .country | lower }} .png" alt=" {{ profile .country .short }} " style="vertical-align: middle;" /> <span style="font-size: .8em; line-height: 11px;"> {{ profile .country .long }} </span>
{% if session .checkLogin %}
<div class="user-actions">
{% if user .id == profile .id %}
<a class="fa fa-pencil-square-o" title="Edit your profile" href=" {{ urls .format ( 'SETTING_MODE' , [ 'general' , 'profile' ] ) }} "></a>
{% else %}
{% if user .isFriends ( profile .id ) != 0 %} <a class="fa fa- {% if user .isFriends ( profile .id ) == 2 %} heart {% else %} star {% endif %} " title="You are friends"></a> {% endif %}
<a class="fa fa-user- {% if user .isFriends ( profile .id ) == 0 %} plus {% else %} times {% endif %} " title=" {% if user .isFriends ( profile .id ) == 0 %} Add {{ profile .username }} as a friend {% else %} Remove friend {% endif %} " href=" {% if user .isFriends ( profile .id ) == 0 %} {{ urls .format ( 'FRIEND_ADD' , [ profile .id , php .sessionid , php .time , sakura .currentPage ] ) }} {% else %} {{ urls .format ( 'FRIEND_REMOVE' , [ profile .id , php .sessionid , php .time , sakura .currentPage ] ) }} {% endif %} " id="profileFriendToggle"></a>
<a class="fa fa-exclamation-circle" title="Report {{ profile .username }} " href=" {{ urls .format ( 'USER_REPORT' , [ profile .id ] ) }} "></a>
{% endif %}
{% if user .permission ( constant ( 'Sakura\\Perms\\Manage::CAN_RESTRICT_USERS' ) , constant ( 'Sakura\\Perms::MANAGE' ) ) %}
<a class="fa fa-trash" title="Restrict {{ profile .username }} " href="?restrict= {{ php .sessionid }} "></a>
{% endif %}
<hr class="default" />
<a class="fa fa-file-text-o" title="View {{ profile .username }} 's user page" href=" {{ urls .format ( 'USER_PROFILE' , [ profile .id ] ) }} "></a>
{ #<a class="fa fa-list" title="View {{ profile .username }} 's threads" href=" {{ urls .format ( 'USER_THREADS' , [ profile .id ] ) }} "></a>
<a class="fa fa-reply" title="View {{ profile .username }} 's posts" href=" {{ urls .format ( 'USER_POSTS' , [ profile .id ] ) }} "></a>
<a class="fa fa-star" title="View {{ profile .username }} 's friends" href=" {{ urls .format ( 'USER_FRIENDS' , [ profile .id ] ) }} "></a> shh #}
{#<a class="fa fa-users" title="View {{ profile.username }}'s groups" href="{{ urls.format('USER_GROUPS', [profile.id]) }}"></a>#}
{% if not noUserpage %}
<a class="fa fa-comments-o" title="View {{ profile .username }} 's profile comments" href=" {{ urls .format ( 'USER_COMMENTS' , [ profile .id ] ) }} "></a>
{% endif %}
2015-10-06 21:05:39 +00:00
</div>
{% endif %}
<hr class="default" />
2016-01-17 01:58:31 +00:00
<b>Joined</b> <span title=" {{ profile .registered | date ( sakura .dateFormat ) }} "> {{ profile .elapsed .joined }} </span>
2015-10-06 21:05:39 +00:00
<br />
2016-01-17 01:58:31 +00:00
{% if profile .lastOnline < 1 %}
2015-11-07 22:58:02 +00:00
<b> {{ profile .username }} hasn't logged in yet.</b>
2015-10-06 21:05:39 +00:00
{% else %}
2016-01-17 01:58:31 +00:00
<b>Last online</b> <span title=" {{ profile .lastOnline | date ( sakura .dateFormat ) }} "> {{ profile .elapsed .lastOnline }} </span>
2015-10-06 21:05:39 +00:00
{% endif %}
<br />
2015-11-07 22:58:02 +00:00
<b> {{ profile .username }} has {% if not profile .forumStats .posts %} no {% else %} {{ profile .forumStats .posts }} {% endif %} forum post {% if profile .forumStats .posts != 1 %} s {% endif %} .</b>
2016-01-17 01:58:31 +00:00
{% if profile .birthday != '0000-00-00' and profile .birthday | split ( '-' ) [ 0 ] > 0 %}
<br /><b>Age</b> <span title=" {{ profile .birthday }} "> {{ profile .birthday ( true ) }} years old</span>
2015-10-06 21:05:39 +00:00
{% endif %}
2016-01-14 20:43:33 +00:00
{% if profile .profileFields or user .permission ( constant ( 'Sakura\\Perms\\Manage::USE_MANAGE' ) , constant ( 'Sakura\\Perms::MANAGE' ) ) %}
2015-10-06 21:05:39 +00:00
<hr class="default" />
{% if session .checkLogin %}
<table style="width: 100%;">
{% for name , field in profile .profileFields %}
2016-01-14 20:43:33 +00:00
<tr>
<td style="text-align: left; font-weight: bold;">
{{ field .name }}
</td>
<td style="text-align: right;">
{% if name == 'youtube' %}
<a href="https://youtube.com/ {% if field .youtubetype == true %} channel {% else %} user {% endif %} / {{ field .value }} " class="default"> {% if field .youtubetype == true %} {{ profile .username }} 's Channel {% else %} {{ field .value }} {% endif %} </a>
{% else %}
{% if field .islink %}
<a href=" {{ field .link }} " class="default">
{% endif %}
{{ field .value }}
{% if field .islink %}
</a>
{% endif %}
2015-10-06 21:05:39 +00:00
{% endif %}
2016-01-14 20:43:33 +00:00
</td>
</tr>
2015-10-06 21:05:39 +00:00
{% endfor %}
2016-01-14 20:43:33 +00:00
{% if user .permission ( constant ( 'Sakura\\Perms\\Manage::USE_MANAGE' ) , constant ( 'Sakura\\Perms::MANAGE' ) ) %}
<tr>
<td style="text-align: left; font-weight: bold;">E-mail address</td>
<td style="text-align: right;"><a href="mailto: {{ profile .email }} " class="default"> {{ profile .email }} </a></td>
</tr>
<tr>
<td style="text-align: left; font-weight: bold;">Register IP</td>
2016-01-17 01:58:31 +00:00
<td style="text-align: right;"> {{ profile .registerIp }} </td>
2016-01-14 20:43:33 +00:00
</tr>
<tr>
<td style="text-align: left; font-weight: bold;">Last IP</td>
2016-01-17 01:58:31 +00:00
<td style="text-align: right;"> {{ profile .lastIp }} </td>
2016-01-14 20:43:33 +00:00
</tr>
{% endif %}
2015-10-06 21:05:39 +00:00
</table>
{% else %}
<b>Log in to view the full profile!</b>
{% endif %}
{% endif %}
{% else %}
2015-11-07 22:58:02 +00:00
<h1 style="color: #222; text-shadow: 0 0 7px #888; padding: 0 0 2px;"> {{ profile .username }} </h1>
2015-10-06 21:05:39 +00:00
{% endif %}
<hr class="default" />
<b>Account Standing</b>
2015-12-29 21:52:19 +00:00
{% if profile .permission ( constant ( 'Sakura\\Perms\\Site::DEACTIVATED' ) ) %}
2015-10-06 21:05:39 +00:00
<h2 style="color: #888; text-shadow: 0 0 7px #888; margin-top: 0;">Deactivated</h2>
{% elseif profile .checkBan %}
<h2 style="color: #222; text-shadow: 0 0 7px #222; margin-top: 0;">Banned</h2>
2015-12-29 21:52:19 +00:00
{% elseif profile .permission ( constant ( 'Sakura\\Perms\\Site::RESTRICTED' ) ) %}
2015-10-06 21:05:39 +00:00
<h2 style="color: #800; text-shadow: 0 0 7px #800; margin-top: 0;">Restricted</h2>
2015-10-17 20:58:51 +00:00
{% elseif profile .getWarnings %}
<h2 style="color: #A00; text-shadow: 0 0 7px #A00; margin-top: 0;">Bad</h2>
2015-10-06 21:05:39 +00:00
{% else %}
2015-10-17 20:58:51 +00:00
<h2 style="color: #080; text-shadow: 0 0 7px #080; margin-top: 0;">Good</h2>
{% endif %}
{% if profile .getWarnings %}
<table class="panelTable">
<tr>
<th>Action</th>
<th>Duration</th>
<th>Reason</th>
</tr>
{% for warning in profile .getWarnings %}
<tr class=" {{ warning .warning_action_text | lower }} ">
<td> {{ warning .warning_action_text }} </td>
<td> {{ warning .warning_length }} minute {% if warning .warning_length != 1 %} s {% endif %} </td>
<td> {{ warning .warning_reason }} </td>
</tr>
{% endfor %}
</table>
2015-10-06 21:05:39 +00:00
{% endif %}
</div>
</div>
2015-10-10 15:51:24 +00:00
<div class="content-left content-column">
2016-01-04 20:14:09 +00:00
{% include 'profile/' ~ profileView ~ '.twig' %}
2015-10-06 21:05:39 +00:00
</div>
<div class="clear"></div>
</div>
{% endif %}
{% endblock %}