겔러리 스킨에서 가로한줄씩 배경을 설정하려면...

· 20년 전 · 1535
123.JPG
관리자님께서 올려주신 썸네일 겔러리 스킨에서...
위 이미지 처럼 리스트에서 가로로 줄마다 배경을 다르게 적용하려면 소스를 어떤식으로 수정을 해야하는지... 도통 알수가 없네요...

아래 소스는 스킨의 목록에서이미지를 뽑는 소스 입니다..
============
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";

$img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);

$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}

if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";

$style = "";
if ($list[$i][icon_new])
$style = " style='font-weight:bold;' ";
$subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";

echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all;'>";
echo "<table width=100%>";
echo "<tr><td height=5></td></tr>";
echo "<tr><td align=center><a href='{$list[$i][href]}&pageNum=$pageNum'>$img</a></td></tr>";
echo "<tr><td align=center><a href='{$list[$i][href]}&pageNum=$pageNum'>$subject</a>{$comment_cnt}</td></tr>";
if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><font color=#cccccc>[{$list[$i][ca_name]}]</font></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}

// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'>&nbsp;</td>";
?>

첨부파일

123.JPG (109.9 KB)
0회 2005-10-15 20:55
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
20년 전 조회 1,566
20년 전 조회 1,529
20년 전 조회 1,789
20년 전 조회 1,505
20년 전 조회 1,921
20년 전 조회 1,825
20년 전 조회 1,524
20년 전 조회 1,632
20년 전 조회 1,683
20년 전 조회 1,536
20년 전 조회 1,791
20년 전 조회 2,181
20년 전 조회 1,518
20년 전 조회 1,545
20년 전 조회 1,626
20년 전 조회 1,663
20년 전 조회 1,680
20년 전 조회 1,673
20년 전 조회 1,599
20년 전 조회 1,558
🐛 버그신고