스킨관련 질문입니다. > 그누4 질문답변

그누4 질문답변

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

스킨관련 질문입니다. 정보

스킨관련 질문입니다.

본문

亞波治님이 올리신 그누보드 스킨중에 3dCarousel 최신글 이 맘에 들어 적용을 하고 싶은데

정말 답이 안나와서 이렇게 궁금증을 올려 봅니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '80'; //썸네일 가로길이
$img_height = '77'; //썸네일 세로길이
$img_quality = '99'; //퀼리티 100이하로 설정

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_3dCarousel'; //썸네일 이미지 생성 디렉토리

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<script type="text/javascript" src="<?php echo $latest_skin_path?>/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<?php echo $latest_skin_path?>/js/script.js"></script>

<style>
*{margin:0;padding:0;}
img{border:none;}

#imgCarousel{height:96px;margin:0px auto ;position:relative;width:438px;background-color:#ffffff}
#imgCarousel .arrow{width:22px;height:22px;background:url('<?php echo $latest_skin_path?>/img/arrows.png') no-repeat;position:absolute;top:50%;margin-top:-22px;left:0;cursor:pointer;}
#imgCarousel .next{background-position:right top;left:auto;right:0;}
#imgCarousel .arrow:hover{background-position:left bottom;}
#imgCarousel .next:hover{background-position:right bottom;}
#stage{left:50%;margin-left:-320px;position:absolute;width:640px;height:100%;}
#stage img{display:none;border:2px #999 solid;}
#stage .default{display:block;left:50%;margin-left:-135px;position:absolute;}
#stage .animationReady{display:block;position:absolute;top:0;left:0;}
</style>

<div id="page">
    <div id="imgCarousel">
    <div class="previous arrow"></div>
        <div class="next arrow"></div>
       
        <div id="stage">
<? for ($i=0; $i<count($list); $i++) {

$img = "<img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음' />";

$thumb = $thumb_path.'/'.$list[$i][wr_id];
// 썸네일 이미지가 존재하지 않는다면
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
} else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/geditor[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor4------
$file = './' . $tmp[0]; // 파일명
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
}

if (file_exists($thumb)){
$img = "<a href='{$list[$i][href]}'><img id=\"[$i]\" src='$thumb' width='$img_width' height='$img_height' title=\"{$list[$i][subject]}\" /></a>";
}
echo $img;
} ?>
  </div>
    </div>
</div>

이렇게 되어 있는데 음... 사진 간격을 줄이고 싶은데 어디서 간격을 줄일수 있는가요???
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로