1
Gestione Forum / Re: SMF - Discussione attive
« il: 06 Feb 2007, 15:02:37 »
Risolto :
Basta mettere nel board.index.template sulla infobar il seguente codice
/****RECENT TOPICS****/
/*require_once("SSI.php");*/
// This is the "Recent Topics" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">Discussioni attive</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" />[/url]
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="90%" border="0">';
/*
Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.),
poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href.
*/
/*
$posts = ssi_recentTopics(8, null, 'return');
foreach ($posts as $post)
{
echo 'Post: <a href="', $post['href'], '">', $post['subject'], '[/url]
Description: ', $post['short_subject'], '
';
}
*/
$posts = ssi_recentTopics($settings['number_recent_posts'], null, 'return');
foreach ($posts as $post)
echo '
<tr>
<td class="middletext" valign="top" nowrap="nowrap">
',
$post['link'],
' ',
$txt[525],
' ',
$post['poster']['link'],
' (',
$post['board']['link'],
')
</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">',
$post['time'],
'</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}
/***RECENT TOPICS***/
Basta mettere nel board.index.template sulla infobar il seguente codice
/****RECENT TOPICS****/
/*require_once("SSI.php");*/
// This is the "Recent Topics" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">Discussioni attive</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" />[/url]
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="90%" border="0">';
/*
Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.),
poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href.
*/
/*
$posts = ssi_recentTopics(8, null, 'return');
foreach ($posts as $post)
{
echo 'Post: <a href="', $post['href'], '">', $post['subject'], '[/url]
Description: ', $post['short_subject'], '
';
}
*/
$posts = ssi_recentTopics($settings['number_recent_posts'], null, 'return');
foreach ($posts as $post)
echo '
<tr>
<td class="middletext" valign="top" nowrap="nowrap">
',
$post['link'],
' ',
$txt[525],
' ',
$post['poster']['link'],
' (',
$post['board']['link'],
')
</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">',
$post['time'],
'</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}
/***RECENT TOPICS***/