새창으로 이미지를 클릭 하면 뜨는데 안뜨게 하는법쫌 가르켜 주세요.. > 그누4 질문답변

그누4 질문답변

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

새창으로 이미지를 클릭 하면 뜨는데 안뜨게 하는법쫌 가르켜 주세요.. 정보

새창으로 이미지를 클릭 하면 뜨는데 안뜨게 하는법쫌 가르켜 주세요..

본문

새창으로 이미지를 클릭 하면 뜨는데 안뜨게 하는법쫌 가르켜 주세요..
 
게시판을 헤더랑 연결 시켜서 보기 싫게 나오는데 아무리 해도 방법을 못찾겠습니다.
 
소스는 아래와 같습니다..
 
 
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 썸네일 생성 갤러리 전용 최신글
// 이미지 가로 및 세로 정렬 기능
// 최신글에 불러들일 썸네일의 사이즈를 변경하려면 (처음 설치시는 해당없음)
// 우선 썸네일폭을 아래에서 지정하고
// data/file/테이블명/latest_thumb/파일 전체삭제 후 실행합니다.

$table_latest_width  = 400; // 최신글 테이블폭
$cols  = 3; //  이미지 가로갯수 = 이미지 세로 갯수는 메인(index.php)에서 지정(총 이미지 수)
$image_h  = 10; // 이미지 상하 간격
$thum_width = "90"; //목록에서 보여질 썸네일 폭 (픽셀)
$image_quality = "100"; //목록에서 보여질 이미지의 압축률 (100 이하)

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/latest_thumb'; // 썸네일 생성 폴더명
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table width="100%" border='0' align='right' cellpadding='0' cellspacing='0' height="50">
<tr>
<td height='22' bgcolor='F5F5F5' style='border-left:2 solid #0074CE' valign='middle'>  <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><b><font color=#009900><?=$board[bo_subject]?></font></b></a></td>
<td bgcolor='F5F5F5'><div align='right'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/more.gif" width="45" height="17"  hspace='6' align="absolmiddle" border="0"></a></div></td>
</tr>
<tr><td colspan='2'height="8"></td></tr>
<tr>
<td colspan='2'style='padding:0 0 10 0 ' height="20">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
<? for ($i=0; $i<count($list); $i++) {
  if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td align="center" valign='top' style='padding-left:3px;'>
<?
    $img = "이미지 없음";
    $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 = $thum_width / $size[0];
            $height = (int)($size[1] * $rate);
            $dst = imagecreatetruecolor($thum_width, $height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $thum_width, $height, $size[0], $size[1]);
            imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $image_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }
    if (file_exists($thumb))
        $img = "<img src='$thumb' alt='{$list[$i][subject]}' border='0' style='border:1 solid #C6C6C6;'>";
//     $img = "<img src='$thumb' alt='{$list[$i][subject]}' width='90' height='60' border='0' style='border:1 solid #C6C6C6;'>"; // 썸네일 가로 세로 고정시 사용
        echo $list[$i][icon_reply] . " ";
        echo "<table cellpadding=0 cellspacing=0 border=0><tr>";
  echo "<td><a href=\"javascript:popup_window('{$list[$i][href]}','winBoard','left=0, top=0, width=650, height=395, scrollbars=1,resizable=no')\" onfocus=\"this.blur()\">$img</a></td>";
        echo "<td width=2 bgcolor=#DDDDDD style='border-top:3px solid #FFFFFF'><img width=2 height=1></td></tr>";
     echo "<tr><td colspan=2 height=2 bgcolor=#DDDDDD style='border-left:3px solid #FFFFFF'><img width=1 height=2></td></tr>";
     echo "<tr><td colspan=2 height=2><img width=1 height=2></td></tr></table>";
        echo "<span style='cursor:default;'><font style=color:#393939;'>{$list[$i][subject]}</font></span>";
        echo "<br>";
        echo " " . $list[$i][icon_new];
//echo " " . $list[$i]['icon_file'];
      $ss_name = "ss_view_{$bo_table}_{$list[$i][wr_id]}";
      session_register($ss_name);
      $$ss_name = $HTTP_SESSION_VARS[$ss_name] = TRUE;

if($list[$i][file][0]) {
$down_link0 = "bbs/download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=0";
//echo " <a href='$down_link0'>". $list[$i][icon_file]; 
echo "</a>";
}
if($list[$i][link][1]) {
$link1 = "bbs/link.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=1";
 
echo "</a>";
}
        //echo " " . $list[$i]['icon_link'];
        echo " " . $list[$i]['icon_hot'];
        echo " " . $list[$i]['icon_secret'];
        ?>
  </td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
    echo "<td></td>";
}
?>
  <? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
  </tr>
</table>
</td>
</tr>
</table>
  • 복사

댓글 전체

--------------------------------------------------------------------------------------------------------------
<a href=\"javascript:popup_window('{$list[$i][href]}','winBoard','left=0, top=0, width=650, height=395, scrollbars=1,resizable=no')\" onfocus=\"this.blur()\">$img</a>
--------------------------------------------------------------------------------------------------------------

그냥
--------------------------------------------------------------------------------------------------------------
$img
--------------------------------------------------------------------------------------------------------------
로 수정...
© SIRSOFT
현재 페이지 제일 처음으로