인기검색어에서 검색단어 글자수 줄이는 방법 어지 하나요?

안녕하세요.
 
다름이 아니오라 밑에 인기검색 스킨을 사용 하는데요..
 
 
검색을 10글자 이상 검색 하고 나서 보면 테이블이 작아서 그런지 바로 밑에 이어서
보이더라구요..보기에도 지저분 하게 보이구요..
 
그래서 검색한 글자를 몇으로 지정 해서 글자갯수로 지정 하여 보이게끔 하고 싶은데요.
 
인기검색 글자 갯수 조절 어찌 하나요..?
 
인기검색어 갯수 아니에요^^;;착오 없으시길 바래요..^^
 
그럼 좋은 하루 되세요~~~
|

댓글 8개

<input name=stx maxlength=15 size=10 itemname="검색어" required value='<?=$stx?>'><select name=sop>

부분에서 maxlength=15 의 값을 줄여주세요.....스킨이나 메인 검색창 모두....
제가 잠시 착각을......이건 입력부 제어인뎅...ㅠ.ㅠ
감사합니다..그런데 위에는 셀렉트창인가 그거 크기 조절 같은데요..?

저는 인기검색어를 추출 해서 보여줄때 인기검색어 글자수 조절을 말하는건데요..ㅠ.ㅠ

1,테스트테스트테스트
테스트테스트
2,테스트테스트

위에 처럼 인기검색어가 밑으로 밀려서 나오는데요..
그걸 글자수 조절로 지정 하거나 아예 줄바꿈 금지로 할수 없나요?

참고로 인기검색어 소스 올릴께요..


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table border="0" width="210" cellpadding="0" cellspacing="0" background="<?=$popular_skin_path?>/main.gif">
<tr>
<td colspan="4" height='50'></td>
</tr>

<tr>
<td width='1' background="<?=$popular_skin_path?>/line.gif"></td>

<td width='170'>
<?
for ($i=0; $i<count($list); $i++)
{
if($i=="0")
{


echo "<p style='margin-top:4; margin-left:15; margin-bottom:1;'>  <img width='14' height='13' align='absmiddle' border='0' src='$popular_skin_path/num_0".$i.".gif'>  <a href='$g4[bbs_path]/search.php?sfl=wr_subject&sop=and&stx=".urlencode($list[$i][pp_word])."' target='_parent'><font color='#00285A'><b>{$list[$i][pp_word]}</b></font></a></p>";
}
else
{
echo "<p style='margin-top:4; margin-left:15; margin-right:40; margin-bottom:1;'>  <img width='14' height='13' align='absmiddle' border='0' src='$popular_skin_path/num_0".$i.".gif'>  <a href='$g4[bbs_path]/search.php?sfl=wr_subject&sop=and&stx=".urlencode($list[$i][pp_word])."' target='_parent'><font color='#00285A'>{$list[$i][pp_word]}</font></a></p>";
}
} //for문으로 이루어진 전체루틴 종료(빼 먹지 말것)
?>
</td>

<td width='40'>
<?
for ($i=0; $i<count($list); $i++)
{
echo "<font color='#ef5d00'>{$list[$i][cnt]}</font>  <br>";//검색 카운트 출력
} //for문으로 이루어진 전체루틴 종료(빼 먹지 말것)
?>
</td>
<td width='1' background="<?=$popular_skin_path?>/line.gif"></td>
</tr>
<tr>
<td colspan="4"><img width='210' height='5' src="<?=$popular_skin_path?>/bottom.gif" border='0'></td>
</tr>
</table>
<?
for ($i=0; $i<count($list); $i++)
{
$list[$i][pp_word] = conv_subject($list[$i][pp_word], 글자길이);//요 줄을 넣어보세요...
혹시 몰라서 립에 있는 popular.lib 소스도 올릴께요..

<?
if (!defined('_GNUBOARD_')) exit;

// 인기검색어 출력
// $skin_dir : 스킨 디렉토리
// $pop_cnt : 검색어 몇개
// $date_cnt : 몇일 동안
function popular($skin_dir='basic', $pop_cnt=7, $date_cnt=3)
{
global $config, $g4;

if (!$skin_dir) $skin_dir = 'basic';

# 관리자 페이지 필터링 필드를 활용해서 민망한 검색어를 제외하자!
$str_exit = explode(",", $config[cf_filter]);
for ($i=0; $i<count($str_exit); $i++)
{
$str_item = $str_exit[$i];
}

$date_gap = date("Y-m-d", $g4[server_time] - ($date_cnt * 86400));
$sql = " select pp_word, count(*) as cnt from $g4[popular_table]
where pp_word <> '$str_item' and pp_date between '$date_gap' and '$g4[time_ymd]'
group by pp_word
order by cnt desc, pp_word
limit 0, $pop_cnt ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = $row;
// 스크립트등의 실행금지
$list[$i][pp_word] = get_text($list[$i][pp_word]);
}

ob_start();
$popular_skin_path = "$g4[path]/skin/popular/$skin_dir";
include ("$popular_skin_path/popular.skin.php");
$content = ob_get_contents();
ob_end_clean();

return $content;
}
?>
답변 감사드립니다..

아..추가 했는데 아무 변화가 없네요..ㅠ.ㅠ

암튼 좋은 하루 되세요..^^
$list[$i][pp_word] = cut_str($list[$i][pp_word], 3,'');//???????????
너무 소중한 답변 감사드립니다..

덕분에 문제는 아주 잘 해결 되었네요..^^

좋은 하루 되세요..^^
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
19년 전 조회 1,582
19년 전 조회 1,684
19년 전 조회 2,350
19년 전 조회 1,607
19년 전 조회 1,543
19년 전 조회 1,932
19년 전 조회 1,636
19년 전 조회 1,637
19년 전 조회 1,546
19년 전 조회 2,221
19년 전 조회 1,610
19년 전 조회 1,638
19년 전 조회 1,540
19년 전 조회 1,601
19년 전 조회 1,601
19년 전 조회 1,574
19년 전 조회 1,555
19년 전 조회 1,556
19년 전 조회 1,626
19년 전 조회 1,544