채택완료

메인에 최근 게시물 갤러리 노출시에 여백을 없앨려면?

메인에 최근 게시물 갤러리 노출시에 여백을 없앨려면?

어떻게 해야하나요?

1935605410_1513307193.4771.jpg

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');

$imgwidth = 320; //표시할 이미지의 가로사이즈
$imgheight = 300; //표시할 이미지의 세로사이즈
?>

<style>
#oneshot { position:relative;background-color: transparent;margin:0px;}
#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;}
#oneshot .img_set{width:<?php echo $imgwidth ?>px;  padding:0px;margin:5px;padding-top:10px; }
#oneshot .subject_set{width:<?php echo $imgwidth - 13 ?>px; height:0px; padding:0px; z-index:1; bottom:0; left:0;;}
#oneshot .subject_set .sub_title{color:#333;line-height:10px;overflow:hidden;padding:5px 0 0 0;margin:0px;font-size:1.2em;font-family:NanumBarunGothic,dotum;}


#oneshot ul {list-style:none;clear:both;margin:0;padding:0;}
#oneshot li{float:left;list-style:none;text-decoration:none;padding:23px 0px 0px 0px;}
.subject_set  a:link, a:visited {color:#333;text-decoration:none;}
.subject_set  a:hover, a:focus, a:active {color:#e60012;text-decoration:none}

</style>
<div id="oneshot">
 <ul>
 <?php for ($i=0; $i<count($list); $i++) { ?> 
  <li>
   <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 >
    <div class="sub_title"  style="text-align:center;"><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]), 65, '...' )) ?></div>-->
   </div>
  </li>
 <?php } ?>
 </ul>
</div>

답변 1개 / 댓글 2개

채택된 답변
+20 포인트

lib/thumbnail.lib.php 파일에서 $is_crop=true로 변경

// 게시글리스트 썸네일 생성
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3')
{

수정 후 관리자페이지 > 환경설정 > 썸네일파일 일괄삭제

답변에 대한 댓글 2개

혹시 비율을 올린대로 나오게는 못하나요??
가로 세로 사이즈가 정해져있는데 어렵죠.
기존 방식대로 여백 있게 쓰던지 아니면 CROP 해서 쓰던지 선택해야 합니다.

답변을 작성하려면 로그인이 필요합니다.