Commit a36074d6 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use summary version of recent forum posts on group homepage


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent c3d17947
......@@ -85,6 +85,9 @@ class PluginBlocktypeRecentForumPosts extends SystemBlocktype {
$smarty = smarty_core();
$smarty->assign('group', $group);
$smarty->assign('foruminfo', $foruminfo);
if ($instance->get_view()->get('type') == 'grouphomepage') {
return $smarty->fetch('blocktype:recentforumposts:latestforumposts.tpl');
}
return $smarty->fetch('blocktype:recentforumposts:recentforumposts.tpl');
}
}
......
{if $foruminfo}
<table class="fullwidth s" id="groupforumtable">
{foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}">
<td><strong><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic|escape}#post{$postinfo->id}">{$postinfo->topicname}</a></strong></td>
<td>{$postinfo->body|str_shorten_html:100:true|safe}</td>
<td><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=20&amp;id={$postinfo->poster}" alt="">
<a href="{$WWWROOT}user/view.php?id={$postinfo->poster}">{$postinfo->poster|display_name|escape}</a>
</td>
</tr>
{/foreach}
</table>
{else}
<p>{str tag=noforumpostsyet section=interaction.forum}</p>
{/if}
<div class="right"><a href="{$WWWROOT}interaction/forum/?group={$group->id}">{str tag=gotoforums section=interaction.forum} &raquo;</a></div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment