최신글에 미리보기 없앨려면 어떻게해야되나요? 정보
최신글에 미리보기 없앨려면 어떻게해야되나요?본문
최신글입니다
미리보기기능을 사용안할려고합니다
어디를 수정하거나 주석처리를 해야되나요?
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있습니다.");
include_once "$latest_skin_path/m3cron.extend.php";
$img_width = '60'; //썸네일 가로길이
$img_height = '300'; //썸네일 세로길이
$img_quality = '9'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 오늘이 아니면 날짜 업데이트 해놓고 이하 실행
if($m3_cron[ori_ymd] != $m3_cron[ymd]) {
sql_query("update $g4[board_table] set $rankinfo[bo_subj] = '$m3_cron[ymd]' where bo_table='$bo_table' ");
rank_update($bo_table, $field, $rankinfo);
}
?>
<style type="text/css">
#latest_rank td {
text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:11px;font-family:돋움;
}
#latest_rank a:link, a:visited, a:active { text-decoration:none; color:#444; }
#latest_rank a:hover { text-decoration:underline; }
</style>
<script type="text/javascript" src="<?=$g4['path']?>/js/common.js"></script>
<div id="latest_rank">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td>
<table width=100%>
<tr>
<td align="center"><b><?=$latest_subject;?></b></td>
<td align="right">
</td>
</tr>
</table>
</td>
</tr>
<? for ($i=0; $i<count($list); $i++) {
$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 = $thumb;
else $img="";
?>
<tr>
<td align=center style="BORDER-BOTTOM: lightgrey 1px dashed; OVERFLOW: hidden">
<table width=100%>
<tr>
<td>
<img src='<?=$latest_skin_path?>/img/<?=$i+1;?>.gif' align=absmiddle>
<div style="display:inline" onmouseover="viewImgDiv(this, '<?=$img;?>');viewImg('<?=$img;?>');" onMouseOut="document.getElementById('ImgDivBox').style.display = 'none';">
<? switch($m3_cron[field]) {
case "wr_link1_hit":
$link = "<a href='{$list[$i][link_href][1]}' target=_blank>{$list[$i][subject]}</a>";
break;
case "wr_link2_hit":
$link = "<a href='{$list[$i][link_href][2]}' target=_blank>{$list[$i][subject]}</a>";
break;
case "wr_hit":
case "wr_good":
case "wr_nogood":
$link = "<a href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
break;
default:
$link = "필드를 찾을 수 없습니다.";
}
echo $link;
?>
</div>
</td>
<td align=right style="font-family:돋움;font-size:11px;color:gray">
<?
if (!empty($list[$i][$rankinfo[wr_no]])) //어제 순위가 있다면
$ratio = $list[$i][$rankinfo[wr_no]] - ($i+1);
else
$ratio = 0; // 어제 순위가 없다면 오늘 순위
echo $ratio . " ";
if ($ratio > 0)
echo "<img src='$latest_skin_path/img/up.gif'>";
else if ($ratio < 0)
echo "<img src='$latest_skin_path/img/down.gif'>";
else
echo "<img src='$latest_skin_path/img/zero.gif'>";
//echo " hit: " . $list[$i][$field];
//echo " ye: " . $list[$i][wr_1];
//echo " to: " . ($i+1);
?></td></tr>
</table>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
</div>
<div id="ImgDivBox" style="padding:5px;position:absolute; display: none; border: solid 1px #CCCCCC; background-color: #FFFFFF; z-index: 999;">
<div id="ImgDiv"></div>
</div>
<script type="text/javascript">
function viewImgDiv(div, img) {
if (img) {
document.getElementById('ImgDivBox').style.left = get_left_pos(div) + div.offsetWidth;
document.getElementById('ImgDivBox').style.top = get_top_pos(div) + 15;
document.getElementById('ImgDivBox').style.display = 'block';
}
}
function viewImg(img) {
if(img) document.getElementById('ImgDiv').innerHTML = "<img src='"+img + "' border='0' width='<?=$img_width;?>'>";
else document.getElementById('ImgDiv').innerHTML = "";
}
</script>
미리보기기능을 사용안할려고합니다
어디를 수정하거나 주석처리를 해야되나요?
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있습니다.");
include_once "$latest_skin_path/m3cron.extend.php";
$img_width = '60'; //썸네일 가로길이
$img_height = '300'; //썸네일 세로길이
$img_quality = '9'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 오늘이 아니면 날짜 업데이트 해놓고 이하 실행
if($m3_cron[ori_ymd] != $m3_cron[ymd]) {
sql_query("update $g4[board_table] set $rankinfo[bo_subj] = '$m3_cron[ymd]' where bo_table='$bo_table' ");
rank_update($bo_table, $field, $rankinfo);
}
?>
<style type="text/css">
#latest_rank td {
text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:11px;font-family:돋움;
}
#latest_rank a:link, a:visited, a:active { text-decoration:none; color:#444; }
#latest_rank a:hover { text-decoration:underline; }
</style>
<script type="text/javascript" src="<?=$g4['path']?>/js/common.js"></script>
<div id="latest_rank">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td>
<table width=100%>
<tr>
<td align="center"><b><?=$latest_subject;?></b></td>
<td align="right">
</td>
</tr>
</table>
</td>
</tr>
<? for ($i=0; $i<count($list); $i++) {
$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 = $thumb;
else $img="";
?>
<tr>
<td align=center style="BORDER-BOTTOM: lightgrey 1px dashed; OVERFLOW: hidden">
<table width=100%>
<tr>
<td>
<img src='<?=$latest_skin_path?>/img/<?=$i+1;?>.gif' align=absmiddle>
<div style="display:inline" onmouseover="viewImgDiv(this, '<?=$img;?>');viewImg('<?=$img;?>');" onMouseOut="document.getElementById('ImgDivBox').style.display = 'none';">
<? switch($m3_cron[field]) {
case "wr_link1_hit":
$link = "<a href='{$list[$i][link_href][1]}' target=_blank>{$list[$i][subject]}</a>";
break;
case "wr_link2_hit":
$link = "<a href='{$list[$i][link_href][2]}' target=_blank>{$list[$i][subject]}</a>";
break;
case "wr_hit":
case "wr_good":
case "wr_nogood":
$link = "<a href='{$list[$i][href]}'>{$list[$i][subject]}</a>";
break;
default:
$link = "필드를 찾을 수 없습니다.";
}
echo $link;
?>
</div>
</td>
<td align=right style="font-family:돋움;font-size:11px;color:gray">
<?
if (!empty($list[$i][$rankinfo[wr_no]])) //어제 순위가 있다면
$ratio = $list[$i][$rankinfo[wr_no]] - ($i+1);
else
$ratio = 0; // 어제 순위가 없다면 오늘 순위
echo $ratio . " ";
if ($ratio > 0)
echo "<img src='$latest_skin_path/img/up.gif'>";
else if ($ratio < 0)
echo "<img src='$latest_skin_path/img/down.gif'>";
else
echo "<img src='$latest_skin_path/img/zero.gif'>";
//echo " hit: " . $list[$i][$field];
//echo " ye: " . $list[$i][wr_1];
//echo " to: " . ($i+1);
?></td></tr>
</table>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
</div>
<div id="ImgDivBox" style="padding:5px;position:absolute; display: none; border: solid 1px #CCCCCC; background-color: #FFFFFF; z-index: 999;">
<div id="ImgDiv"></div>
</div>
<script type="text/javascript">
function viewImgDiv(div, img) {
if (img) {
document.getElementById('ImgDivBox').style.left = get_left_pos(div) + div.offsetWidth;
document.getElementById('ImgDivBox').style.top = get_top_pos(div) + 15;
document.getElementById('ImgDivBox').style.display = 'block';
}
}
function viewImg(img) {
if(img) document.getElementById('ImgDiv').innerHTML = "<img src='"+img + "' border='0' width='<?=$img_width;?>'>";
else document.getElementById('ImgDiv').innerHTML = "";
}
</script>
댓글 전체
onmouseover ~ onmouseout 전까지 지워보세요.