인기글 혹은 일정한 추천(hit)게시판으로 최신글을 만들수 있는 방법이 없을까요?? 정보
인기글 혹은 일정한 추천(hit)게시판으로 최신글을 만들수 있는 방법이 없을까요??본문
게시판 그룹을 A,B,C 등으로 나누어서 각 그룹별로 게시판을 형성하여 사용하고 있습니다.
특정그룹에서 인기글이나 추천게시글을 뽑고 싶은데 여기 스킨에 있는데로 하여도 잘 안되네요.
저는 인기글 혹은 일정한 추천수를 획득한 게시판 글을 일정기간 설정하여 메인화면인 인덱스 화면에 테이블로 보여주고 싶습니다.
좋은 방법이 있으시면 부탁 드리겠습니다.
회원여러분의 많은 도움부탁 드리겠습니다..
댓글 전체
new.php에서
<?
include_once("./_common.php");
$g4[title] = "최근 게시물";
include_once("./_head.php");
$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
if ($min_good)
$sql_common .= " and b.wr_good >= '$min_good' ";
이건 new.php?min_good=100 으로 사용하면 됩니다.
if ($min_comment)
$sql_common .= " and b.wr_comment >= '$min_comment' ";
이건 new.php?min_comment=10 으로 사용하면 됩니다.
if ($gr_id)
$sql_common .= " and b.gr_id = '$gr_id' ";
if ($view == "w")
$sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == "c")
$sql_common .= " and a.wr_id <> a.wr_parent ";
if ($mb_id)
$sql_common .= " and a.mb_id = '$mb_id' ";
$sql_order = " order by a.bn_id desc ";
<?
include_once("./_common.php");
$g4[title] = "최근 게시물";
include_once("./_head.php");
$sql_common = " from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.bo_use_search = '1' ";
if ($min_good)
$sql_common .= " and b.wr_good >= '$min_good' ";
이건 new.php?min_good=100 으로 사용하면 됩니다.
if ($min_comment)
$sql_common .= " and b.wr_comment >= '$min_comment' ";
이건 new.php?min_comment=10 으로 사용하면 됩니다.
if ($gr_id)
$sql_common .= " and b.gr_id = '$gr_id' ";
if ($view == "w")
$sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == "c")
$sql_common .= " and a.wr_id <> a.wr_parent ";
if ($mb_id)
$sql_common .= " and a.mb_id = '$mb_id' ";
$sql_order = " order by a.bn_id desc ";
rolo님 답변 감사합니다.
제자 잘 몰라서 이해가 안가는 부분이 있습니다.
if ($min_good)
$sql_common .= " and b.wr_good >= '$min_good' ";
이건 new.php?min_good=100 으로 사용하면 됩니다.
if ($min_comment)
$sql_common .= " and b.wr_comment >= '$min_comment' ";
이건 new.php?min_comment=10 으로 사용하면 됩니다
위 내용을 어떻게 사용하는지 모르겠네요.
최신글 불러오듯이 사용하는것인지요??
구체적인 방법이 있을것 같은데 부탁드리겠습니다.
번거롭게 하는것 같아 죄송하네요..
제자 잘 몰라서 이해가 안가는 부분이 있습니다.
if ($min_good)
$sql_common .= " and b.wr_good >= '$min_good' ";
이건 new.php?min_good=100 으로 사용하면 됩니다.
if ($min_comment)
$sql_common .= " and b.wr_comment >= '$min_comment' ";
이건 new.php?min_comment=10 으로 사용하면 됩니다
위 내용을 어떻게 사용하는지 모르겠네요.
최신글 불러오듯이 사용하는것인지요??
구체적인 방법이 있을것 같은데 부탁드리겠습니다.
번거롭게 하는것 같아 죄송하네요..
new.php를 복사해서 index.php로 만드시고 꾸미시는 것은 어떨까요?