그누보드5의 갤러리 리스트를 내용에 보여주는것이 가능한가요? 도움부탁드립니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
그누보드5의 갤러리 리스트를 내용에 보여주는것이 가능한가요? 도움부탁드립니다.

QA

그누보드5의 갤러리 리스트를 내용에 보여주는것이 가능한가요? 도움부탁드립니다.

본문

그누보드5에 갤러리 목록을 리스트말고 뷰페이지에 썸네일 형식으로..나란히 보이게하는방법좀 알수있을런지요.. 아래는 그누보드4의 " 겁쟁이님의... 뷰페이지에 갤러리 처럼 이미지 파일 출력 "을 그누보드5에 적용할수있는 방법을 부탁합니다. 아래는 그누보드4내용링크입니다. 제가 초보라서요...ㅠㅠ 초보가 넘기엔 시간이 필요한데.. 고수님들은 조금만 보셔도...아실거라생각합니다.. 원하시는분들도 있으시길래.. 그누고수님들께 해결좀 부탁드립니다. 아주그냥..ㅠ  헤메고있습다..  

 

아래 소스 시작

------------------------------------------------------------------------------------------------

 

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div style="height:12px; line-height:1px; font-size:1px;"> </div>

<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>


<div style="clear:both; height:30px;">
    <div style="float:left; margin-top:6px;">
    <img src="<?=$board_skin_path?>/img/icon_date.gif" align=absmiddle>
    <span style="color:#888888;">작성일 : <?=date("y-m-d H:i", strtotime($view[wr_datetime]))?></span>
    </div>

    <!-- 링크 버튼 -->
    <div style="float:right;">
    <?
    ob_start();
    ?>
    <? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
    <? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>

    <? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_list_search.gif' border='0' align='absmiddle'></a> "; } ?>
    <? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
    <? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_modify.gif' border='0' align='absmiddle'></a> "; } ?>
    <? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
    <? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
    <? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
    <?
    $link_buttons = ob_get_contents();
    ob_end_flush();
    ?>
    </div>
</div>

<div style="border:1px solid #ddd; clear:both; height:34px; background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;">
    <table border=0 cellpadding=0 cellspacing=0 width=100%>
    <tr>
        <td style="padding:8px 0 0 10px;">
            <div style="color:#505050; font-size:13px; font-weight:bold; word-break:break-all;">
            <? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?>
            <?=cut_hangul_last(get_text($view[wr_subject]))?>
            </div>
        </td>
        <td align="right" style="padding:6px 6px 0 0;" width=120>
            <? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
            <? if ($trackback_url) { ?><a href="javascript:trackback_send_server('<?=$trackback_url?>');" style="letter-spacing:0;" title='주소 복사'><img src="<?=$board_skin_path?>/img/btn_trackback.gif" alt="" align="absmiddle"></a><?}?>
        </td>
    </tr>
    </table>
</div>
<div style="height:3px; background:url(<?=$board_skin_path?>/img/title_shadow.gif) repeat-x; line-height:1px; font-size:1px;"></div>


<table border=0 cellpadding=0 cellspacing=0 width=<?=$width?>>
<tr>
    <td height=30 background="<?=$board_skin_path?>/img/view_dot.gif" style="color:#888;">
        <div style="float:left;">
         글쓴이 :
        <?=$view[name]?><? if ($is_ip_view) { echo " ($ip)"; } ?>
        </div>
        <div style="float:right;">
        <img src="<?=$board_skin_path?>/img/icon_view.gif" align=absmiddle> 조회 : <?=number_format($view[wr_hit])?>
        <? if ($is_good) { ?> <img src="<?=$board_skin_path?>/img/icon_good.gif" align=absmiddle> 추천 : <?=number_format($view[wr_good])?><? } ?>
        <? if ($is_nogood) { ?> <img src="<?=$board_skin_path?>/img/icon_nogood.gif" align=absmiddle> 비추천 : <?=number_format($view[wr_nogood])?><? } ?>
         
        </div>
    </td>
</tr>

