최근게시물 불러왔는데 이상합니다. 정보
최근게시물 불러왔는데 이상합니다.본문
넘버링+오토텝 카우셀 이란 최근게시물을 받았는데요
이미지를 줄이면 말 그대로 이미지만 줄여지고 나머지는 변동이 없네요.. ㅠ.ㅠ
사진첨부하고 소스 적어놓을게요 ㅠ.ㅠ 어디를 수정해야 하는지점 알려주세요 ㅠ.ㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = 620;
$img_height = 160;
$img_quality = 200;
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_mainBn';
$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">
* {
margin:0;
padding:0;
}
#MnBnCarousel {
width:705px;
float:right;
height:374px;
background:#ffffff;
border:10px solid #ffffff;
text-align:center;
}
/* -------- dok main 2.0! ------- */
.dok_myAlbum {
width:705px;
height:374px;
position:relative;
margin:0px auto;
background: #fff;
}
.dok_myAlbum .PN {
margin-right:4px;
background-image:url(<?=$latest_skin_path?>/img/sprite.gif);
background-repeat:no-repeat;
cursor:pointer;
width:18px;
float:left;
line-height:18px;
}
.dok_myAlbum .prevSlide, .dok_myAlbum .prev {
background-position:0 0;
}
.dok_myAlbum .prevSlideDisabled, .dok_myAlbum .prevDisabled {
background-position:0 -18px!important;
}
.dok_myAlbum .prevSlideDisabled, .dok_myAlbum .prevDisabled, .dok_myAlbum .nextSlideDisabled, .dok_myAlbum .nextDisabled {
cursor:text!important;
}
.dok_myAlbum .nextSlide, .dok_myAlbum .next {
background-position:right -18px;
}
.dok_myAlbum .nextDisabled {
background-position:right 0px!important;
}
.dok_myAlbum .prevSlide {
background-position:0 -36px;
}
.dok_myAlbum .prevSlideDisabled {
background-position:0 -54px!important;
}
.dok_myAlbum .nextSlide {
background-position:right -54px;
}
.dok_myAlbum .nextSlideDisabled {
background-position:right -36px!important;
}
.dok_myAlbum_tt, .dok_myAlbum_ct {
float:left;
width:100%;
overflow:hidden;
}
.dok_myAlbum_opacity { /* background:#fff; */
opacity:0.4;
filter:alpha(opacity=40);
position:absolute;
left:0;
bottom:0;
width:100%;
height:22px;
line-height:22px;
}
.dok_myAlbum_tt {
height:18px;
position:absolute;
bottom:2px;
left:0;
}
.dok_myAlbum_tt_container {
height:18px;
margin-right:4px;
overflow:hidden;/* width:144px;*/
float:left; /*position:relative;*/
}
.dok_myAlbum_tt_container_list { /*position: absolute; left:0; top:0;*/
}
.dok_myAlbum_tt_container_list li {
float:left;
line-height:18px;
width:18px;
}
.dok_myAlbum_tt_container_list li span {
cursor:pointer;
color:#fff;
width:18px;
text-align:center;
display:block;
}
.dok_myAlbum_tt_container_list .focus span {
cursor:text;
background:#a9a9a9;
color:#fff;
text-decoration:none;
}
.dok_myAlbum_ct {
position:absolute;
left:0;
top:0;
width:705px;
height:374px;
overflow:hidden;
}
.dok_myAlbum_ct_container {
width:705px;
height:374px;
position:relative;
overflow:hidden;
}
.dok_myAlbum_ct_container_list {
position:absolute;
left:0;
top:0;
width:705px;
background:#fff
}
.dok_myAlbum_ct_container_list li {
float:left;
width:705px;
}
/* -------- /End! ------- */
</style>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/dok-3.0.pack.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/dok.ui.myalbum-2.1.pack.js"></script>
<script type="text/javascript">
(function($){
$.ready(function(){
$.ui.myalbum({
el:"#focus1,#focus2",
ct:".dok_myAlbum_ct",
ctContainer:".dok_myAlbum_ct_container",
ctList:"ul",
ctChild:"li",
ctChildBlock:"block",
tt:".dok_myAlbum_tt",
ttContainer:".container",
ttList:"ul",
ttChild:"li",
focusClassName:"focus",
eventType:"mouseover",
numAPage:8,// 페이지내에서 항목보기.
interval:5000,// 재생시간.
delay:300,// 지연, 스위칭
startIndex:0// 초기재생.
});
});
})(dok);
</script>
<!--js-main_bn시작! -->
<div class="dok_myAlbum" id="focus2">
<div class="dok_myAlbum_ct">
<div class="dok_myAlbum_ct_container">
<ul class="dok_myAlbum_ct_container_list" id="xxx">
<? for ($i=0; $i<count($list); $i++) { ?>
<?
//썸네일 생성
$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, $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/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, $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))
$thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0px #ccc solid'></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></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>"; }
?>
<? if ($list[$i][wr_link1]) {
echo "<li><a href='{$list[$i][wr_link1]}' target='_blank'>{$thumfile}</a></li>";
} else {
echo "<li><a href='{$list[$i][href]}'>{$thumfile}</a></li>";
}
?>
<!--ex) li><a href="-- in url --" title="1">
<img width:550px; height="260" alt="1" src="img/images/01.jpg" /></a></li -->
<? } ?>
</ul>
</div>
</div>
<p class="dok_myAlbum_opacity"> </p>
<div class="dok_myAlbum_tt"> <span class="PN prevSlide"> </span> <span class="PN prev"> </span>
<div class="dok_myAlbum_tt_container container">
<ul class="dok_myAlbum_tt_container_list">
<? for ($i=0; $i<count($list); $i++) { $k = $i + 1; ?><li><span title=""><?=$k?></span></li><? } ?>
<!--ex) li><span title="">1</span></li -->
</ul>
</div>
<span class="PN next"> </span> <span class="PN nextSlide"> </span> </div>
</div>
<!--/js-End!-->
이미지를 줄이면 말 그대로 이미지만 줄여지고 나머지는 변동이 없네요.. ㅠ.ㅠ
사진첨부하고 소스 적어놓을게요 ㅠ.ㅠ 어디를 수정해야 하는지점 알려주세요 ㅠ.ㅠ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = 620;
$img_height = 160;
$img_quality = 200;
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_mainBn';
$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">
* {
margin:0;
padding:0;
}
#MnBnCarousel {
width:705px;
float:right;
height:374px;
background:#ffffff;
border:10px solid #ffffff;
text-align:center;
}
/* -------- dok main 2.0! ------- */
.dok_myAlbum {
width:705px;
height:374px;
position:relative;
margin:0px auto;
background: #fff;
}
.dok_myAlbum .PN {
margin-right:4px;
background-image:url(<?=$latest_skin_path?>/img/sprite.gif);
background-repeat:no-repeat;
cursor:pointer;
width:18px;
float:left;
line-height:18px;
}
.dok_myAlbum .prevSlide, .dok_myAlbum .prev {
background-position:0 0;
}
.dok_myAlbum .prevSlideDisabled, .dok_myAlbum .prevDisabled {
background-position:0 -18px!important;
}
.dok_myAlbum .prevSlideDisabled, .dok_myAlbum .prevDisabled, .dok_myAlbum .nextSlideDisabled, .dok_myAlbum .nextDisabled {
cursor:text!important;
}
.dok_myAlbum .nextSlide, .dok_myAlbum .next {
background-position:right -18px;
}
.dok_myAlbum .nextDisabled {
background-position:right 0px!important;
}
.dok_myAlbum .prevSlide {
background-position:0 -36px;
}
.dok_myAlbum .prevSlideDisabled {
background-position:0 -54px!important;
}
.dok_myAlbum .nextSlide {
background-position:right -54px;
}
.dok_myAlbum .nextSlideDisabled {
background-position:right -36px!important;
}
.dok_myAlbum_tt, .dok_myAlbum_ct {
float:left;
width:100%;
overflow:hidden;
}
.dok_myAlbum_opacity { /* background:#fff; */
opacity:0.4;
filter:alpha(opacity=40);
position:absolute;
left:0;
bottom:0;
width:100%;
height:22px;
line-height:22px;
}
.dok_myAlbum_tt {
height:18px;
position:absolute;
bottom:2px;
left:0;
}
.dok_myAlbum_tt_container {
height:18px;
margin-right:4px;
overflow:hidden;/* width:144px;*/
float:left; /*position:relative;*/
}
.dok_myAlbum_tt_container_list { /*position: absolute; left:0; top:0;*/
}
.dok_myAlbum_tt_container_list li {
float:left;
line-height:18px;
width:18px;
}
.dok_myAlbum_tt_container_list li span {
cursor:pointer;
color:#fff;
width:18px;
text-align:center;
display:block;
}
.dok_myAlbum_tt_container_list .focus span {
cursor:text;
background:#a9a9a9;
color:#fff;
text-decoration:none;
}
.dok_myAlbum_ct {
position:absolute;
left:0;
top:0;
width:705px;
height:374px;
overflow:hidden;
}
.dok_myAlbum_ct_container {
width:705px;
height:374px;
position:relative;
overflow:hidden;
}
.dok_myAlbum_ct_container_list {
position:absolute;
left:0;
top:0;
width:705px;
background:#fff
}
.dok_myAlbum_ct_container_list li {
float:left;
width:705px;
}
/* -------- /End! ------- */
</style>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/dok-3.0.pack.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/js/dok.ui.myalbum-2.1.pack.js"></script>
<script type="text/javascript">
(function($){
$.ready(function(){
$.ui.myalbum({
el:"#focus1,#focus2",
ct:".dok_myAlbum_ct",
ctContainer:".dok_myAlbum_ct_container",
ctList:"ul",
ctChild:"li",
ctChildBlock:"block",
tt:".dok_myAlbum_tt",
ttContainer:".container",
ttList:"ul",
ttChild:"li",
focusClassName:"focus",
eventType:"mouseover",
numAPage:8,// 페이지내에서 항목보기.
interval:5000,// 재생시간.
delay:300,// 지연, 스위칭
startIndex:0// 초기재생.
});
});
})(dok);
</script>
<!--js-main_bn시작! -->
<div class="dok_myAlbum" id="focus2">
<div class="dok_myAlbum_ct">
<div class="dok_myAlbum_ct_container">
<ul class="dok_myAlbum_ct_container_list" id="xxx">
<? for ($i=0; $i<count($list); $i++) { ?>
<?
//썸네일 생성
$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, $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/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, $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))
$thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0' style='border:0px #ccc solid'></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/noimg.gif' width='{$img_width}' height='{$img_height}' style='border:0 #E7E7E7 solid'></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>"; }
?>
<? if ($list[$i][wr_link1]) {
echo "<li><a href='{$list[$i][wr_link1]}' target='_blank'>{$thumfile}</a></li>";
} else {
echo "<li><a href='{$list[$i][href]}'>{$thumfile}</a></li>";
}
?>
<!--ex) li><a href="-- in url --" title="1">
<img width:550px; height="260" alt="1" src="img/images/01.jpg" /></a></li -->
<? } ?>
</ul>
</div>
</div>
<p class="dok_myAlbum_opacity"> </p>
<div class="dok_myAlbum_tt"> <span class="PN prevSlide"> </span> <span class="PN prev"> </span>
<div class="dok_myAlbum_tt_container container">
<ul class="dok_myAlbum_tt_container_list">
<? for ($i=0; $i<count($list); $i++) { $k = $i + 1; ?><li><span title=""><?=$k?></span></li><? } ?>
<!--ex) li><span title="">1</span></li -->
</ul>
</div>
<span class="PN next"> </span> <span class="PN nextSlide"> </span> </div>
</div>
<!--/js-End!-->
댓글 전체
$img_width = 620;
$img_height = 160;
$img_quality = 200;
이미지 크기변경말고... 다른 무엇을 원하시는건지? --;;
$img_height = 160;
$img_quality = 200;
이미지 크기변경말고... 다른 무엇을 원하시는건지? --;;