가로로 롤링될 때 공백을 없애고 싶어요..ㅠㅠ > 그누4 질문답변

그누4 질문답변

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

가로로 롤링될 때 공백을 없애고 싶어요..ㅠㅠ 정보

가로로 롤링될 때 공백을 없애고 싶어요..ㅠㅠ

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : 링크 1..

가로로 롤링 배너를 만들었는데..

마퀴테그를 사용했거든요..
그런데 빈 공백이 생겨버리네요..

그리고 최근 게시물 이미지 갯수를 8개로 하면..두줄로 나와버리네요..ㅠㅜㅠ

갯수를 15개정도로 설정을 한다면..
한줄로 쭉쭉 계속 이어지게 나오게 하고 싶은데 어떻게 해야할까요??
그리고 처음 롤링될 때 공백이 안생기고 바로 배너가 꽉 차게 하고 싶습니다ㅠㅠ
-------------------------------------------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

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

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

$table_latest_width  = "100%"; // 최신글 테이블폭

$cols = "{$board[bo_6]}" ; //  이미지 가로갯수 ,  이미지 세로 갯수는 메인(index.php)에서 지정(총 이미지 수)
$image_h  = "{$board[bo_7]}"; // 이미지 상하 간격

$thum_width = "{$board[bo_4]}"; //목록에서 보여질 썸네일 폭 (픽셀)
$image_quality = "{$board[bo_2]}"; //목록에서 보여질 이미지의 압축률 (100 이하)
$thum_height = "{$board[bo_5]}"; //목록에서 보여질 썸네일 높이 (픽셀)

$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?>" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td>
<marquee width='900' direction='left' scrollamount='10' scrolldelay=100 onmouseover='this.stop();' onmouseout='this.start();'>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr bgcolor="#FFFFFF"><td colspan='2' align='center' style='padding-left:0px; padding-right:0px; padding-top:0px; padding-bottom:0px;'>
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<? if (count($list) == 0) { ?><tr bgcolor="#FFFFFF"><td colspan=4 align=center height=30>배너없음</td></tr><? } else { ?>
    <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:0px;padding-right:0px;'>
<?
    $title = get_text($list[$i][wr_subject]);
    $title = cut_str(get_text($list[$i][wr_subject]), 51); //타이틀글자수
    $img = "<img src='$latest_skin_path/img/noimage.gif' style='border:1px solid #DDDDDD;padding:3px;' width='$thum_width' title='$title'>";
    $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]}' style='border:0 solid #DDDDDD;' title='$title'>";
//        $img = "<img src='$thumb' alt='{$list[$i][subject]}' width='180' height='40' border='0' style='border:0 solid #CCCCCC;'>"; // 썸네일 가로 세로 고정시 사용
        echo "<table cellpadding=0 cellspacing=1 border=0>";
echo "<tr><td style='width:$thum_width;height:$thum_height;border:1px solid #DDDDDD;padding:0px;' align='center'><a href='{$list[$i][wr_link1]}' target='_blank' onfocus='this.blur()' title='$title'>$img</a></td></tr>";
    echo "</table>";
?>
    </td>
<?
}
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
    echo "<td></td>";
}
}
?>
</tr>
</table>
</td></tr></table></marquee></td></tr></table>

댓글 전체

전체 190 |RSS
그누4 질문답변 내용 검색

회원로그인

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