Jak zrobić ograniczenie wyświetlania. Tzn. nie mam za dużo miejsca na stronie wiec chce aby wyświetlał się tylko jeden shout w shoutboxie. Jak to zrobic ? Oto kod:
<?php
//Display shouts
echo ("<table width=100% cellpadding=0 cellspacing=0>"); $shouts = file("shouts.php"); foreach ($shouts as $item){
$row_color = ($row_count % 2) ? $row_color1 : $row_color2;
list
($poster,$message,$date,$time,$ip) = explode ("|^|", $item); $thisnamecolor = $namecolor;
$thisnamecolor = colornames($poster,$thisnamecolor);
$thisshout = "$poster:$message";
$wrap = intval(($width+15
)/($textsize-2
))+1; $thisshout = wordwrap($thisshout, $wrap, ' ', 1
); $newmessage=profanityfilter(shoutcode(smilies(killhtml($message))));
$thisshout = str_replace($message,$newmessage,$thisshout); $thisshout = "<div title="Posted $date @ $time">".$thisshout."</div>n";
$thisshout = str_replace($poster.":","<font color=".$thisnamecolor.">$poster:</font> ",$thisshout); if($row_coloring==on){
$thisshout = "<tr bgcolor='$row_color'><td>".$thisshout."</td></tr>";
} else {
$thisshout = "<tr><td>".$thisshout."</td></tr>";
}
$row_count++;
}
?>
uzywaj odpowiedniego bbcode, dr_bonzo