Bu aşağıdaki kodları silmelisin ve diğer kalan kodlarda da kategori id tanımlaması yapmalısın:
$cont4 = "";
$cont5 = "";
$cont6 = "";
// Bir kategorinin haberlerini alıyoruz. Kategori id değerini idcategoria = '4' bölümünde tanımlayınız.
$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 validate = '1' and idcategoria = '4' ORDER BY `pinned` DESC, `id` DESC LIMIT 5");
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);
}
// Bölüm adını tanımlıyoruz.
$sezione4 = $row['titcat'];
$icona = $row['icona'];
switch($icona) {
case '1':
$image = "$this->images/icona_news.gif";
break;
case '2':
$image = "$this->images/icona_help.gif";
break;
case '3':
$image = "$this->images/icona_star.gif";
break;
case '4':
$image = "$this->images/icona_pc.gif";
break;
case '5':
$image = "$this->images/icona_world.gif";
break;
default:
$image = $icona;
break;
}
$pinned = $row['pinned'] ? " <img src=\"$this->images/pin.gif\" border=\"0\" alt=\"\" />" : '';
$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 .= " ...";
}
$cont4 .= "
- <a href=\"index.php?ind=news&op=news_show_single&ide={$row['id']}\">$titolo<br/></a>
";
}
// Bir kategorinin haberlerini alıyoruz. Kategori id değerini idcategoria = '5' bölümünde tanımlayınız.
$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 validate = '1' and idcategoria = '5' ORDER BY `pinned` DESC, `id` DESC LIMIT 5");
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);
}
// Bölüm adını tanımlıyoruz.
$sezione5 = $row['titcat'];
$icona = $row['icona'];
switch($icona) {
case '1':
$image = "$this->images/icona_news.gif";
break;
case '2':
$image = "$this->images/icona_help.gif";
break;
case '3':
$image = "$this->images/icona_star.gif";
break;
case '4':
$image = "$this->images/icona_pc.gif";
break;
case '5':
$image = "$this->images/icona_world.gif";
break;
default:
$image = $icona;
break;
}
$pinned = $row['pinned'] ? " <img src=\"$this->images/pin.gif\" border=\"0\" alt=\"\" />" : '';
$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 .= " ...";
}
$cont5 .= "
- <a href=\"index.php?ind=news&op=news_show_single&ide={$row['id']}\">$titolo<br/></a>
";
}
// Bir kategorinin haberlerini alıyoruz. Kategori id değerini idcategoria = '6' bölümünde tanımlayınız.
$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 validate = '1' and idcategoria = '6' ORDER BY `pinned` DESC, `id` DESC LIMIT 5");
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);
}
// Bölüm adını tanımlıyoruz.
$sezione6 = $row['titcat'];
$icona = $row['icona'];
switch($icona) {
case '1':
$image = "$this->images/icona_news.gif";
break;
case '2':
$image = "$this->images/icona_help.gif";
break;
case '3':
$image = "$this->images/icona_star.gif";
break;
case '4':
$image = "$this->images/icona_pc.gif";
break;
case '5':
$image = "$this->images/icona_world.gif";
break;
default:
$image = $icona;
break;
}
$pinned = $row['pinned'] ? " <img src=\"$this->images/pin.gif\" border=\"0\" alt=\"\" />" : '';
$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 .= " ...";
}
$cont6 .= "
- <a href=\"index.php?ind=news&op=news_show_single&ide={$row['id']}\">$titolo<br/></a>
";
}
<td valign=\"top\" width=\"50%\">
<table class=\"tabnews\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
<tbody>
<tr>
<td class=\"tdblock\" valign=\"top\" width=\"95%\">
<b>$sezione4</b>
</td>
</tr>
<tr>
<td colspan=\"2\">
{$cont4}
</td>
</tr>
</tbody>
</table>
</td>
<tr>
<td valign=\"top\" width=\"50%\">
<table class=\"tabnews\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
<tbody>
<tr>
<td class=\"tdblock\" valign=\"top\" width=\"95%\">
<b>$sezione5</b>
</td>
</tr>
<tr>
<td colspan=\"2\">
{$cont5}
</td>
</tr>
</tbody>
</table>
</td>
<td valign=\"top\" width=\"50%\">
<table class=\"tabnews\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
<tbody>
<tr>
<td class=\"tdblock\" valign=\"top\" width=\"95%\">
<b>$sezione6</b>
</td>
</tr>
<tr>
<td colspan=\"2\">
{$cont6}
</td>
</tr>
</tbody>
</table>
</td>
</tr>