{% extends 'global/master.twig' %} {% set forumBackLink %}{{ route('forums.forum', forum.id) }}{% endset %} {% block title %}{% if thread is defined %}{{ thread.title }}{% else %}Creating thread in {{ forum.name }}{% endif %}{% endblock %} {% if thread is defined %} {% if forum.permission(constant('Sakura\\Perms\\Forum::REPLY'), user.id) and ( thread.status != 1 or forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) ) %} {% set forumReplyLink %}#reply{% endset %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::STICKY'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::ANNOUNCEMENT'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::MOVE'), user.id) or forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %} {% set showMod = true %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::STICKY'), user.id) %} {% set forumSticky = thread.type == 1 ? true : false %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::ANNOUNCEMENT'), user.id) %} {% set forumAnnounce = thread.type == 2 ? true : false %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) %} {% set forumLock = thread.status == 1 ? true : false %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::MOVE'), user.id) %} {% if thread.oldForum %} {% set forumRestore = true %} {% endif %} {% if thread.forum != sakura.trashForumId %} {% set forumTrash = true %} {% endif %} {% endif %} {% if forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %} {% if thread.forum == sakura.trashForumId %} {% set forumPrune = true %} {% endif %} {% endif %} {% set posts = thread.posts|batch(10) %} {% set paginationPages = posts %} {% set paginationUrl %}{{ route('forums.thread', thread.id) }}{% endset %} {% endif %} {% block css %} {% endblock %} {% block js %} {% endblock %} {% block content %}
{{ forum.name }} / {{ thread.title }}
{% include 'forum/forumBtns.twig' %} {% if thread is defined %} {% set textCache = session.replyText['t' ~ thread.id] %} {% set postingAction = route('forums.thread.reply', thread.id) %} {% for post in posts[get.page|default(1) - 1] %} {% endfor %} {% else %} {% set titleCache = session.replyText['f' ~ forum.id].title %} {% set textCache = session.replyText['f' ~ forum.id].text %} {% set postingAction = route('forums.new', forum.id) %} {% endif %} {% if forumReplyLink is defined or thread is not defined %} {% endif %}
{% if not post.poster.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or post.poster.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) %}{{ post.poster.username }} {{ post.poster.username }} {% else %} [deleted user] {% endif %}
{{ post.poster.title }}
Tenshi {{ post.poster.country(true) }}{% if post.poster.id == (thread.posts|first).poster.id %} OP{% endif %} {% if session.checkLogin %}
{% if (user.id == post.poster.id and forum.permission(constant('Sakura\\Perms\\Forum::EDIT_OWN'), user.id)) or forum.permission(constant('Sakura\\Perms\\Forum::EDIT_ANY'), user.id) %} {% endif %} {% if (user.id == post.poster.id and forum.permission(constant('Sakura\\Perms\\Forum::DELETE_OWN'), user.id)) or forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %} {% endif %} {% if not (post.poster.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or post.poster.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) or user.id == post.poster.id) %} {% if user.isFriends(post.poster.id) != 0 %} {% endif %} {% endif %}
{% endif %}
{{ post.parsed|raw }}
{% if post.poster.signature and post.poster.permission(constant('Sakura\\Perms\\Site::CHANGE_SIGNATURE')) %}
{{ post.poster.signature()|raw|nl2br }}
{% endif %}
{% if forumReplyLink is defined or thread is not defined %} {% include 'forum/replyForm.twig' %} {% endif %} {% include 'forum/forumBtns.twig' %}
{% endblock %}