검색어중에서 회원 아이디를 원천봉쇄(?) 하려면 어떻게 해야하나요? 정보
검색어중에서 회원 아이디를 원천봉쇄(?) 하려면 어떻게 해야하나요?본문
검색봇이 마구 게시물을 긁어가고 나면 인기검색어에 회원 아이디가 자꾸 올라가네요.
검색어가 회원아이디라면 db에도 저장하지 않으면서 인기검색어로도 노출되지 않게 하려면 어떻게 해야할까요?
초보자에게 설명해주신다 생각해주시고 답변부탁 드립니다 감사합니다.
검색어가 회원아이디라면 db에도 저장하지 않으면서 인기검색어로도 노출되지 않게 하려면 어떻게 해야할까요?
초보자에게 설명해주신다 생각해주시고 답변부탁 드립니다 감사합니다.
댓글 전체
인기 검색어 소스를 첨부하세요
popular.skin.php 입니다
<?
/**
* Popular Skin for Gnuboard4
*
* Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
*/
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$date_gap_old = date("Y-m-d", strtotime($date_gap) - ($date_cnt * 86400));
$old = array();
$sql2 = " select pp_word, count(*) as cnt from $g4[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";
}
?>
<style type="text/css">
.mw-popular { border:1px solid #e1e1e1; text-align:center; }
.mw-popular td { font-size:12px; line-height:16px; }
.mw-popular a:link { color:#444; text-decoration:none; }
.mw-popular a:active { color:#444; text-decoration:none; }
.mw-popular a:visited { color:#444; text-decoration:none; }
.mw-popular a:hover { color:#444; text-decoration:underline; }
.mw-popular .subject { background:url(<?=$popular_skin_path?>/img/box-bg.gif); height:24px; margin:0 0 7px 0; }
.mw-popular .subject { font-size:12px; color:#555; font-weight:bold; letter-spacing:-1px; text-decoration:none; text-align:left; }
.mw-popular .subject div { margin:5px 0 0 10px;}
.mw-popular table { margin:0 0 0 5px;}
.mw-popular .word { width:105px; height:16px; overflow:hidden; margin:2px 0 0 5px; }
.mw-popular .gap { letter-spacing:-1px; font-size:11px; }
</style>
<div class="mw-popular">
<div style="border:1px solid #fff;">
<div class="subject"><div>인기검색어</div></div>
<table border=0 cellpadding=0 cellspacing=0>
<? for ($i=0; $i<$pop_cnt; $i++) { ?>
<? if (!is_array($list[$i])) continue; ?>
<tr>
<td width="20" height="20"><img src="<?=$popular_skin_path?>/img/<?=sprintf("%02d", $i+1)?>.gif"></td>
<td width="110">
<div class="word">
<!--<a href="<?=$g4[bbs_path]?>/search.php?sfl=wr_subject&sop=and&stx=<?=urlencode($list[$i][pp_word])?>"><?=$list[$i][pp_word]?></a>-->
<?
if ($is_admin) {
echo "<a href='$g4[bbs_path]/search.php?sfl=wr_subject&sop=and&stx=".urlencode($list[$i][pp_word])."'>{$list[$i][pp_word]}</a> <a href=\"javascript:win_comment('$g4[path]/schdel.php?psp_word={$list[$i][pp_word]}');\" title='검색어가 포함된 게시물 전체삭제'><font color=ff3300>x</font></a>";
}else {
echo "<a href='$g4[bbs_path]/search.php?sfl=wr_subject&sop=and&stx=".urlencode($list[$i][pp_word])."'>{$list[$i][pp_word]}</a> ";
}
?>
</div>
</td>
<td width="35">
<img src="<?=$popular_skin_path?>/img/<?=$list[$i][icon]?>.gif" align=absmiddle>
<span class="gap"><? if ($list[$i][icon] != "new" && $list[$i][icon] != "nogap") { echo abs($list[$i][rank_gap]); }?></span>
</td>
</tr>
<? } ?>
</table>
</div>
</div>
<?
/**
* Popular Skin for Gnuboard4
*
* Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
*/
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$date_gap_old = date("Y-m-d", strtotime($date_gap) - ($date_cnt * 86400));
$old = array();
$sql2 = " select pp_word, count(*) as cnt from $g4[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";
}
?>
<style type="text/css">
.mw-popular { border:1px solid #e1e1e1; text-align:center; }
.mw-popular td { font-size:12px; line-height:16px; }
.mw-popular a:link { color:#444; text-decoration:none; }
.mw-popular a:active { color:#444; text-decoration:none; }
.mw-popular a:visited { color:#444; text-decoration:none; }
.mw-popular a:hover { color:#444; text-decoration:underline; }
.mw-popular .subject { background:url(<?=$popular_skin_path?>/img/box-bg.gif); height:24px; margin:0 0 7px 0; }
.mw-popular .subject { font-size:12px; color:#555; font-weight:bold; letter-spacing:-1px; text-decoration:none; text-align:left; }
.mw-popular .subject div { margin:5px 0 0 10px;}
.mw-popular table { margin:0 0 0 5px;}
.mw-popular .word { width:105px; height:16px; overflow:hidden; margin:2px 0 0 5px; }
.mw-popular .gap { letter-spacing:-1px; font-size:11px; }
</style>
<div class="mw-popular">
<div style="border:1px solid #fff;">
<div class="subject"><div>인기검색어</div></div>
<table border=0 cellpadding=0 cellspacing=0>
<? for ($i=0; $i<$pop_cnt; $i++) { ?>
<? if (!is_array($list[$i])) continue; ?>
<tr>
<td width="20" height="20"><img src="<?=$popular_skin_path?>/img/<?=sprintf("%02d", $i+1)?>.gif"></td>
<td width="110">
<div class="word">
<!--<a href="<?=$g4[bbs_path]?>/search.php?sfl=wr_subject&sop=and&stx=<?=urlencode($list[$i][pp_word])?>"><?=$list[$i][pp_word]?></a>-->
<?
if ($is_admin) {
echo "<a href='$g4[bbs_path]/search.php?sfl=wr_subject&sop=and&stx=".urlencode($list[$i][pp_word])."'>{$list[$i][pp_word]}</a> <a href=\"javascript:win_comment('$g4[path]/schdel.php?psp_word={$list[$i][pp_word]}');\" title='검색어가 포함된 게시물 전체삭제'><font color=ff3300>x</font></a>";
}else {
echo "<a href='$g4[bbs_path]/search.php?sfl=wr_subject&sop=and&stx=".urlencode($list[$i][pp_word])."'>{$list[$i][pp_word]}</a> ";
}
?>
</div>
</td>
<td width="35">
<img src="<?=$popular_skin_path?>/img/<?=$list[$i][icon]?>.gif" align=absmiddle>
<span class="gap"><? if ($list[$i][icon] != "new" && $list[$i][icon] != "nogap") { echo abs($list[$i][rank_gap]); }?></span>
</td>
</tr>
<? } ?>
</table>
</div>
</div>
이건 select 하는건데요 insert 하는 부분에서 mb_id 가 있을경우 DB에 저장 안되게 하세요