Bu şekilde 3 taneden sonra alta geçmesi gerekir.
Denermisin
<?php
$limit = $this->config['news_block'];
if (!$limit) {
$limit = 5;
}
$cont = "";
$content = "";
$link_user = $mklib_board->forum_link("profile");
$query = $DB->query( "SELECT n.id, n.idcategoria, n.idautore, n.titolo, n.autore, n.testo, n.data, n.totalcomm, s.id AS idcat, s.titolo AS titcat, s.icona, n.pinned
FROM mkp_news AS n
LEFT JOIN mkp_news_sections AS s ON(s.id = n.idcategoria)
WHERE n.idcategoria = '2' ORDER BY `id` DESC LIMIT $limit");
$x = 0;
echo $cont .="<table class=\"tabnews\" align='left' cellspacing=\"0\" cellpadding=\"0\" width=\"33%\">
<tr>";
while( $row = $DB->fetch_row($query) ) {
$idnt = $row['id'];
$totcomments = $row['totalcomm'];
$id_orig_name = $row['idautore'];
$idcategoria = $row['idcategoria'];
$titolo = stripslashes($row['titolo']);
$name = $row['autore'];
$testo = stripslashes($row['testo']);
if ($this->mkeditor == "BBCODE") {
$testo = $this->decode_bb($testo);
$testo = $mklib_board->decode_smilies($testo);
}
$sezione = $row['titcat'];
$cdata = $this->create_date($row['data']);
$news_words= $this->config['news_words'];
if ($this->config['news_html']) {
$testo = str_replace ("<br />", " ", $testo);
$testo = strip_tags ($testo);
}
if ($news_words) {
$testo = substr ($testo, 0, $news_words);
$testo .= " ...";
}
$cont .= "<td class=\"tdblock\" valign=\"top\"><p style=\"text-align:center\"><a href=\"index.php?ind=news&op=news_show_single&ide={$row['id']}\"><font color=\"red\" size=\"1pt\">$titolo</font><br /><img src=\"$this->siteurl/mkportal/upload_image/images/$idnt.jpg\" border=\"0\" width=\"165\" height=\"55\" alt=\"$testo\" /><br />$testo</a></p></td>";
if ($x==3) {
echo $cont .="</tr><tr>";
$x = 0;
}
}
echo $cont .="</tr>
</table>";
$content = "
<tr>
<td class=\"contents\">
<div class=\"taburlo\">
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
<tr>
<td class=\"taburlo\" valign=\"top\">
{$cont}
</td>
</tr>
</table>
</div>
</td>
</tr>
";
unset($cont);
unset($row);
unset($idcat);
unset($categoria);
unset($idnt);
unset($query);
unset($query2);
unset($totcomments);
unset($id_orig_name);
unset($idcategoria);
unset($titolo);
unset($name);
unset($testo);
unset($sezione);
unset($cdata);
unset($news_words);
?>