<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++) {
    if ($view[file][$i][source] && !$view[file][$i][view]) {
        $cnt++;
        echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
        echo "  <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle>";
        echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'>";
        echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
        echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
        echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
        echo "</a></td></tr>";
    }
}

// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++) {
    if ($view[link][$i]) {
        $cnt++;
        $link = cut_str($view[link][$i], 70);
        echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
        echo "  <img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle>";
        echo "<a href='{$view[link_href][$i]}' target=_blank>";
        echo " <span style=\"color:#888;\">{$link}</span>";
        echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[link_hit][$i]}]</span>";
        echo "</a></td></tr>";
    }
}
?>
<tr>
    <td height="150" style="word-break:break-all; padding:10px;">

 


<table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="18" bgcolor="#A3A3A3"></td>
    <td width="683" align="center" bgcolor="#A3A3A3" height='50'>
            <!-- 내용 출력 -->
        <font color="#FFFFFF"><?=$view[content];?></font>
   
    </td>
    <td width="19" bgcolor="#A3A3A3"></td>
  </tr>
  <tr>
    <td width="18" bgcolor="#A3A3A3"></td>
    <td width="683" align="center" bgcolor="#A3A3A3"><table width='683' border='0' cellspacing='0' cellpadding='0'>
      <tr>
       
       
        <?
  $t = count($view[file]);
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
  
   
   
            if ($view[file][$i][view]) {
    
    if ($i > 1) { 
    $tr = $i%4;   
    }  
          
    if ($tr == '0') {
     echo"</tr><tr>";
    }
    
               // echo "<td width='170'>" . $view[file][$i][view] . "</td>";
    
    
echo "  
<td width='170'>
 
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td height='158' align='center' valign='middle' bgcolor='#FFFFFF'>" . $view[file][$i][view] . "</td>
    <td width='1' rowspan='3'></td>
  </tr>
  <tr>
    <td height='28' align='center' bgcolor='#E1E1E1'><span  class='photo_text2'>". $view[file][$i][content] ."</span></td>
  </tr>
  <tr>
    <td height='13'></td>
  </tr>
</table> 

</td>   
";   
 }
        }
        ?>       
       
      
      </tr>
     

 

 

 

 

    </table></td>
    <td width="19" bgcolor="#A3A3A3"></td>
  </tr>
  <tr>
    <td height="5" colspan="3" bgcolor="#A3A3A3"></td>
  </tr>
</table>

 

 

 

       
        <?//echo $view[rich_content]; // view_image($view, '0', '') 과 같은 코드를 사용할 경우?>
        <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>

        <? if ($nogood_href) {?>
        <div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
        <div style="color:#888; margin:7px 0 5px 0;">비추천 : <?=number_format($view[wr_nogood])?></div>
        <div><a href="<?=$nogood_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_nogood.gif" align="absmiddle"></a></div>
        </div>
        <? } ?>

        <? if ($good_href) {?>
        <div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
        <div style="color:#888; margin:7px 0 5px 0;"><span style='color:crimson;'>추천 : <?=number_format($view[wr_good])?></span></div>
        <div><a href="<?=$good_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_good.gif" align="absmiddle"></a></div>
        </div>
        <? } ?>

</td>
</tr>
<? if ($is_signature) { echo "<tr><td align='center' style='border-bottom:1px solid #E7E7E7; padding:5px 0;'>$signature</td></tr>"; } // 서명 출력 ?>
</table>
<br>

<?
// 코멘트 입출력
include_once("./view_comment.php");
?>

<div style="height:1px; line-height:1px; font-size:1px; background-color:#ddd; clear:both;"> </div>

<div style="clear:both; height:43px;">
    <div style="float:left; margin-top:10px;">
    <? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
    <? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
    </div>

    <!-- 링크 버튼 -->
    <div style="float:right; margin-top:10px;">
    <?=$link_buttons?>
    </div>
</div>

<div style="height:2px; line-height:1px; font-size:1px; background-color:#dedede; clear:both;"> </div>

</td></tr></table><br>

<script language="JavaScript">
function file_download(link, file) {
    <? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
    document.location.href=link;
}
</script>

