ไม่รู้ว่า เป็นโค๊ดส่วนนี้หรือเปล่านะครับ
/* 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. */
// ----------*** แก้ไขกระทู้เมื่อเร็วๆนี้ให้แสดงผลแบบชัดเจน ***----------
$cnt = 0;
foreach ($context['latest_posts'] as $post){
$cnt++;
$class = ($cnt % 2) ? 'windowbg' : 'windowbg2';
echo '
<tr>
<td class="', $class, '"><img src="', $post['icon'] , '" alt="" /></td>
<td class="', $class, '"" title="', $post['preview'] ,'">', $post['link'], '</td>
<td class="', $class, '"" style="text-align:center;">', $post['replies'], '</td>
<td class="', $class, '"" style="text-align:center;">', $post['views'], '</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>';
}
echo '
</td>
</tr>';
}
ลิงค์หัวข้อ:
http://dexmore.com/topic/6177