IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name, t.num_views, t.num_replies,
แต่ว่าในไฟล์ SMF 2.0.11 มีแค่นี้เองโค๊ด: [Select]IFNULL(mem.real_name, m.poster_name) AS poster_name,
[/color][/size]
'subject' => $row['subject'],
'views' => comma_format($row['num_views']),
'replies' => comma_format($row['num_replies']),
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_recentposts" class="middletext">';
/* 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. */
foreach ($context['latest_posts'] as $post)
echo '
<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
<dd>', $post['time'], '</dd>';
echo '
</dl>';
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="1" width="100%" border="0">
<tr>
<td class="catbg2" style="text-align:left;" colspan="2">',$txt['recent_title'],'</td>
<td class="catbg2" style="text-align:center;">',$txt['recent_views'],'</td>
<td class="catbg2" style="text-align:center;">',$txt['recent_replies'],'</td>
<td class="catbg2" style="text-align:center;">',$txt['recent_boardname'],'</td>
<td class="catbg2" style="text-align:center;">',$txt['recent_by'],'</td>
<td class="catbg2" style="text-align:right;">',$txt['recent_time'],'</td>
</tr>';
$cnt = 0;
foreach ($context['latest_posts'] as $post){
$cnt++;
$class = ($cnt % 2) ? 'windowbg' : 'windowbg2';
echo '
<tr>
<td></td>
<td class="', $class, '" title="', $post['preview'] ,'">', $post['link'], ' <img src="' . $settings['lang_images_url'] . '/new.gif"</td>
<td class="', $class, '" style="text-align:center;">', $post['views'], '</td>
<td class="', $class, '" style="text-align:center;">', $post['replies'], '</td>
<td class="', $class, '" style="text-align:center;">',$post['board']['link'], '</td>
<td class="', $class, '" style="text-align:center;">',$post['poster']['link'], '</td>
<td class="', $class, '" style="text-align:right;" nowrap="nowrap">', $post['time'], '</td>
</tr>';
}
echo '
</table>';
?>
//welove Replies and Views on Recent Posts
$txt['recent_title'] = 'กระทู้ล่าสุด';
$txt['recent_views'] = 'อ่าน';
$txt['recent_replies'] = 'ตอบ';
$txt['recent_boardname'] = 'รายชื่อบอร์ด';
$txt['recent_by'] = 'ผู้โพสท์';
$txt['recent_time'] = 'วัน/เวลา';
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_recentposts" class="middletext">';
/* 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. */
foreach ($context['latest_posts'] as $post)
echo '
<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
<dd>', $post['time'], '</dd>';
echo '
</dl>';
}
//-- Labradoodle-360; Advanced Recent Posts
elseif (!empty($context['latest_posts']))
{
echo '
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
<tr>
<td class="arp_header">', $txt['topic_name'] ,':</td>
<td class="arp_header">', $txt['poster_name'] ,':</td>
<td class="arp_header">', $txt['board_name'] ,':</td>
<td class="arp_header">', $txt['post_time'] ,':</td>
</tr>';
foreach ($context['latest_posts'] as $post)
{
echo '
<tr>
<td class="arppost arp_left">', $post['link'], '</td>
<td class="arppost arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arp_rest">', $post['board']['link'], '</td>
<td class="arppost arp_rest">', $post['time'], '</td>
</tr>';
}
echo '
</table>
<br />
';
}
// End Labradoodle-360; Advanced Recent Posts --//
/*-- Labradoodle-360; Advanced Recent Posts */
.arp_header {
font-weight: bold;
text-align: center;
}
.arppost {
background-color: #f6f6f6;
width: 20%;
text-align: center;
}
.arppost:hover {
background: #e0e6e6;
}
.arp_left {
border-top: 1px solid #b7b7b7;
border-bottom: 1px solid #b7b7b7;
border-left: 1px solid #b7b7b7;
border-right: 1px solid #b7b7b7;
}
.arp_rest {
border-top: 1px solid #b7b7b7;
border-bottom: 1px solid #b7b7b7;
border-right: 1px solid #b7b7b7;
}
/* End Labradoodle-360; Advanced Recent Posts --*/
?>
//-- Labradoodle-360; Advanced Recent Posts
$txt['topic_name'] = 'หัวข้อ';
$txt['poster_name'] = 'ผู้โพสท์';
$txt['board_name'] = 'รายชื่อบอร์ด';
$txt['post_time'] = 'เดือน/วัน/ปี/เวลา';
// End Labradoodle-360; Advanced Recent Posts --//
?>
//-- Labradoodle-360; Advanced Recent Posts
$txt['topic_name'] = 'Topic';
$txt['poster_name'] = 'Poster';
$txt['board_name'] = 'Board';
$txt['post_time'] = 'Post Time';
// End Labradoodle-360; Advanced Recent Posts --//