Witam
Chodzi mi o rozmiar blocku, dokładnie chodzi o ostatnie komentarze.Mam tak:
print("<table class=\"lista\" width=\"100%\" align=\"left\" cellpadding=\"4\" cellspacing=\"4\">");
Tylko że block rozjeżdża się nie wiem czemu, ile bym nie zmienił w "width=" cały czas jest rozjechany.Potrzebuje szerokość 200 na stałe.
cały kod:
<?php
require_once ("include/functions.php");
require_once ("include/raconfigmzes.php");
require_once ("include/blocks.php");
block_begin("OSTATNIE KOMENTARZE");
// HACK NEW COMMENT
if(!isset($_COOKIE['lastcomment'])) {
$expire = time() + 3600
* 24
* 7; // 7 jours $LastComment = 0;
}
else
{
$LastComment = abs(intval($_COOKIE['lastcomment'])); }
// FIN HACK NEW COMMENT
$mq=mysql_query("SELECT added,text,user,info_hash FROM comments ORDER BY added DESC LIMIT 8");
print("<table class=\"lista\" width=\"100%\" align=\"left\" cellpadding=\"4\" cellspacing=\"4\">");
{
// HACK NEW COMMENT
if ($LastComment <= strtotime($rq["added"])) { $is_new5 = '<img alt="" src="./images/new.gif" />';
}
else
{
$is_new5='';
}
// FIN HACK NEW COMMENT
print("<tr><td class=\"lista\" align=\"center\">");
{
}
else
{
//on coupe le texte a $max caracteres ...
$max=30;
if
{
$chaine=substr($chaine,0
,$max) . ' [...]'; }
{
$ren = mysql_query("SELECT namemap.info_hash, namemap.filename, namemap.url FROM namemap WHERE info_hash='".$rq["info_hash"] ."'");
//if (!$file)
// die("Bad ID!");
}
$ma=35;
if
{
$chay=substr($chay,0
,$ma) . ''; }
print("<a href=\"comments/".$rq["info_hash"]."#comments\"><font face=tahoma size=2>".$chay."</font></a><br />"); print("<font size=1 color=green><b>Napisał: ".stripslashes($rq["user"])."</font></b></td>"); }
}
block_end();
?>
Ten post edytował Altec69 10.09.2012, 10:19:03