최신글 스킨 수정 중인데 도움 부탁드려요 > 그누4 질문답변

그누4 질문답변

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

최신글 스킨 수정 중인데 도움 부탁드려요 정보

최신글 스킨 수정 중인데 도움 부탁드려요

본문

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=127608&sca=%EC%B5%9C%EC%8B%A0%EA%B8%80&sfl=wr_subject%7C%7Cwr_content&stx=fade

링크의 스킨을 수정해서 쓰려는데요.

썸네일 이미지 대신 걍 아이콘처럼 하는데

좀 처럼 아이콘이 중간으로 안옵니다.

padding이나  margin으로 꼼수 부려봤느데
갯수가 달라지면 또 위치가 바뀌더라구요

4시간 동안 이러고 있어요 휴...






<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 

$img_width = 270; //큰 썸네일 가로
$img_height = 278; //큰 썸네일 세로
$img_quality = 100; //썸네일 퀄리티

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

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'main_photo';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result); 
?> 

<style type="text/css">
img {border:none;}
#featured {
	width: 272px;
	height: 280px;
	position: relative;
	border:#CCC solid 1px;
	z-index:10;
}

#nav {
	width: 272px;
	position: absolute;
	top: 250px;
	z-index: 20;

}
#nav li {
	/* [disabled]float: left; */
	float: left;
	width: 15px;
		margin:0 3 0 3;
	list-style: none;
}
#nav a { width: 15px; height:15px; display: block; border: 1px solid #32445a; background: #fff;}
#nav li.activeSlide a { background: #2776ac;}
#nav a:focus { outline: none; }
#nav img { border: none; display: block;}

</style>
<script type="text/javascript" src="<?=$g4['path']?>/js/jquery.min_15.js"></script>
<script type="text/javascript" src="<?=$g4['path']?>/js/chili-1.7.pack.js"></script>
<script type="text/javascript" src="<?=$g4['path']?>/js/jquery.cycle.all.js"></script>
<script type="text/javascript" src="<?=$g4['path']?>/js/jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function() {
    $('#slideshow').cycle({
        fx:     'fade',
        speed:  '2500',
		 pause:  1 ,
        timeout: 3000,
        pager:  '#nav',
		pagerEvent: 'mouseover',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#nav li:eq(' + (idx) + ') a';
        }
    });

    $('#direct').click(function() {
        $('#nav li:eq(2) a').triggerHandler('click');
        return false;
    });
    
});

</script>


<div id="featured" >


<ul id="nav" name="nav">  
<? 
for ($i=0; $i<count($list); $i++) {
	$j = $i + 1;  
	if ($j == "1") { 
	$selected='ui-tabs-selected';
	} else { 
	$selected='';}
//썸네일 생성
$thumfile = "";
    $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("/\.(jp[e]?g|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
                break;

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

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
				// 이미지 높이 맞출려면 주석처리된것을 사용
				//imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $$img_height, $size[0], $size[1]);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
				// 이미지 높이 맞출려면 주석처리된것을 사용
				//imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $$img_height, $size[0], $size[1]);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $img_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/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
				$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
					break;

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

				// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
				if ($height < $img_height)
					// 계산된 이미지 높이로 복사본 이미지 생성
					$dst = imagecreatetruecolor($img_width, $img_height);
				else
					// 설정된 이미지 높이로 복사본 이미지 생성
					$dst = imagecreatetruecolor($img_width, $img_height);
				// 이미지 높이 맞출려면 주석처리된것을 사용
				//imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $$img_height, $size[0], $size[1]);
				imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $img_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))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0'></a>";
		else
		//이미지가 없으면
		$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}'></a>";
		//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
       { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
   
	   
?>
     <li class="ui-tabs-nav-item <?=$selected?>" id="nav-fragment-<?=$j?>"><a href="#fragment-<?=$j?>"></a></li>
<? }?>
</ul>



<div id="slideshow" class="pics">

<!-- First Content -->
<? 
for ($i=0; $i<count($list); $i++) {
	$thumfile2 = $thumb_path.'/'.$list[$i][wr_id];
	
	$j = $i + 1;  
	if ($j == "1") { 
	$hide='';
	} else { 
	$hide='ui-tabs-hide'; }
?>
	<a href='<?=$list[$i][href]?>'><img src="<?=$thumfile2?>" alt="" /></a>

    <? }?>
</div>
</div>    


댓글 전체

cycle.all.js 파일에 jquery에서 어느정도 바꾸는것 같습니다.
이것을 조금 커스트마이징 해서
네비쪽을 감싸서 위치를 바로 잡아주는 css를 하나 넣어주면 될듯합니다.
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

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