최근게시물에서 공지사항 맨 위에 표시하기 > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

최근게시물에서 공지사항 맨 위에 표시하기

페이지 정보

본문

보통은 위 그림처럼 최근게시물에 공지사항을 올린 후 일반 게시물을 올리면 공지사항이 밑으로 내려갑니다.

제가 구현하고자 하는건 최근게시물에서 공지사항은 내려가지 않고 계속해서 최근게시물 맨 위에 표시하고자 했으면 합니다.

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

위 질문을 올렸더니 어떤 분이 아래와 같은 답변을 주시더군요.

<? for ($i=1; $i<count($list); $i++) { ?>
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
<?}?>

<? for ($i=1; $i<count($list); $i++) { ?>
if (!$list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt;'>{$list[$i]['subject']}</font>";
<?}?>

응용하세요

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

아래 소스에 적용하려고 하는데 어떻게 적용하라고 하는건지 아무리 고민해도 잘 모르겠네요.
꼭 좀 도와주시길 부탁드립니다.
감사합니다. ^^


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

<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr height=25><td align=left valign=bottom colspan=3>&nbsp;&nbsp;<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td></tr>
<tr><td width=78 height=4><img src="<?=$latest_skin_path?>/img/bgl.gif" border=0></td>
<td width=34 height=4><img src="<?=$latest_skin_path?>/img/bgm.gif" border=0></td>
<td width=100%  height=4 background="<?=$latest_skin_path?>/img/bgr.gif"></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr><td colspan=3 align=center>

<table width=100%>
<tr><td height=20> <img src='<?=$latest_skin_path?>/img/arrow.gif' align=absmiddle>
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='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>
<tr><td background="<?=$latest_skin_path?>/img/dot.gif" height=1> </td></tr></table>

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

댓글목록

profile_image

쎄엠님의 댓글

쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

답답하실 것 같아 혹 하고 올려봅니다.
초보이기 때문에 전혀아닐 수도 있습니다만 시도해 보시면 어떨까 하고 용감하게 올려 봅니다.
올리신 부분 가운데 아래의 부분을 찾습니다.
-->
<table width=100%>
<tr><td height=20> <img src='<?=$latest_skin_path?>/img/arrow.gif' align=absmiddle>
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}'>";
--≫      if ($list[$i]['is_notice'])
                echo "<font style='color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
--≫      echo "<font style='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>";
<--

중간에 --≫ 로 표시된 부분을 어떤 분이 올리신 팁을 적용해 보면 어떨까요?
아 단순하게 그냥 적용해서는 안 되는 것 같습니다.
응용을 해야 할 것 같은데 말입니다.
고수님들의 손길이 필요할 것 같네요.

Total 1,640건 34 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
815 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9109 0 04-27
814 davi쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9108 0 10-22
813 okpcas쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9106 0 12-21
812 채군쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9104 0 02-13
811 진진쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9103 0 12-14
810 그루터기쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9100 1 05-16
809 강남길홍길동쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9094 0 08-12
808 알라쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9084 0 03-05
807 davi쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9084 0 08-29
806 소피쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9083 0 12-28
805 nstar쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9083 0 03-29
804 데니스쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9077 0 07-01
803 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9077 0 12-17
802 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9073 0 02-23
801 알럽투데이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9065 0 09-25
800 휴먼쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9065 0 08-01
799 초돌이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9064 0 12-30
798 프라하쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9056 1 03-29
797 포인트쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9051 0 11-14
796 와룡이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9046 0 05-11
795 디란도쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9043 0 11-06
794 davi쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9040 0 07-02
793 용맨쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9039 1 01-21
792 부업타운쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9037 1 06-24
791 귀여운현호쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9032 0 02-26

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
1,399
어제
7,853
최대
8,371
전체
1,634,808
Copyright (c) 株式会社YHPLUS. All rights reserved.