최신글스킨에서 html 부분을 없에고 싶습니다. > 그누3질답

그누3질답

최신글스킨에서 html 부분을 없에고 싶습니다. 정보

그누보드 최신글스킨에서 html 부분을 없에고 싶습니다.

본문

아래는 최신글스킨입니다.
링크된 곳의 스킨을 쬐금 고친 것인대요,
문제는 html부분도 그대로 적용되고 있습니다.
본문 보기에서는 html을 책크했지만, 이 최신글에서는 html부분이 정용안되고 다 빠지게 할 수는 없는가요?

<?
$image_height = 75; // 높이
$image_width  = 90; // 너비
?>

<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
    <td height=25 background="<?=$latest_skin?>/topline.gif">&nbsp;<img src='<?=$latest_skin?>/female_n.gif'>&nbsp;<a href='./?doc=bbs/gnuboard.php&bo_table=<?=$bo_table?>'><b><?=$bo_subject?></b></a> </td>
</tr>
<tr>
<td width="100%">
<table  width="100%" cellpadding="0" cellspacing="0" height="1"  style="margin-bottom:5;">
<tr>
<td height=1  bgcolor='#FFCC33'></td>
</tr>
</table>
</td>
</tr>
  <tr>
      <td>

<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0) { ?>
<? if (!file_exists($list[$i][file_image1])) { ?>

        <table cellpadding=0 cellspacing=0 border=0>
            <tr>
              <td valign="top">
      <table cellpadding=1 cellspacing=3 border=0>
    <tr>
    <td style="padding-left:3">
  <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],30,"..");?></b></span></a> <?=$list[$i][icon_new]?> &nbsp;<span style='font-size:11'><?=$list[$i][date]?></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span>
</td>
</tr>
<tr>
    <td>
  <div align="justify" style="margin-right:1; margin-left:1;"><?=cut_str($list[$i][wr_content],280,"…");?></div>
</td>
</tr>
  </table>
              </td>
          </tr>
        </table>

<? }else{ ?>

        <table cellpadding=0 cellspacing=0 border=0>
          <tr>
              <td valign="middle" ><p><img src='<?=$list[$i][file_image1]?>' width='<?=$image_width?>' height='<?=$image_height?>' border=1 align=left bordercolor='#0000'></p></td>
              <td valign="top">
      <table cellpadding=1 cellspacing=3 border=0>
    <tr>
    <td style="padding-left:3">
  <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=subject><b><?=cut_str($list[$i][subject],20,"..");?></b></span></a> <?=$list[$i][icon_new]?> &nbsp;<span style='font-size:11'><?=$list[$i][date]?></span> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span>
</td>
</tr>
<tr>
    <td>
  <div align="justify" style="margin-right:1; margin-left:1;"><?=cut_str($list[$i][wr_content],182,"…");?></div>
</td>
</tr>
  </table>
  </td>
          </tr>
        </table>
    </td>
 </tr>

<? } ?>

<tr>
<td>
<table width=100% cellpadding=0 cellspacing=0 border=0 style="margin-bottom:3;">
      <tr>
          <td width="100%" height="1" background='./<?=$latest_skin?>/line_width.gif'></td>
      </tr>
  </table>
</td>
</tr>

<? } else { ?>
 
<tr>
<td  height="17"  width="100%">
<table>
<tr>
<td height="17"  valign="middle">&nbsp; <img src='<?=$latest_skin?>/icon_li.gif'>&nbsp;&nbsp;  <a href='<?="./?doc=bbs/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><?=$list[$i][subject]?></a> <span style='font-size:8pt;'><?=$list[$i][commentcnt]?></span> <?=$list[$i][icon_new]?> &nbsp;  &nbsp;  <span style='font-size:11'><?=$list[$i][date]?></span>
</td>
</tr>
</table>
</td>
</tr>

<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=25>자료가 없습니다.</td></tr>"; } ?>

</table>

댓글 전체

카이루님 감사합니다.
죄송하지만 아래의 부분을 어디에 어떻게 넣어야 되는지도 가르쳐 주세요....

// 태그만 제거
String.prototype.stripTags = function () {
      var str = this;
      var pos1 = str.indexOf('<');

    if (pos1 == -1) return str;
    else {
        var pos2 = str.indexOf('>', pos1);
        if (pos2 == -1) return str;
        return (str.substr(0, pos1) + str.substr(pos2+1)).stripTags();
    }
}
다음을 참고하세요.

// HTML 특수문자를 변환
String.prototype.htmlChars = function () {
      var str = ((this.replace('"', '&amp;')).replace('"', '&quot;')).replace('\'', '&#39;');
      return (str.replace('<', '&lt;')).replace('>', '&gt;');
}

// 좌우 공백없애는 함수
String.prototype.trim = function () { return this.replace(/(^s*)|(s*$)/g, ""); }

// 왼쪽 공백없애는 함수
String.prototype.ltrim = function () { return this.replace(/^s*/g, ""); }

// 오른쪽 공백없애는 함수
String.prototype.rtrim = function () { return this.replace(/s*$/g, ""); }

// 태그만 제거
String.prototype.stripTags = function () {
      var str = this;
      var pos1 = str.indexOf('<');

    if (pos1 == -1) return str;
    else {
        var pos2 = str.indexOf('>', pos1);
        if (pos2 == -1) return str;
        return (str.substr(0, pos1) + str.substr(pos2+1)).stripTags();
    }
}

// 대소문자 구별하지 않고 단어 위치 찾기
String.prototype.ipos = function (needle, offset) {
      var offset = (typeof offset == "number")?offset:0;
      var pos1 = str.toLowerCase().indexOf(needle.toLowerCase(), offset);
      var pos2 = str.toUpperCase().indexOf(needle.toUpperCase(), offset);

      if (pos1 == -1 && pos2 == -1) return false;
      if (pos1 == -1) pos1 = str.length + 1;
      if (pos2 == -1) pos2 = str.length + 1;

      return Math.min(pos1, pos2);
}

// 대소문자 구별하지 않고 뒤에서부터 단어위치 찾기
String.prototype.ripos = function (needle, offset) {
      var offset = (typeof offset == "number")?offset:0;
      var pos1 = str.toLowerCase().lastIndexOf(needle.toLowerCase(), offset);
      var pos2 = str.toUpperCase().lastIndexOf(needle.toUpperCase(), offset);

      if (pos1 == -1 && pos2 == -1) return false;
      return Math.max(pos1, pos2);
}

// 문자열을 배열로
String.prototype.toArray = function () {
      var len = this.length;
      var arr = new Array;
      for (var i=0; i<len; i++) arr[i] = this.charAt(i);
      return arr;
}
전체 9,564
그누3질답 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT