Ich habe folgenden Newticker block eingebeut der auch wunderbar funzt
nur wie kann ich das abändern das er nur die 10 nuesten news zeigt und nicht alle ?
<?php
$usemarquee = 1;
$scrolldirection = "left";
global $prefix, $multilingual, $currentlang, $dbi;
if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
$content = "<table width=\"100%\" border=\"0\">";
$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\" $width=\"100%\" ScrollAmount=\"5\" ScrollDelay=\"90\" onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\">";
$result = sql_query("select sid, title, comments, counter from ".$prefix."_stories $querylang order by sid ASC limit 0,100", $dbi);
while(list($sid, $title, $comtotal, $counter) = sql_fetch_row($result, $dbi)) {
$content .= "<b>»  <font class=\"heading\"><a href=\"modules.php?name=News&file=article&sid=$sid\">$title</b></a>   ";
}
$content .= "</table>";
?>
kann mir jemand helfen?
Nimm das hier
Zitat$result = sql_query("select sid, title, comments, counter from ".$prefix."_stories $querylang order by sid ASC limit 0,10", $dbi);
danke ich teste mal :)
Update:
hab das ausgetauscht aber es wird immernoch alles angezeigt also alle news :(
hmmm
<?php
$usemarquee = 1;
$scrolldirection = "left";
global $prefix, $multilingual, $currentlang, $dbi;
if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
$content = "<table width=\"100%\" border=\"0\">";
$content .= "<Marquee Behavior=\"Scroll\" Direction=\"$scrolldirection\" $width=\"100%\" ScrollAmount=\"5\" ScrollDelay=\"90\" onMouseOver=\"this.stop()\" onMouseOut=\"this.start()\">";
$result = sql_query("select sid, title, comments, counter from ".$prefix."_stories $querylang order by sid ASC limit 0,10", $dbi);
while(list($sid, $title, $comtotal, $counter) = sql_fetch_row($result, $dbi)) {
$content .= "<b>»  <font class=\"heading\"><a href=\"modules.php?name=News&file=article&sid=$sid\">$title</b></a>   ";
}
$content .= "</table>";
?>
kann mir da jemand helfen?
ich bekomme es nicht zum laufen (mit 10 news )
hmmm es werden immer weider alle news angezeigt
danke
ZitatNimm das hier
Zitat$result = sql_query("select sid, title, comments, counter from ".$prefix."_stories $querylang order by sid ASC limit 0,10", $dbi);
hmmm es zeigt nur die 10 ältesten news an das soll aber genau anders herum sein also die 10 neusten :)
hmmmm wo nur ändere ich das
so habe den code nochmal geändert und "order by time " gemacht
jetzt funzt es
aber wie kann ich noch machen das er mir die news kategorie mit anzeigt ???
im moment zeigt er ja nur die überschrift