최신글 갤러리를 사용하고 있는데요.
1줄밖에 출력이 되지 않네요. 3개씩 2줄 출력 하고 싶은데 어디를 수정해야 하는지 잘 모르겠어요
<?php
echo latest("theme/gallery", "gallery", 3, 18);
?>
이렇게 불러오고 있고요
latest.skin.php 파일 내용은
<?php
if (!defined('_GNUBOARD_')) exit; //개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
global $is_admin;
$n_thumb_width = 377; //썸네일 가로 크기
$n_thumb_height = 409; //썸네일 세로 크기
?>
<link rel="stylesheet" href="<?php echo $latest_skin_url; ?>/style.css">
<section class="n_gallery_wrap">
<?php if (count($list) == 0) { //게시물이 없을 경우 ?>
<div class="n_no_list">게시물이 없습니다.</div>
<?php } else { //게시물이 있을 경우 ?>
<ul class="n_thumb">
<?php for ($i = 0; $i < count($list); $i++) { ?>
<li>
<a href="<?php echo $list[$i]['href']; ?>">
<?php
$n_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $n_thumb_width, $n_thumb_height);
$n_noimg = "$latest_skin_url/img/noimg.gif";
if($n_thumb['src']) {
$img_content = '<img src="'.$n_thumb['src'].'" width="'.$n_thumb_width.'" height="'.$n_thumb_height.'" alt="'.$list[$i]['subject'].'" title="" />';
} else {
$img_content = '<img src="'.$n_noimg.'" width="'.$n_thumb_width.'" height="'.$n_thumb_height.'" alt="이미지없음" title="" />';
}
echo $img_content;
?>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
</section>
예요. 고수님들의 도움 부탁드립니다.
답변 1개
<?php echo latest("theme/gallery", "gallery", 6, 18); ?>
<?php for ($i = 0; $i < count($list); $i++) { ?>
아래의
<li>
를
<li <?php if($i%3==0)?>>
로 수정해보세요.
style.css도 아마 적당히 수정해야 할 것입니다.
답변을 작성하려면 로그인이 필요합니다.