Gönderen Konu: bu şekilde haber bloğu yapabılırmıyız.(çözüldü:çözen:burajan)  (Okunma sayısı 7489 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı isabey

  • Moderatör
  • *
  • İleti: 585
  • Puan: 70
  • Cinsiyet: Bay
    • isabey koyu
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #10 : Temmuz 07, 2008, 22:31:58 ÖS »
tskurler gardes
gardes 2 sorumvar  biri 4 lu haber yapmak 2.soruda nasil kategoru ayarlariz  ben sitede 6 cesit kategoru var 3 calisyiyor digerleri calismiyor nasil ayarlariz saygilar

http://www.isabeykoyu.com/
Konuyu Paylaş:
  delicious  facebook  twitter  google

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5051
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #11 : Temmuz 07, 2008, 23:00:56 ÖS »
Bu aşağıdaki kodları silmelisin ve diğer kalan kodlarda da kategori id tanımlaması yapmalısın:
Kod: [Seç]
$cont4 = "";
$cont5 = "";
$cont6 = "";

Kod: [Seç]
// 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'] ? "&nbsp;<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&amp;op=news_show_single&amp;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'] ? "&nbsp;<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&amp;op=news_show_single&amp;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'] ? "&nbsp;<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&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
";
}

Kod: [Seç]
<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>

Kod: [Seç]
<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>
« Son Düzenleme: Temmuz 07, 2008, 23:04:21 ÖS Gönderen: burajan »
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5051
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #12 : Temmuz 07, 2008, 23:05:40 ÖS »
Yukarıda yazdığım kod c1.2 içindir.

4'lü haber için DESC LIMIT 5 kısmından 4 diye belirtebilirsin.
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı isabey

  • Moderatör
  • *
  • İleti: 585
  • Puan: 70
  • Cinsiyet: Bay
    • isabey koyu
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #13 : Temmuz 08, 2008, 08:32:37 ÖÖ »
  haber kategoru numaralarini ayarlarmisniz  bir turluyapamdim kafayi yedimya lutfen 6 haber kategoriye gore ayarlarmisniz saygilar  2  3  4   9  10 11    buna gerek yok  8


 
Kod: [Seç]
<?php
/*
+--------------------------------------------------------------------------
|   MkPortal
|   ========================================
|   by Meo aka Luponero <Amedeo de longis>
|      Don K. Colburn <visiblesoul.net>
|
|   Copyright (c) 2003-2008 mkportal.it
|   http://www.mkportal.it
|   Email: luponero@mclink.it
|
+---------------------------------------------------------------------------
|
|   > MKPortal
|   > Written By Amedeo de longis
|   > Date started: 9.2.2004
|
+--------------------------------------------------------------------------
|
|   > Kategorili Haberler Blo&eth;u Yap&yacute;mc&yacute; Bilgisi
|   > Burak &THORN;&Yacute;M&THORN;EK (Burajan)
|   > http://www.buraksimsek.net
|   > http://www.uzmanweb.net
|   >Yay&yacute;n Tarihi: 07 Temmuz 2008 Pazartesi
|
+--------------------------------------------------------------------------
*/
if (!defined("IN_MKP")) {
    die (
"Sorry !! You cannot access this file directly.");
}

$limit $this->config['news_block'];
if (!
$limit) {
$limit 5;
}

// Her yeni kategori için bir cont atamas&yacute; yap&yacute;yoruz.
// E&eth;er yeni bir kategori blo&eth;u eklemek istiyorsan&yacute;z bu a&thorn;a&eth;&yacute;daki cont de&eth;erinden bir tane daha ekleyin ve say&yacute;s&yacute;n&yacute; belirtin.
// Örnek: $cont10 = "";
$cont "";
$cont2 "";
$cont3 "";
$cont4 "";
$cont5 "";
$cont6 "";
$content "";
$link_user $mklib_board->forum_link("profile");

