keyword 라는 보드를 생성한 후에
통합검색 파일에서
아래 코드를
$wdate = time();
$sqls = "insert into a_tn2_keyword_list (board_name,division,thread,replycnt,wdate,subject,name,secret) values ('keyword','1','0','0','$wdate','$ish_wodrd','$ish_wodrd','0')";
$result = @mysql_query($sqls);
if(!$result) db_error($sqls);
$uids = mysql_insert_id();
$muids = "-".$uids;
@mysql_query("update a_tn2_keyword_list set uid = '$muids', follow = '$uids' where no = '$uids'");
--------------------------------
if(!$ish_wodrd) return;
iBoard_Print_Here('freeboard',$Search_text_set);
위 구문 사이에 넣어줍니다.
key_list.php 파일을 만들어서 아래 코드를 넣고 저장하고 테크노트 설치폴더에 저장합니다.
<?
include "lib.php";
$temp=mysql_fetch_array(mysql_query("select count(*) from a_tn2_keyword_list"));
$total=$temp["count(*)"];
$result_key=mysql_query("select name,count(*) as cnt from a_tn2_keyword_list group by name order by cnt desc limit 10");
$nowdate = time();
$olddate = $nowdate - 600;
?>
<table>
<?
$num=1;
while($data_key=mysql_fetch_array($result_key))
{
$junda=mysql_fetch_array(mysql_query("select count(name) from a_tn2_keyword_list where name='$data_key[name]'"));
$jundaold=mysql_fetch_array(mysql_query("select count(name) from a_tn2_keyword_list where name='$data_key[name]' and wdate < '$olddate'"));
$winto=trim($junda["count(name)"]);
$winto_old = trim($jundaold["count(name)"]);
?>
<tr>
<td><?=$num?></td>
<td><?=$data_key[name]?></td>
<td><?=$winto?> <? if ($winto > $winto_old) { ?> ↑ <? } ?> </td>
</tr>
<?
$num++;
} ?>
</table>
위와 같이 하시면
http://www.bikero.co.kr:8080/board.php?board=main&command=other_insert&exe=search_view&mode=all&ish_period=all&ish_wodrd=혼다위 사이트와 같이 통합검색에서 인기검색을 추가할 수 있습니다.