스킨의 중앙 정렬 방법좀 알려 주세요! > 그누4 질문답변

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

그누4 질문답변

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

스킨의 중앙 정렬 방법좀 알려 주세요! 정보

스킨의 중앙 정렬 방법좀 알려 주세요!

본문

안녕하세요 주말은 즐겁게 보내고 계시지요 ^^

전 index.main.skin.php 파일에 최신 게시물 스킨을 삽입 하여 쓰고 있는데요
<?=mw_latest("latest_onetap04", "B04",10,50);?>
이렇게만 하면 스킨이 왼쪽에 붙는데 불러올 스킨을 중앙에 정렬 시킬 방법은 없나요?
고수님들 소스좀 알려 주세요!
감사합니다 늘 건안하세요~~!

댓글 전체

프리자인님 관심 감사드립니다
죄송합니다 제가 스킨명을 잘못섰네요
스킨명은 slideshow_xtx 입니다
초보여서도 그렇지만 이 slideshow_xtx 스킨은 어디 정렬을 써줄만데를 모르겠더라구요??
아무튼 감사합니다
와 프리자인님 관심 감사드립니다!
그럼 신세 지는길에 완전히 문의 드려봅니다
스킨 자체가 배추빌더의 1세대스킨 정중앙에 위치하고 싶기도 하지만
사실은 $img_width = '450'; //큰썸네일 가로길이
을 600으로 조정 하고 테스트 해봐도 스킨의 폼만 커질뿐 큰썸네일에는 변화가 없습니다
왜일까요?
그래서 이초보 포기하고  배추빌더의 서브페이지 정중앙에라도 위치하게 하려고
문의 드렸던것입니다
이왕 신세지는길에 왼쪽에서 10px 띄우는것 말고 스킨 자체가 정중앙에 위치 시키는 방법하고
큰썸네일 키우는 법좀 아니면 왜 스킨폼만 커지고 썸네일 조정이 안되는지 알려 주세요 ^^
감사합니다 프리자인님~~!
안녕히 계세요~~!
------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '450'; //큰썸네일 가로길이
$img_height = '300'; //큰썸네일 세로길이
$sw_img = '85'; //작은썸네일 가로길이
$sh_img = '55'; //작은썸네일 세로길이
$speed = '700'; //화면전환속도
$effect = 'random'; //fade|wipe|slide|random
$img_quality = '9'; //퀼리티 100이하로 설정

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있습니다.");

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

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/mootools.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/backgroundslider.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/slideshow.js"></script>
<style>
.slideshowContainer {
border: 1px dotted #000;
width: <?=$img_width?>px;
height: <?=$img_height?>px;
margin-bottom: 0px;
}

.loading {
background: url(<?=$latest_skin_path?>/images/loading.gif) center no-repeat;
}

.slideshowThumbnail {
outline: none;
}

.slideshowThumbnail img {
border: 1px solid EEE;
margin-right: 4px;
margin-top: 4px;
}

a:hover.slideshowThumbnail img {
filter: Alpha(Opacity=40);
}

.outline {
filter: Alpha(Opacity=40);
border: 7px solid orange;
z-index: 0;
position: absolute;
}

#thumbnails {
/*width: 130px;
float: left;*/
}
#container {
width: <?=$img_width+5?>px;
margin: auto;
padding-top: 0px;
padding-bottom: 0px;
}
.pgnb{
position:relative;
}
.pgnbGorealra{
width:<?=$img_width?>px;
height:<?=$img_height?>px;
position:absolute;
top:-305Px;
left:0px;
}
.co{
position:relative;
}
.cora{
width:100px;
height:106px;
position:absolute;
top:-<?=$img_height+5?>Px;
left:-2px;
}
</style>
<table border="0" width="<?=$img_width?>" id="main" cellspacing="0" cellpadding="0">
<tr>
<td>
<div id="container">
<div id="example">
<div id="slideshowContainer" class="slideshowContainer"></div>
<div id="thumbnails">
<div class="co"><div class="cora"><img src="<?=$latest_skin_path?>/images/co.png" border="0" width="100" height="106"></div></div>
<div class='pgnb'><div class='pgnbGorealra'><a href='<?=$g4['bbs']?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/images/bink.gif' border='0' width='450' height='300'></a></div></div>
<? for ($i=0; $i<count($list); $i++) {
        $lk = $list[$i][href];
$img = "<img src='$latest_skin_path/images/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("/\.(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, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<a href='$thumb'class='slideshowThumbnail'><img src='$thumb' width='$sw_img' height='$sh_img' title='{$list[$i][subject]}'></a>";
}
echo $img;}
?></div>
<script type="text/javascript">
  window.addEvent('domready',function(){
var obj = {
wait: 3000,
effect: '<?=$effect?>',
duration: <?=$speed?>,
loop: true,
thumbnails: true,
backgroundSlider: true,
onClick: function(i){alert(i)}
}
show = new SlideShow('slideshowContainer','slideshowThumbnail',obj);
show.play();
});
  </script>
