lib그룹별 자동 추천/힛 게시물 뽑기 에서 특정 게시판 제외하기 방법 정보
lib그룹별 자동 추천/힛 게시물 뽑기 에서 특정 게시판 제외하기 방법본문
lib에 코드입니다.
bbs/board_head.php에 적용을 해둬서 모든 게시판에 일괄적으로 적용이 됩니다.
board_head.php
//아래 부분만 추가
####################################################
// 베스트게시물
@include ("../best5.php");
####################################################
이런식으로 호출이 되는데...
특정 게시판에는 위에 내용이 노출되지 않게끔 하고 싶은데 방법을 모르겠네요!!!
유사질문을 찾아서...비슷하게나마 적용해도 에러가 뜨구요...
lib부분에서 처리를 해야하는건지..아니면 board_head.php에서 제외할 게시판을 처리해야하는건지 모르겠네요..아시는 분 방법 좀 알려주세요...
// 최신글 추출
function latest1($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options, $before_day, $titles)
{
$before_time = date("Y-m-d H:i:s", $before_day);
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and wr_datetime >= '$before_time' order by $options desc limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
bbs/board_head.php에 적용을 해둬서 모든 게시판에 일괄적으로 적용이 됩니다.
board_head.php
//아래 부분만 추가
####################################################
// 베스트게시물
@include ("../best5.php");
####################################################
이런식으로 호출이 되는데...
특정 게시판에는 위에 내용이 노출되지 않게끔 하고 싶은데 방법을 모르겠네요!!!
유사질문을 찾아서...비슷하게나마 적용해도 에러가 뜨구요...
lib부분에서 처리를 해야하는건지..아니면 board_head.php에서 제외할 게시판을 처리해야하는건지 모르겠네요..아시는 분 방법 좀 알려주세요...
// 최신글 추출
function latest1($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options, $before_day, $titles)
{
$before_time = date("Y-m-d H:i:s", $before_day);
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and wr_datetime >= '$before_time' order by $options desc limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
댓글 전체
<?
if($bo_table == "특정게시판명") {
} else {
@include ("../best5.php");
?>
if($bo_table == "특정게시판명") {
} else {
@include ("../best5.php");
?>
여러개 추가하려면 어떻게 해야 할까요 ?