검색어에 지정된 배경색이 안보이는 건 버그인가요 ? 정보
검색어에 지정된 배경색이 안보이는 건 버그인가요 ?
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
lib/common.lib.php 에 search_font 함수가 선언된 곳이 있습니다.
관리자모드에서 검색글색지정 배경지정을 해 놓으면 검색시에 글의색과 배경색이 보여집니다.
문제는 제목에만 보여진다는 것입니다.
아래 처럼 검색어에 태그가 붙습니다.
<span style='background-color:YELLOW; color:RED;'>검색어</span>
그러나, 어떤 이유에서인지는 모르나 글 내용에서는 붙지 않습니다.
글자자르기 때문일지도 몰라 테스트 해 보았으나 역시 마찬가지입니다.
내용검색을 해도 마찬가지로 <span style='background-color:YELLOW; color:RED;'>검색어</span> 가 찍히지 않습니다.
bbs/search.php 아래
// 비밀글은 검색 불가
if (strstr($row[wr_option].$row2[wr_option], "secret"))
$row[wr_content] = "[비밀글 입니다.]";
$subject = get_text($row[wr_subject]);
if (strstr($sfl, "wr_subject"))
$subject = search_font($stx, $subject);
if ($read_level[$idx] <= $member[mb_level])
{
$row[wr_content]= strip_tags($row[wr_content]); ////추가
//$content = cut_str(get_text($row[wr_content]),300,"…");
$content = cut_str(conv_content($row[wr_content],2),300,"…");//수정
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
}
else
$content = '';
skin/search/basic/search.skin.php 아래
echo strip_tags( $list[$idx][$i][content] );
//strip_tags 가 문제를 일으키는 것 같아 보입니다만.....
오류 주소 :
lib/common.lib.php 에 search_font 함수가 선언된 곳이 있습니다.
관리자모드에서 검색글색지정 배경지정을 해 놓으면 검색시에 글의색과 배경색이 보여집니다.
문제는 제목에만 보여진다는 것입니다.
아래 처럼 검색어에 태그가 붙습니다.
<span style='background-color:YELLOW; color:RED;'>검색어</span>
그러나, 어떤 이유에서인지는 모르나 글 내용에서는 붙지 않습니다.
글자자르기 때문일지도 몰라 테스트 해 보았으나 역시 마찬가지입니다.
내용검색을 해도 마찬가지로 <span style='background-color:YELLOW; color:RED;'>검색어</span> 가 찍히지 않습니다.
bbs/search.php 아래
// 비밀글은 검색 불가
if (strstr($row[wr_option].$row2[wr_option], "secret"))
$row[wr_content] = "[비밀글 입니다.]";
$subject = get_text($row[wr_subject]);
if (strstr($sfl, "wr_subject"))
$subject = search_font($stx, $subject);
if ($read_level[$idx] <= $member[mb_level])
{
$row[wr_content]= strip_tags($row[wr_content]); ////추가
//$content = cut_str(get_text($row[wr_content]),300,"…");
$content = cut_str(conv_content($row[wr_content],2),300,"…");//수정
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
}
else
$content = '';
skin/search/basic/search.skin.php 아래
echo strip_tags( $list[$idx][$i][content] );
//strip_tags 가 문제를 일으키는 것 같아 보입니다만.....
댓글 전체

$row[wr_content]= strip_tags($row[wr_content]); ////추가
이부분에 문제가 있거나
$content = cut_str(conv_content($row[wr_content],2),300,"…");//수정
문제가 있는걸로 보여집니다.
이부분에 문제가 있거나
$content = cut_str(conv_content($row[wr_content],2),300,"…");//수정
문제가 있는걸로 보여집니다.

태그가 검색 후에 뿌려지는 문제가 있어서 어떤 분의 도움으로 태그가 노출 안되게 바꾸었습니다.
즉,
$content = cut_str(get_text($row[wr_content]),300,"…");
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
이렇게 변경
$row[wr_content]= strip_tags($row[wr_content]); ////추가
//$content = cut_str(get_text($row[wr_content]),300,"…");
$content = cut_str(conv_content($row[wr_content],2),300,"…");//수정
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
되었습니다.
즉,
$content = cut_str(get_text($row[wr_content]),300,"…");
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
이렇게 변경
$row[wr_content]= strip_tags($row[wr_content]); ////추가
//$content = cut_str(get_text($row[wr_content]),300,"…");
$content = cut_str(conv_content($row[wr_content],2),300,"…");//수정
if (strstr($sfl, "wr_content"))
$content = search_font($stx, $content);
되었습니다.