테스트 사이트 - 개발 중인 베타 버전입니다

카테고리별로 공지를 보여주고 싶은데 방법 없을까요?

전문 프로그래머가 아니다 보니
검색이나 질문을 통해서 답을 얻게 되는데요 ㅎㅎ

메인에서는 공지가 노출되지 않고
카테고리별로 공지를 보여주고 싶은데 방법 없을까요?

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

//원래 있는부분
lib/latest.lib.php 부분에
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";

아래 처럼 등록하신면 될듯 합니다
$notice_array = explode("\n", trim($board[bo_notice]));
$notice_count = count($notice_array):
$notice_str = "";
if($notice_count)
{
for($k =0 ; $k < $notice_count ; $k++)
{
$notice_array[$k] = " wr_id != '".$notice_array[$k]."' " ;
}
$notice_str = " AND ".implode(" AND " , $notice_array);." ";
}
$sql = " select * from $tmp_write_table where wr_is_comment = 0 $notice_str order by wr_num limit 0, $rows ";


카테고리별 공지 사항은
bbs/list.php 를 건드리셔도 되고

skin 폴더에 list.skin.php 의
리스트 부분에 루프 돌릴때
for ($i=0; $i<count($list); $i++) {
밑에 아래 if 문으로 필터를 해주시면 될듯 합니다
//공지가 아니고 , 공지면 현 카테고리만 보이게
if (!$list[$i][is_notice] || ( $list[$i][is_notice] && ( $list[$i][ca_name] == $sca || $sca == "") ){
아래 부분에서 어디에 넣으면 좋을까요? ㅎㅎ

<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=25 align=center>
<td>
<?
if ($list[$i][is_notice]) // 공지사항
echo "<img src=\"$board_skin_path/img/notice_icon.gif\">";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<font color='#333333'><strong>{$list[$i][num]}</strong>";
else
echo "<span style=font-size:8pt;><font face=Tahoma color=#888888>{$list[$i][num]}</font></span>";
?></td>
----------------------

게시글 목록

번호 제목
284348
284336
284333
284332
284320
284318
284316
284313
284307
284306
284303
284298
284296
284290
284286
284280
284277
284272
284261
284259