I recently added a MOD that displays the topic starters avatar next to the thread on the board view of the forum, really cool, and want it to also do it on the Recent Topics/Posts bloc I have on the front. Would someone know how to recode the code I am using to allow that to happen?
this is the code I am using -
global $scripturl;
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr><td colspan="3" class="titlebg">Most Recently Posted To Topics</td></tr> ';
$what=ssi_recentTopics('12', NULL, 'array');
foreach ($what as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">
', $topic['link'];
// Is this topic new? (assuming they are logged in!)
if (!$topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '
</td>
<td class="windowbg2" valign="middle" width="20%">
', $topic['poster']['link'], '
</td>
<td class="windowbg2" valign="middle" width="35%">';
if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
echo '
<span class="smalltext">
', $topic['time'], '
</span>
</td>
</tr>';
}
echo '
</table>';
ANYONE?!?! Please!! Please!! Please!! Please!! Please!! Please!! Please!! Please!!
The SSI recentTopics(); function doesn't include an avatar information in the database call. I would assume the members table would have to be joined in on the fun. :) I'm not sure exactly what it required to do it, but I'll play with it and see what I can do. The only problem is it will require you to make a change to the recent topics function in the SSI. I guess we could just make a copy of it and call it something else, then add the changes. I'll see what I can do. I make no promises though. :)
Quote from: IchBinâ„¢ on February 06, 2007, 01:21:41 AM
The SSI recentTopics(); function doesn't include an avatar information in the database call. I would assume the members table would have to be joined in on the fun. :) I'm not sure exactly what it required to do it, but I'll play with it and see what I can do. The only problem is it will require you to make a change to the recent topics function in the SSI. I guess we could just make a copy of it and call it something else, then add the changes. I'll see what I can do. I make no promises though. :)
Anything yet Ich??