2022-09-13 13:14:49 +00:00
|
|
|
{% extends 'master.twig' %}
|
|
|
|
|
|
|
|
{% if profile_user is defined %}
|
|
|
|
{% set image = url('user-avatar', {'user': profile_user.id, 'res': 200}) %}
|
|
|
|
{% set manage_link = url('manage-user', {'user': profile_user.id}) %}
|
2023-08-02 22:12:47 +00:00
|
|
|
{% if (not profile_is_banned or profile_can_edit) %}
|
|
|
|
{% set site_background = profile_background_info %}
|
2023-09-08 20:40:48 +00:00
|
|
|
{% set site_background_url = url('user-background', {'user': profile_user.id}) %}
|
2022-09-13 13:14:49 +00:00
|
|
|
{% endif %}
|
|
|
|
{% set stats = [
|
|
|
|
{
|
|
|
|
'title': 'Joined',
|
|
|
|
'is_date': true,
|
|
|
|
'value': profile_user.createdTime,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': 'Last seen',
|
|
|
|
'is_date': true,
|
2023-08-02 22:12:47 +00:00
|
|
|
'value': profile_user.lastActiveTime|default(0),
|
2022-09-13 13:14:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': 'Topics',
|
|
|
|
'value': profile_stats.forum_topic_count,
|
|
|
|
'url': url('user-profile-forum-topics', {'user': profile_user.id}),
|
|
|
|
'active': profile_mode == 'forum-topics',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': 'Posts',
|
|
|
|
'value': profile_stats.forum_post_count,
|
|
|
|
'url': url('user-profile-forum-posts', {'user': profile_user.id}),
|
|
|
|
'active': profile_mode == 'forum-posts',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'title': 'Comments',
|
|
|
|
'value': profile_stats.comments_count,
|
|
|
|
},
|
|
|
|
] %}
|
|
|
|
{% else %}
|
|
|
|
{% set image = url('user-avatar', {'user': 0, 'res': 240}) %}
|
|
|
|
{% set manage_link = url('manage-users') %}
|
|
|
|
{% set profile_is_editing = false %}
|
|
|
|
{% set profile_notices = [] %}
|
|
|
|
{% endif %}
|