그누보드4 에있던 인기 검색어 기능.. 정보
그누보드4 에있던 인기 검색어 기능..
본문
그 뭐였더라.. 클릭수에 따라 업 & 다운 뉴 nogap 이렇게 되는거 있죠 그거 소스 그누보드5 화해서 작업중인데..
참 아예 적용 시켜서 반응이 없내요... 참 ... ㅠ_ㅠ..이힝 ㅜ_ㅜ..
추천
0
0
댓글 10개

뭔지 몰라 도움을 못드리네요....ㅠㅠ

요거에요 ㅜ_ㅜ...
$date_gap_old = date("Y-m-d", strtotime($date_gap) - ($date_cnt * 86400));
$old = array();
$sql2 = " select pp_word, count(*) as cnt from {$g5['popular_table']}
where pp_date between '$date_gap_old' and '$date_gap'
group by pp_word
order by cnt desc, pp_word
limit 0, 100 ";
$qry2 = sql_query($sql2);
$count = mysql_num_rows($qry2);
for ($j=0; $row2=sql_fetch_array($qry2); $j++) {
$old[$j] = $row2;
}
for ($i=0; $i<$pop_cnt; $i++)
{
for ($j=0; $j<$count; $j++) {
if ($old[$j][pp_word] == $list[$i][pp_word]) {
break;
}
}
$list[$i][pp_word] = urldecode($list[$i][pp_word]);
$list[$i][pp_rank] = $i + 1;
if ($count == $j) {
$list[$i][old_pp_rank] = 0;
$list[$i][rank_gap] = 0;
} else {
$list[$i][old_pp_rank] = $j + 1;
$list[$i][rank_gap] = $list[$i][old_pp_rank] - $list[$i][pp_rank];
}
if ($list[$i][rank_gap] > 0)
$list[$i][icon] = "up";
else if ($list[$i][rank_gap] < 0)
$list[$i][icon] = "down";
else if ($list[$i][old_pp_rank] == 0)
$list[$i][icon] = "new";
else if ($list[$i][rank_gap] == 0)
$list[$i][icon] = "nogap";
}

정확히 뭐가 안되는거죠. 소스코드를 보니 머리가 아퍼요....ㅠㅠ

이게 그누보드4 에서 해석해보니깐 db 로 between 문으로 해당날자 사이에 예약어 같은걸이용해서 count(*) as cnt 문 즉 숫자 출력하는건데 인식이 안되는건지 제가 잘못한건지... 아예 작동을 안하고 NEW 만뜨더라구요 ㅎㅎ

$list[$i][old_pp_rank] = $j + 1; 랑 $list[$i][pp_rank] = $i + 1; 랑 값이 같으니 ....

그냥 상큼하게.... 다시 만드...... 쿨럭

배추빌더 소스네요.
배추빌더5에 그누5용으로 적용되어 있다는..
배추빌더5에 그누5용으로 적용되어 있다는..

+1

+1

+1