// Bir kategorinin haberlerini al&yacute;yoruz. Kategori id de&eth;erini idcategoria = '1' bölümünde tan&yacute;mlay&yacute;n&yacute;z.
// E&eth;er yeni bir kategori blo&eth;u eklemek istiyorsan&yacute;z bu a&thorn;a&eth;&yacute;daki kodlar&yacute;n bir kopyas&yacute;n&yacute; al&yacute;n&yacute;z ve alt sat&yacute;r&yacute;na yap&yacute;&thorn;t&yacute;r&yacute;n&yacute;z.
// &THORN;uan için a&thorn;a&eth;&yacute;da 6 tane kategori için tan&yacute;mlama yap&yacute;lm&yacute;&thorn;t&yacute;r. Örne&eth;ine bakarak sizde yeni bir tane olu&thorn;turabilirsiniz.
$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 = '1' 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&yacute;n&yacute; tan&yacute;ml&yacute;yoruz.
// Buradaki $sezione belirtilen de&eth;erde e&eth;er yani bir kategori olu&thorn;turuyorsan&yacute;z farkl&yacute; bir de&eth;er vermelisiniz.
// Örnek: $sezione10 = $row['titcat'];
$sezione $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'] ? "&nbsp;<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 ($testo0$news_words);
$testo .= " ...";
   
}

$cont .= "
  - <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
"
;
}


// Bir kategorinin haberlerini al&yacute;yoruz. Kategori id de&eth;erini idcategoria = '2' bölümünde tan&yacute;mlay&yacute;n&yacute;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 = '2' 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&yacute;n&yacute; tan&yacute;ml&yacute;yoruz.
$sezione2 $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'] ? "&nbsp;<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 ($testo0$news_words);
$testo .= " ...";
   
}

$cont2 .= "
  - <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
"
;
}


// Bir kategorinin haberlerini al&yacute;yoruz. Kategori id de&eth;erini idcategoria = '3' bölümünde tan&yacute;mlay&yacute;n&yacute;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 = '3' 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&yacute;n&yacute; tan&yacute;ml&yacute;yoruz.
$sezione3 $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'] ? "&nbsp;<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 ($testo0$news_words);
$testo .= " ...";
   
}

$cont3 .= "
  - <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
"
;
}



// Bir kategorinin haberlerini al&yacute;yoruz. Kategori id de&eth;erini idcategoria = '4' bölümünde tan&yacute;mlay&yacute;n&yacute;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&yacute;n&yacute; tan&yacute;ml&yacute;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'] ? "&nbsp;<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 ($testo0$news_words);
$testo .= " ...";
   
}

$cont4 .= "
  - <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
"
;
}



// Bir kategorinin haberlerini al&yacute;yoruz. Kategori id de&eth;erini idcategoria = '5' bölümünde tan&yacute;mlay&yacute;n&yacute;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&yacute;n&yacute; tan&yacute;ml&yacute;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'] ? "&nbsp;<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 ($testo0$news_words);
$testo .= " ...";
   
}

$cont5 .= "
  - <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
"
;
}


// Bir kategorinin haberlerini al&yacute;yoruz. Kategori id de&eth;erini idcategoria = '6' bölümünde tan&yacute;mlay&yacute;n&yacute;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&yacute;n&yacute; tan&yacute;ml&yacute;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'] ? "&nbsp;<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 ($testo0$news_words);
$testo .= " ...";
   
}

$cont6 .= "
  - <a href=\"index.php?ind=news&amp;op=news_show_single&amp;ide={$row['id']}\">$titolo<br/></a>
"
;
}

// Her kategoriyi a&thorn;a&eth;&yacute;daki alanda gösteriyoruz.
// Burada biraz html bilgisi gerekiyor. Örne&eth;ine bakarak yapabilirsiniz.
// E&eth;er yeni bir kategori olu&thorn;turduysan&yacute;z bölüm ad&yacute;n&yacute; $sezione ve {$cont} tan&yacute;mlamas&yacute;n&yacute; yapmal&yacute;s&yacute;n&yacute;z.
// Örnek: $sezione10 ve {$cont10}
$content "
<tr>
  <td class=\"contents\">
  <div class=\"taburlo\">
    <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
      <tr>
<td class=\"taburlo\" valign=\"top\">
<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">
<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>$sezione</b>
</td>
</tr>
    <tr>
<td colspan=\"2\">
{$cont}
</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>$sezione2</b>
</td>
</tr>
    <tr>
<td colspan=\"2\">
{$cont2}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<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>$sezione3</b>
</td>
</tr>
    <tr>
<td colspan=\"2\">
{$cont3}
</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>$sezione4</b>
</td>
</tr>
    <tr>
<td colspan=\"2\">
{$cont4}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<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>
</table>
</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($icona);
unset($cdata);
unset($news_words);




?>

