Location: PHPKode > projects > Jarida > jarida_1.0/templates/default/article.tpl
{if !$smarty.get.id}
<table width="100%">
{section name=articles loop=$articles}
<tr><td>
<table width="100%" cellspacing="1px">
<tr><td class="article_title" colspan="2"><a href="./article.php?id={$articles[articles].id}">{$articles[articles].title|capitalize}</a></td></tr>
<tr class="article_body"><td align="left">{$articles[articles].date|date_format:"%b %e, %Y :: %T"}</td>
<td align="right"><a href="./article.php?id={$articles[articles].id}">{$lang.article_comments}</a> ({$articles[articles].numComments})</td></tr>
</table>
</td></tr>
{/section}
</table></td>
{else}
<table width="100%" cellspacing="1px">
<tr><td class="article_title" colspan="2">{$article.title|capitalize}</td></tr>
<tr class="article_date"><td align="left">{$article.date|date_format:"%b %e, %Y :: %T"}</td>
<td align="right">{$lang.article_comments} : {$article.numComments}</td></tr>
<tr><td class="article_body" colspan="2">
{if $article.photo_file}
{html_image file=`$article.photo_file` width=`$article.dimensions.width` height=`$article.dimensions.height` align=left}
{/if}
{$article.body|nl2br}
</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
{section name=comments loop=$comments}
<tr><td class="comment_title" colspan="2">
{$comments[comments].title}
</td></tr>
<tr><td class="comment_date" colspan="2">
{if $comments[comments].web}
<a href="{$comments[comments].web}" target="_blank">{$comments[comments].name}</a>
{else}
{$comments[comments].name}
{/if}
&nbsp; :: &nbsp; {$comments[comments].date|date_format:"%b %e, %Y :: %T"}
</td></tr>
<tr><td class="comment_body" colspan="2">
{$comments[comments].body|nl2br}
</td></tr>
{/section}
<tr><td>&nbsp;</td><tr>
</table>
<div class="comment_head">{$lang.comment_head}</div>
<table width="100%">
<form name="comment_form" id="comment_form" method="post" action="./comment.php">
<tr><td class="form_label">{$lang.comment_name}</td>
<td class="form_input"><input type="text" name="name" size="50" /></td></tr>
<tr><td class="form_label">{$lang.comment_web}</td>
<td class="form_input"><input type="text" name="web" size="50" /></td></tr>
<tr><td class="form_label">{$lang.comment_title}</td>
<td class="form_input"><input type="text" name="title" size="50" /></td></tr>
<tr><td class="form_label">{$lang.comment_body}</td>
<td class="form_input"><textarea name="body" cols="50" rows="15"></textarea></td></tr>
<input type="hidden" name="id" value="{$smarty.get.id}" />
<input type="hidden" name="type" value="article" />
<tr><td colspan="2" align="center"><input type="submit" name="submit" value="{$lang.submit}" />
<p>{section name=smilies loop=$smilies}
<img border="0" src="./img/{$smilies[smilies].file}" alt="{$smilies[smilies].code}" 
title="{$smilies[smilies].code}" onClick="writeImgTag('comment_form','{$smilies[smilies].code}')"
style="cursor:pointer " />
{/section}
</p></td></tr>
</form>
</table>
</td>
{/if}
Return current item: Jarida