오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
가로형 갤러리 스킨인데요...
불러올 게시물 수를 6개로 지정해주면 3개에서 다음줄로 내려올줄 알았는데..
위에 스샷 처럼 한줄로 다 나와버립니다.
float:left...................display:block; 다 지정해줘봤는데 마찬가지네요.
적당한 가로길이를 넘어가면 다음줄로 넘어가게 하려면..
소스의 어느부분을 수정 해줘야할까요?
고수님들 부탁드려요~
갤러리 최신글 소스는 아래..
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$rows = count($list);
$style_name = "mw-group-$bo_table-$rows-$subject_len";
$cols = 3; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$img_width = '198'; //썸네일 가로길이
$img_height = '114'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$col_width = (int)(99 / $cols);
?>
<style type="text/css">
#<?=$style_name?> { clear:both; margin:0; border:0px solid #e1e1e1; }
#<?=$style_name?> .item { clear:both; display:none; }
#<?=$style_name?> .subject { clear:both; height:30px; color:#666666; font-weight:bold; padding-top:5px; font-size:12px; }
#<?=$style_name?> .subject a { color:#666666; text-decoration:none; }
#<?=$style_name?> .prev { float:left; margin:0 0 0 -4px; cursor:pointer; }
#<?=$style_name?> .next { float:left; margin:0 0px 0 0; cursor:pointer; }
#<?=$style_name?> .link { float:left; margin:0 0 0 5px; text-align:center; }
</style>
<div id="<?=$style_name?>">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<? for ($i=0; $i<$rows; $i++) { ?>
<td valign="top">
<table width="194" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:4px; padding:6px;">
<tr>
<div style="display:block;">
<td valign="top">
<?
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if ($file=="/")
$file = $data_path . "/thumb/" . "noimg.gif";
$img = thumbnail($file, $img_width, $img_height, 0, 2, $img_quality);
$img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:1 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";
?><a href='<?=$list[$i][href]?>'><?=$img?></a></td>
</tr><tr>
<td>
<div class="subject"><a href="<?=$list[$i][href]?>"><span style="font-size:12px;"><?=$list[$i][subject]?></span></a><span style="color:#FF6633; font-size:10px"><?=$list[$i]['comment_cnt']?></span></div>
<div style="color:#9a99aa; padding-top:4px;"><a href="<?=$list[$i][href]?>"><span style="color:#747172; font-size:11px;"><?=cut_str(strip_tags($list[$i][wr_content]),100,"...")?></span></a></div>
</td>
</tr>
</table></div>
</td>
<? } ?>
</tr>
</table>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td></td>
</tr>
</table>"; } ?>
</div>
오류 주소 :
가로형 갤러리 스킨인데요...
불러올 게시물 수를 6개로 지정해주면 3개에서 다음줄로 내려올줄 알았는데..
위에 스샷 처럼 한줄로 다 나와버립니다.
float:left...................display:block; 다 지정해줘봤는데 마찬가지네요.
적당한 가로길이를 넘어가면 다음줄로 넘어가게 하려면..
소스의 어느부분을 수정 해줘야할까요?
고수님들 부탁드려요~
갤러리 최신글 소스는 아래..
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$rows = count($list);
$style_name = "mw-group-$bo_table-$rows-$subject_len";
$cols = 3; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$img_width = '198'; //썸네일 가로길이
$img_height = '114'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$col_width = (int)(99 / $cols);
?>
<style type="text/css">
#<?=$style_name?> { clear:both; margin:0; border:0px solid #e1e1e1; }
#<?=$style_name?> .item { clear:both; display:none; }
#<?=$style_name?> .subject { clear:both; height:30px; color:#666666; font-weight:bold; padding-top:5px; font-size:12px; }
#<?=$style_name?> .subject a { color:#666666; text-decoration:none; }
#<?=$style_name?> .prev { float:left; margin:0 0 0 -4px; cursor:pointer; }
#<?=$style_name?> .next { float:left; margin:0 0px 0 0; cursor:pointer; }
#<?=$style_name?> .link { float:left; margin:0 0 0 5px; text-align:center; }
</style>
<div id="<?=$style_name?>">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<? for ($i=0; $i<$rows; $i++) { ?>
<td valign="top">
<table width="194" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:4px; padding:6px;">
<tr>
<div style="display:block;">
<td valign="top">
<?
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if ($file=="/")
$file = $data_path . "/thumb/" . "noimg.gif";
$img = thumbnail($file, $img_width, $img_height, 0, 2, $img_quality);
$img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:1 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";
?><a href='<?=$list[$i][href]?>'><?=$img?></a></td>
</tr><tr>
<td>
<div class="subject"><a href="<?=$list[$i][href]?>"><span style="font-size:12px;"><?=$list[$i][subject]?></span></a><span style="color:#FF6633; font-size:10px"><?=$list[$i]['comment_cnt']?></span></div>
<div style="color:#9a99aa; padding-top:4px;"><a href="<?=$list[$i][href]?>"><span style="color:#747172; font-size:11px;"><?=cut_str(strip_tags($list[$i][wr_content]),100,"...")?></span></a></div>
</td>
</tr>
</table></div>
</td>
<? } ?>
</tr>
</table>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td></td>
</tr>
</table>"; } ?>
</div>
첨부파일
댓글 2개
<? for ($i=0; $i<$rows; $i++) { ?>
<td valign="top">
부분 대신
<? for ($i=0; $i<$rows; $i++) {
if($i && !($i%cols))
{
echo "</tr><tr>";
}
?>
<td valign="top">
<? } ?>
</tr>
</table>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
위쪽에
<?
}
if($i){
while($i%cols){echo "</td>";}
}
?>
</tr>
</table>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
로 교체하시면 될듯 합니다
<td valign="top">
부분 대신
<? for ($i=0; $i<$rows; $i++) {
if($i && !($i%cols))
{
echo "</tr><tr>";
}
?>
<td valign="top">
<? } ?>
</tr>
</table>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
위쪽에
<?
}
if($i){
while($i%cols){echo "</td>";}
}
?>
</tr>
</table>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>
로 교체하시면 될듯 합니다
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기