갤러리 게시판 리스트에서 사진 클릭시 바로 사이트 이동 > 그누4 팁자료실

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.

갤러리 게시판 리스트에서 사진 클릭시 바로 사이트 이동 정보

갤러리 게시판 리스트에서 사진 클릭시 바로 사이트 이동

본문

비슷한 스킨이 많을거라고 생각합니다.

제가 스킨을 수정하고 이미지 영역만 수정하려고 하다보니 기존에 있는 링크스킨이랑 안맞아서 제가 그누5 스킨에서 소스를 따왔더니 잘 되네요 .

게시판 작성할때 첨부파일로 이미지를 올리고 링크1에 홈페이지 주소를 넣습니다.

그럼 리스트에서 사진 클릭시 새창으로 외부 홈페이지가 뜹니다.



<?
    for ($i=0; $i<count($list); $i++) {
        if ($i && $i%$mod==0)
            echo "</tr><tr>";

        $style = "";
        $subject = "<span $style>{$list[$i][subject]}</span>";

        $comment_cnt = "";
        if ($list[$i][comment_cnt])
          $comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";

        $list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
        $list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
        $list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);

        echo "<td width='{$td_width}%' valign=middle style='word-break:break-all; padding:2px;'>";
        echo "<table align=center>";
        echo "<tr><td height=5></td></tr>";
        echo "<tr><td align=center valign=top><div style='border:0px solid #ccc; background:#fff; padding:4px; font-size:0; line-height:0;'><a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a></div></td></tr>";
        echo "<tr><td align=center class=lh>";
        //echo "<nobr style='display:block; overflow:hidden; width:100%'><a href='{$list[$i][ca_name_href]}'>[{$list[$i][ca_name]}]</a> ";
        echo "<a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</nobr>";
        //echo " " . $list[$i][icon_new];
        //echo " " . $list[$i][icon_file];
        //echo " " . $list[$i][icon_link];
        //echo " " . $list[$i][icon_hot];
        //echo " " . $list[$i][icon_secret];
        echo "</td></tr>";
        //echo "<tr><td align=center style='font-size:11px; color:#888;'>Date.".$list[$i][datetime2]." / Hit.".$list[$i][wr_hit]."</td></tr>";
        if ($is_checkbox) echo "<tr><td align=center></td></tr>";
        echo "</table></td>\n";
    }

    // 나머지 td
    $cnt = $i%$mod;
    if ($cnt)
        for ($i=$cnt; $i<$mod; $i++)
            echo "<td width='{$td_width}%'>&nbsp;</td>";
    ?>






너무 복잡하다고 생각하시는 분은

<a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a>

이미지 영역 소스입니다. 이부분만 적용해주면 되요

별거아닌 소스이지만 저는 꼭 필요하던거라 ㅋㅋ 다른분들도 필요하실까 싶어서 올립니다.

추천
1

댓글 6개

위의 소스로 바꾸어보아도 안되고
아래 '이부분만 적용해주면 되요'라는 건 무슨 뜻인지요? 그 부분을 삭제하라는 말씀인가요?
갤러리 리스트스킨에서 이미지 썸네일 부분입니다.
<a href='{$list[$i][href]}' onfocus='this.blur()'><img src='{$thumb}' width='{$thumb_width}' height='{$thumb_height}' border=1 style='border:1px solid #ffffff;'onmouseover=\"this.src='{$thumb1}';  this.style.cursor='hand'\"  onmouseout=\"this.src='{$thumb}';\"></a>

이런식으로 되어있는걸

<a href='".$list[$i][link_href][1]."' target='_blank'><img style=\"width: 300px;\" src=\"".$g4[path]."/data/file/".$bo_table."/".$list[$i][file][0][file]."\" /></a>

위와같이 변경해주시면 됩니다.

<a href='{$list[$i][href]}'> // <a href='".$list[$i][link_href][1]."'>
이부분이 다릅니다. 여기를 변경해주시면 됩니다.
갤러리 스킨 76번쯔음

<ul class="gall_con">
    <li class="gall_href">
        <a href="<?php echo $list[$i]['href'] ?>">

이 부분을

<ul class="gall_con">
    <li class="gall_href">
        <a href="<?php echo $list[$i]['link_href'][1] ?>" target="_blank">

이렇게 변경해보세요
전체 3,313 |RSS
그누4 팁자료실 내용 검색

회원로그인

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