Browse Source

Attempt at using HTML5 microdata

pull/40/head
Savetheinternet 13 years ago
parent
commit
0ba885d9c1
  1. 2
      inc/functions.php
  2. 12
      templates/post_reply.html
  3. 20
      templates/post_thread.html

2
inc/functions.php

@ -777,7 +777,7 @@
while($th = $query->fetch()) { while($th = $query->fetch()) {
if(!$mod && $config['cache']['enabled']) { if(!$mod && $config['cache']['enabled']) {
if($built = cache::get("thread_index_{$board['uri']}_{$th['id']}")) { if($built = cache::get("thread_index_{$board['uri']}_{$th['id']}")) {
$body .= '<div id="thread_' . $th['id'] . '">' . $built . '</div>'; $body .= $built;
continue; continue;
} }
} }

12
templates/post_reply.html

@ -1,19 +1,19 @@
{% 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 }}"> <div class="post reply" id="reply_{{ post.id }}" itemscope>
<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 }}" />
<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 class="subject">{{ post.subject }}</span> <span itemprop="title" class="subject">{{ post.subject }}</span>
{% endif %} {% endif %}
{% if post.email|length > 0 %} {% if post.email|length > 0 %}
{# start email #} {# start email #}
<a class="email" href="mailto:{{ post.email }}"> <a itemprop="email" class="email" href="mailto:{{ post.email }}">
{% endif %} {% endif %}
<span class="name">{{ post.name }}</span> <span itemprop="name" class="name">{{ post.name }}</span>
{% if post.trip|length > 0 %} {% if post.trip|length > 0 %}
<span class="trip">{{ post.trip }}</span> <span class="trip">{{ post.trip }}</span>
{% endif %} {% endif %}
@ -49,7 +49,7 @@
{% if post.embed %} {% if post.embed %}
{{ post.embed }} {{ post.embed }}
{% elseif post.file == 'deleted' %} {% elseif post.file == 'deleted' %}
<img src="{{ config.image_deleted }}" alt="" /> <img itemprop="image" src="{{ config.image_deleted }}" alt="" />
{% elseif post.file and post.file %} {% elseif post.file and post.file %}
<p class="fileinfo">File: <a href="{{ config.uri_img }}{{ post.file }}">{{ post.file }}</a> <span class="unimportant"> <p class="fileinfo">File: <a href="{{ config.uri_img }}{{ post.file }}">{{ post.file }}</a> <span class="unimportant">
( (
@ -91,7 +91,7 @@
</a> </a>
{% endif %} {% endif %}
{{ post.postControls }} {{ post.postControls }}
<p class="body"> <p itemprop="desc" 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>
</div> </div>

20
templates/post_thread.html

@ -1,10 +1,14 @@
{% filter remove_whitespace %} {% filter remove_whitespace %}
{# tabs and new lines will be ignored #} {# tabs and new lines will be ignored #}
{% if index %}
<div id="thread_{{ post.id }}" itemscope>
{% endif %}
{% if post.embed %} {% if post.embed %}
{{ post.embed }} {{ post.embed }}
{% elseif post.file == 'deleted' %} {% elseif post.file == 'deleted' %}
<img src="{{ config.image_deleted }}" alt="" /> <img itemprop="image" src="{{ config.image_deleted }}" alt="" />
{% elseif post.file and post.file %} {% elseif post.file and post.file %}
<p class="fileinfo">File: <a href="{{ config.uri_img }}{{ post.file }}">{{ post.file }}</a> <span class="unimportant"> <p class="fileinfo">File: <a href="{{ config.uri_img }}{{ post.file }}">{{ post.file }}</a> <span class="unimportant">
( (
@ -43,18 +47,18 @@
{{ 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"><p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}> <div class="post op"{% if not index %} itemscope{% 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 class="subject">{{ post.subject }}</span> <span itemprop="title" class="subject">{{ post.subject }}</span>
{% endif %} {% endif %}
{% if post.email|length > 0 %} {% if post.email|length > 0 %}
{# start email #} {# start email #}
<a class="email" href="mailto:{{ post.email }}"> <a itemprop="email" class="email" href="mailto:{{ post.email }}">
{% endif %} {% endif %}
<span class="name">{{ post.name }}</span> <span itemprop="name" class="name">{{ post.name }}</span>
{% if post.trip|length > 0 %} {% if post.trip|length > 0 %}
<span class="trip">{{ post.trip }}</span> <span class="trip">{{ post.trip }}</span>
{% endif %} {% endif %}
@ -100,7 +104,7 @@
{% endif %} {% endif %}
{{ post.postControls }} {{ post.postControls }}
</p> </p>
<p class="body"> <p itemprop="desc" 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 %}
@ -130,4 +134,6 @@
{% include 'post_reply.html' %} {% include 'post_reply.html' %}
{% endfor %} {% endfor %}
<br class="clear"/>{% if hr %}<hr/>{% endif %} <br class="clear"/>{% if hr %}<hr/>{% endif %}
{% if index %}
</div>
{% endif %}

Loading…
Cancel
Save