최근게시물에 출력되는 HTML태그 없애는법좀 알려주세요~! > 그누4 질문답변

그누4 질문답변

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

최근게시물에 출력되는 HTML태그 없애는법좀 알려주세요~! 정보

최근게시물에 출력되는 HTML태그 없애는법좀 알려주세요~!

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : www.soj.co.nz

게시물을 html써서 작성하면 최근게시물 뽑아질때 HTML태그도 같이 나오는데 없애는 법을 알려주시면 감사하겠습니다 ^_^

사용하는 최근게시물 스킨 코드는 다음과 같습니다:

<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<?
for ($i=0; $i<count($list); $i++)
{
    $title = get_text($list[$i][wr_subject]);
    $content = cut_str(get_text($list[$i][wr_content]), 210, "");

    // 태그 웹표준으로 변경
    $content = str_replace("<P>", "", $content);
    $content = str_replace("</P>", "", $content);
    $content = str_replace("<BR>", "", $content);


    $img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
    if (!file_exists($img) || !$list[$i][file][0][file])
        $img = "$latest_skin_path/img/no_image.gif";
    $href = "$g4[bbs_path]/board.php?bo_table=$bo_table&amp;wr_id={$list[$i][wr_id]}";

    $upday = cut_str($list[$i][wr_datetime], 10, "");
    $tmp = explode("-", $upday);
    $upday = $tmp[0]."년 ".$tmp[1]."월 ".$tmp[2]."일";

    echo " <table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td><a href='$href' class='headlink'>{$list[$i][subject]}</a></td>
</tr>
<tr>
<td class='headtext'>$content... <span class='date'>(<a href='$href' class='link'>자세히 보기</a>)</span></td>
</tr>
<tr>
<td height=20></td>
</tr>
</table>

    ";

}
?>

<? if (count($list) == 0) { ?>
<div>게시물이 없습니다.</div>
<? } ?>

감사합니다~! ^-^
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로