최근 갤러리 여러개 쓸때 한개만 나오는 경우 정보
최근 갤러리 여러개 쓸때 한개만 나오는 경우본문
안녕하세요
메인에 최근 갤러리를 5~6개 정도 쓰려고 하는데
스킨 접목을 해보니까 처음꺼 빼고는 사진이 안나오네요
소스는
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
global $is_admin, $member;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$thumb_width = "95"; //썸네일 가로 크기
$thumb_height = "95"; //썸네일 세로 크기
$thumb_quality = "90"; //썸네일 이미지 품질
$filter[type] = "99";
$filter[arg1] = "100";
$filter[arg2] = "1";
$filter[arg3] = "2";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$g2_color_set = "1"; //최근게시물 색상 선택은 1~4 중 하나를 입력하세요
$g2_round = "fff"; //최근게시물 기본색상 테두리를 넣으려면 "e1e1e1" 로 수정하세요
$thumb_main = "3"; //메인에 보이게 할 썸네일 갯수
$arrow_top = "35"; //좌우버튼 상단에서 떨어지는 거리
?>
<script type="text/javascript" src="<?php echo $latest_skin_path ?>/js/jquery.simple_slider.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $latest_skin_path ?>/css/color_set<?php echo $g2_color_set ?>.css">
<style type="text/css">
.g2_list_wrap {border-right:1px solid #<?php echo $g2_round ?>; border-bottom:0px solid #<?php echo $g2_round ?>; border-left:1px solid #<?php echo $g2_round ?>; text-align:left}
#g2_gallery_list {height:<?php echo $thumb_height + 20 ?>px; text-align:center; overflow:hidden}
#g2_main {margin:0 auto; width:<?php echo ($thumb_width * $thumb_main) + 50 ?>px; height:<?php echo $thumb_height ?>px; overflow:hidden}
#g2_arrow_prev {float:left; margin-top:<?php echo $arrow_top ?>px}
#g2_arrow_next {float:right; margin-top:<?php echo $arrow_top ?>px}
.objImgFrame {width:<?php echo $thumb_width ?>px}
.simple_slider_hover {cursor:pointer}
.simple_slider_disabled {cursor:default; opacity:0.5; filter:alpha(opacity=50); zoom:1}
.g2_no_list {text-align:center; color:#767676}
</style>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#g2_gallery_list').show();
jQuery('#g2_gallery_thumb').simple_slider({
'leftID': 'leftNav',
'rightID': 'rightNav',
'display': <?php echo $thumb_main ?> //메인에 보이게 할 썸네일 갯수
})
});
</script>
<div class="g2_latest_wrap">
<div class="g2_title_wrap">
<div class="g2_title"><a href="<?php echo $g4[bbs_path] ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $board[bo_subject] ?></a></div>
<div class="g2_title_shadow"><?php echo $board[bo_subject] ?></div>
</div>
<div class="g2_title_bg_top"></div>
<div class="g2_title_bg_bottom"></div>
<div class="g2_list_wrap" id="g2_gallery_list">
<div id="g2_main" style="margin-top:15px">
<?php if (!count($list) == 0) { ?>
<div id="g2_arrow_prev"><img src="<?php echo $latest_skin_path ?>/img/prev.gif" width="17" height="22" border="0" alt="" title="" id="leftNav" /></div>
<div id="g2_arrow_next"><img src="<?php echo $latest_skin_path ?>/img/next.gif" width="17" height="22" border="0" alt="" title="" id="rightNav" /></div>
<?php } ?>
<div id="g2_gallery_thumb">
<?php
for ($i = 0; $i < count($list); $i++) {
$noimg = $latest_skin_path."/img/_noimg.gif";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if ($list[$i][wr_id]) {
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
if ($edit_img = $list[$i]['wr_content']) {
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
}
?>
<a href="<?php echo $list[$i][href] ?>"><img src="<?php echo $thumb ?>" width="<?php echo $thumb_width ?>" height="<?php echo $thumb_height ?>" border="0" alt="<?php echo $list[$i]['subject'] ?>" title="<?php echo $list[$i]['subject'] ?>"></a>
<?php } ?>
</div>
<?php if (count($list) == 0) { ?>
<div class="g2_no_list">게시물이 없습니다.</div>
<?php } ?>
</div>
</div>
</div>
이건데 여러개 쓸 수 있는 방법이 없을까요?
메인에 최근 갤러리를 5~6개 정도 쓰려고 하는데
스킨 접목을 해보니까 처음꺼 빼고는 사진이 안나오네요
소스는
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
global $is_admin, $member;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$thumb_width = "95"; //썸네일 가로 크기
$thumb_height = "95"; //썸네일 세로 크기
$thumb_quality = "90"; //썸네일 이미지 품질
$filter[type] = "99";
$filter[arg1] = "100";
$filter[arg2] = "1";
$filter[arg3] = "2";
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$g2_color_set = "1"; //최근게시물 색상 선택은 1~4 중 하나를 입력하세요
$g2_round = "fff"; //최근게시물 기본색상 테두리를 넣으려면 "e1e1e1" 로 수정하세요
$thumb_main = "3"; //메인에 보이게 할 썸네일 갯수
$arrow_top = "35"; //좌우버튼 상단에서 떨어지는 거리
?>
<script type="text/javascript" src="<?php echo $latest_skin_path ?>/js/jquery.simple_slider.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $latest_skin_path ?>/css/color_set<?php echo $g2_color_set ?>.css">
<style type="text/css">
.g2_list_wrap {border-right:1px solid #<?php echo $g2_round ?>; border-bottom:0px solid #<?php echo $g2_round ?>; border-left:1px solid #<?php echo $g2_round ?>; text-align:left}
#g2_gallery_list {height:<?php echo $thumb_height + 20 ?>px; text-align:center; overflow:hidden}
#g2_main {margin:0 auto; width:<?php echo ($thumb_width * $thumb_main) + 50 ?>px; height:<?php echo $thumb_height ?>px; overflow:hidden}
#g2_arrow_prev {float:left; margin-top:<?php echo $arrow_top ?>px}
#g2_arrow_next {float:right; margin-top:<?php echo $arrow_top ?>px}
.objImgFrame {width:<?php echo $thumb_width ?>px}
.simple_slider_hover {cursor:pointer}
.simple_slider_disabled {cursor:default; opacity:0.5; filter:alpha(opacity=50); zoom:1}
.g2_no_list {text-align:center; color:#767676}
</style>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#g2_gallery_list').show();
jQuery('#g2_gallery_thumb').simple_slider({
'leftID': 'leftNav',
'rightID': 'rightNav',
'display': <?php echo $thumb_main ?> //메인에 보이게 할 썸네일 갯수
})
});
</script>
<div class="g2_latest_wrap">
<div class="g2_title_wrap">
<div class="g2_title"><a href="<?php echo $g4[bbs_path] ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $board[bo_subject] ?></a></div>
<div class="g2_title_shadow"><?php echo $board[bo_subject] ?></div>
</div>
<div class="g2_title_bg_top"></div>
<div class="g2_title_bg_bottom"></div>
<div class="g2_list_wrap" id="g2_gallery_list">
<div id="g2_main" style="margin-top:15px">
<?php if (!count($list) == 0) { ?>
<div id="g2_arrow_prev"><img src="<?php echo $latest_skin_path ?>/img/prev.gif" width="17" height="22" border="0" alt="" title="" id="leftNav" /></div>
<div id="g2_arrow_next"><img src="<?php echo $latest_skin_path ?>/img/next.gif" width="17" height="22" border="0" alt="" title="" id="rightNav" /></div>
<?php } ?>
<div id="g2_gallery_thumb">
<?php
for ($i = 0; $i < count($list); $i++) {
$noimg = $latest_skin_path."/img/_noimg.gif";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if ($list[$i][wr_id]) {
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
if ($edit_img = $list[$i]['wr_content']) {
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $thumb_quality, 0, "", $filter, $noimg);
}
}
?>
<a href="<?php echo $list[$i][href] ?>"><img src="<?php echo $thumb ?>" width="<?php echo $thumb_width ?>" height="<?php echo $thumb_height ?>" border="0" alt="<?php echo $list[$i]['subject'] ?>" title="<?php echo $list[$i]['subject'] ?>"></a>
<?php } ?>
</div>
<?php if (count($list) == 0) { ?>
<div class="g2_no_list">게시물이 없습니다.</div>
<?php } ?>
</div>
</div>
</div>
이건데 여러개 쓸 수 있는 방법이 없을까요?
댓글 전체

자바스크립트(css변수도 바꾸면 좋고) 변수를 각각 다른 이름으로 새로운 스킨을 만들어서 각각의 별개의 스킨처럼 쓰시면 됩니다. 이거는 노가다이기 때문에...
저도 이런경우 어떻게 노가다를 피해가느냐가 앞으로의 고민. 스킨의 이름과 그속에서 쓰일 변수들을 자동생성하게 만들어주든지 해야할거 같은데...
저도 이런경우 어떻게 노가다를 피해가느냐가 앞으로의 고민. 스킨의 이름과 그속에서 쓰일 변수들을 자동생성하게 만들어주든지 해야할거 같은데...