{% if loops.similar|length %}
<div class="forumbg">
<div class="header">{{ lang('SIMILAR_TOPICS') }}</div>
{% for similar in loops.similar %}
<div class="small-icon row{% if similar.S_ROW_COUNT is even %} bg1{% else %} bg2{% endif %}">
	<div class="inner">
	{% if similar.S_UNREAD_TOPIC and not S_IS_BOT %}
	<a href="{{ similar.U_NEWEST_POST }}"><img src="{{ T_THEME_PATH }}/images/icon_post_target_unread.gif" alt=""/></a>
	{% endif %}
	{% EVENT topiclist_row_prepend %}
	{% if similar.S_HAS_POLL %}<img src="{{ T_THEME_PATH }}/images/icon_topic_poll.gif" alt=""/>{% endif %}
	{% if similar.ATTACH_ICON_IMG %}<img src="{{ T_THEME_PATH }}/images/icon_topic_attach.gif" alt=""/>{% endif %}
	{% if similar.S_TOPIC_UNAPPROVED or similar.S_POSTS_UNAPPROVED %}
	<a href="{{ similar.U_MCP_QUEUE }}" class="rightside"><img src="{{ T_THEME_PATH }}/images/icon_topic_unapproved.gif" alt=""/></a>{% endif %}
	{% if similar.S_TOPIC_REPORTED %}
	<a href="{{ similar.U_MCP_REPORT }}" class="rightside"><img src="{{ T_THEME_PATH }}/images/icon_topic_reported.gif" alt=""/></a>{% endif %}
	<a href="{{ similar.U_VIEW_TOPIC }}" class="topictitle">{{ similar.TOPIC_TITLE }}</a> <span class="posts">[{% if similar.REPLIES %}{{ similar.REPLIES }}{% else %}1{% endif %}]</span>
	{% if not S_IS_BOT %}
	<br />{{ similar.LAST_POST_AUTHOR_FULL }} &laquo; <a href="{{ similar.U_LAST_POST }}" title="{{ lang('GOTO_LAST_POST') }}">{{ similar.LAST_POST_TIME }}</a>
	{% endif %}
	{% if similar.pagination|length %}
	<div class="rightside pagination">
		{% for pagination in similar.pagination %}
			{% if pagination.S_IS_PREV %}
			{% elseif pagination.S_IS_CURRENT %}<span class="active button">{{ pagination.PAGE_NUMBER }}</span>
			{% elseif pagination.S_IS_ELLIPSIS %}<span class="ellipsis button">{{ lang('ELLIPSIS') }}</span>
			{% elseif pagination.S_IS_NEXT %}
			{% else %}<a href="{{ pagination.PAGE_URL }}" class="button">{{ pagination.PAGE_NUMBER }}</a> 
			{% endif %}
		{% endfor %}
	</div>
	{% endif %}
	{% EVENT topiclist_row_append %}
	</div>
</div>
{% endfor %}
</div>
{% endif %}
