공지 관련 재질문 드립니다. 정보
공지 관련 재질문 드립니다.본문
몇일전에 올렸는데 해결이 안되어서 다시 질문드립니다.
아시는 분 있으시면 도움 부탁드립니다.^^
------------------------------------------------------
게시판에서 분류를 사용하면
<전체>에서는 공지글들이 리스트 제일 위에 굵은 글씨로 뜨는데
분류보기(분류1,분류2...)로 들어가면 해당분류에 쓴 공지들조차도 리스트에 표시가 안되네요.
분류보기에 들어가면 해당분류에서 쓴 공지글들이 리스트에 나오게 하고 싶습니다.
아시는 분 있으시면 도움 부탁드립니다.^^
------------------------------------------------------
게시판에서 분류를 사용하면
<전체>에서는 공지글들이 리스트 제일 위에 굵은 글씨로 뜨는데
분류보기(분류1,분류2...)로 들어가면 해당분류에 쓴 공지들조차도 리스트에 표시가 안되네요.
분류보기에 들어가면 해당분류에서 쓴 공지글들이 리스트에 나오게 하고 싶습니다.
댓글 전체
bbs/list.php
87라인부터
//if (!$sca && !$stx)
{
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
//}
87라인부터
//if (!$sca && !$stx)
{
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
//}
엑스엠엘님 관심 가져주셔서 감사합니다.
하지만 말씀하신 대로 주석처리하니 공지 자체가 나오지 않네요.
일단 if (!$sca && !$stx) 이 부분을 if (!$stx)로 고쳐서 분류보기에서도 전체공지가 나오게는 됐습니다.
그 분류에 맞는 공지만 나오게 하려면 어떻게 해야 할까요..
하지만 말씀하신 대로 주석처리하니 공지 자체가 나오지 않네요.
일단 if (!$sca && !$stx) 이 부분을 if (!$stx)로 고쳐서 분류보기에서도 전체공지가 나오게는 됐습니다.
그 분류에 맞는 공지만 나오게 하려면 어떻게 해야 할까요..
bbs/list.php
87라인부터
if (!$sca && !$stx)
{
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
} else if ($sca && !$stx) // 분류 지정하고, 검색이 아닐 때
{
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where ca_name='$sca' and wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
}
87라인부터
if (!$sca && !$stx)
{
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
} else if ($sca && !$stx) // 분류 지정하고, 검색이 아닐 때
{
$arr_notice = split("\n", trim($board[bo_notice]));
for ($k=0; $k<count($arr_notice); $k++)
{
if (trim($arr_notice[$k])=='') continue;
$row = sql_fetch(" select * from $write_table where ca_name='$sca' and wr_id = '$arr_notice[$k]' ");
if (!$row[wr_id]) continue;
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
}
잘됩니다. 정말 감사합니다.^^