갤러리 게시판에 배경 반복시켜야 하는데 답답합니다..ㅠ_ㅠ 정보
갤러리 게시판에 배경 반복시켜야 하는데 답답합니다..ㅠ_ㅠ본문
[첫번쨰 이미지: 완성되었을 때의 모습 입니다.]
[두번쨰 이미지: 나무 배경 이미지 입니다.]
이미지 처럼줄 마다 책장처럼 이미지를 반복시켜야 하는데요
이곳저곳 다 쑤셔가면서 넣어봐도 반복이 되질 않아서요
어느 부분에 어떻게 넣어야 하는건지 알려주세요...하ㅏ...
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td style="background-image:url('<?=$board_skin_path?>/img/desk_bg.jpg');background-repeat:no-repeat; background-position:center; background-position:top;">
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width="100%" align="center" cellpadding="0" cellspacing="0" class="board_list" border="0">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 title='이미지 없음' >";
$image = $list[$i][file][0][file];
$thumb = $thumb_path.'/'.$list[$i][file][0][file];
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
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
/*imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][file][0][file], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][file][0][file], 0606);*/
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][file][0][file], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][file][0][file], 0606);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb) && $list[$i][file][0][file]) {
$img = "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$thumb}' width='{$thumb_width}' height='{$thumb_height}' border=0 style='border:0px solid #ffffff;'onmouseover=\"this.style.border='0px solid #4572cf'; this.style.cursor='hand'\" onmouseout=\"this.style.border='0px solid #ffffff';\"></a>";
} else {
preg_match("`<\s*img\s+src\s*=\s*['|\"]?([^'|\"\s]+://[^'|\"\s]+\.(gif|jpe?g|png))['|\"]?\s*[^>]+`i", $list[$i]['wr_content'], $images);
if (!empty($images[1])) {
$img_size = GetImageSize("$images[1]");
if($img_size[0] >= $img_size[1]) {
$imgper = $thumb_width/$img_size[0];
$thumb_height = $img_size[1]*$imgper;
}else{
$imgper = $thumb_height/$img_size[1];
$thumb_width = $img_size[0]*$imgper;
}
$img = "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$images[1]}' width='{$thumb_width}' height='{$thumb_height}' align='absmiddle' border='0'></a>";
} else {
echo "";
}
}
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="thumb_1_2.gif";
else
$bg="thumb_1.gif";
$subject = cut_str($list[$i][subject],18);
$go = "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='$board_skin_path/img/btn_go.jpg'></a>";
echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr><td align='center' valign='top'>$img</td></tr>\n";
echo "<tr><td align='center' height='20'> </td></tr>\n";
echo "<tr><td align='center' height='25'>$subject</td></tr>\n";
echo "<tr><td align='center' height='25'>$go</td></tr>\n";
if ($is_checkbox)
echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
지금은 그냥 상단 테이블에 넣어놓은 상황이고요..첫째줄이라도 그럴싸하게 보이게..ㅎㅇ
[두번쨰 이미지: 나무 배경 이미지 입니다.]
이미지 처럼줄 마다 책장처럼 이미지를 반복시켜야 하는데요
이곳저곳 다 쑤셔가면서 넣어봐도 반복이 되질 않아서요
어느 부분에 어떻게 넣어야 하는건지 알려주세요...하ㅏ...
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td style="background-image:url('<?=$board_skin_path?>/img/desk_bg.jpg');background-repeat:no-repeat; background-position:center; background-position:top;">
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width="100%" align="center" cellpadding="0" cellspacing="0" class="board_list" border="0">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}' height=20></td></tr><tr>";
$img = "<img src='$board_skin_path/img/noimage.gif' border=0 title='이미지 없음' >";
$image = $list[$i][file][0][file];
$thumb = $thumb_path.'/'.$list[$i][file][0][file];
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
continue;
$rate = $thumb_width / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $thumb_height)
$dst = imagecreatetruecolor($thumb_width, $height);
else
$dst = imagecreatetruecolor($thumb_width, $thumb_height);
/*imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][file][0][file], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][file][0][file], 0606);*/
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][file][0][file], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][file][0][file], 0606);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $thumb_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb) && $list[$i][file][0][file]) {
$img = "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$thumb}' width='{$thumb_width}' height='{$thumb_height}' border=0 style='border:0px solid #ffffff;'onmouseover=\"this.style.border='0px solid #4572cf'; this.style.cursor='hand'\" onmouseout=\"this.style.border='0px solid #ffffff';\"></a>";
} else {
preg_match("`<\s*img\s+src\s*=\s*['|\"]?([^'|\"\s]+://[^'|\"\s]+\.(gif|jpe?g|png))['|\"]?\s*[^>]+`i", $list[$i]['wr_content'], $images);
if (!empty($images[1])) {
$img_size = GetImageSize("$images[1]");
if($img_size[0] >= $img_size[1]) {
$imgper = $thumb_width/$img_size[0];
$thumb_height = $img_size[1]*$imgper;
}else{
$imgper = $thumb_height/$img_size[1];
$thumb_width = $img_size[0]*$imgper;
}
$img = "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$images[1]}' width='{$thumb_width}' height='{$thumb_height}' align='absmiddle' border='0'></a>";
} else {
echo "";
}
}
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="thumb_1_2.gif";
else
$bg="thumb_1.gif";
$subject = cut_str($list[$i][subject],18);
$go = "<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='$board_skin_path/img/btn_go.jpg'></a>";
echo "<td width='{$td_width}%' valign=top style='word-break:break-all;'>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr><td align='center' valign='top'>$img</td></tr>\n";
echo "<tr><td align='center' height='20'> </td></tr>\n";
echo "<tr><td align='center' height='25'>$subject</td></tr>\n";
echo "<tr><td align='center' height='25'>$go</td></tr>\n";
if ($is_checkbox)
echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
<? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
지금은 그냥 상단 테이블에 넣어놓은 상황이고요..첫째줄이라도 그럴싸하게 보이게..ㅎㅇ
댓글 전체
책 이미지 아래에 있는 나무가 반복되야한다는건가요?
아니면 이미지 뒤에 배경이 반복되게 들어가야한다는건가요;
아니면 이미지 뒤에 배경이 반복되게 들어가야한다는건가요;
지금 보이는 이미지 처럼 배경이 들어가야 한다는거죠...제가 포토샾으로 작업 해 놓은거에요..저렇게 나무이미지가 줄마다 들어가야하는거죠
출력 테이블 부분과 줄바꿈 쪽 바꾸면 될것 같네요..
폼 테그 바로 아래있는 테이블에 먹여봐도 안되던데요?
if ($i && $i%$mod==0)
echo "</tr><tr><td colspan='{$mod}'><img src='불러올이미지' width='100%' /></td></tr><tr>";
echo "</tr><tr><td colspan='{$mod}'><img src='불러올이미지' width='100%' /></td></tr><tr>";