초보입니다.도와주세요. > 그누4 질문답변

그누4 질문답변

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

초보입니다.도와주세요. 정보

초보입니다.도와주세요.

본문

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 썸네일 생성 갤러리 전용 최신글
// 이미지 가로 및 세로 정렬 기능

// 최신글에 불러들일 썸네일의 사이즈를 변경하려면 (처음 설치시는 해당없음)
// 우선 썸네일폭을 아래에서 지정하고
// data/file/테이블명/latest_thumb/파일 전체삭제 후 실행합니다.


$table_latest_width  = 680; // 최신글 테이블폭
$cols  = 8; //  이미지 가로갯수 = 이미지 세로 갯수는 메인(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="<?=$table_latest_width?>" border="0" cellspacing="0" cellpadding="0" style='border:1 solid #DDDDDD;'>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height="1" colspan=2 bgcolor=#DDDDDD></td></tr>
<tr bgcolor=#F9F9F9 style=cursor:hand; onclick=location.href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" onmouseover="this.style.backgroundColor='#FBFBFF';return true;" onMouseOut="this.style.backgroundColor='';return true;">
    <td height="25" style='padding-top:3px;padding-left:20px;'><font style='font-family:굴림; font-size:9pt; color:#696969;'>♧&nbsp; <strong><?=$board[bo_subject]?></strong> &nbsp;♧</font></td>
    <td align="right" style='padding-top:3px;padding-right:20px;'><font style='font-family:돋움; font-size:8pt; color:#999999;'>more</font></td>
</tr>
<tr><td height="1" colspan=2 bgcolor=#E7E7E7></td></tr>
</table></td>
</tr>
<tr><td height="15" ></td></tr>
<tr>
<td>
<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 color='#BCCFCD'>▒</font> <font style=color:#393939;'>{$list[$i][subject]}</font> <font color='#BCCFCD'>▒</font></span> ";
        echo " " . $list[$i][icon_new];
        ?>
  </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>
<tr><td height="5"></td></tr>
</table>


______________________________________________
위의 내용은 최신겔러리 스킨입니다.
그림을 누르면 게시판이 팝업창식으로 떠요.. 팝업창식말고요 그냥 같은 그냥에 뜨게하려면 뭘 수정해야 하나요?
제 설명이 부족하면 pcink.co.kr 가서 최신겔러리 눌러보시면 될꺼여요....

가르쳐주시면 감사드립니다.

댓글 전체

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>"; 
| 이렇게 하면 아마도 될지도 모르겠는데요~~
V
echo "<td><a href='{$list[$i][href]}' target='_self'>$img</a></td>";
echo "<span style='cursor:default;'><font color='#BCCFCD'>▒</font> <font style=color:#393939;'>{$list[$i][subject]}</font> <font color='#BCCFCD'>▒</font></span> ";
|
V
echo "<span style='cursor:default;'><font color='#BCCFCD'>▒</font> <font style=color:#393939;'>
<a href='{$list[$i][href]}' target='_self'>{$list[$i][subject]}</a></font> <font color='#BCCFCD'>▒</font>
</span>";
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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