전 아미나 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개
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;
}
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기