{% extends 'profile/master.twig' %} {% from 'macros.twig' import container_title %} {% from 'user/macros.twig' import user_profile_warning %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_text, input_checkbox, input_file, input_file_raw, input_select %} {% if profile_user is defined %} {% set canonical_url = url('user-profile', {'user': profile_user.id}) %} {% set title = profile_user.username %} {% else %} {% set title = 'User not found!' %} {% endif %} {% block content %} {% if profile_is_editing %}
{{ input_csrf('profile') }} {% if perms.edit_avatar %} {{ input_file_raw('avatar[file]', 'profile__hidden', ['image/png', 'image/jpeg', 'image/gif'], {'id':'avatar-selection'}) }} {% endif %} {% else %}
{% endif %} {% include 'profile/_layout/header.twig' %} {% if profile_is_editing %}
  • General
  • Keep things sane and generally suitable for all ages.
  • Make sure to adhere to the rules.
{% if perms.edit_avatar %}
  • Avatar
  • May not exceed the {{ byte_symbol(profile_user.avatarInfo.maxBytes) }} file size limit.
  • May not be larger than {{ profile_user.avatarInfo.maxWidth }}x{{ profile_user.avatarInfo.maxHeight }}.
  • Will be centre cropped and scaled to at most 240x240.
  • Animated GIF images are allowed.
{% endif %} {% if perms.edit_background %}
  • Background
  • May not exceed the {{ byte_symbol(profile_user.backgroundInfo.maxBytes) }} file size limit.
  • May not be larger than {{ profile_user.backgroundInfo.maxWidth }}x{{ profile_user.backgroundInfo.maxHeight }}.
  • GIF images, in general, are only allowed when tiling.
{% endif %}
{% endif %} {% if profile_notices|length > 0 %}
{% for notice in profile_notices %}

{{ notice }}

