mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
...
This commit is contained in:
parent
b2f083be30
commit
6d82894b82
@ -19,7 +19,8 @@ class Twig_Extensions_Extension_Tinyboard extends Twig_Extension
|
|||||||
'hasPermission' => new Twig_Filter_Function('twig_hasPermission_filter', array('needs_environment' => false)),
|
'hasPermission' => new Twig_Filter_Function('twig_hasPermission_filter', array('needs_environment' => false)),
|
||||||
'date' => new Twig_Filter_Function('twig_date_filter', array('needs_environment' => false)),
|
'date' => new Twig_Filter_Function('twig_date_filter', array('needs_environment' => false)),
|
||||||
'poster_id' => new Twig_Filter_Function('poster_id', array('needs_environment' => false)),
|
'poster_id' => new Twig_Filter_Function('poster_id', array('needs_environment' => false)),
|
||||||
'remove_whitespace' => new Twig_Filter_Function('twig_remove_whitespace_filter', array('needs_environment' => false))
|
'remove_whitespace' => new Twig_Filter_Function('twig_remove_whitespace_filter', array('needs_environment' => false)),
|
||||||
|
'count' => new Twig_Filter_Function('count', array('needs_environment' => false))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% filter remove_whitespace %}
|
{% filter remove_whitespace %}
|
||||||
{# tabs and new lines will be ignored #}
|
{# tabs and new lines will be ignored #}
|
||||||
<div class="post reply" id="reply_{{ post.id }}" itemscope itemid="/{{ board.uri }}/{{ post.id }}">
|
<div class="post reply" id="reply_{{ post.id }}" itemprop="comment" itemscope itemid="/{{ board.uri }}/{{ post.id }}" itemtype="http://schema.org/UserComments"
|
||||||
|
{% if not index %} itemref="/{{ board.uri }}/{{ post.thread }}"{% endif %}>
|
||||||
|
|
||||||
<p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
<p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
||||||
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
||||||
@ -28,13 +29,13 @@
|
|||||||
{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %}
|
{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %}
|
||||||
[<a style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>]
|
[<a style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ post.time|date(config.post_date) }}
|
<time itemprop="commentTime" datetime="{{ post.time|date('c') }}">{{ post.time|date(config.post_date) }}</time>
|
||||||
</label>
|
</label>
|
||||||
{% if config.poster_ids %}
|
{% if config.poster_ids %}
|
||||||
ID: {{ post.ip|poster_id(post.thread) }}
|
ID: {{ post.ip|poster_id(post.thread) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a itemprop="url" class="post_no" {% if not index %}onclick="highlightReply({{ post.id }})" {% endif %}href="{{ post.link }}">No.</a>
|
<a itemprop="url" class="post_no" {% if not index %}onclick="highlightReply({{ post.id }})" {% endif %}href="{{ post.link }}">No.</a>
|
||||||
<a class="post_no"
|
<a itemprop="replyToUrl" class="post_no"
|
||||||
{% if not index %}
|
{% if not index %}
|
||||||
onclick="citeReply({{ post.id }});"
|
onclick="citeReply({{ post.id }});"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{# tabs and new lines will be ignored #}
|
{# tabs and new lines will be ignored #}
|
||||||
|
|
||||||
{% if index %}
|
{% if index %}
|
||||||
<div id="thread_{{ post.id }}" itemscope itemid="/{{ board.uri }}/{{ post.id }}">
|
<div id="thread_{{ post.id }}" itemscope itemid="/{{ board.uri }}/{{ post.id }}" itemtype="http://schema.org/Article">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if post.embed %}
|
{% if post.embed %}
|
||||||
@ -47,12 +47,12 @@
|
|||||||
{{ config.uri_thumb }}{{ post.thumb }}
|
{{ config.uri_thumb }}{{ post.thumb }}
|
||||||
{% endif %}" style="width:{{ post.thumbx }}px;height:{{ post.thumby }}px" alt="" /></a>
|
{% endif %}" style="width:{{ post.thumbx }}px;height:{{ post.thumby }}px" alt="" /></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="post op"{% if not index %} itemscope itemid="/{{ board.uri }}/{{ post.id }}"{% endif %}><p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
<div class="post op"{% if not index %} itemscope itemid="/{{ board.uri }}/{{ post.id }}" itemtype="http://schema.org/Article"{% endif %}><p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
||||||
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
||||||
<label for="delete_{{ post.id }}">
|
<label for="delete_{{ post.id }}">
|
||||||
{% if post.subject|length > 0 %}
|
{% if post.subject|length > 0 %}
|
||||||
{# show subject #}
|
{# show subject #}
|
||||||
<span itemprop="title" class="subject">{{ post.subject }}</span>
|
<span itemprop="name" class="subject">{{ post.subject }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if post.email|length > 0 %}
|
{% if post.email|length > 0 %}
|
||||||
{# start email #}
|
{# start email #}
|
||||||
@ -73,12 +73,12 @@
|
|||||||
{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %}
|
{% if post.mod and post.mod|hasPermission(config.mod.show_ip, board.uri) %}
|
||||||
[<a style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>]
|
[<a style="margin:0;" href="?/IP/{{ post.ip }}">{{ post.ip }}</a>]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ post.time|date(config.post_date) }}
|
<time itemprop="dateCreated" datetime="{{ post.time|date('c') }}" pubdate>{{ post.time|date(config.post_date) }}</time>
|
||||||
</label>
|
</label>
|
||||||
{% if config.poster_ids %}
|
{% if config.poster_ids %}
|
||||||
ID: {{ post.ip|poster_id(post.id) }}
|
ID: {{ post.ip|poster_id(post.id) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="post_no" href="{{ post.link }}">No.</a>
|
<a itemprop="url" class="post_no" href="{{ post.link }}">No.</a>
|
||||||
<a class="post_no"
|
<a class="post_no"
|
||||||
{% if not index %}
|
{% if not index %}
|
||||||
onclick="citeReply({{ post.id }});"
|
onclick="citeReply({{ post.id }});"
|
||||||
@ -100,11 +100,11 @@
|
|||||||
<img class="icon" title="Bumplocked" src="{{ config.image_bumplocked }}" alt="Locked" />
|
<img class="icon" title="Bumplocked" src="{{ config.image_bumplocked }}" alt="Locked" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if index %}
|
{% if index %}
|
||||||
<a itemprop="url" href="{{ post.root }}{{ board.dir }}{{ config.dir.res }}{{ config.file_page|sprintf(post.id) }}">[{% trans %}Reply{% endtrans %}]</a>
|
<a itemprop="discussionUrl" href="{{ post.root }}{{ board.dir }}{{ config.dir.res }}{{ config.file_page|sprintf(post.id) }}">[{% trans %}Reply{% endtrans %}]</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ post.postControls }}
|
{{ post.postControls }}
|
||||||
</p>
|
</p>
|
||||||
<p itemprop="text" class="body">
|
<p itemprop="articleBody" class="body">
|
||||||
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %}
|
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %}
|
||||||
</p>
|
</p>
|
||||||
{% if post.omitted or post.omitted_images %}
|
{% if post.omitted or post.omitted_images %}
|
||||||
@ -128,6 +128,9 @@
|
|||||||
{% endif %} omitted. Click reply to view.
|
{% endif %} omitted. Click reply to view.
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if not index %}
|
||||||
|
<meta itemprop="interactionCount" content="UserComments:{{ post.posts|count }}" />
|
||||||
|
{% endif %}
|
||||||
</div>{% endfilter %}
|
</div>{% endfilter %}
|
||||||
{% set hr = post.hr %}
|
{% set hr = post.hr %}
|
||||||
{% for post in post.posts %}
|
{% for post in post.posts %}
|
||||||
|
Loading…
Reference in New Issue
Block a user