2Hi.Biz
Trang chủ | TWIG | Xtscript | Templates | Xtgem
tiaxgame: this is my block postview {% block postview %} - 2Hi.Biz
* Admin
- Cấp bậc: admin
31-03-2015
* Heriwap this is my block post_view
{% block post_view %}

{% if post %}
{% set post = post|merge( { 'karma': post.karma_up - post.karma_down } ) %}
{% set karma = post.karma <= settings.karma_treshold %}
{% endif %}

{# Get avatar #}

{% set show_avatars = profile.settings.show_avatars|default('1') %}

{% if show_avatars %}
{% set avatar_src = post.author.avatars[16] %}
{% endif %}

{# Get message #}

{% if post.reply_to %}
{% set msg %}
<a dir="ltr" class="reply_to" href="{{ post.reply_to.link }}"><img src="http://xtgem.com/images/forum/icons/reply.png" class="reply-ico" alt="*" /> {{ post.reply_to.author_name }}</a> {{post.body|raw}}
{% endset %}
{% else %}
{% set msg %}
{{post.body|raw}}
{% endset %}
{% endif %}

{% if karma %}
{% if not post.main_post %}
{% set msg %}
<span class="karma-notice">This post is hidden due to low score. To view it
<a
href="{{ post.karma_link }}"
title="View hidden post"
onclick="document.getElementById('body_{{ post.id }}').style.display='inline';this.parentNode.style.display='none';return false;"
>click here.</a
>
</span>
<span id="body_{{ post.id }}" style="display: none;">
{{msg|raw}}
</span>
{% endset %}
{% endif %}
{% endif %}

{% if post.karma == 0 %}
{% set karma_value_name = 'neutral' %}
{% elseif post.karma > 0 %}
{% set karma_value_name = 'positive' %}
{% else %}
{% set karma_value_name = 'negative' %}
{% endif %}

{# Post block #}
<div class="postItem{{ post.main_post ? ' marked' : '' }}{{ view == 'thread' ? '' : ' single' }}{% if post.admin_post %} admin_post{% endif %}" id="post_{{ post.id }}">
{# Author and avatar #}
{% if post.author %}
{% if show_avatars %}
<div class="memInfo"><table cellpadding="0" cellspacing="1"><tr><td width="auto"><img style="background: #ffffff;margin: 0 6px 0 0;padding: 2px;border: 1px solid #ccc;" src="{{avatar_src}}" alt="*" width="40" height="40" /></td><td><b><a href="{{ post.author.link }}">{% set ten=post.author.name %}{% include 'name.js' %}</a></b><br/>- Cấp bậc: <img style="background: #ffffff;margin: 0 6px 0 0;padding: 2px;border: 1px solid #ccc;" src="http://aichat.wap.sh/lv/{% include 'lv.js' %}.gif" alt="{% include 'lv.js' %}"></td></tr></table></div> {% else %}<a href="{{ post.author.link }}" title="view {{ post.author.name }} profile">{{ post.author.name }}</a></span>
{% endif %} {% else %}
<div class="memInfo"><table cellpadding="0" cellspacing="1"><tr><td width="auto"><img style="background: #ffffff;margin: 0 6px 0 0;padding: 2px;border: 1px solid #ccc;" src="http://toichat.wap.sh/m.png" alt="*" width="40" height="40" /></td><td><b>{{ post.anonymous_name }}</b><br/>- Cấp bậc: Khách</td></tr></table></div>
{% endif %}
<img src="/icon/clock.png"> {% include 'time.js' %}<br />

{% include 'bbcode_link.js' %}
{# Meta information about post #}
<div class="meta">







{% if post.last_update %}
<div class="list1">- Edited: &nbsp;<a href="{{ post.last_update_by.link }}">{{ post.last_update_by.name }}</a> )<br/><img src="/icon/clock.png"> {% include 'cmt/time.js' %}</div>
{% endif %}
{% include 'cmt/like.js' %}
{% if settings.allow_anonymous_posting or profile and not thread.is_closed and not settings.maintenance %}
{# Edit link #}

&middot; <a href="{{ post.reply_link }}">Reply</a>

{% endif %}


</div>{% include 'cmt/attach.js' %}

{% include 'cmt/admin.js' %}
</div>

{% endblock %}

Online: Guests: 1