[급] 포토최신글에서 링크문제가 있어요. > 그누4 질문답변

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

그누4 질문답변

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

[급] 포토최신글에서 링크문제가 있어요. 정보

[급] 포토최신글에서 링크문제가 있어요.

본문

위 내용은 latest.skin.php 파일입니다.
제목을 클릭하면 게시판 본문으로 넘어가는데, 썸네일 이미지를 클릭하면 페이지에 오류가 있어서 넘어가질 않습니다.

적용한 사이트 : http://www.noka.co.kr

고수님들 좀 수정 좀 해주세요. 꾸뻑~
=========================================================================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가


//전체 파일 불러오기 예{select * from g4_board_file where bo_table = '4_5' and wr_id in (8136, 8135) order by bf_no}
// 위의 예와 같은 형식을 얻기 위해 id 값을 생성한다.
$wr_id_in = "";
for ($i=0; $i<count($list); $i++){
if($i) $wr_id_in .= ", ";
$wr_id_in .= $list[$i]['wr_id'];
}

// 파일 쿼리문
$file_sql = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id in ($wr_id_in) order by bf_no ";
$file_result = sql_query($file_sql);
// 배열생성
$i = 0;
while ($row = sql_fetch_array($file_result))
{
$g4_file[$i] = $row;
$i++;
}
// $list배열에 파일 끼워넣기
for ($i=0; $i<count($list); $i++){
// 게시물별 파일게수 카운팅
$list[$i][file]['count'] = 0;
// 게시물에 속하는 파일 찾기
for ($f=0; $f<count($g4_file); $f++){
// 게시물 id 와 파일 id 비교
if($list[$i]['wr_id'] == $g4_file[$f]['wr_id']){
$no = $g4_file[$f][bf_no];
      $list[$i]['file'][$no]['href'] = "./download.php?bo_table=$bo_table&wr_id=$wr_id&no=$no" . $qstr;
        $list[$i]['file'][$no]['download'] = $g4_file[$f][bf_download];
        $list[$i]['file'][$no]['path'] = "$g4[path]/data/file/$bo_table";
        $list[$i]['file'][$no]['size'] = get_filesize($g4_file[$f][bf_filesize]);
        $list[$i]['file'][$no]['datetime'] = $g4_file[$f][bf_datetime];
        $list[$i]['file'][$no]['source'] = $g4_file[$f][bf_source];
        $list[$i]['file'][$no]['bf_content'] = $g4_file[$f][bf_content];
        $list[$i]['file'][$no]['content'] = get_text($g4_file[$f][bf_content]);
        $list[$i]['file'][$no]['view'] = view_file_link($g4_file[$f][bf_file], $g4_file[$f][bf_width], $g4_file[$f][bf_height], $list[$i][file][$no][content]);
        $list[$i]['file'][$no]['file'] = $g4_file[$f][bf_file];
        $list[$i]['file'][$no]['image_width'] = $g4_file[$f][bf_width] ? $g4_file[$f][bf_width] : 640;
        $list[$i]['file'][$no]['image_height'] = $g4_file[$f][bf_height] ? $g4_file[$f][bf_height] : 480;
        $list[$i]['file'][$no]['image_type'] = $g4_file[$f][bf_type];
        $list[$i]['file']['count']++;
}
}
}

// 이미지 보이기 전체 보이기는 0
$all_view = 1;
// 미리보기 이미지크기
$img_w = 130;
$img_h = 130;
// 넓이로 맞췄을때 높이의 중간지점에서 80%로 복구시킨다.
$Percent = 80;
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width=7 height=7><img src="<?=$latest_skin_path?>/img/bg_tl.gif" width=7></td>
    <td background="<?=$latest_skin_path?>/img/bg_t.gif"></td>
    <td width=6><img src="<?=$latest_skin_path?>/img/bg_tr.gif" width=6></td>
</tr>
<tr>
    <td background="<?=$latest_skin_path?>/img/bg_ml.gif"></td>
    <td>


<div style="padding:5px; background-color:#efefef;">
<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong>
</div>

