최신글 롤링 질문입니다. > 그누4 질문답변

그누4 질문답변

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

최신글 롤링 질문입니다. 정보

최신글 롤링 질문입니다.

본문

아래는 최신글을 불러오는 소스 인데요...
이미지를 3페이지??? 혹은 최근이미지 몇개까지를 롤링으로 하고싶은데..
소스 적용하는 방법에 대해서 설명해 주시면 감사하겠습니다....

사이트는 : http://junggonala.com 입니다.
index 페이지에 중앙에 적용된 것 입니다..


<?
/* -----------------------------------------------------
배열을 이용해 특정 게시판에서 최신글 뽑아오기 - 갤러리 스킨
작성자 : 휴온 박성광 작성일 : 2008.09.27
----------------------------------------------------- */
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

//한 줄에 출력할 이미지 개수
$arr_new_cols=4;

$data_path = $g4[path]."/data/file/";
$thumb_path = $data_path;


?>
<link rel="stylesheet" type="text/css" href="<?=$latest_skin_path?>/arr_new_gallery.css">

<style type="text/css">

a.tt:link, a.tt:visited, a.tt:active {
text-decoration:none;
color:#000000;
letter-spacing:-0.04em;
font-size: 12px; }
a.tt:hover {
text-decoration:none;
color:#F60;
font-size: 12px;}

.tabcom_area{}
.tabcom_area .title{height:30px; border-bottom:2px solid #b1b1b1; margin:5px 0 10px 0; padding:0;  position:relative;}
.tabcom_area .title h3{display:inline; float:left; letter-spacing:-1px; margin:0 0 5px 0; padding-bottom:5px; font-weight:bold; font-size:20px; border-bottom:2px solid #353535;  position:relative;}
.tabcom_area .title h3 a{color:#3F627D;}
.tabcom_area .title span{display:inline; float:left; font:10px tahoma; margin-top:2px;margin-right:5px;}
.tabcom_area .title span a{ color:#777; }
.tabcom_list {display:inline;border-bottom-width:1; border-bottom-color:#9999CC; border-bottom-style:dotted;margin-top:10px; margin-botton:10px;}
.line {border:2px solid #777888; margin:3px;}
</style>



<table width="100%" cellpadding=0 cellspacing=0 style="margin-top:7px;">
<tr>
<?
for ($i=0; $i<count($list); $i++) {
if ($i >= 0)
    $title = get_text($list[$i][subject]);

    //한 줄에 $arr_new_cols 만큼 출력
    if($i%$arr_new_cols == 0 && $i>0)
echo "</tr><tr>";

    $content = cut_str(get_text($list[$i][wr_content]), 80);
    $bo_table=$board_list[$i][bo_table];




    /*
    $image = urlencode($list[$i][file][0][file]); //원본
$img=$data_path."/".$bo_table."/".$image;    //썸네일이 없을경우 원본출력
$thumb = $thumb_path."/".$bo_table."/thumb/".$list[$i][wr_id];
    $list[$i]['wr_meny'] = $list[$i]['wr_meny'] ? $list[$i]['wr_meny'] : $list[$i]['wr_meny2'];
if (!file_exists($img)) {
        $thumb = "$latest_skin_path/img/noimage.gif";
*/


        //섬네일 관련 설정
        $thumb_width=115;//섬네일 최대폭
        $thumb_height=90;//섬네일 최대높이
        //$bo_table = $list[$i][bo_table];
        //DQ엔진 인클루드 2005-03-22 석훈
        include_once "$g4[path]/thumbEngine/dq_thumb_engine2.php";
        $dqEngine['thumb_resize'] = 2;
// 0, 1, 2 사용
// 0: 원본 비율 대칭 리사이즈, 1: 비율유지 안함(찌그러짐), 2: 원본비율 리사이즈 + Center Crop

$image = $list[$i][file][0][file]; //공백으로인한썸네일깨짐방지
//$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {

$thumbdir = $g4[path]."/data/file/".$bo_table."/imgges";
if (!is_dir($thumbdir)) {
@mkdir($thumbdir, 0707);
@chmod($thumbdir, 0707);
    // 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
    $file = $thumbdir."/index.php";
    $f = @fopen($file, "w");
    @fwrite($f, "");
    @fclose($f);
    @chmod($file, 0606);
}

$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg = $thumbdir."/".$list[$i][wr_id].".thumb";
make_thumb($thumb_width,$thumb_height,$thumbsource,$thumbimg);
@chmod($thumbimg, 0707);


}
    echo <<<HEREDOC
    <td  align='center' valign='middle' class='lt_td' width='{$imgwidth}' height='{$imgheight}'>
    <a href='{$list[$i][href]}' >
<img src='$thumbimg' border='0'  title='$title' class='line' onmouseover=this.style.filter='alpha(opacity=70)' onmouseout=this.style.filter=''>
        <br/>
<span style='font-size:9pt; color:#FF0000;'>[{$board_list[$i][bo_subject]}]</span>
<div>{$subject} {$title}</div>
        <div><font color='#F05500'>{$list[$i]['wr_meny']} 원</font> {$list[$i][icon_new]}</div>

</a>
    </td>
HEREDOC;
}
/* end for */
?>
<? if (count($list) == 0) { ?><td align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td><? } ?>
</tr>
</table>
<br />

댓글 전체

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

회원로그인

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