T

히스토리 게시판에서 공지사항 사용은 안되는걸까요.. ㅠㅜ

원하는 건 게시판 전체의 상단이 아니라 분류별로 나뉜 목록에서 공지사항 선택된 게시물이 제일 위에 뜨는 겁니다.
bbs의 list.php에서 소스를 가져와서 이리저리 만지작은 해봤는데.. 공지사항만 뜬다던가, 마지막분류 하나만 뜬다던가 제대로 뜨질않아서.. 혹시 도움을 주실분이 계실까 올려봅니다.

<?

//카테고리를 읽는다.
$sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[bo_category_list]); // 구분자가 | 로 되어 있음
for ($i=0; $i<count($arr); $i++) { //카테고리 루프 시작
//각 카테고리 별로 글을 읽어와서 뿌려준다.
$his_year = trim($arr[$i]);
?>
<table width=100%>
<tr>
<td width='50%' style='padding:0px 10px;' valign='top'>
<div class="history_area">
<div class="title">
<? if($bo_table) {
// $img = "<img src=$board_skin_path/img/year_".$his_year.".gif>";
$year = "<span style='font-size:28px;font-family:Arial;letter-spacing:-1px; color:#000000;'><h2><i>$his_year</i></h2></span>";
echo $year;
} // 연혁불러오기?>
</div>
</div>
</td>
</tr></table>
<?
$sql1 = " SELECT wr_id,wr_subject,wr_content FROM $write_table WHERE ca_name = '$arr[$i]' ORDER BY wr_subject asc";
$row1 = mysql_query($sql1);
for ($j=0; $ca=mysql_fetch_array($row1); $j++) { //글별 루프 시작
//echo $ca['wr_subject']."<br>".$ca['wr_content']."<br><br>";
$his_date = $ca['wr_subject']; //날짜
$his_content = conv_content($ca['wr_content'],true); //내용
//해당 카테고리별 포함된 글들
?>
<div class="item_text">
<table cellspacing="0" cellpadding="0" border="0" width="97%">
<tr>
<td width="30"><? if ($is_checkbox) { ?><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? }?></td>
<td width="80" align="right"><b><?=$his_date?></b></td>
<td width="10"> </td>
<td class="history_list">
<div class="history_item">
<?=$his_content?>  <? if ($is_admin == "super" || $is_admin == "group") { ?>
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bo_table?>&wr_id=<?=$ca['wr_id']?>'>[내용]</a>
<a href='<?=$g4[path]?>/bbs/write.php?bo_table=<?=$bo_table?>&w=u&wr_id=<?=$ca['wr_id']?>'>[수정]</a>
<a href="javascript:del('./delete.php?bo_table=<?=$bo_table?>&wr_id=<?=$ca[wr_id]?>&page=');">[삭제]</a>
<? } ?>
</div>
</td>
</tr>
</table>
</div>
<?
} //글별 루프 끝
?>
<br class='clear' />
<?
} //카테고리 루프 끝
?>
|

댓글 1개

쉽게 그냥 별도의 게시판 하나 만드시고...
거기에 따른 최신글로 스킨에 넣으시면 될듯하네요. 꼼수라...이방법이 더 빠릇듯합니다.ㅎ
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
14년 전 조회 1,533
14년 전 조회 2만
14년 전 조회 1,146
14년 전 조회 809
14년 전 조회 784
14년 전 조회 767
14년 전 조회 794
14년 전 조회 820
14년 전 조회 984
14년 전 조회 981
14년 전 조회 871
14년 전 조회 979
14년 전 조회 988
14년 전 조회 2,047
14년 전 조회 981
14년 전 조회 978
14년 전 조회 1,592
14년 전 조회 1,185
14년 전 조회 764
14년 전 조회 975