최신글 이미지 정렬 채택완료
링크에 걸어둔 갤러리 최신글 스킨 적용했더니 가로로 정렬이 안되고 세로로 정렬이 되요
그리고 사진 앞에 ● 이렇게 떠서 고칠려고 했는데 안되요 ㅠㅠ
<?php
<div style="clear:both;"></div>
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$imgwidth = 210; //표시할 이미지의 가로사이즈
$imgheight = 160; //표시할 이미지의 세로사이즈
?>
<div class="n_title_wrap">
<div class="n_title"><a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=<?php echo $bo_table; ?>"><img src="<?php echo $latest_skin_url; ?>/img/index_00.png" width="173" height="39" alt="더보기" title="" /></a></div>
<div class="n_right_wrap">
<?php if ($is_admin == "super" || $is_auth) { ?>
<a href="<?php echo G5_URL; ?>/adm/board_form.php?w=u&bo_table=<?php echo $bo_table; ?>"><img src="<?php echo $latest_skin_url; ?>/img/icon_setting.gif" width="13" height="13" alt="게시판설정" title="" /></a>
<?php } ?>
<a href="<?php echo G5_BBS_URL; ?>/write.php?bo_table=<?php echo $bo_table; ?><?php echo $write_href; ?>"><img src="<?php echo $latest_skin_url; ?>/img/icon_write.gif" width="13" height="13" alt="글쓰기" title="" /></a>
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=<?php echo $bo_table; ?>"><img src="<?php echo $latest_skin_url; ?>/img/icon_more.gif" width="13" height="13" alt="더보기" title="" /></a>
</div>
</div><br>
<div id="oneshot">
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<li>
<div style="position:relative">
<div id="quick" style="position: absolute; z-index: 2; padding-top: 0px; left: 0px; width: 73px; ">
<?php
if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new'];
?>
</div>
</div>
<div class="img_set">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);
if($thumb['src']) {
$img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';
} else {
$img_content = 'NO IMAGE';
}
echo $img_content;
?>
</a>
</div>
<div class="subject_set">
<div class="sub_title"><a href="<?php echo $list[$i]['href'] ?>"><?php echo cut_str($list[$i]['subject'], 23, "..") ?></a></div>
<div class="sub_content"><?php echo get_text(cut_str(strip_tags($list[$i][wr_content]), 25, '...' )) ?></div>
</div>
</li>
<?php } ?>
</ul>
</div>
<div style="clear:both;"></div>
답변 2개
저는 잘 되는데요.
제가 현재 사용중인 스킨 소스입니다.
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$imgwidth = 166; //표시할 이미지의 가로사이즈
$imgheight = 110; //표시할 이미지의 세로사이즈
?>
<div class="n_title_wrap">
<div class="n_title"><a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=<?php echo $bo_table; ?>"><?php echo $bo_subject; ?><span>-내가 본 일본의 이모저모를 사진으로 소개해 보세요^^</span></a></div>
<div class="n_right_wrap">
<?php if ($is_admin == 'super' || $is_auth) { ?>
<a href="<?php echo G5_URL; ?>/adm/board_form.php?w=u&bo_table=<?php echo $bo_table; ?>"><img src="<?php echo $latest_skin_url; ?>/img/icon_setting.gif" width="13" height="13" alt="게시판설정" /></a>
<?php } ?>
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=<?php echo $bo_table; ?>"><img src="<?php echo $latest_skin_url; ?>/img/icon_more.gif" width="13" height="13" alt="더보기" title="" /></a>
</div>
</div><br>
<div id="oneshot">
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<li>
<div style="position:relative">
<div id="quick" style="position: absolute; z-index: 2; padding-top: 0px; left: 0px; width: 73px; ">
<?php
if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new'];
?>
</div>
</div>
<div class="img_set">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $imgwidth, $imgheight);
if($thumb['src']) {
$img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';
} else {
$img_content = 'NO IMAGE';
}
echo $img_content;
?>
</a>
</div>
<div class="subject_set">
<div class="sub_title"><a href="<?php echo $list[$i]['href'] ?>"><?php echo cut_str($list[$i]['subject'], 23, "..") ?></a></div>
<div class="sub_content"><? echo $list[$i]['wr_name']; ?> / <? echo $list[$i]['datetime']; ?></div>
</div>
</li>
<?php } ?>
</ul>
</div>
style.css
#oneshot { position:relative;margin:0 auto;padding:0;}
#oneshot .la_title{position:absolute; left:0; top:0; z-index:100; background:#000; padding:5px; font-size:1em; color:#fff;margin:0 0 0 5px;filter:alpha(opacity=50);opacity:.5;}
.n_title span {font-weight:normal;}
#oneshot .img_set{width:166px; height:110px; border:2px solid #eaeaea; background-color:#f8f8f8;padding:0;}
#oneshot .subject_set{width:166px; padding:0px 10px 0px 3px; z-index:1; bottom:0; left:0;}
#oneshot .subject_set .sub_title{color:#333;overflow:hidden;padding:3px 0 0 0;font-size:13px;}
#oneshot .subject_set .sub_content{color:#8c8a8a;overflow:hidden;padding:3px 0 0;}
#oneshot ul {list-style:none;clear:both;margin:0;padding:0;}
#oneshot li{float:left;list-style:none;text-decoration:none;padding:0px 3px 0px 0px}
댓글을 작성하려면 로그인이 필요합니다.
http://liberta1980.co-story.net
저도 잘 되네요.
둘째삼식님이 하신 것처럼 이미지 가로 세로 크기를 조절하고 style.css 파일에서 썸네일 사이 간격을 조금 조절해주면 됩니다.
말씀하신 것과 같이 깨지는 것은... 브라우저를 새로고침 해 주면 없어질 것입니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인