</div>
</div></td>
</tr>
</table>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '600'; //큰썸네일 가로길이
$img_height = '400'; //큰썸네일 세로길이
$sw_img = '85'; //작은썸네일 가로길이
$sh_img = '57'; //작은썸네일 세로길이
$speed = '700'; //화면전환속도
$effect = 'random'; //fade|wipe|slide|random
$img_quality = '9'; //퀼리티 100이하로 설정

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있습니다.");

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

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/mootools.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/backgroundslider.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/slideshow.js"></script>
<style>
td.center {
  text-align:center;
}

td.center img { margin: 0px auto; }
.slideshowContainer {
border: 1px dotted #000;
width: <?=$img_width?>px;
height: <?=$img_height?>px;
margin-bottom: 0px;
}

.loading {
background: url(<?=$latest_skin_path?>/images/loading.gif) center no-repeat;
}

.slideshowThumbnail {
outline: none;
}

.slideshowThumbnail img {
border: 1px solid EEE;
margin-right: 4px;
margin-top: 4px;
}

a:hover.slideshowThumbnail img {
filter: Alpha(Opacity=40);
}

.outline {
filter: Alpha(Opacity=40);
border: 7px solid orange;
z-index: 0;
position: absolute;
}

#thumbnails {
/*width: 130px;
float: left;*/
}
#container {
width: <?=$img_width+5?>px;
margin: auto;
padding-top: 0px;
padding-bottom: 0px;
}
.pgnb{
position:relative;
}
.pgnbGorealra{
width:<?=$img_width?>px;
height:<?=$img_height?>px;
position:absolute;
top:-305Px;
left:0px;
}
.co{
position:relative;
}
.cora{
width:100px;
height:106px;
position:absolute;
top:-<?=$img_height+5?>Px;
left:-2px;
}
</style>
<table border="0" width="<?=$img_width?>" id="main" cellspacing="0" cellpadding="0">
<tr>
<td class=center>
<div id="container">
<div id="example">
<div id="slideshowContainer" class="slideshowContainer"></div>
<div id="thumbnails">
<div class="co"><div class="cora"><img src="<?=$latest_skin_path?>/images/co.png" border="0" width="100" height="106"></div></div>
<div class='pgnb'><div class='pgnbGorealra'><a href='<?=$g4['bbs']?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/images/bink.gif' border='0' width='<?=$img_width?>' height='<?=$img_height?>'></a></div></div>
<? for ($i=0; $i<count($list); $i++) {
        $lk = $list[$i][href];
$img = "<img src='$latest_skin_path/images/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("/\.(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, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<a href='$thumb' class='slideshowThumbnail'><img src='$thumb' width='$sw_img' height='$sh_img' title='{$list[$i][subject]}'></a>";
}
echo $img;
}
?></div>
<script type="text/javascript">
  window.addEvent('domready',function(){
var obj = {
wait: 3000,
effect: '<?=$effect?>',
duration: <?=$speed?>,
loop: true,
thumbnails: true,
backgroundSlider: true,
onClick: function(i){alert(i)}
}
show = new SlideShow('slideshowContainer','slideshowThumbnail',obj);
show.play();
});
  </script>
</div>
</div></td>
</tr>
</table>


위 처럼 해보세요...
테스트를 못해봤습니다. 될지모르겟네요..
프리자인님 감사합니다!
많은 시간을 할애 하여 주셔서 너무 감사드립니다!
slideshow_xtx의 썸네일 크기 변경에는 아무 문제 없는 스킨이었습니다
다만 스킨 350X250 이럴때 올려진 이미지는 계속 그렇게 출력 되어 지구요
썸네일 600X400 으로 변경하고 신규로 사진올리면 그때 부터 인식을 하더군요
멀쩡한 스킨이 안된다고 엄청 시간 투자했네요 제가 이렇습니다 ㅎㅎㅎ

프리자인님이 소스 변경분은 모든것이 중앙정렬되어
왼쪽 상단의 리본 마져도 중앙으로 정렬 하더군요 ^^
그것 마저 잡아 달라고 말씀드리기는 너무 죄송스럽구요
크기 조정 가능 하니까 폭 조정으로 쓸려구해요 ^^

관심과 좋은 학식 나눠 주셔서 감사드립니다
프리자인님 늘 행복 가득하세요
안녕히 계세요~~
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

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