block-News Bloğunu sadece bir bölüm için ayarlamak?

Begonnen von korsanuye, 10 Dezember 2010, 12:45:14

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 2 Gäste betrachten dieses Thema.

korsanuye

merhablar ben block-News.php bloğunu sadece bir bölüm için kullanak istiyorum yani sadece kültür-sanak bölümündeki konular yayınlansın.

Sitki

block-News.php

Bul:
    $querylang = "";

Degistir:
    $querylang = "AND topic=20";

20 rakam sadece örnektir. Kendi haber rakam bölümü/konu ile degistirilmesi lazim.
viele Grüße

Kein Support über PN, Mail oder Messenger!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

korsanuye

aynen dediğinizi yaptım böyle
Zitat$querylang = "AND topic=6";
eğiştirdim ama olmadı başka konularda çıktı.

Sitki

Bu düzenleme topic ler icin gecerli, haber kategorileri icin degil.
viele Grüße

Kein Support über PN, Mail oder Messenger!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

korsanuye

ee zaten bende kategori için demiyorumki topic için diyorum işte resim

korsanuye


Eren Aslan

#6
Kategorii Haber Blokları Dene

<?php
#### Generated by Block Creator by ProNuke ###
if (eregi("block-Block_Creator.php",$PHP_SELF)) {
    
Header("Location: index.php");
    die();
}

global 
$prefix$db;
$content  =  "<table border=\"0\" width=\"100%\" id=\"table1\">";
$content  .= "<tr>";
$content  .= "        <td width=\"30%\" height=\"25\" colspan=\"2\"<font color=#000033><b>BAFRADAN</b></td>";
KaynakVbulletin Center http://www.vbulletincenter.com/pragmamx/22491-pragmamx-haber-kategorisi-bloku.html
$content  .= "        <td width=\"30%\" height=\"25\" colspan=\"2\"<font color=#000033><b>KÖYLER&Yacute;M&Yacute;ZDEN</b></td>";
$content  .= "</tr>";
$content  .= "<tr>";
$content  .= "        <td width=\"50%\" colspan=\"2\" bgcolor=\"#D3F1FD\">";
$sql "SELECT sid, title, comments, counter, hometext, topic FROM ".$prefix."_stories WHERE  topic='7'  ORDER BY sid DESC LIMIT 1";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter$hometext$topic) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\"><b>$title</b></center><br>$hometext</a><br>";
}


$content  .="</td>";
$content  .= "        <td width=\"50%\" colspan=\"2\" bgcolor=\"#FFFEDF\">";
$sql "SELECT sid, title, comments, counter, hometext, topic FROM ".$prefix."_stories WHERE  topic='10'  ORDER BY sid DESC LIMIT 1";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter$hometext$topic) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\"><b>$title</b></center><br>$hometext</a><br>";
}
$content  .= "</tr>";
$content  .= "<tr>";

$content  .= "<tr>";
$content  .= "        <td width=\"0,1%\" bgcolor=\"#D3F1FD\"></td>";
$content  .= "        <td bgcolor=\"#D3F1FD\" >";
$sql "SELECT sid, title, comments, counter FROM ".$prefix."_stories WHERE  topic='7' ORDER BY sid DESC LIMIT 0,5";
$result $db->sql_query($sql);
KaynakVbulletin Center http://www.vbulletincenter.com/showthread.php?t=22491
while (list($sid$title$comments$counter) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a><br>";
}
$content  .="</td>";
$content  .= "        <td width=\"0,1%\" bgcolor=\"#FFFEDF\"></td>";

$content  .= "        <td bgcolor=\"#FFFEDF\" >";
$sql "SELECT sid, title, comments, counter FROM ".$prefix."_stories WHERE  topic='10'  ORDER BY sid DESC LIMIT 0,5";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a><br>";
}
$content  .="</td>";
$content  .= "</tr>";
$content  .= "<tr>";
$content  .= "        <td width=\"30%\" height=\"25\" colspan=\"2\"<font color=#000033><b>GÜNDEM</b></td>";
$content  .= "        <td width=\"30%\" height=\"25\" colspan=\"2\" <font color=#000033><b>S&Yacute;YASET</b></td>";
$content  .= "</tr>";
$content  .= "<tr>";
$content  .= "        <td width=\"50%\" colspan=\"2\" bgcolor=\"#FFFEDF\">";
$sql "SELECT sid, title, comments, counter, hometext, topic FROM ".$prefix."_stories WHERE  topic='6'  ORDER BY sid DESC LIMIT 1";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter$hometext$topic) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\"><b>$title</b></center><br>$hometext</a><br>";
}


