갤러리형 최신글 두줄 이상 나오게 하려면 정보
갤러리형 최신글 두줄 이상 나오게 하려면본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : http://myhappybaby.co.kr/onuri1.61/index.php
위 조소에 보이는 갤러리형 최신글은 현재 6개가 한줄오 나옵니다.
게시물 갯수를 12개로 하면 두 줄이 되어야 할 텐데 옆으로만 늘어납니다.
2줄 이상으로 출력하려면 어디를 수정해야 하나요?
아래는 해당 스킨 소스입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '46'; //썸네일 가로길이
$img_height = '36'; //썸네일 세로길이
$img_quality = '9'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb105'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr height="1">
<td bgcolor="#d8d8d8"></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1" bgcolor="#d8d8d8"></td>
<td width="10"></td>
<td>
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr height="5"><td colspan="2"></td></tr>
<tr height="27">
<td>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#57697c" ><b><?=$board[bo_subject]?></b></font></a>
</td>
<td align="right"><img src='<?=$latest_skin_path?>/img/icon.gif'><span style="font-size: 11px; color: #646464; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>더보기</a></span></td>
</tr>
<tr height="1"><td colspan="2" background="<?=$latest_skin_path?>/img/line_dot.gif" border="0"></td></tr>
<tr height="5"><td colspan="2"></td></tr>
</table>
</td>
<td width="10"></td>
<td width="1" bgcolor="#d8d8d8"></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1" bgcolor="#d8d8d8"></td>
<td width="10"></td>
<td>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<td align="center">
<?
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td><img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음'></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr><tr height='7'><td colspan='3'></td></tr></table>";
$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 = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td align='center'><a href='{$list[$i][href]}'><img src='$thumb' width='$img_width' height='$img_height' border='0'></a></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr><tr height='7'><td colspan='3'></td></tr></table>";
}
//날짜표시
$date = explode("-", $date1);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$latest_date = $year."-".$month."-".$day."";
echo $list[$i]['icon_reply'] . " ";
echo $img;
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<strong>{$list[$i]['subject']}</strong>";
else
echo "{$list[$i]['subject']}";
echo "</a>";
//if ($list[$i]['comment_cnt'])
// echo " <a href=\"{$list[$i]['comment_href']}\" style='font-size:9px; color:#EE5A00; vertical-align:1px;'>{$list[$i]['comment_cnt']}</a>";
//echo " " . $list[$i]['icon_new'];
//echo " " . $list[$i]['icon_hot'];
//echo " " . $list[$i]['icon_file'];
//echo " " . $list[$i]['icon_link'];
//echo " " . $list[$i]['icon_secret'];
//echo "</td><td width=36 align=right>";
//echo "<font color=#bababa class=small>{$list[$i][datetime2]}</font>";
?></td>
<?}if($i%$i==0) echo "</tr>";?>
</table>
</td>
<td width="10"></td>
<td width="1" bgcolor="#d8d8d8"></td>
</tr>
<tr height="6">
<td width="1" bgcolor="#d8d8d8"></td>
<td colspan="3"></td>
<td width="1" bgcolor="#d8d8d8"></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr height="1">
<td bgcolor="#d8d8d8"></td>
</tr>
</table>
</td>
</tr>
</table>
오류 주소 : http://myhappybaby.co.kr/onuri1.61/index.php
위 조소에 보이는 갤러리형 최신글은 현재 6개가 한줄오 나옵니다.
게시물 갯수를 12개로 하면 두 줄이 되어야 할 텐데 옆으로만 늘어납니다.
2줄 이상으로 출력하려면 어디를 수정해야 하나요?
아래는 해당 스킨 소스입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '46'; //썸네일 가로길이
$img_height = '36'; //썸네일 세로길이
$img_quality = '9'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb105'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr height="1">
<td bgcolor="#d8d8d8"></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1" bgcolor="#d8d8d8"></td>
<td width="10"></td>
<td>
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr height="5"><td colspan="2"></td></tr>
<tr height="27">
<td>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#57697c" ><b><?=$board[bo_subject]?></b></font></a>
</td>
<td align="right"><img src='<?=$latest_skin_path?>/img/icon.gif'><span style="font-size: 11px; color: #646464; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>더보기</a></span></td>
</tr>
<tr height="1"><td colspan="2" background="<?=$latest_skin_path?>/img/line_dot.gif" border="0"></td></tr>
<tr height="5"><td colspan="2"></td></tr>
</table>
</td>
<td width="10"></td>
<td width="1" bgcolor="#d8d8d8"></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1" bgcolor="#d8d8d8"></td>
<td width="10"></td>
<td>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<td align="center">
<?
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td><img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음'></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr><tr height='7'><td colspan='3'></td></tr></table>";
$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 = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td align='center'><a href='{$list[$i][href]}'><img src='$thumb' width='$img_width' height='$img_height' border='0'></a></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr><tr height='7'><td colspan='3'></td></tr></table>";
}
//날짜표시
$date = explode("-", $date1);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$latest_date = $year."-".$month."-".$day."";
echo $list[$i]['icon_reply'] . " ";
echo $img;
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<strong>{$list[$i]['subject']}</strong>";
else
echo "{$list[$i]['subject']}";
echo "</a>";
//if ($list[$i]['comment_cnt'])
// echo " <a href=\"{$list[$i]['comment_href']}\" style='font-size:9px; color:#EE5A00; vertical-align:1px;'>{$list[$i]['comment_cnt']}</a>";
//echo " " . $list[$i]['icon_new'];
//echo " " . $list[$i]['icon_hot'];
//echo " " . $list[$i]['icon_file'];
//echo " " . $list[$i]['icon_link'];
//echo " " . $list[$i]['icon_secret'];
//echo "</td><td width=36 align=right>";
//echo "<font color=#bababa class=small>{$list[$i][datetime2]}</font>";
?></td>
<?}if($i%$i==0) echo "</tr>";?>
</table>
</td>
<td width="10"></td>
<td width="1" bgcolor="#d8d8d8"></td>
</tr>
<tr height="6">
<td width="1" bgcolor="#d8d8d8"></td>
<td colspan="3"></td>
<td width="1" bgcolor="#d8d8d8"></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr height="1">
<td bgcolor="#d8d8d8"></td>
</tr>
</table>
</td>
</tr>
</table>
댓글 전체