공지사항 작성시 공지사항 글이 바로아래 또 보여집니다.
유사글 찾아봤는데 아래와 같이 조치하라고 나와 있는데..
초보라 이해가 안돼요..
조금만 쉽게 설명해 줄수 있나요?
main.php 가 어디에 있는지요.. 조언 부탁드립니다.
유사채택댓글
-------------------------------------------------------------------
g4는 그누보드3와 사용법이 다릅니다.
main.php 상단에 다음과 같은 내용이 추가되어야 합니다.
<?
// 상대 경로
$g4_path = "."; // g4 사용을 위해서 반드시 추가
include_once("$g4_path/common.php"); // g4 사용을 위해서 반드시 추가
include_once("$g4[path]/lib/latest.lib.php"); // 최신글 처리를 위해서 반드시 추가
$g4[title] = "";
include_once("$g4[path]/head.php"); // 필요시 추가
?>
그리고 브라우저에서 호출방식은
http://설치사이트/main.php 이처럼 호출하셔야 합니다.
참고로 한말씀 더 드린다면
g4 설치시 설정된 index.php에 위의 main.php의 내용을 그대로 넣으시면 될듯합니다.
유사글 찾아봤는데 아래와 같이 조치하라고 나와 있는데..
초보라 이해가 안돼요..
조금만 쉽게 설명해 줄수 있나요?
main.php 가 어디에 있는지요.. 조언 부탁드립니다.
유사채택댓글
-------------------------------------------------------------------
g4는 그누보드3와 사용법이 다릅니다.
main.php 상단에 다음과 같은 내용이 추가되어야 합니다.
<?
// 상대 경로
$g4_path = "."; // g4 사용을 위해서 반드시 추가
include_once("$g4_path/common.php"); // g4 사용을 위해서 반드시 추가
include_once("$g4[path]/lib/latest.lib.php"); // 최신글 처리를 위해서 반드시 추가
$g4[title] = "";
include_once("$g4[path]/head.php"); // 필요시 추가
?>
그리고 브라우저에서 호출방식은
http://설치사이트/main.php 이처럼 호출하셔야 합니다.
참고로 한말씀 더 드린다면
g4 설치시 설정된 index.php에 위의 main.php의 내용을 그대로 넣으시면 될듯합니다.
댓글 2개
공지사항으로 등록된 글은 중복하여 위에 노출이 되는거에요. 공지사항으로 등록된 글은 공지사항에만 나오고 리스트에 안나오게 하려면 bbs/list.php 파일을 수정하셔야 합니다.
[code]
$list = array();
$i = 0;
$j = 0; // 공지사항 갯수
if (!$sca && !$stx)
{
$arr_notice = explode("\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++;
$j++; // 공지사항 갯수 추가
}
}
$k = 0;
while ($row = sql_fetch_array($result))
{
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
if ($sca || $stx)
$row = sql_fetch(" select * from $write_table where wr_id = '$row[wr_parent]' ");
$arr_notice = explode("\n", trim($board[bo_notice]));
if(@in_array($row[wr_id], $arr_notice)) continue; // 공지사항 일 때 리스트 포함 X
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
if (strstr($sfl, "subject"))
$list[$i][subject] = search_font($stx, $list[$i][subject]);
$list[$i][is_notice] = false;
//$list[$i][num] = number_format($total_count - ($page - 1) * $board[bo_page_rows] - $k);
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k -$j; //공지사항 갯수만큼 빼고 num계산
$i++;
$k++;
}
[/code]
[code]
$list = array();
$i = 0;
$j = 0; // 공지사항 갯수
if (!$sca && !$stx)
{
$arr_notice = explode("\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++;
$j++; // 공지사항 갯수 추가
}
}
$k = 0;
while ($row = sql_fetch_array($result))
{
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
if ($sca || $stx)
$row = sql_fetch(" select * from $write_table where wr_id = '$row[wr_parent]' ");
$arr_notice = explode("\n", trim($board[bo_notice]));
if(@in_array($row[wr_id], $arr_notice)) continue; // 공지사항 일 때 리스트 포함 X
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
if (strstr($sfl, "subject"))
$list[$i][subject] = search_font($stx, $list[$i][subject]);
$list[$i][is_notice] = false;
//$list[$i][num] = number_format($total_count - ($page - 1) * $board[bo_page_rows] - $k);
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k -$j; //공지사항 갯수만큼 빼고 num계산
$i++;
$k++;
}
[/code]
게시글 목록
| 번호 | 제목 |
|---|---|
| 284172 | |
| 284170 | |
| 284167 | |
| 284164 | |
| 284161 | |
| 284159 | |
| 284155 | |
| 284152 | |
| 284151 | |
| 284148 | |
| 284142 | |
| 284141 | |
| 284137 | |
| 284136 | |
| 284135 | |
| 284127 | |
| 284121 | |
| 284120 | |
| 284116 | |
| 284115 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기