{% endfor %}
{% endif %}
{% set show_profile_fields = not profile_is_guest and (profile_is_editing ? perms.edit_profile : profile_fields_display_values is not empty) %} {% set show_background_settings = profile_is_editing and perms.edit_background %} {% set show_birthdate = profile_is_editing and perms.edit_birthdate %} {% set show_active_forum_info = not profile_is_editing and (profile_active_category_info.forum_id|default(0) > 0 or profile_active_topic_info.topic_id|default(0) > 0) %} {% set show_sidebar = profile_is_guest or show_profile_fields or show_background_settings or show_birthdate or show_active_forum_info %} {% if show_sidebar %}
{% if show_background_settings %}
{{ container_title('Background') }}
{{ input_file('background[file]', '', ['image/png', 'image/jpeg', 'image/gif'], {'id':'background-selection'}) }} {{ input_checkbox('background[attach]', 'None', true, '', 0, true, {'onchange':'profileChangeBackgroundAttach(this.value)'}) }} {% for key, value in background_attachments %} {{ input_checkbox('background[attach]', value, key == profile_user.backgroundInfo.attachment, '', key, true, {'onchange':'profileChangeBackgroundAttach(this.value)'}) }} {% endfor %} {{ input_checkbox('background[attr][blend]', 'Blend', profile_user.backgroundInfo.blend, '', '', false, {'onchange':'profileToggleBackgroundAttr(\'blend\', this.checked)'}) }} {{ input_checkbox('background[attr][slide]', 'Slide', profile_user.backgroundInfo.slide, '', '', false, {'onchange':'profileToggleBackgroundAttr(\'slide\', this.checked)'}) }}
{% endif %} {% if current_user is not defined %}
You must log in to view full profiles!
{% elseif show_profile_fields %}
{{ container_title('Elsewhere') }}
{% for fieldInfo in profile_fields_infos %} {% if profile_is_editing or profile_fields_display_values[fieldInfo.name] is defined %} {% endif %} {% endfor %}
{% endif %} {% if show_active_forum_info %}
{{ container_title('Forum Activity') }}
{% if profile_active_category_info is not empty %}
{% set forum = profile_active_category_info %} {% if forum.forum_icon is defined and forum.forum_icon is not empty %} {% set forum_icon = forum.forum_icon %} {% elseif forum.forum_archived is defined and forum.forum_archived %} {% set forum_icon = 'fas fa-archive fa-fw' %} {% elseif forum.forum_type is defined and forum.forum_type != constant('MSZ_FORUM_TYPE_DISCUSSION') %} {% if forum.forum_type == constant('MSZ_FORUM_TYPE_LINK') %} {% set forum_icon = 'fas fa-link fa-fw' %} {% elseif forum.forum_type == constant('MSZ_FORUM_TYPE_CATEGORY') %} {% set forum_icon = 'fas fa-folder fa-fw' %} {% endif %} {% else %} {% set forum_icon = 'fas fa-comments fa-fw' %} {% endif %}
Most active category
{{ forum.forum_name }}
{{ profile_active_category_stats.post_count|number_format }} post{{ profile_active_category_stats.post_count == 1 ? '' : 's' }} / {{ ((profile_active_category_stats.post_count / profile_stats.forum_post_count) * 100)|number_format(2) }}% of total posts
{% endif %} {% if profile_active_topic_info is not empty %}
{% set topic = profile_active_topic_info %} {% if topic.topic_deleted is defined and topic.topic_deleted is not null %} {% set topic_icon = 'fas fa-trash-alt' %} {% elseif topic.topic_type is defined and topic.topic_type != constant('MSZ_TOPIC_TYPE_DISCUSSION') %} {% if topic.topic_type == constant('MSZ_TOPIC_TYPE_ANNOUNCEMENT') or topic.topic_type == constant('MSZ_TOPIC_TYPE_GLOBAL_ANNOUNCEMENT') %} {% set topic_icon = 'fas fa-bullhorn' %} {% elseif topic.topic_type == constant('MSZ_TOPIC_TYPE_STICKY') %} {% set topic_icon = 'fas fa-thumbtack' %} {% endif %} {% elseif topic.topic_locked is defined and topic.topic_locked is not null %} {% set topic_icon = 'fas fa-lock' %} {% else %} {% set topic_icon = 'fas fa-comment' %} {% endif %}
Most active topic
{{ topic.topic_title }}
{{ profile_active_topic_stats.post_count|number_format }} post{{ profile_active_topic_stats.post_count == 1 ? '' : 's' }} / {{ ((profile_active_topic_stats.post_count / profile_stats.forum_post_count) * 100)|number_format(2) }}% of total posts
{% endif %}
{% endif %} {% if show_birthdate %}
{{ container_title('Birthdate') }}
{% endif %}
{% endif %} {% if profile_user is defined %}
{% if (profile_is_editing and perms.edit_about) or profile_user.hasProfileAbout %}
{{ container_title('About ' ~ profile_user.username) }} {% if profile_is_editing %}
{{ input_select('about[parser]', constant('\\Misuzu\\Parsers\\Parser::NAMES'), profile_user.profileAboutParser, '', '', false, 'profile__about__select') }}
{% else %}
{{ profile_user.profileAboutParsed|raw }}
{% endif %}
{% endif %} {% if (profile_is_editing and perms.edit_signature) or profile_user.hasForumSignature %}
{{ container_title('Signature') }} {% if profile_is_editing %}
{{ input_select('signature[parser]', constant('\\Misuzu\\Parsers\\Parser::NAMES'), profile_user.forumSignatureParser, '', '', false, 'profile__signature__select') }}
{% else %}
{{ profile_user.forumSignatureParsed|raw }}
{% endif %}
{% endif %} {% if profile_warnings|length > 0 or profile_warnings_can_manage %}
{{ container_title('Account Standing', false, profile_warnings_can_manage ? url('manage-users-warnings', {'user': profile_user.id}) : '') }}
{% if profile_warnings_can_manage %}
User IP
Issuer
Issuer IP
{% endif %}
Type
Created
Duration
Note
{% for warning in profile_warnings %} {{ user_profile_warning(warning, profile_warnings_view_private, profile_warnings_can_manage, profile_warnings_can_manage ? csrf_token() : '') }} {% endfor %}
{% endif %} {% endif %}
{% if profile_is_editing %} {% else %}
{% endif %} {% endblock %}