smf sitenizdek son konular bölümünü düzenli yapmak için
Themes/default/boardindex.template.php
dosyasında
Ara
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
sonrasına ekliyoruz
// Show lots of posts.
if (!empty($context['latest_posts']))
{
echo '
<table cellspacing="1" width="100%" cellpadding="0" border="0">';
foreach ($context['latest_posts'] as $post)
echo '
<tr><td class="windowbg2" valign="top" width="30%"><span class="smalltext">', $post['board']['link'], '</span></td>
<td class="windowbg2" valign="top" width="30%"><span class="smalltext"><a href="',$post['href'],'">', $post['short_subject'], '</a></span></td>
<td class="windowbg2" valign="top" width="17%"><span class="smalltext">', $txt['by'], ' ', $post['poster']['link'], '</span></td>
<td class="windowbg2" valign="top" width="23%"><span class="smalltext">', $post['time'], '</span></td></tr>';
echo '</table>';
}
Linkback: https://www.buyuknet.com/smf-son-konular-bolumunu-duzenli-yapmak-t38502.0.html