포토최근게시물 레이아웃 > 그누4 질문답변

그누4 질문답변

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

포토최근게시물 레이아웃 정보

포토최근게시물 레이아웃

본문

안녕하세요..포토최근게시물인데 정중간에 오게하고싶은데 우측으로 밀리네요.
옆넚이와 높이 설정은 어떻게 하는지 답변좀 부탁드립니다.
더운데 수고하십시오.
아래소스------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$img_width = 100;
$img_height = 80;
$img_quality = 99;

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);

?>
<style type="text/css">
#t { width: 300px; border-left: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;}
.img_list { width: 300px; overflow:hidden; padding: 16px 0px 0 30px; margin: 0 auto; background: #FAFAFA; }
.img_list li { display:inline; list-style:none; float:left; padding: 0 20px 0 0; background: #FAFAFA; }
.img_list li a {color:#333; text-decoration:none; }
.img_list li a:hover { text-decoration:none; color:#FF4500; }
.img_list li img {display:block; border:none; border: 1px solid #cccccc; }
.img_list2 { width: 300px; overflow:hidden; padding: 12px 0px 0 30px; margin: 0 auto; background: #FAFAFA; }
.img_list2 li { display:inline; font:12px 돋움, Dotum; color: #333333; font-weight: bold; text-align:left; list-style:none; float:left; width:162px; }
.img_list2 li a { color:#333; text-decoration:none; }
.img_list2 li a:hover { text-decoration:none; color:#FF4500; }
.img_list3 { width: 338px; overflow:hidden; padding: 12px 0 10px 30px; margin: 0 auto; background: #FAFAFA; }
.img_list3 li { display:inline; font:11px 돋움, Dotum; color: #676767; text-align:left; list-style:none; float:left; width:162px; }
.img_list3 li a { color:#777; text-decoration:none; }
.img_list3 li a:hover { text-decoration:none; color:#676767; }
</style>

<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr height="1">
<td bgcolor="#d9d9d9" colspan="3"></td>
</tr>
<tr>
<td width="1" bgcolor="#d9d9d9"></td>
<td>
<table cellpadding="0" cellspacing="2" width="100%" border="0">
<tr>
<td background="<?=$latest_skin_path?>/img/title_bg_25.gif">
<table cellpadding="5" cellspacing="0" width="100%" border="0">
<tr>
<td align="left">&nbsp;
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#555555" ><b><?=$board[bo_subject]?></b></font></a>
</td>
<td align="right"><img src='<?=$latest_skin_path?>/img/icon.gif'><span style="font-size: 12px; color: #646464; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>&nbsp;더 보기</a></span>&nbsp;&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="1" bgcolor="#d9d9d9"></td>
</tr>
<tr height="1">
<td bgcolor="#d9d9d9" colspan="3"></td>
</tr>
</table>

<div id="t">
<ul class="img_list">
<? for ($i=0; $i<count($list); $i++) {
//썸네일 생성
$thumfile = "";
    $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]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        } else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$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]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0'></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/no_images.gif' width='{$img_width}' height='{$img_height}'></a>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
?>

<li><a href='<?=$list[$i][href]?>'><?=$thumfile?></a></li>

<?
}
?>
</ul>
<ul class="img_list2">
<? for ($i=0; $i<count($list); $i++) { ?>
<li><a href='<?=$list[$i][href]?>'><?=$list[$i]['subject']?></a></li>
<?
}
?>
</ul>
<ul class="img_list3">
<? for ($i=0; $i<count($list); $i++) {
$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
$wr_content = preg_replace("/&nbsp;/"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content = cut_str(get_text($wr_content), 46, '…');
?>

<li><a href='<?=$list[$i][href]?>'><?=$wr_content?></a></li>
<?
}
?>
</ul>

</div>
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로