$content  .="</td>";
$content  .= "        <td width=\"50%\" colspan=\"2\" bgcolor=\"#D3F1FD\">";
$sql "SELECT sid, title, comments, counter, hometext, topic FROM ".$prefix."_stories WHERE  topic='9'  ORDER BY sid DESC LIMIT 1";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter$hometext$topic) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\"><b>$title</b></center><br>$hometext</a><br>";
}
$content  .= "</tr>";
$content  .= "<tr>";

$content  .= "<tr>";
$content  .= "        <td width=\"0,1%\" bgcolor=\"#FFFEDF\"></td>";
$content  .= "        <td bgcolor=\"#FFFEDF\" >";
$sql "SELECT sid, title, comments, counter FROM ".$prefix."_stories WHERE  topic='6'  ORDER BY sid DESC LIMIT 0,5";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a><br>";
}
$content  .="</td>";
$content  .= "        <td width=\"0,1%\" bgcolor=\"#D3F1FD\"></td>";

$content  .= "        <td bgcolor=\"#D3F1FD\" >";
$sql "SELECT sid, title, comments, counter FROM ".$prefix."_stories WHERE  topic='9'  ORDER BY sid DESC LIMIT 0,5";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a><br>";
}
$content  .="</td>";
$content  .= "</tr>";
$content  .= "<tr>";
$content  .= "        <td width=\"30%\" height=\"25\" colspan=\"2\"<font color=#000033><b>SPOR</b></td>";
$content  .= "        <td width=\"30%\" height=\"25\" colspan=\"2\" <font color=#000033><b>TEKNOLOJ&Yacute;</b></td>";
$content  .= "</tr>";
$content  .= "<tr>";
$content  .= "        <td width=\"50%\" colspan=\"2\" bgcolor=\"#D3F1FD\">";
$sql "SELECT sid, title, comments, counter, hometext, topic FROM ".$prefix."_stories WHERE  topic='8'  ORDER BY sid DESC LIMIT 1";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter$hometext$topic) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\"><b>$title</b></center><br>$hometext</a><br>";
}


$content  .="</td>";
$content  .= "        <td width=\"50%\" colspan=\"2\" bgcolor=\"#FFFEDF\">";
$sql "SELECT sid, title, comments, counter, hometext, topic FROM ".$prefix."_stories WHERE  topic='5'  ORDER BY sid DESC LIMIT 1";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter$hometext$topic) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\"><b>$title</b></center><br>$hometext</a><br>";
}
$content  .= "</tr>";
$content  .= "<tr>";

$content  .= "<tr>";
$content  .= "        <td width=\"0,1%\" bgcolor=\"#D3F1FD\"></td>";
$content  .= "        <td bgcolor=\"#D3F1FD\" >";
$sql "SELECT sid, title, comments, counter FROM ".$prefix."_stories WHERE  topic='8'  ORDER BY sid DESC LIMIT 0,5";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a><br>";
}
$content  .="</td>";
$content  .= "        <td width=\"0,1%\" bgcolor=\"#FFFEDF\"></td>";

$content  .= "        <td bgcolor=\"#FFFEDF\" >";
$sql "SELECT sid, title, comments, counter FROM ".$prefix."_stories WHERE  topic='5'  ORDER BY sid DESC LIMIT 0,5";
$result $db->sql_query($sql);
while (list(
$sid$title$comments$counter) = $db->sql_fetchrow($result)) {
$title2substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle>&nbsp; <a href=\"modules.php?name=News&amp;file=article&amp;sid=".$sid."\">$title</a><br>";
}
$content  .="</td>";
$content  .= "</tr>";

$content  .= "</table>"
?>



Saygılarımla...