게시판 목록의 이미지를 올릴시 본문에 이미지가 보이네요.
이미지를 올려서 교체가 안되는부분은 지우는식으로 해결을 했는데..
또 다른 문제가 생겨 버리네요.
이미지를 올렸더니 본문에도 이미지가 남아요..;;;;;
이미지를 목록과 위에 제목에는 보이게 하고..
본문에는 안보이게 할수있는법 없을까요?
스킨은 : elpis_product01 이 스킨이구요.
제품소개 계시판 스킨을 깔았습니다.
또 다른 문제가 생겨 버리네요.
이미지를 올렸더니 본문에도 이미지가 남아요..;;;;;
이미지를 목록과 위에 제목에는 보이게 하고..
본문에는 안보이게 할수있는법 없을까요?
스킨은 : elpis_product01 이 스킨이구요.
제품소개 계시판 스킨을 깔았습니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 4개
view.skin.php 에서
첨부파일 나타내시는 부분을 지우시거나
첨부파일이 이미지 뿐만 아니라 다른 파일도 업로드 하신다면
이미지 파일을 구분하여 출력 않하는 코드를 삽입 하셔야 될듯 싶네요~
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script>
//Table Size 조정
function ImageResizing(objFrame) {
if (!objFrame) return;
//height 조정
var conversionSize = 380;
var orgWidth = objFrame.width;
var orgHeight = objFrame.height;
if (( orgWidth > conversionSize) || (orgHeight > conversionSize)){
if (orgWidth > orgHeight){
newWidth = conversionSize;
newHeight = Math.round((conversionSize * orgHeight)/orgWidth);
}else{
newWidth = Math.round((conversionSize * orgWidth)/orgHeight);
newHeight = conversionSize;
}
objFrame.width = newWidth;
objFrame.height = newHeight;
}
}
function ThumbViewer(ImageObj){
// if (ImageObj.src == "http://pics.auction.co.kr/buy/itempage/no_image_thumb.gif") return;
ThumbImage0.style.border = "silver 1px solid";
ThumbImage1.style.border = "silver 1px solid";
ThumbImage2.style.border = "silver 1px solid";
if (ThumbImage0 == ImageObj) ThumbImage0.style.border = "#333333 1px solid";
if (ThumbImage1 == ImageObj) ThumbImage1.style.border = "#333333 1px solid";
if (ThumbImage2 == ImageObj) ThumbImage2.style.border = "#333333 1px solid";
if (ThumbImage1 == ImageObj){
img0.style.display = "none";
img1.style.display = "";
img2.style.display = "none";
ImageResizing(img1);
}
else if (ThumbImage2 == ImageObj){
img0.style.display = "none";
img1.style.display = "none";
img2.style.display = "";
ImageResizing(img2);
}
else
{
img0.style.display = "";
img1.style.display = "none";
img2.style.display = "none";
ImageResizing(img0);
}
}
</script>
<?
//$img = "$g4[path]/data/file/$bo_table/".urlencode($view[file][0][file]);
//if (!file_exists($img) || !$view[file][0][file]) $img = "$board_skin_path/img/progress/no_image.gif";
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<!-- <tr><td height=2 bgcolor=#B0ADF5></td></tr> -->
<tr>
<td height="10"> </td>
</tr>
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!--<td width="210">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="9" colspan="3"><img src="<?= $board_skin_path?>/img/progress/skin_top.gif" width="210" height="9"></td>
</tr>
<tr>
<td width="9" background="<?= $board_skin_path?>/img/progress/skin_left.gif"> </td>
<td width="192" height="128">
<?
// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
if($i > 0){
$style= "style=\"display:none\"";
}
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=192 height=128 border=0 id=img$i $style>";
$thumimg[$i]=" <img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=30 height=20 border=0 id=ThumbImage$i onfocus=\"javascript:ThumbViewer(this)\" onmouseover=\"javascript:ThumbViewer(this)\">";
}
?>
</td>
<td width="9" valign="top" background="<?= $board_skin_path?>/img/progress/skin_right.gif"><img src="<?= $board_skin_path?>/img/progress/skin_right_img.gif" width="9" height="5"></td>
</tr>
<tr>
<td colspan="3"><img src="<?= $board_skin_path?>/img/progress/skin_down.gif" width="210" height="9"></td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td colspan="3" height="30" align="right">
<?php
echo $thumimg[0];
echo $thumimg[1];
echo $thumimg[2];
?>
</td>
</tr>
</table>
</td>-->
<td width="5"></td>
<!--<td width="20"></td>-->
<td valign="top">
<table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
<!-- 추가필드시작-->
<tr><td height=2 bgcolor=#B0ADF5></td></tr>
<!-- <tr><td height=1 bgcolor=#E7E7E7></td></tr> -->
<tr><td height=30 > <?php echo "<img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle>" ?> 제목 : <?php echo $view[subject] ?></td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr><td height=30 > <?php echo "<img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle>" ?> 유료/무료 : <font color="red"><?php echo $view[wr_1] ?></font></td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr><td height=30 > <?php echo "<img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle>" ?> 사용용도 : <?=$view[wr_3]?></td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr><td height=30 > <?php echo "<img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle>" ?> 웹소스입니다.
<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++)
{
if ($view[file][$i][source] && !$view[file][$i][view])
{
$cnt++;
echo "<tr><td height=22> <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'>{$view[file][$i][source]} ({$view[file][$i][size]}), Down : {$view[file][$i][download]}</a></td></tr>";
}
} ?>
</td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<!-- 추가필드끝-->
<tr>
<td height="20" valign="bottom"></td>
</tr>
<tr>
<td>
</a>
</td>
</tr>
</table>
</td>
<td width="20"></td>
</tr>
</table>
</td>
</tr>
<!--본문이미지출력-->
<tr><td height=1></td></tr>
<!--<tr><td height=1 bgcolor=#E7E7E7></td></tr>-->
<tr>
<td height="150" style='word-break:break-all; padding:10px;'>
<!--<td height="150" style='word-break:break-all; padding:10px;' bgcolor=#F8F8F9>-->
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<span class="ct lh">내용 : <?=$view[content];?></span>
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
<!--출력끝-->
</table>
</td>
</tr>
<tr>
<td height="10"> </td>
</tr>
</table>
<!-- 박스 시작
<table border="0" cellpadding="0" cellspacing="0" width="620">
<tr>
<td width="620" height="154">
<table border="0" cellpadding="0" cellspacing="0" width="622" bgcolor="#CCCCCC" height="152">
<tr>
<td width="1" bgcolor="white" height="1"></td>
<td width="620" height="1"></td>
<td width="1" bgcolor="white" height="1"></td>
</tr>
<tr>
<td width="1" height="70"></td>
<td width="620" bgcolor="#E8E5E5" height="152" valign="top">
<table border="0" cellpadding="3" cellspacing="0" width="298" height="152">
<tr>
<td width="290" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="614" height="148" align="center">
<tr>
<td width="614" height="148" bgcolor="white" valign="top" align="center">
<table border="0" width="614" cellpadding="5" cellspacing="0">
<tr>
<td width="614"><span class="ct lh"><?=$view[content];?></span></td>
</tr>
</table>
</td>
</table>
</td>
</tr>
</table>
</td>
<td width="1" height="70"></td>
</tr>
<tr>
<td width="1" bgcolor="white" height="1"></td>
<td width="620" height="1"></td>
<td width="1" bgcolor="white" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
박스 끝-->
</td></tr>
<!-- <tr><td height=1 bgcolor=#E7E7E7></td></tr> -->
<?
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
if ($view[link][$i])
{
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=30> <img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle> 홈페이지 : <a href='{$view[link_href][$i]}' target=_blank>{$link} ({$view[link_hit][$i]})</a></td></tr><tr><td height=1 bgcolor=#E7E7E7></td></tr>";
}
}
?>
<tr>
<td>
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
</table><br>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr></table><br>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
<!-- 게시글 보기 끝 -->
소스가 이렇습니다. 그런데 첨부파일 이미지 출력부분이 어딘지 모르겠네요;;;
잘못 지웠더니 DB에러가 나서 손을 못 대고 있어요;
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
이부분 같네요~~ 으헉 확인을 않해봐서 정확한지는 -ㅁ-!!!