69 lines
4.9 KiB
Smarty
69 lines
4.9 KiB
Smarty
{* RECENT FORUMS *}
|
|
<div class='header'><a href="http://bateworld.com/forum.php" title="Forums">Recent Forums</a></div>
|
|
<div style="background:#000;padding:10px;" id="recent-forums">
|
|
{* LIST CATEGORIES *}
|
|
{section name=forumcat_loop loop=$forumcats max=4}
|
|
{if $forumcats[forumcat_loop].forums|@count != 0}
|
|
{* LIST FORUMS *}
|
|
{section name=forum_loop loop=$forumcats[forumcat_loop].forums max=1}
|
|
{* THERE IS A LAST POST IN THIS FORUM *}
|
|
{if $forumcats[forumcat_loop].forums[forum_loop].lastpost}
|
|
{* LAST POST AUTHOR EXISTS *}
|
|
{if $forumcats[forumcat_loop].forums[forum_loop].lastpost_info.author->user_exists}
|
|
<ul>
|
|
<li class="tpr" style="padding:0 5px 0 5px;"><img src='{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.author->user_photo("./images/nophoto.png",true)}' width='{$misc->photo_size($forumcats[forumcat_loop].forums[forum_loop].lastpost_info.author->user_photo("./images/nophoto.png"),"40","40","w")}'></li>
|
|
<li style="padding:0 10px 0 10px;"><a href='forum_topic.php?forum_id={$forumcats[forumcat_loop].forums[forum_loop].forum_id}&topic_id={$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumtopic_id}&post_id={$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_id}#post_{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_id}'>{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumtopic_subject}</a>
|
|
{capture assign="lastpost_user"}<a href='{$url->url_create("profile", $forumcats[forumcat_loop].forums[forum_loop].lastpost_info.author->user_info.user_username)}'>{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.author->user_displayname}</a>{/capture}
|
|
<div>
|
|
{lang_sprintf id=6000095 1=$lastpost_user}
|
|
{assign var='lastpost_date_basic' value=$datetime->time_since($forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_date)}
|
|
- {lang_sprintf id=$lastpost_date_basic[0] 1=$lastpost_date_basic[1]}
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div style="clear:both;height:1px;margin-top:-1px;font-size:0px;overflow:hidden;"> </div>
|
|
<div style="padding:0 10px 0 10px;">
|
|
{capture name="thebody"}
|
|
{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_excerpt}
|
|
{/capture}
|
|
{$smarty.capture.thebody}...
|
|
</div>
|
|
{if $forumcats[forumcat_loop].forums|@count > 1 && $smarty.section.forum_loop.rownum < $forumcats[forumcat_loop].forums|@count}
|
|
<div style="padding:3px 0 5px 0;"><hr style='text-align:center;width:100%;' /></div>
|
|
{/if}
|
|
{* AUTHOR DOES NOT EXIST *}
|
|
{else}
|
|
<ul>
|
|
<li><img src='./images/nophoto.png' width='40'></li>
|
|
<li>
|
|
<a href='forum_topic.php?forum_id={$forumcats[forumcat_loop].forums[forum_loop].forum_id}&topic_id={$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumtopic_id}&post_id={$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_id}#post_{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_id}'>{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumtopic_subject}</a>
|
|
{capture assign="lastpost_user"}{if $forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_authoruser_id != 0}{lang_print id=1071}{else}{lang_print id=835}{/if}{/capture}
|
|
<div>
|
|
{lang_sprintf id=6000095 1=$lastpost_user}
|
|
{assign var='lastpost_date_basic' value=$datetime->time_since($forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_date)}
|
|
- {lang_sprintf id=$lastpost_date_basic[0] 1=$lastpost_date_basic[1]}
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div style="clear:both;height:1px;margin-top:-1px;font-size:0px;overflow:hidden;"> </div>
|
|
<div>
|
|
{capture name="thebody"}
|
|
{$forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_excerpt}
|
|
{/capture}
|
|
{$smarty.capture.thebody}...
|
|
</div>
|
|
{if $forumcats[forumcat_loop].forums|@count > 1 && $smarty.section.forum_loop.rownum < $forumcats[forumcat_loop].forums|@count}
|
|
<!-- <div style="padding:3px 0 3px 0;"><hr style='text-align:center;width:100%;' /></div> //-->
|
|
{/if}
|
|
{/if}
|
|
{* NO LAST POST *}
|
|
{else}
|
|
{/if}
|
|
{/section}
|
|
{/if}
|
|
{if $smarty.section.forumcat_loop.rownum < 4 && $forumcats[forumcat_loop].forums[forum_loop].lastpost_info.forumpost_excerpt==''}
|
|
<div style="padding:3px 0 5px 0;"><hr style='text-align:center;width:100%;' /></div>
|
|
{/if}
|
|
{/section}
|
|
</div>
|
|
<div class='portal_spacer'></div> |