{% extends 'profile/master.twig' %} {% from 'macros.twig' import container_title %} {% 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.name %} {% else %} {% set title = 'User not found!' %} {% endif %} {% block content %} {% if profile_is_editing %}
{{ input_csrf() }} {% 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 {{ profile_avatar_info.maxBytes|format_filesize }} file size limit.
  • May not be larger than {{ profile_avatar_info.maxWidth }}x{{ profile_avatar_info.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 {{ profile_background_info.maxBytes|format_filesize }} file size limit.
  • May not be larger than {{ profile_background_info.maxWidth }}x{{ profile_background_info.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|default([]) 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_guest and not profile_is_deleted and not profile_is_editing and profile_active_topic_info.id|default(0) > 0 %} {% set show_warnings = profile_warnings is defined and profile_warnings|length > 0 %} {% set show_sidebar = (not profile_is_banned or profile_can_edit) and (profile_is_guest or show_profile_fields or show_background_settings or show_birthdate or show_active_forum_info or show_warnings) %} {% 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_background_info.attachment, '', key, true, {'onchange':'profileChangeBackgroundAttach(this.value)'}) }} {% endfor %} {{ input_checkbox('background[attr][blend]', 'Blend', profile_background_info.blend, '', '', false, {'onchange':'profileToggleBackgroundAttr(\'blend\', this.checked)'}) }} {{ input_checkbox('background[attr][slide]', 'Slide', profile_background_info.slide, '', '', false, {'onchange':'profileToggleBackgroundAttr(\'slide\', this.checked)'}) }}
{% endif %} {% if profile_is_guest and not profile_is_deleted %}
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 defined and profile_active_category_info is not empty %}
Most active category
{{ profile_active_category_info.name }}
{{ profile_active_category_stats.postCount|number_format }} post{{ profile_active_category_stats.postCount == 1 ? '' : 's' }} / {{ ((profile_active_category_stats.postCount / profile_stats.forum_post_count) * 100)|number_format(2) }}% of total posts
{% endif %} {% if profile_active_topic_info is defined and profile_active_topic_info is not empty %}
Most active topic
{{ profile_active_topic_info.title }}
{{ profile_active_topic_stats.postCount|number_format }} post{{ profile_active_topic_stats.postCount == 1 ? '' : 's' }} / {{ ((profile_active_topic_stats.postCount / profile_stats.forum_post_count) * 100)|number_format(2) }}% of total posts
{% endif %}
{% endif %} {% if show_birthdate %}
{{ container_title('Birthdate') }}
{% endif %} {% if show_warnings %}
{{ container_title('Warnings') }}
{% for warning in profile_warnings %}
{% for line in warning.bodyLines %}

{{ line }}

{% endfor %}
{% endfor %}
{% endif %}
{% endif %} {% if profile_user is defined %}
{% if (not profile_is_banned or profile_can_edit) and ((profile_is_editing and perms.edit_about) or profile_user.hasAboutContent) %}
{{ container_title('About ' ~ profile_user.name) }} {% if profile_is_editing %}
{{ input_select('about[parser]', constant('\\Misuzu\\Parsers\\Parser::NAMES'), profile_user.aboutParser, '', '', false, 'profile__about__select') }}
{% else %}
{{ profile_user.aboutContent|parse_text(profile_user.aboutParser)|raw }}
{% endif %}
{% endif %} {% if (not profile_is_banned or profile_can_edit) and ((profile_is_editing and perms.edit_signature) or profile_user.hasSignatureContent) %}
{{ container_title('Signature') }} {% if profile_is_editing %}
{{ input_select('signature[parser]', constant('\\Misuzu\\Parsers\\Parser::NAMES'), profile_user.signatureParser, '', '', false, 'profile__signature__select') }}
{% else %}
{{ profile_user.signatureContent|parse_text(profile_user.signatureParser)|raw }}
{% endif %}
{% endif %} {% endif %}
{% if profile_is_editing %} {% else %}
{% endif %} {% endblock %}