<table width=100% border=0 cellpadding=0 cellspacing=0 <?=$options?>>
<tr>
   
       
        <? for ($i=0; $i<count($list); $i++) { ?>
<td width="20%" align=center valign=top>
        <table width=95% border=0 cellpadding=0 cellspacing=0>
        <tr><td height="10"></td></tr>
        <tr>
        <td width="100%" align="center">
            <?
//$list[$i]['file'] = get_file($board['bo_table'], $list[$i]['wr_id']);
for($j=0; $j<$list[$i]['file']['count']; $j++){
if($list[$i][file][$j][image_type]){
// 이미지 출력시 가로세로 사이지를 확인하여 틀에 공백이 않보이게 사이즈를 조절한다.
$size_w = $img_w/($list[$i][file][$j][image_width]/100);
$size_h = $list[$i][file][$j][image_height]/100*$size_w;
if($img_h < $size_h){
  $size[$i] = "width=$img_w";
// 높이의 경우 벗어난 사이즈에서 $Percent만큼 복구 시킨다.
$position_top = ($img_h-$size_h)/2+($Percent*($size_h-$img_h)/200);
$position_left = 0;
}else{
  $size[$i] = "height=$img_h";
$size_h = $img_h/($list[$i][file][$j][image_height]/100);
$size_w = $list[$i][file][$j][image_width]/100*$size_h;
$position_top = 0;
$position_left = ($img_w-$size_w)/2;
}
?>
    <table width="<?=$img_w+6?>" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td align="center" valign="middle" bgcolor="#FFFFFF"><nobr style='display:block; overflow:hidden; width:<?=$img_w?>px; height:<?=$img_h?>px; vertical-align:middle;'><img src="<?=$list[$i][file][$j][path]."/".urlencode($list[$i][file][$j][file])?>" <?=$size[$i]?> border="0" style="cursor:pointer; position:relative; top:<?=$position_top?>; left:<?=$position_left?>" onclick="image_window(this, <?=$list[$i][file][$j][image_width]?>, <?=$list[$i][file][$j][image_height]?>)" /></nobr></td>
  </tr>
</table>
<?
if($all_view)
break;
}
}
?>
        </td>
        </tr>
        <tr>
            <td height=30 align="center">
               
                <?
                echo $list[$i]['icon_reply'] . " ";
                echo "<a href='{$list[$i]['href']}'>";
                echo $list[$i]['subject'];
                echo "</a>";

                if ($list[$i]['comment_cnt'])
                    echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-size:10px; color:#FF6600;'>{$list[$i]['comment_cnt']}</span></a>";

                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                //echo " " . $list[$i]['icon_new'];
                //echo " " . $list[$i]['icon_file'];
                //echo " " . $list[$i]['icon_link'];
                //echo " " . $list[$i]['icon_hot'];
                echo " " . $list[$i]['icon_secret'];
                ?>
            </td>
        </tr>
        </table>
    </td>
        <?
if(($i+1)%5 == 0)
echo  " </tr><tr>";
}

if(!count($list)){
?>
        <td align=center valign=top>
        <table width=95% border=0 cellpadding=0 cellspacing=0>
        <tr>
            <td height=50 align="center" >
                등록되어진 게시물이 없습니다.           
            </td>
        </tr>
        </table>
        </td>
        <? } ?>
   

</tr>

</table>


    </td>
    <td background="<?=$latest_skin_path?>/img/bg_mr.gif"></td>
</tr>
<tr>
    <td height=7><img src="<?=$latest_skin_path?>/img/bg_bl.gif" width=7></td>
    <td background="<?=$latest_skin_path?>/img/bg_b.gif"></td>
    <td><img src="<?=$latest_skin_path?>/img/bg_br.gif" width=6></td>
</tr>
</table>

=======================================================================================

댓글 전체

이미지 클릭시 원본 이미지가 뜨게끔 되어 있네요.
중간에서 쪼끔 아래쯤...

<img src="<?=$list[$i][file][$j][path]."/".urlencode($list[$i][file][$j][file])?>" <?=$size[$i]?> border="0" style="cursor:pointer; position:relative; top:<?=$position_top?>; left:<?=$position_left?>" onclick="image_window(this, <?=$list[$i][file][$j][image_width]?>, <?=$list[$i][file][$j][image_height]?>)" />

요 부분을 찾아서 아래처럼 수정 해보세요.

<a href="<?=$list[$i]['href']?>"><img src="<?=$list[$i][file][$j][path]."/".urlencode($list[$i][file][$j][file])?>" <?=$size[$i]?> border="0" style="position:relative; top:<?=$position_top?>; left:<?=$position_left?>" /></a>
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

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