<!--{if $inajax}-->
	{template header}

	<div class="tagthread">
	<a class="close" href="###" onclick="hideMenu()" title="{lang close}"><img src="{IMGDIR}/close.gif" alt="{lang close}" /></a>
	<h4>{lang tag}: $name</h4>
		<span id="tagpage_0">
		<ul>
			<!--{if $threadlist}-->
				<!--{loop $threadlist $thread}-->
					<li><a href="viewthread.php?tid=$thread[tid]" target="_blank">$thread[subject]</a></li>
				<!--{/loop}-->
			<!--{/if}-->
			<li class="more"><a href="tag.php?name=$tagnameenc" target="_blank">{lang tag_more}</a></li>
		</ul>
		</span>
	</div>

	{template footer}
<!--{else}-->
	{subtemplate header}
	<div id="nav">
		<a href="$indexname">$bbname</a> &raquo; <a href="tag.php">{lang tag}</a> &raquo; $name
	</div>

	<!--{if !empty($multipage)}-->
	<div class="pages_btns">
		$multipage
	</div>
	<!--{/if}-->

	<div class="mainbox threadlist">
		<h1>{lang tag}: $name</h1>
		<table summary="$name" cellspacing="0" cellpadding="0">
			<thead>
				<tr>
					<td class="icon">&nbsp;</td>
					<th>{lang subject}</th>
					<td class="forum">{lang forum}</td>
					<td class="author">{lang author}</td>
					<td class="nums">{lang replies}/{lang views}</td>
					<td class="lastpost">{lang lastpost}</td>
				</tr>
			</thead>
			<!--{if $threadlist}-->
				<!--{loop $threadlist $thread}-->
				<tbody>
					<tr>
						<td class="icon">
							<!--{if $thread['special'] == 1}-->
								<img src="{IMGDIR}/pollsmall.gif" alt="{lang thread_poll}" />
							<!--{elseif $thread['special'] == 2}-->
								<img src="{IMGDIR}/tradesmall.gif" alt="{lang thread_trade}" />
							<!--{elseif $thread['special'] == 3}-->
								<!--{if $thread['price'] > 0}-->
									<img src="{IMGDIR}/rewardsmall.gif" alt="{lang thread_reward}" />
								<!--{elseif $thread['price'] < 0}-->
									<img src="{IMGDIR}/rewardsmallend.gif" alt="{lang thread_rewardend}" />
								<!--{/if}-->
							<!--{elseif $thread['special'] == 4}-->
								<img src="{IMGDIR}/activitysmall.gif" alt="{lang thread_activity}" />
							<!--{elseif $thread['special'] == 5}-->
								<img src="{IMGDIR}/debatesmall.gif" alt="{lang thread_debate}" />
							<!--{elseif $thread['special'] == 6}-->
								<img src="{IMGDIR}/videosmall.gif" alt="{lang thread_video}" />
							<!--{else}-->
								$thread['icon']
							<!--{/if}-->
						</td>
						<th>
							<label>
							<!--{if $thread['special'] == 1}-->
								<img src="{IMGDIR}/pollsmall.gif" alt="{lang thread_poll}" />
							<!--{/if}-->
							<!--{if $thread['special'] == 2}-->
								<img src="{IMGDIR}/tradesmall.gif" alt="{lang thread_trade}" />
							<!--{/if}-->
							<!--{if $thread['special'] == 3}-->
								<!--{if $thread['price'] > 0}-->
									<img src="{IMGDIR}/rewardsmall.gif" alt="{lang thread_reward}" />
								<!--{elseif $thread['special'] == '3' && $thread['price'] < 0}-->
									<img src="{IMGDIR}/rewardsmallend.gif" alt="{lang thread_rewardend}" />
								<!--{/if}-->
							<!--{/if}-->
							<!--{if $thread['special'] == 4}-->
								<img src="{IMGDIR}/activitysmall.gif" alt="{lang thread_activity}" />
							<!--{/if}-->
							<!--{if $thread['special'] == 5}-->
								<img src="{IMGDIR}/debatesmall.gif" alt="{lang thread_debate}" />
							<!--{/if}-->
							<!--{if $thread['attachment']}-->
								<img src="images/attachicons/common.gif" alt="{lang attachment}" />
							<!--{/if}-->
							<!--{if $thread['displayorder']}-->
								<img src="{IMGDIR}/pin_$thread[displayorder].gif" alt="{lang thread_stick}<!--{if $thread['displayorder'] == 3}-->$threadsticky[0]<!--{elseif $thread['displayorder'] == 2}-->$threadsticky[1]<!--{elseif $thread['displayorder'] == 1}-->$threadsticky[2]<!--{/if}-->" />
							<!--{/if}-->
							<!--{if $thread['digest']}-->
								<img src="{IMGDIR}/digest_$thread[digest].gif" alt="{lang thread_digest} $thread[digest]" />
							<!--{/if}-->
							</label>
							<a href="viewthread.php?tid=$thread[tid]" target="_blank">$thread[subject]</a>
							<!--{if $thread[multipage]}-->
								<span class="threadpages">$thread[multipage]</span>
							<!--{/if}-->
						</th>
						<td class="forum"><a href="forumdisplay.php?fid=$thread[fid]">$thread[forumname]</a></td>
						<td class="author">
							<cite>
							<!--{if $thread['authorid'] && $thread['author']}-->
								<a href="space.php?uid=$thread[authorid]">$thread[author]</a>
							<!--{else}-->
								<!--{if $forum['ismoderator']}--><a href="space.php?uid=$thread[authorid]">{lang anonymous}</a><!--{else}-->{lang anonymous}<!--{/if}-->
							<!--{/if}-->
							</cite>
							<em>$thread[dateline]</em>
						</td>
						<td class="nums"><strong>$thread[replies]</strong> / <em>$thread[views]</em></td>
						<td class="lastpost">
							<em><a href="redirect.php?tid=$thread[tid]&amp;goto=lastpost#lastpost">$thread[lastpost]</a></em>
							<cite>{lang forum_lastpost_by} <!--{if $thread['lastposter']}--><a href="space.php?username=$thread[lastposterenc]">$thread[lastposter]</a><!--{else}-->{lang anonymous}<!--{/if}--></cite>
						</td>
					</tr>
				<!--{/loop}-->
			<!--{else}-->
				<tr><td colspan="5">{lang tag_nofound}</td></tr>
			<!--{/if}-->
	</table></div>

	<!--{if !empty($multipage)}-->
	<div class="pages_btns" style="margin-top: {TABLESPACE}px">
	$multipage
	</div>
	<!--{/if}-->

	{subtemplate footer}
<!--{/if}-->