2015-10-11 23:37:54 +00:00
{ % extends 'global/master.tpl' % }
2015-11-07 22:58:02 +00:00
{ % set profileHidden = profile . checkPermission ( 'SITE' , 'DEACTIVATED' ) or profile . password . password_algo = = 'nologin' or ( profile . checkPermission ( 'SITE' , 'RESTRICTED' ) and ( user . id ! = profile . id and not user . checkPermission ( 'MANAGE' , 'USE_MANAGE' ) ) ) % }
2015-10-11 23:37:54 +00:00
{ % set noUserpage = profile . userPage | length < 1 % }
2015-10-16 20:50:11 +00:00
{ % set profileView = profileHidden ? 'hidden' : ( noUserpage and profileView = = 'index' ? 'comments' : profileView ) % }
2015-10-11 23:37:54 +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-11 23:37:54 +00:00
2015-10-16 20:50:11 +00:00
{ % block css % }
<style type="text/css">
2015-10-30 18:23:27 +00:00
#profileHeader {
2015-10-16 20:50:11 +00:00
background-image: linear-gradient(0deg, transparent 0%, transparent 12%, rgba(0, 0, 0, .7) 30%,
2015-11-07 22:58:02 +00:00
transparent 76%, transparent 100%), url(' { { urls . format ( 'IMAGE_HEADER' , [ profile . id ] ) } } ');
2015-10-16 20:50:11 +00:00
}
2015-10-31 18:14:54 +00:00
#profileHeader.floating {
2015-11-07 22:58:02 +00:00
background-image: linear-gradient(90deg, transparent 0%, transparent 40%, #3A2E44 45%), url(' { { urls . format ( 'IMAGE_HEADER' , [ profile . id ] ) } } ');
2015-10-31 18:14:54 +00:00
background-size: auto 130px;
background-repeat: no-repeat;
background-position: left top;
}
2015-10-16 20:50:11 +00:00
</style>
{ % endblock % }
2015-10-31 18:14:54 +00:00
{ % block js % }
2015-10-30 18:23:27 +00:00
<script type="text/javascript">
// Header
window.addEventListener("scroll", function(e) {
2015-11-04 21:26:58 +00:00
if(window.scrollY > 170) {
2015-10-30 18:23:27 +00:00
var profileHeader = document.getElementById('profileHeader');
var profileContent = document.getElementById('profileContent');
2015-10-31 18:14:54 +00:00
profileHeader.className = 'profileHeaderContent floating';
profileContent.className = 'profileContainer headerFloating';
2015-10-30 18:23:27 +00:00
} else {
var profileHeader = document.getElementById('profileHeader');
var profileContent = document.getElementById('profileContent');
2015-10-31 18:14:54 +00:00
profileHeader.className = 'profileHeaderContent';
profileContent.className = 'profileContainer';
2015-10-30 18:23:27 +00:00
}
});
</script>
2015-10-31 18:14:54 +00:00
{ % endblock % }
2015-10-30 18:23:27 +00:00
2015-10-11 23:37:54 +00:00
{ % block content % }
2015-11-07 22:58:02 +00:00
<div class="profile" id="u { { profile . id } } ">
2015-10-30 18:23:27 +00:00
<div class="profileHeaderContent" id="profileHeader">
2015-11-07 22:58:02 +00:00
<div id="userAvatar" style="background-image: url(' { { urls . format ( 'IMAGE_AVATAR' , [ profile . id ] ) } } ');"> { { profile . username } } 's Avatar</div>
2015-10-16 20:50:11 +00:00
<div class="userData">
<div class="headerLeft">
<div class="profileUsername" style="color: { { profile . colour } } ;" { % if profile . getUsernameHistory % } title="Known as { { profile . getUsernameHistory [ 0 ] [ 'username_old' ] } } before { { profile . getUsernameHistory [ 0 ] [ 'change_time' ] | date ( sakura . dateFormat ) } } ." { % endif % } >
2015-11-07 22:58:02 +00:00
{ % if profileHidden % } Unknown user { % else % } { { profile . username } } { % endif % }
2015-10-11 22:11:18 +00:00
</div>
2015-10-16 20:50:11 +00:00
<div class="profileUserTitle">
{ % if profileHidden % } The requested user does not exist! { % else % } { { profile . userTitle } } { % endif % }
2015-10-12 17:28:34 +00:00
</div>
2015-10-11 22:11:18 +00:00
</div>
2015-10-16 20:50:11 +00:00
<div class="headerRight">
{ % if not profileHidden % }
2015-11-07 22:58:02 +00:00
<div>Joined <span title=" { { profile . dates . joined | date ( sakura . dateFormat ) } } "> { { profile . elapsed . joined } } </span></div>
<div> { % if profile . dates . lastOnline < 1 % } User hasn't logged in yet. { % else % } Last Active <span title=" { { profile . dates . lastOnline | date ( sakura . dateFormat ) } } "> { { profile . elapsed . lastOnline } } </span> { % endif % } </div>
2015-10-16 20:50:11 +00:00
{ % endif % }
</div>
2015-10-11 22:11:18 +00:00
</div>
2015-10-16 20:50:11 +00:00
</div>
2015-10-30 18:23:27 +00:00
<div class="profileContainer" id="profileContent">
2015-10-16 20:50:11 +00:00
<div class="userDataBar">
2015-11-07 13:24:02 +00:00
{ % if not profileHidden % }
{ % if ( profile . checkPremium [ 0 ] or profile . checkPermission ( 'MANAGE' , 'USE_MANAGE' ) ) % }
<div class="profilePlatform hierarchyContainer">
<div class="inner">
<ul class="hierarchies">
{ % if profile . checkPremium [ 0 ] % }
<li class="tenshi">Tenshi</li>
{ % endif % }
{ % if profile . checkPermission ( 'MANAGE' , 'USE_MANAGE' ) % }
<li class="staff">Staff</li>
{ % endif % }
{ % if false % }
<li class="developer">Developer</li>
{ % endif % }
{ % if false % }
<li class="alumnii">Alumnii</li>
{ % endif % }
</ul>
</div>
2015-10-11 22:11:18 +00:00
</div>
2015-11-07 13:24:02 +00:00
{ % endif % }
{ % if session . checkLogin % }
<div class="profilePlatform userActions">
<div class="inner">
<ul class="actions">
2015-11-07 22:58:02 +00:00
{ % if user . user_id = = profile . user_id % }
2015-11-07 13:24:02 +00:00
<li class="edit"><a title="Edit your profile" href=" { { urls . format ( 'SETTING_MODE' , [ 'general' , 'profile' ] ) } } ">Edit</a></li>
<li class="settings"><a title="Change your settings" href=" { { urls . format ( 'SETTINGS_INDEX' ) } } ">Settings</a></li>
2015-10-16 20:50:11 +00:00
{ % else % }
2015-11-07 22:58:02 +00:00
<li class=" { % if user . checkFriends ( profile . id ) = = 2 % } mutualFriend { % elseif user . checkFriends ( profile . id ) = = 1 % } pendingFriend { % else % } addFriend { % endif % } "><a href=" { % if user . checkFriends ( 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 % } "> { % if user . checkFriends ( profile . id ) = = 0 % } Add friend { % else % } Friends { % endif % } </a></li>
<li class="report"><a href=" { { urls . format ( 'USER_REPORT' , [ profile . id ] ) } } ">Report</a></li>
2015-10-16 20:50:11 +00:00
{ % endif % }
2015-11-07 13:24:02 +00:00
</ul>
</div>
</div>
{ % endif % }
<div class="profilePlatform userAccounts">
<div class="inner">
{ % if session . checkLogin % }
{ % if profile . profileFields % }
{ % for name , field in profile . profileFields % }
<div class="field">
<div> { { field . name } } </div>
<div>
{ % if name = = 'youtube' % }
2015-11-07 22:58:02 +00:00
<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>
2015-11-07 13:24:02 +00:00
{ % else % }
{ % if field . islink % }
<a href=" { { field . link } } ">
{ % endif % }
{ { field . value } }
{ % if field . islink % }
</a>
{ % endif % }
{ % endif % }
</div>
<div class="clear"></div>
2015-10-11 22:11:18 +00:00
</div>
2015-11-07 13:24:02 +00:00
{ % endfor % }
{ % else % }
<div class="noAccounts">
<div class="fa fa-question"></div>
<div class="notif">This user has not set any links yet.</div>
</div>
{ % endif % }
2015-10-11 22:11:18 +00:00
{ % else % }
<div class="noAccounts">
2015-11-07 13:24:02 +00:00
<div class="fa fa-exclamation-circle"></div>
<div class="notif">Log in to view the full profile.</div>
2015-10-11 22:11:18 +00:00
</div>
{ % endif % }
2015-11-07 13:24:02 +00:00
</div>
2015-10-11 22:11:18 +00:00
</div>
2015-11-07 13:24:02 +00:00
{ % endif % }
2015-10-16 20:50:11 +00:00
<div class="profilePlatform accountStanding">
<div class="inner">
<div class="title">Account Standing</div>
{ % if profileHidden % }
<div class="standing" style="color: #444;">Unknown</div>
{ % elseif profile . checkBan % }
<h2 class="standing" style="color: #800;">Banned</h2>
{ % else % }
2015-10-11 22:11:18 +00:00
{ % if profile . getWarnings % }
2015-10-16 20:50:11 +00:00
<div class="standing" style="color: #A22;">Bad</div>
{ % else % }
<div class="standing" style="color: #2A2;">Good</div>
2015-10-11 22:11:18 +00:00
{ % endif % }
2015-10-12 17:28:34 +00:00
{ % endif % }
2015-10-16 20:50:11 +00:00
{ % if profile . getWarnings % }
<div>This user has <b> { { profile . getWarnings | length } } </b> warning { % if profile . getWarnings | length ! = 1 % } s { % endif % } !</div>
<div>After <b>10 warnings</b> a user may be permanently banned.</div>
2015-10-12 17:28:34 +00:00
{ % endif % }
2015-10-16 20:50:11 +00:00
</div>
</div>
</div>
<div class="profileMain">
{ % if not profileHidden % }
<div class="statsRow">
{ % if profileView ! = ( noUserpage ? 'comments' : 'index' ) % }
2015-10-12 17:28:34 +00:00
<div class="profilePlatform">
2015-11-07 22:58:02 +00:00
<a class="inner" title="Userpage" href=" { { urls . format ( 'USER_PROFILE' , [ profile . id ] ) } } ">
2015-10-16 20:50:11 +00:00
<div class="fa fa-user"></div>
2015-10-12 17:28:34 +00:00
</a>
2015-10-11 22:11:18 +00:00
</div>
2015-10-16 20:50:11 +00:00
{ % endif % }
{ % if profileView ! = 'friends' % }
<div class="profilePlatform">
2015-11-07 22:58:02 +00:00
<a class="inner" title="Friends" href=" { { urls . format ( 'USER_FRIENDS' , [ profile . id ] ) } } ">
2015-10-16 20:50:11 +00:00
<div class="fa fa-user-plus"></div>
<div class="count"> { { profile . getFriends | length } } </div>
</a>
2015-10-11 22:11:18 +00:00
</div>
2015-10-16 20:50:11 +00:00
{ % endif % }
{ % if profileView ! = 'groups' % }
<div class="profilePlatform">
2015-11-07 22:58:02 +00:00
<a class="inner" title="Groups" href=" { { urls . format ( 'USER_GROUPS' , [ profile . id ] ) } } ">
2015-10-16 20:50:11 +00:00
<div class="fa fa-users"></div>
<div class="count">0</div>
</a>
</div>
{ % endif % }
{ % if profileView ! = 'comments' % }
<div class="profilePlatform">
2015-11-07 22:58:02 +00:00
<a class="inner" title="Comments" href=" { { urls . format ( 'USER_COMMENTS' , [ profile . id ] ) } } ">
2015-10-16 20:50:11 +00:00
<div class="fa fa-comments"></div>
<div class="count"> { { profile . profileComments . count } } </div>
</a>
</div>
{ % endif % }
{ % if profileView ! = 'threads' % }
<div class="profilePlatform">
2015-11-07 22:58:02 +00:00
<a class="inner" title="Threads" href=" { { urls . format ( 'USER_THREADS' , [ profile . id ] ) } } ">
2015-10-16 20:50:11 +00:00
<div class="fa fa-list"></div>
<div class="count"> { { profile . forumStats . topics } } </div>
</a>
2015-10-11 22:11:18 +00:00
</div>
2015-10-16 20:50:11 +00:00
{ % endif % }
{ % if profileView ! = 'posts' % }
<div class="profilePlatform">
2015-11-07 22:58:02 +00:00
<a class="inner" title="Posts" href=" { { urls . format ( 'USER_POSTS' , [ profile . id ] ) } } ">
2015-10-16 20:50:11 +00:00
<div class="fa fa-reply"></div>
<div class="count"> { { profile . forumStats . posts } } </div>
</a>
</div>
{ % endif % }
</div>
2015-10-11 22:11:18 +00:00
{ % endif % }
2015-10-16 20:50:11 +00:00
<div class="userPage profilePlatform">
<div class="inner">
{ % include 'profile/' ~ profileView ~ '.tpl' % }
</div>
2015-10-11 22:11:18 +00:00
</div>
</div>
</div>
2015-10-16 20:50:11 +00:00
</div>
2015-10-11 23:37:54 +00:00
{ % endblock % }