최신게시물 이미지수 조절방법 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최신게시물 이미지수 조절방법 정보

최신게시물 이미지수 조절방법

본문

안녕하세요  오랜만입니다..
그동안 홈페이지 만드는 취미생활에서 손을때고있다가 본의아니게 홈페이지를 하나 만들어야 해서
다시 공부를 하고 있는데 아주 생소하네요..  도와주십시요..

DesignOneX님의 최신게시물을 사용하려 하는데 이미지가 가로4개로 나오네요..
저는 가로 2개의 이미지로 나오게 하고 싶거든요.. 그래서 여러가지를 시도해보다 안되서 도움을 청합니다

소스를 올리겠습니다
---------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

/*
 *    ez_cineV_Gallery Gnuboard4
 *
 *     latest.skin.php
 *     
 *      Copyright 2011 Man Hyung, cho
 *     
 *      File encoding: Korean(Euc-kr)
 *
 */



  $is_crop = 1;
// $is_crop    : 세로 높이가 $height를 넘을 때 crop 할 것인지를 결정
//                0 : crop 하지 않습니다
//                1 : 기본 crop
//                2 : 중간을 기준으로 crop


//불당썸---------------------------------------------------------------//
$img_width = 180; //표시할 이미지의 가로사이즈
$img_height = 130; //표시할 이미지의 세로사이즈
$table_width = 900; //테이블넓이

//언샾마스트 퀄리티(썸 노이즈바지)
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;


$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$no_img = $latest_skin_path."/img/no_img.gif";


// 불당썸을 include
include_once("$g4[path]/lib/thumb.lib.php");
//불당썸---------------------------------------------------------------//

//$list_content = "450"; //내용길이
$cols  = 2;


?>


<style type="text/css">

h1 {
background: #fdcd07;
margin: 20px 0 10px;
padding: 4px;
text-align: center;
color: #801d03;
font: 310%/100% Garamond, Georgia, serif;
letter-spacing: 2px;
text-transform: uppercase;
}
h1 em {
border: dashed 1px #e3792c;
display: block;
padding: 10px 0;
font-style: normal;
}
.credits {
width: 280px;
margin: 0 auto 20px;
text-align: center;
border-bottom: solid 1px #ccc;
padding: 0 0 8px 0;
font: 130%/110% Garamond, Georgia, serif;
}
.credits em {
color: #999;
}
.credits a {
color: #333;
text-decoration: none;
text-transform: uppercase;
}
.credits a:hover {
text-decoration: underline;
}
img {
border: none;
}

/* ---------- gallery styles start here ----------------------- */
.gallery {
list-style: none;
margin: 0;
padding: 0;
}
.gallery li {
padding: 10px;
margin: 0;
float: left;
position: relative;
width: 180px;
height: 130px;
}
.gallery li:hover img {
border-color: #000;
}
.gallery img {
background: #fff;
border: solid 1px #888;
padding: 5px;
}
.gallery em {
background: #fff url(images/grey-gradient.gif) repeat-y;
color: #000;
font-style: normal;
padding: 2px 10px;
display: block;
position: absolute;
top: 110px;
left: 9px;
border: 1px solid #999;
border-left-color: #888;
}
.gallery a {
text-decoration: none;
}
.gallery a:hover em {
background: #ffdb01 url(images/orange-gradient.gif) repeat-y;
border-color: #c25b08;
}
</style>
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="5" style="border-bottom:1px groove #999;">
  <tr>
    <td><font style="font-size:16pt; font-weight:300;">GDT:DesignonexGallery</font> | <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></td>
  </tr>
 
</table>
<br />






<ul class="gallery" style="width:<?=$table_width?>px;">
<? for ($i=0; $i<count($list); $i++) { ?>

<? //리스트 페이지 이미지 출력 

//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];

$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "",  $filter, $noimg); //첨부파일 언샾마스크추가

} else { //에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명

$thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "",  $filter, $noimg); //언샾마스크추가

}
}




$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
$wr_content = preg_replace("/&nbsp;/"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content1 = cut_str(get_text($wr_content), 100, '…');



if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {

//echo "<a href='{$list[$i]['href']}' class='item' title='{$list[$i]['subject']}'>";
//echo "<img src='$thumb' border='0'>";
//echo "</a>";

?>
    <li><a href="<?=$list[$i]['href']?>"><em><?=$list[$i]['subject']?></em><img src="<?=$thumb?>" /></a></li>
   
     
   
    <?

}
 
} ?>
  <? if (count($list) == 0) { echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td colspan=3 align=center height=100>자료가 없습니다.</td></tr></table>"; } ?>
</ul>

------------------------------
소스 입니다...

아시는분 도와주시면 감사하겠습니다..
좋은 하루되세요

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT