최근게시물 사진을 클릭하면 해당 글로 가지 않습니다 정보
최근게시물 사진을 클릭하면 해당 글로 가지 않습니다본문
보통은 <a href='{$list[$i]['href']}'> 이렇게 링크를 걸면 해당 글 본문으로 링크가 되는데
아래 스킨에서는 위 소스를 넣어도 본문 링크가 되지 않습니다.
어떻게 해야 할까요? 현재는 해당 보드로 링크되어 있습니다.
아래는..
latest.skin.php 내용입니다.
<?
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: 0px 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>
아래 스킨에서는 위 소스를 넣어도 본문 링크가 되지 않습니다.
어떻게 해야 할까요? 현재는 해당 보드로 링크되어 있습니다.
아래는..
latest.skin.php 내용입니다.
<?
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: 0px 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>
댓글 전체

사이트를 보고 싶습니당.
onsegetv.com 입니다. 우측 사진 최근게시물입니다.