« Son Düzenleme: Temmuz 08, 2008, 12:40:00 ÖS Gönderen: isabey »

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5051
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #14 : Temmuz 08, 2008, 12:42:16 ÖS »
isabey, istediğin şekilde uyguladım, dosya ektedir. Ekten indirebilirsin. Sonucunu yazarsan sevinirim.
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı isabey

  • Moderatör
  • *
  • İleti: 585
  • Puan: 70
  • Cinsiyet: Bay
    • isabey koyu
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #15 : Temmuz 08, 2008, 12:48:12 ÖS »
 :!1 daha ;D ne soyleyim :'1 spersiniz  ;!9 kocaman  ;) tesekurlerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr  :!1


www.isabeykoyu.com

Çevrimdışı aybars_123

  • İleti: 260
  • Puan: 27
    • Egitimciyim.net
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #16 : Temmuz 08, 2008, 19:41:07 ÖS »


kardesım oncelıkle emeklerın ıcın çok tesekkur ederım.benım yukarıdakı reesımde de belırttığım gıbı bırkaç sıkıntım var.heralde onlarda olunca tam olacak.
1-en onemlısı karaekter sayısını sınırlayamazmıyız.resımde de goreceğin gıbı karakter sayısını sınırlamayınca bazı haberler uzun olduğu ıcın altlarda bosluk oluyor.

2-acaba haber baslığında ve haberlerde boyut ve rengınde (harflerin) değişiklık şansımız var mı?

cevabınızı bekleyeceğim.Şimdiden tesekkur ederim.

unutmadan ustad 4 lü haber bloğunu asağıya koydum.

http://www.dosya.cc/yanyanahaber.zip.html
« Son Düzenleme: Temmuz 08, 2008, 19:54:22 ÖS Gönderen: aybars_123 »

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5051
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #17 : Temmuz 08, 2008, 21:02:32 ÖS »
1- Karakter sınırlaması olayına bakacağım. Çözüm üretirsem buraya yazarım.
2- Tabiki değişiklik yapabilirsin. Ben gerekli kodlamaları mkportalın class sınıfından yararlanarak yapmıştım. Eğer senin isteidğin bir değişiklik varsa ya sınıf tanımlaması yapabilirsin yada çeşitli html kodları ekleyebilirsin.
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Çevrimdışı aybars_123

  • İleti: 260
  • Puan: 27
    • Egitimciyim.net
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #18 : Temmuz 08, 2008, 21:44:28 ÖS »
"""Karakter sınırlaması olayına bakacağım. Çözüm üretirsem buraya yazarım."""


özelıkle bu konuyu sabırsızlıkla beklıyorum ustad

Çevrimdışı burajan

  • Web Programcısı
  • Administrator
  • *
  • İleti: 5051
  • Puan: 334
  • Cinsiyet: Bay
  • Web Programcısı
    • Burak ŞİMŞEK - Kişisel İnternet Sitesi
-bu şekilde haber bloğu yapabılırmıyız
« Yanıtla #19 : Temmuz 08, 2008, 22:16:16 ÖS »
Ben sadece bir blok (kategori) için örnek vereceğim diğer bloklarada sen aynı şekilde uygularsın aybars_123  ;)
Aşağıdaki kodu bulmalısın:
Kod: [Seç]
$titolo = stripslashes($row['titolo']);Bu kodu aşağıdaki gibi değiştirmelisin:
Kod: [Seç]
$karaktersinir = 10;
$titolo = stripslashes($row['titolo']);
$titolo = substr($titolo,0,$karaktersinir);

Diğer bloklarda (kategorilerde) aynı işlemi yaparsan hepsine uygulamış olursun. Bu arada 10 sayısı ile belirtilen karakter sayısıdır.
Kişisel İnternet Sitem => buraksimsek.com.tr - http://www.buraksimsek.com.tr

Lütfen özel mesaj ile destek istemeyiniz. Önce forumda arama yapınız daha sonra forumda ilgili bölüme konu açınız.

Seo4Smf Tagleri:
 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
5 Yanıt
1969 Gösterim
Son İleti Temmuz 11, 2008, 15:17:31 ÖS
Gönderen: muratogretmen
8 Yanıt
1377 Gösterim
Son İleti Temmuz 29, 2008, 22:14:09 ÖS
Gönderen: AdmiN
35 Yanıt
5321 Gösterim
Son İleti Eylül 10, 2009, 02:01:58 ÖÖ
Gönderen: coruhunsesi
30 Yanıt
4372 Gösterim
Son İleti Mart 21, 2010, 23:30:20 ÖS
Gönderen: isabey
5 Yanıt
1423 Gösterim
Son İleti Kasım 27, 2008, 19:28:23 ÖS
Gönderen: AdmiN