{include file='header.tpl' p="article"} 

<br />
<table width="886" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="150" valign="top">
	<div id="reg_box">
	<h3 class="captions">{$lang.articles}</h3>
		<div id="list_cats">
		<ul>
		    {$article_categories}
		</ul>
		</div>
	</div>
	<br />
	<div id="reg_box">
	<h3 class="captions">{$lang.members}</h3>
	{if $logged_in == '1'}
	{include file='loggedin_body.tpl'} 
	{else}
	{include file='login_body.tpl'} 
	{/if}
	</div>
	{if ($show_tags == 1) && (count($tags) > 0)}
	<br />
	<div id="reg_box">
	<h3 class="captions">{$lang.tags}</h3>
	<br />
	{foreach from=$tags item=tag key=k}
		{$tag.href}
	{/foreach}
	</div>
	{/if}
	</td>
    <td width="738" valign="top">

	{if is_array($article)}
	<div id="css_articles">
		<div class="articleContent">
		<h2>{$article.title}</h2>
	
		<div class="pubDate"><strong>{$lang.articles_published}</strong>: {$article.date} {$lang.articles_by} <a href="{$smarty.const._URL}/profile.{$smarty.const._FEXT}?u={$article.username}">{$article.username}</a> 
			<span class="articleBreadcrumb"><strong>{$lang.articles_filedunder}</strong>: 
			{foreach from=$article.pretty_cats key=cat_name item=cat_href}
			  <a href="{$cat_href}" title="{$cat_name}">{$cat_name}</a> 
			{/foreach} 
			
			<strong>{$lang.views}</strong>: {$article.views_formatted} 
			
			{if is_array($article.tags)}
			<strong>{$lang.tags}</strong>:
			
			 {foreach name=tag_links from=$article.tags key=k item=t}
			   {if $smarty.foreach.tag_links.last}
			    <a href="{$t.link}" title="{$t.tag}">{$t.tag}</a> 
			   {else}
			    <a href="{$t.link}" title="{$t.tag}">{$t.tag}</a>, 
			   {/if}
			 {/foreach}
			
			{/if}
			</span>
		</div>
			<!--{if !empty($list_subcats)}	
			 <div id="list_subcats">
			 <h4>{$lang.related_cats}</h4>
			 <ul>
			  {$list_subcats}
			 </ul>
			 </div>
			{/if}--> 
			<div id="articleParagraph">
			<span class="shortcuts">
				<a href="#" class="increaseFont">[+]</a> <a href="#" class="resetFont">[a]</a> <a href="#" class="decreaseFont">[-]</a>
				<a href="#relatedLinks" class="anchorLink">{$lang.articles_related}</a> <a href="#comments" class="anchorLink">{$lang.comments}</a> 
				{if $logged_in && $is_admin == 'yes'}
				 <a href="{$smarty.const._URL}/admin/article_manager.php?do=edit&id={$article.id}" title="{$lang.edit}" target="_blank">{$lang.edit}</a> 
				{/if}
			</span>
			<br />
					<div id="pm_resizer">{$article.content}</div>
			<div align="center">{$ad_4}</div>
			</div>
			{if $facebook_like_href != ''}
				<iframe src="http://www.facebook.com/plugins/like.php?href={$facebook_like_href}&amp;layout=standard&amp;show_faces=false&amp;width=400&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:400px; height:35px;" allowTransparency="true"></iframe>
			{/if}
		</div>

		<a name="relatedLinks" id="relatedLinks"></a>
		<div class="relatedArticles">
		<h3>{$lang.articles_related}</h3>
			{if is_array($related_articles) && count($related_articles) > 0}
			 <ul class="relatedArticleli">
			 	{foreach from=$related_articles item=related key=id}
			    <li>
			   	{if $related.meta.post_thumb_show != ''}
			   	<a href="{$related.link}"><img src="{$smarty.const._ARTICLE_ATTACH_DIR}/{$related.meta.post_thumb_show}" align="left" width="55" height="55" alt="" class="artThumb" /></a>
				{/if} 				
				<a href="{$related.link}">{smarty_fewchars s=$related.title length=42}</a>
				<br />
				{if $related.meta.post_thumb_show == ''}
				<div class="minDesc">{smarty_fewchars s=$related.excerpt length=190}</div>
				{else}
				<div class="minDesc">{smarty_fewchars s=$related.excerpt length=130}</div>
				{/if}
				</li>
			    {/foreach}
			 </ul>
			{/if}
		</div>

		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		   <td colspan="2">
		    <br />
			<a name="comments" id="comments"></a>
			{if $article.allow_comments == 1}
				<div class="postComments">
				{if $logged_in == '1'}
				<h3>{$lang.post_comment}</h3>
				<span class="mycommentspan" name="mycommentspan" id="mycommentspan"></span>
				<form action="" name="myform" method="post" id="myform">
				 <textarea name="comment_txt" id="c_comment_txt" style="width:96%" rows="5" onkeyup="textLimit(this, 400);"></textarea>
				 <input type="hidden" id="c_vid" name="vid" value="{$uniq_id}" />
				 <input type="hidden" id="c_user_id" name="user_id" value="{$user_id}" />
				 <br />
				 <input type="submit" id="c_submit" name="Submit" value="{$lang.submit_comment}" class="inputbutton" />
				 <br />
				 <span class="small-warning">* {$lang.post_comment_notice}</span>
				</form>
				{elseif $logged_in == 0 && $guests_can_comment == 1}
					<h3>{$lang.post_comment}</h3>
					<span class="mycommentspan" name="mycommentspan" id="mycommentspan"></span>
					<form action="" name="myform" method="post" id="myform">
					 {$lang.your_name}:<br />
					<input type="text" id="c_username" name="username" value="{$guestname}" class="inputtext" /><br /><br />
					{$lang.your_comment}:<br />
					<textarea id="c_comment_txt" name="comment_txt" style="width:95%" rows="5" onkeyup="textLimit(this, 400);"></textarea><br /><br />
					{$lang.confirm_comment}:<br />
					<img src="{$smarty.const._URL}/include/securimage_show.php?sid={php}echo md5(uniqid(time()));{/php}" id="image" align="absmiddle" />
					<a href="#" onclick="document.getElementById('image').src = '{$smarty.const._URL}/include/securimage_show.php?sid=' + Math.random(); return false"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/reload.gif" border="0" align="absmiddle" /></a>
					<br />
					<input class="inputtext" name="captcha" type="text" id="captcha" size="15" maxlength="15" />
		
					<input type="hidden" id="c_vid" name="vid" value="{$uniq_id}" />
					<input type="hidden" id="c_user_id" name="user_id" value="0" />
					<br />
					<input type="submit" id="c_submit" name="Submit" value="{$lang.submit_comment}" class="inputbutton" />
					<br /><span class="small-warning">* {$lang.post_comment_notice}</span>
					</form>
				{/if}
				<br />
				<h3>{$lang.comments}</h3>
				<div class="comment_box">
				{if $show_comments == 'empty'}
					<ol>
					<li id="preview_comment">
					</li>
					</ol>
					<div id="be_the_first" class="be_the_first">{$lang.be_the_first}</div>
				{else}
					<ol>
					<li id="preview_comment"></li>
					</ol>
					<ol id="comments_ol">
					{$show_comments}
					</ol>
				{/if}
				{if $logged_in != '1' && $guests_can_comment != 1}<br />{$must_sign_in}{/if}
				</div>
			 {/if}
		   </td>
		  </tr>
		</table>

		<div class="shareLinks">
		<ul>
			<li class="upLink"><a href="#top" class="anchorLink">{$lang.top}</a></li>

			<li><a href="http://twitter.com/home/?status={$article.title}+{$article.link}" title="Tweet this" target="_blank"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/share/twitter.gif"  alt="{$lang.share_video}" width="16" height="16" border="0" align="absmiddle" /></a></li>
			<li><a href="http://www.facebook.com/share.php?u={$article.link}&title={$article.title}" target="_blank"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/share/facebook.gif"  alt="{$lang.share_video}" width="16" height="16" border="0" align="absmiddle" />  </a> </li>
			<li><a href="http://digg.com/submit?phase=2&url={$article.link}&title={$article.title}" target="_blank"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/share/digg.gif"  alt="{$lang.share_video}" width="16" height="16" border="0" align="absmiddle" />  </a></li>
			<li><a href="http://del.icio.us/post?url={$article.link}&title={$article.title}" target="_blank"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/share/delicious.gif"  alt="{$lang.share_video}" width="16" height="16" border="0" align="absmiddle" />  </a></li>
			<li><a href="http://www.google.com/bookmarks/mark?op=edit&bkmk={$article.link}&title={$article.title}" target="_blank"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/share/google.gif"  alt="{$lang.share_video}" width="16" height="16" border="0" align="absmiddle" />  </a></li>
			<li><a href="http://en.reddit.com/submit?url={$article.link}&title={$article.title}" target="_blank"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/share/reddit.gif"  alt="{$lang.share_video}" width="16" height="16" border="0" align="absmiddle" />  </a></li>
		</ul>
		</div>
		<div style="clear:both;"></div>
	{else}
	<div id="css_articles">
		<div class="articleContent">
		<h2>{$article}</h2>
	<div style="clear:both;"></div>
	{/if}
	</div>
	</td>
  </tr>
</table>
{include file='footer.tpl'} 