더블 카테고리에서 문제가… > 그누4 질문답변

그누4 질문답변

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

더블 카테고리에서 문제가… 정보

더블 카테고리에서 문제가…

첨부파일

zzalbang.zip (71.8K) 3회 다운로드 2006-05-19 08:33:40

본문

나라오름님의 게시판 부분 더블 카테고리 소스를 쏙 빼서
기본 갤러리 게시판에 장착 했습니다.
 
일단 작동은 잘 되는데, 카테고리를 누르면
1차 카테고리가 아닌 해당 2차 카테고리로 검색이 되서 결과물들이
나오게 하고 싶은데요…
 
 
    echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all;'>";
    echo "<table width=100%>";
    echo "<tr><td height=5></td></tr>";
    echo "<tr><td align=center><a href='{$list[$i][href]}'>$img</a></td></tr>";
    echo "<tr><td align=center><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
    if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><font color=#cccccc>[{$list[$i][wr_10]}]</font></a></td></tr>";
    if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
    echo "<tr><td height=5></td></tr>";
    echo "</table></td>\n";
 
 
 
list.skin.php 에서 제목과 카테고리 출력에 해당하는 부분인데...
 
일단 [{$list[$i][wr_10]}] 으로 써 놓은 부분은 2차 카테고리로 그대로 나와줘서
한시름 놓았구요, a href 부분이 막힙니다.....
 
별 방법도 다 써 보고 common.lib.php 파일도 열어서
$list['ca_name'] 부분을 보고 따로 만들어도 봤지만 역시 안 되네요;
이외에는 시도할 방법도 이젠 생각이 나질 않고;
 
 
링크1 은 해당 스킨 적용한 테스트 게시판이고,
 
링크2 는 나라오름님의 더블 카테고리 게시판 스킨 링크...... 입니다.......
 
파일1 은 기본스킨쪽에 관리자님이 올리신 짤방 + 더블카테고리 기능 적용한
스킨인데.....
 
그냥 여기다가 적는 것 보다는 원본 보는게 더 낫겠다 싶어 올려요 'ㅁ'
 
 
 
링크1 로 가 보시면 제목밑에 분류7, 분류8 이런식으로 2차 카테고리 명이
표시되어 있는데 그걸 클릭하면 1차 카테고리로 검색이 됩니다.
이걸 2차로 검색되도록 고쳐보려고 했는데 그게 안 되서 -_-a
 
2차 카테고리인 분류7 을 누르면 2차가 분류7 인 것들만 검색된다던가,
분류8 을 누르면 2차가 분류 8인 것들만 검색된다던가 그렇게 하려고
했는데 말이죠 -ㅇ-
 
나라오름님께서 올리신 갤러리 스킨 다른 건 살펴보니 따로 테이블을
생성해야 하는 것 같고 ' ';
 
 
 
대략 5시간동안 고치다 고치다 안 되서 밤도 샌 마당에 잠도 자야겠고...
해서 이렇게 질문글을 올립니다 ...;

댓글 전체

대략 꽁수입니다..

list.skin.php 파일
//=======================
<?
for ($i=0; $i<count($list); $i++)
{
    if ($i && $i%$mod==0)
        echo "</tr><tr>";
       
    $list[$i][nc_ca_name_href] =  "$g4[bbs_path]/board.php?bo_table=$board[bo_table]&sca=".urlencode($list[$i]['ca_name'])."&sfl=wr_10&stx=".urlencode($list[$i]['wr_10'])."&nca=".urlencode($list[$i]['wr_10']);

    $img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' 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
                continue;

            $rate = $board[bo_1] / $size[0];
            $height = (int)($size[1] * $rate);

            if ($height < $board[bo_2])
                $dst = imagecreatetruecolor($board[bo_1], $height);
            else
                $dst = imagecreatetruecolor($board[bo_1], $board[bo_2]);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
            imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_3]);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }

    if (file_exists($thumb))
        $img = "<img src='$thumb' border=0 style='border:1px solid #999999;'>";

    $style = "";
    if ($list[$i][icon_new])
        $style = " style='font-weight:bold;' ";
    $subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";

    $comment_cnt = "";
    if ($list[$i][comment_cnt])
        $comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";

    echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all;'>";
    echo "<table width=100%>";
    echo "<tr><td height=5></td></tr>";
    echo "<tr><td align=center><a href='{$list[$i][href]}'>$img</a></td></tr>";
    echo "<tr><td align=center><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
    if ($is_category) echo "<tr><td align=center><a href='{$list[$i][nc_ca_name_href]}'><font color=#cccccc>[{$list[$i][wr_10]}]</font></a></td></tr>";
    if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
    echo "<tr><td height=5></td></tr>";
    echo "</table></td>\n";
}
//========================================
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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