최신글에 해당 게시판에 공지사항만 나오게 하려구요 > 그누4 질문답변

그누4 질문답변

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

최신글에 해당 게시판에 공지사항만 나오게 하려구요 정보

최신글에 해당 게시판에 공지사항만 나오게 하려구요

본문

혹 가능한가 싶어 이렇게 했습니다.
그누 최신 (4.36.20) 버전 쓰구요.

그런데 안되네요. 팁자료실이나 질문답변 게시판에 계속 찾아봐도 과거 내용과 지금의 그누보드 구조가 변경 된 것인지 잘모르겠네요. 초보기도 하구요.

고수님들 답변 부탁 드려요.

 


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
?>
<base target="_main">



<table width=100% border="0" cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=100% border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height=20 style="padding-top:4px;" valign="middle"><?
            //echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}' target='_parent'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:11px; color:#4f4f4f;'>{$list[$i]['subject']}</font>";
           // else
           //     echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
            echo "</a>";

          //  if ($list[$i]['comment_cnt']) 
           //     echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";

            // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

          //  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'];
            ?></td></tr>

      </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>

댓글 전체

최신 basic 스킨에서 공지사항만 추출한 내용은 다음과 같습니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 2;

if ($is_checkbox) $colspan++;
?>

<style>
.board_top { clear:both; }

.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }

.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }

.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd; }
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.subject { overflow:hidden; }

.board_list .notice { font-weight:normal; }
.board_list .current { font:bold 11px tahoma; color:#E15916; }
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
</style>

<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
    <!-- 제목 -->

    <table cellspacing="0" cellpadding="0" class="board_list">
    <col width="50" />
    <? if ($is_checkbox) { ?><col width="40" /><? } ?>
    <col />

    <?
    for ($i=0; $i<count($list); $i++) {
        $bg = $i%2 ? 0 : 1;
    ?>

    <tr class="bg<?=$bg?>">
        <td class="num">
            <?
            if ($list[$i][is_notice]) // 공지사항
                echo "<b>공지</b>";
            else if ($wr_id == $list[$i][wr_id]) // 현재위치
                echo "<span class='current'>{$list[$i][num]}</span>";
            else
                echo $list[$i][num];
            ?>
        </td>
        <td class="subject">
            <?
            echo $nobr_begin;
            echo $list[$i][reply];
            echo $list[$i][icon_reply];

            if ($list[$i][is_notice])
                echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></a>";
            echo $nobr_end;
            ?>
        </td>
    </tr>
    <? } // end for ?>

    <? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>

    </table>

</td></tr></table>
<!-- 게시판 목록 끝 -->
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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