3만원에 작성된 연관 검색어 무료로 뿌립니다.
전 아미나 LTE BSE 사용중입니다.
아미나에 맞게 짜여져 있습니다. 다른 빌더에서 가능한지는 모르겠습니다만 한번 시도해 보세요.
그리고 적당히 바꿔서 보이게 하면 될 것 같습니다.
lib/common.lib.php
적당한 곳에
function get_same_keyword($word){
$return_data = "";
$sql = "select pp_word, count(*) as cnt from g5_popular where pp_word like '%$word%' group by pp_word order by cnt desc limit 20 ";
$sql_result = sql_query($sql);
//ul 및 li에 class추가해서 사용할 것
$return_data = "<b>연관 검색어 : </b>";
while($data = sql_fetch_array($sql_result)){
$return_data .= "<a href='".G5_BBS_URL."/search.php?stx=".urlencode($data[pp_word])."'>$data[pp_word]</a> ";
}
$return_data .= "";
return $return_data;
}
아래는 뿌리고 싶은 페이지에 넣어주면 됩니다. 전 스킨 안에 검색 스킨 안에 넣었습니다.
<div class="search-box">
<?php echo get_same_keyword($text_stx); ?><br style="display: block; margin: 8px 0;">
</div>
위 스크립트 더 잘 수정할 수 있는 분이 계시면 수정 부탁드립니다. 제 머리로는 여기까지 인데요.....
추천 누르는거 잊지 마시구요. 그럼...
댓글 13개
그렇지 않을경우 php 7.2 에서 오류가 발생합니다.
function get_same_keyword($word){
$return_data = "";
$sql = "select pp_word, count(*) as cnt from g5_popular where pp_word like '%{$word}%' group by pp_word order by cnt desc limit 20 ";
$sql_result = sql_query($sql);
//ul 및 li에 class추가해서 사용할 것
$return_data = "<b>연관 검색어 : </b>";
while($data = sql_fetch_array($sql_result)){
$return_data .= "<a href='".G5_BBS_URL."/search.php?stx=".urlencode($data['pp_word'])."'>{$data['pp_word']}</a> ";
}
$return_data .= "";
return $return_data;
}
일단 추천요^^
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4443 | ||
| 2394 | 1년 전 | 5054 | ||
| 2393 |
|
1년 전 | 1707 | |
| 2392 |
|
1년 전 | 1365 | |
| 2391 |
|
1년 전 | 1148 | |
| 2390 |
|
1년 전 | 1202 | |
| 2389 | 1년 전 | 1784 | ||
| 2388 | 1년 전 | 1332 | ||
| 2387 | 1년 전 | 1314 | ||
| 2386 |
투명한열정
|
1년 전 | 3078 | |
| 2385 |
|
1년 전 | 2350 | |
| 2384 | 1년 전 | 1671 | ||
| 2383 | 1년 전 | 1807 | ||
| 2382 | 1년 전 | 1459 | ||
| 2381 |
|
1년 전 | 1875 | |
| 2380 | 1년 전 | 1045 | ||
| 2379 | 1년 전 | 1386 | ||
| 2378 | 1년 전 | 920 | ||
| 2377 | 1년 전 | 3002 | ||
| 2376 | 1년 전 | 1566 | ||
| 2375 | 1년 전 | 1739 | ||
| 2374 |
네이비스택
|
1년 전 | 1119 | |
| 2373 | 1년 전 | 1553 | ||
| 2372 | 1년 전 | 1473 | ||
| 2371 |
goodman148
|
1년 전 | 2116 | |
| 2370 | 1년 전 | 1523 | ||
| 2369 |
|
1년 전 | 1037 | |
| 2368 | 1년 전 | 1840 | ||
| 2367 | 1년 전 | 1359 | ||
| 2366 |
|
1년 전 | 1216 | |
| 2365 | 1년 전 | 2147 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기