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.
block-News.php
Bul:
$querylang = "";
Degistir:
$querylang = "AND topic=20";
20 rakam sadece örnektir. Kendi haber rakam bölümü/konu ile degistirilmesi lazim.
aynen dediğinizi yaptım böyle
Zitat$querylang = "AND topic=6";
eğiştirdim ama olmadı başka konularda çıktı.
Bu düzenleme topic ler icin gecerli, haber kategorileri icin degil.
ee zaten bende kategori için demiyorumki topic için diyorum işte resim
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fimg697.imageshack.us%2Fimg697%2F3435%2F30171587.jpg&hash=ed2587a625b7ffc616f28f7b5ff9cc59bf4c626a)
çözümü yokmu bunun?
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>";
Kaynak: Vbulletin 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ÝMÝ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)) {
$title2= substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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);
Kaynak: Vbulletin Center http://www.vbulletincenter.com/showthread.php?t=22491
while (list($sid, $title, $comments, $counter) = $db->sql_fetchrow($result)) {
$title2= substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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Ý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)) {
$title2= substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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Ý</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)) {
$title2= substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<center><img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&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)) {
$title2= substr($title,0,20);
$content .= "<img src=\"images/icon_dot.gif\" border=0 valign=absmiddle> <a href=\"modules.php?name=News&file=article&sid=".$sid."\">$title</a><br>";
}
$content .="</td>";
$content .= "</tr>";
$content .= "</table>";
?>
Saygılarımla...