<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
    resizeBoardImage(<?=(int)$board[bo_image_width]?>);
    drawFont();
}
</script>
<!-- 게시글 보기 끝 -->

--------------------------------------------------------------------------------------------------

첨부 소스끝. 그누5로 적용하려 하는데 이미지가 줄지않습니다.ㅠㅠ

어느부분을 수정해야될런지요?

도움 부탁드립니다.

81fdd987768b34a28980b58b968bf692_1413222361_1439.jpg 

이 질문에 댓글 쓰기 :

답변 1

저걸 그대로 g5로 옮긴다면 그냥 카피만 해주고 썸네일 코드만 넣으면 됩니다.

저 코드 그대로 쓰자면 g5 게시판 스킨 view.skin.php 에서

 

        <?php

        // 파일 출력

        $v_img_count = count($view['file']);

        if($v_img_count) {

            echo "<div id=\"bo_v_img\">\n";

 

            for ($i=0; $i<=count($view['file']); $i++) {

                if ($view['file'][$i]['view']) {

                    //echo $view['file'][$i]['view'];

                    echo get_view_thumbnail($view['file'][$i]['view']);

                }

            }

 

            echo "</div>\n";

        }

         ?>

 

        <!-- 본문 내용 시작 { -->

        <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>

        <?php//echo $view['rich_content']; // 과 같은 코드를 사용할 경우 ?>

        <!-- } 본문 내용 끝 --> 

 

 

위 부분 지우고 아래 코드 넣으세요.

그리고 게시판 설정에서 파일 설명 사용에 체크하고 

이미지 폭 크기를 150정도로 하면 저거랑 똑같이 나올겁니다.

코드 정렬은 원본이 이렇게 되있는 상태라 직접 정리하세요.

 

 


<table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="18" bgcolor="#A3A3A3"></td>
    <td width="683" align="center" bgcolor="#A3A3A3" height='50'>
        <!-- 본문 내용 시작 { -->
        <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
        <?php//echo $view['rich_content']; //  과 같은 코드를 사용할 경우 ?>
        <!-- } 본문 내용 끝 -->    
    </td>
    <td width="19" bgcolor="#A3A3A3"></td>
  </tr>
  <tr>
    <td width="18" bgcolor="#A3A3A3"></td>
    <td width="683" align="center" bgcolor="#A3A3A3"><table width='683' border='0' cellspacing='0' cellpadding='0'>
      <tr>
        
        
        <? 
  $t = count($view[file]);
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
  
   
   
            if ($view[file][$i][view]) {
    
    if ($i > 1) { 
    $tr = $i%4;   
    }  
          
    if ($tr == '0') {
     echo"</tr><tr>";
    }
    
               // echo "<td width='170'>" . $view[file][$i][view] . "</td>";
    
    
echo "  
<td width='170'>
 
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td height='158' align='center' valign='middle' bgcolor='#FFFFFF'>" . get_view_thumbnail($view['file'][$i]['view']) . "</td>
    <td width='1' rowspan='3'></td>
  </tr>
  <tr>
    <td height='28' align='center' bgcolor='#E1E1E1'><span  class='photo_text2'>". $view[file][$i][content] ."</span></td>
  </tr>
  <tr>
    <td height='13'></td>
  </tr>
</table> 
</td>   
";   
 }
        }
        ?>        
        
       
      </tr>
     
 
 
 
 
    </table></td>
    <td width="19" bgcolor="#A3A3A3"></td>
  </tr>
  <tr>
    <td height="5" colspan="3" bgcolor="#A3A3A3"></td>
  </tr>
</table> 

잘됩니다.감사합니다. 또한가지여쭤볼게요.. 내용의 이미지가 아래처럼 가로세로비율대로..가지런하게 배열이 되지않은데요.ㅠ 요렇게 가능하려면 어떤걸 수정해야 할런지요..--> http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=143673&sca=%EA%B0%A4%EB%9F%AC%EB%A6%AC&page=2

답변을 작성하시기 전에 로그인 해주세요.
전체 60,104
QA 내용 검색

회원로그인

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