최신글 관련 문의 입니다. 정보
최신글 관련 문의 입니다.본문
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A; font-weight:bold;'>{$list[$i]['subject']}</font>";
echo "</a>";
최신글 스킨에서 일반글과 공지사항을 출력하는라인입니다.
제가 궁금한건 최신글에서 공시사항은 출력이 안되게 하고 싶습니다.
최신글 목록 갯수를 4개로 지정하면 일반글만 떠 있고 공지사항은 게시판에만 있고 최신글에선 안뜨게끔 하고 싶은데 방법을 모르겠습니다. 공지글 echo부분 지우면 내용만 출력이 안될뿐 줄은 잡아먹고 있어서 골머리 아프네요..
혹시 해결 방법 아시는분 계신가요?
숫자 1,2,3,4,5,6 이 있다 하면 이중 5가 공지 글이면
게시판
공지 5
6
5
4
3
2
1
이렇게 뜨고
최신글에서는 목록갯수를 4개로 정해놓으면
6
4
3
2
5번인 공지가 빠지고 4개가 뜨게금 하려 합니다
혹시 아시는분 계시면 좀 도와주세요...
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A; font-weight:bold;'>{$list[$i]['subject']}</font>";
echo "</a>";
최신글 스킨에서 일반글과 공지사항을 출력하는라인입니다.
제가 궁금한건 최신글에서 공시사항은 출력이 안되게 하고 싶습니다.
최신글 목록 갯수를 4개로 지정하면 일반글만 떠 있고 공지사항은 게시판에만 있고 최신글에선 안뜨게끔 하고 싶은데 방법을 모르겠습니다. 공지글 echo부분 지우면 내용만 출력이 안될뿐 줄은 잡아먹고 있어서 골머리 아프네요..
혹시 해결 방법 아시는분 계신가요?
숫자 1,2,3,4,5,6 이 있다 하면 이중 5가 공지 글이면
게시판
공지 5
6
5
4
3
2
1
이렇게 뜨고
최신글에서는 목록갯수를 4개로 정해놓으면
6
4
3
2
5번인 공지가 빠지고 4개가 뜨게금 하려 합니다
혹시 아시는분 계시면 좀 도와주세요...
댓글 전체
if (!$list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A; font-weight:bold;'>{$list[$i]['subject']}</font>";
echo "</a>";
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A; font-weight:bold;'>{$list[$i]['subject']}</font>";
echo "</a>";
답변 감사합니다 얼른 해봐야겠네요! 되던 안되던 채택합니다!
정말 감사합니다^^
정말 감사합니다^^
음 해봤는데 안되네요..ㅠ 다른방법을 또 찾아봐야겠네요 감사합니다
lib/latest.lib.php
$board = sql_fetch($sql);
// 공지 추출 시작 ★
$arr_notice = array();
$notice_ex = preg_split("/\n/i", trim($board[bo_notice]));
foreach ($notice_ex as $row) {
if (trim($row) !== "")
$arr_notice[] = $row;
}
$notice_arrcnt = count($arr_notice);
$nootice_query = "";
if ($notice_arrcnt > 0) $notice_query = "and wr_id not in (" . implode(",", $arr_notice) . ")";
// 공지 추출 마지막 ★
//$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 $notice_query order by wr_num limit 0, $rows "; // 최신글 공지 제외 위한 추가 ★
$board = sql_fetch($sql);
// 공지 추출 시작 ★
$arr_notice = array();
$notice_ex = preg_split("/\n/i", trim($board[bo_notice]));
foreach ($notice_ex as $row) {
if (trim($row) !== "")
$arr_notice[] = $row;
}
$notice_arrcnt = count($arr_notice);
$nootice_query = "";
if ($notice_arrcnt > 0) $notice_query = "and wr_id not in (" . implode(",", $arr_notice) . ")";
// 공지 추출 마지막 ★
//$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 $notice_query order by wr_num limit 0, $rows "; // 최신글 공지 제외 위한 추가 ★
이렇게나 상세하게.. lib 파일 건드는건 초보라서 생각도 못해봤네요.. 감사합니다!
덕분에 잘 해결되었습니다 감사합니다.^^
좋은 주말 되세요..^^
좋은 주말 되세요..^^