cheditor게시판 본문글, 최근글에서 html제거하고 출력하기 정보
cheditor게시판 본문글, 최근글에서 html제거하고 출력하기본문
cheditor게시판스킨을 썼을때 본문글을 최근글로 뽑으니까 html소스까지 그대로 나오더군요.
strip_tags 를 써도 마찬가지더군요.
인터넷에서 검색하고 알아낸 소스인데 제 경우에는 됐습니다.
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),109);
echo $wr_content;
첫번째줄 소스는 <에서 >로 끝나는 모든 구문을 공백으로 바꾸는 거죠. 해서 본문에 <한글> 이런 것도 없애버립니다.-_-;;
두번째줄은 보시다시피 그렇게 압축한 글의 길이를 정해주는 소스입니다. 109가 글자수죠.
참고로 제가 쓰고 있는 최근글 소스까지 올립니다. 파일첨부한 이미지까지 출력하는 최근글 스킨입니다.
요즘 div에 맛을 들여서 그걸로만 작업하는 중입니다.;;;
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<? for ($i=0; $i<count($list); $i++) {
echo "<div style='padding:2 0 2 0'>";
echo "<font style=color:998877;font-size:8pt;>".$list[$i][datetime2]."</font> ";
echo "<a href='{$list[$i]['href']}' style=color:#666666;font-size:13px;>";
echo "<b>{$list[$i]['subject']}</b>";
echo "</a> ";
echo $list[$i]['icon_new'];
if ($list[$i]['comment_cnt']) {
echo " <span style='font-size:7pt;color:tomato;'>{$list[$i][comment_cnt]}</span>"; }
echo "</div>";
echo "<div style='color:#666666;padding:0 0 0 0;float:left;width:130px;'>";
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),109);
echo $wr_content;
echo "</div>";
echo "<div style='padding:0 0 0 0;float:right;width:150px;'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
echo "<img src='$g4[path]/data/file/$bo_table/$image' width='150' border='0'>";
} else {
echo "";
}
echo "</div>";
echo "<div style='clear:both;height:5px;'></div>";
} ?>
<? if (count($list) == 0) { ?><div style='width:100px;padding:15 0 15 0;text-align:center;color:#6A6A6A;'>게시물이 없습니다.</div><? } ?>
strip_tags 를 써도 마찬가지더군요.
인터넷에서 검색하고 알아낸 소스인데 제 경우에는 됐습니다.
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),109);
echo $wr_content;
첫번째줄 소스는 <에서 >로 끝나는 모든 구문을 공백으로 바꾸는 거죠. 해서 본문에 <한글> 이런 것도 없애버립니다.-_-;;
두번째줄은 보시다시피 그렇게 압축한 글의 길이를 정해주는 소스입니다. 109가 글자수죠.
참고로 제가 쓰고 있는 최근글 소스까지 올립니다. 파일첨부한 이미지까지 출력하는 최근글 스킨입니다.
요즘 div에 맛을 들여서 그걸로만 작업하는 중입니다.;;;
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<? for ($i=0; $i<count($list); $i++) {
echo "<div style='padding:2 0 2 0'>";
echo "<font style=color:998877;font-size:8pt;>".$list[$i][datetime2]."</font> ";
echo "<a href='{$list[$i]['href']}' style=color:#666666;font-size:13px;>";
echo "<b>{$list[$i]['subject']}</b>";
echo "</a> ";
echo $list[$i]['icon_new'];
if ($list[$i]['comment_cnt']) {
echo " <span style='font-size:7pt;color:tomato;'>{$list[$i][comment_cnt]}</span>"; }
echo "</div>";
echo "<div style='color:#666666;padding:0 0 0 0;float:left;width:130px;'>";
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),109);
echo $wr_content;
echo "</div>";
echo "<div style='padding:0 0 0 0;float:right;width:150px;'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
echo "<img src='$g4[path]/data/file/$bo_table/$image' width='150' border='0'>";
} else {
echo "";
}
echo "</div>";
echo "<div style='clear:both;height:5px;'></div>";
} ?>
<? if (count($list) == 0) { ?><div style='width:100px;padding:15 0 15 0;text-align:center;color:#6A6A6A;'>게시물이 없습니다.</div><? } ?>
추천
1
1
댓글 16개
감사합니다.^^
cheditor사용시 좋은 참고자료가 될것 같습니다.
멋진 하루되시길..
cheditor사용시 좋은 참고자료가 될것 같습니다.
멋진 하루되시길..

저도 그문제 때문에 스킨을 수정해서 사용했거든요. 감사합니다.

찾던 자료 입니다 감사히 쓰겠습니다

아래소스에서요
타이틀에 커서을 갖다 놓으면 본문 내용이 나오는데
말씀하신 대로 html을 뺴고 나오게 하려구 응용을 했는데 안되요 ㅡ,.ㅡ
도와주세요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width='500' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td colspan=2 style=padding-bottom:3px;>
<img src=<?=$latest_skin_path?>/img/top_bar.gif><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()' onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('more2','','<?=$g4['path']?>/images/top_bar2_up.GIF',1)"><img src=<?=$latest_skin_path?>/img/top_bar2.gif name="more2" border="0" ></a>
</td>
</tr>
<?
$cols = 2; // 가로 셀 수
$image_h = 2; // 상하 간격
for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td style=padding:5px; align="center">
<?{
//섬네일 관련 설정
$thumb1_width=120;//섬네일 최대폭
$thumb1_height=100;//섬네일 최대높이
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
if(!is_file('$g4[path]/data/file/$bo_table/thumb_$image')){
include_once "$g4[path]/thumbEngine/dq_thumb_engine2.php";
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg="$g4[path]/data/file/$bo_table/thumb_" . $image;
make_thumb($thumb1_width,$thumb1_height,$thumbsource,$thumbimg);
chmod($thumbimg, 0606);
}
}
$image_file = "thumb_".$image;
$image_url = "$g4[path]/data/file/$bo_table";
$wr_content = cut_str(strip_tags($list[$i][wr_content]), 38, '...');//본문 글 줄이는 함수
if (!file_exists($image_url) || !$list[$i][file][0][file]){
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
else {
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top width=57 height=57><a href='{$list[$i][href]}'><img src='$image_url/$image_file' width='88' height='65' border='0' align='absmiddle' title='{$list[$i][wr_subject]}'></a></td>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'><img src="http://222.231.1.41/~sjabcua/skin/latest/ttbasic_l/img/icon_title.gif" border=0><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
}
?>
</td>
<? if (count($list) == 0) { ?>게시물이 없습니다.<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td></td>";
} }
?>
</table>
타이틀에 커서을 갖다 놓으면 본문 내용이 나오는데
말씀하신 대로 html을 뺴고 나오게 하려구 응용을 했는데 안되요 ㅡ,.ㅡ
도와주세요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width='500' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td colspan=2 style=padding-bottom:3px;>
<img src=<?=$latest_skin_path?>/img/top_bar.gif><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()' onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('more2','','<?=$g4['path']?>/images/top_bar2_up.GIF',1)"><img src=<?=$latest_skin_path?>/img/top_bar2.gif name="more2" border="0" ></a>
</td>
</tr>
<?
$cols = 2; // 가로 셀 수
$image_h = 2; // 상하 간격
for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td style=padding:5px; align="center">
<?{
//섬네일 관련 설정
$thumb1_width=120;//섬네일 최대폭
$thumb1_height=100;//섬네일 최대높이
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
if(!is_file('$g4[path]/data/file/$bo_table/thumb_$image')){
include_once "$g4[path]/thumbEngine/dq_thumb_engine2.php";
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg="$g4[path]/data/file/$bo_table/thumb_" . $image;
make_thumb($thumb1_width,$thumb1_height,$thumbsource,$thumbimg);
chmod($thumbimg, 0606);
}
}
$image_file = "thumb_".$image;
$image_url = "$g4[path]/data/file/$bo_table";
$wr_content = cut_str(strip_tags($list[$i][wr_content]), 38, '...');//본문 글 줄이는 함수
if (!file_exists($image_url) || !$list[$i][file][0][file]){
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
else {
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top width=57 height=57><a href='{$list[$i][href]}'><img src='$image_url/$image_file' width='88' height='65' border='0' align='absmiddle' title='{$list[$i][wr_subject]}'></a></td>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'><img src="http://222.231.1.41/~sjabcua/skin/latest/ttbasic_l/img/icon_title.gif" border=0><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
}
?>
</td>
<? if (count($list) == 0) { ?>게시물이 없습니다.<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td></td>";
} }
?>
</table>
$wr_content = cut_str(strip_tags($list[$i][wr_content]), 38, '...');//본문 글 줄이는 함수
위 소스를
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),38);
echo $wr_content;
이렇게 해보세요. 제가 올린 팁이 바로 strip_tags 대신 쓰는 팁이었는데...^^;
위 소스를
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),38);
echo $wr_content;
이렇게 해보세요. 제가 올린 팁이 바로 strip_tags 대신 쓰는 팁이었는데...^^;

아래에 보시면
제목 타이틀 부분에 마우스 커서을 올리면 자동으로 그 내용이 보이거든요
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'>
물론 지구인님 말씀대로 당근 본문 내용은 잘나오구요^^
제목에 마우스 커서을 올려놓으면 나오는 미리보기화면에서 html코드가 보인다는 말씀
참고사이트 입니다
http://222.231.1.41/~sjabcua/index_mainxxx.php
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),38);
echo $wr_content;
if (!file_exists($image_url) || !$list[$i][file][0][file]){
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
제목 타이틀 부분에 마우스 커서을 올리면 자동으로 그 내용이 보이거든요
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'>
물론 지구인님 말씀대로 당근 본문 내용은 잘나오구요^^
제목에 마우스 커서을 올려놓으면 나오는 미리보기화면에서 html코드가 보인다는 말씀
참고사이트 입니다
http://222.231.1.41/~sjabcua/index_mainxxx.php
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(get_text($wr_content),38);
echo $wr_content;
if (!file_exists($image_url) || !$list[$i][file][0][file]){
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
장담할 순 없지만 ;;
<a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'>
이걸
<a href='{$list[$i][href]}' title='{$wr_content}'>
이렇게 해보시죠?
저도 그 이상은..^^;;
<a href='{$list[$i][href]}' title='{$list[$i][wr_content]}'>
이걸
<a href='{$list[$i][href]}' title='{$wr_content}'>
이렇게 해보시죠?
저도 그 이상은..^^;;

지구인님 덕분에 해결했어요^^
타이틀 프리뷰는
$wr_content2 = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
따로 잡었어요^^
왜냐하면 본문 글 줄이는 함수와는 별도로 전체문장이 나와야 해서요^^
정말 감사합니다
아래 전문
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width='500' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td colspan=2 style=padding-bottom:3px;>
<img src=<?=$latest_skin_path?>/img/top_bar.gif><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()' onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('more2','','<?=$g4['path']?>/images/top_bar2_up.GIF',1)"><img src=<?=$latest_skin_path?>/img/top_bar2.gif name="more2" border="0" ></a>
</td>
</tr>
<?
$cols = 2; // 가로 셀 수
$image_h = 2; // 상하 간격
for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td style=padding:5px; align="center">
<?{
//섬네일 관련 설정
$thumb1_width=120;//섬네일 최대폭
$thumb1_height=100;//섬네일 최대높이
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
if(!is_file('$g4[path]/data/file/$bo_table/thumb_$image')){
include_once "$g4[path]/thumbEngine/dq_thumb_engine2.php";
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg="$g4[path]/data/file/$bo_table/thumb_" . $image;
make_thumb($thumb1_width,$thumb1_height,$thumbsource,$thumbimg);
chmod($thumbimg, 0606);
}
}
$image_file = "thumb_".$image;
$image_url = "$g4[path]/data/file/$bo_table";
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content2 = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(strip_tags($list[$i][wr_content]), 50, '...');//본문 글 줄이는 함수
if (!file_exists($image_url) || !$list[$i][file][0][file]){
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$wr_content2}'><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
else {
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top width=57 height=57><a href='{$list[$i][href]}'><img src='$image_url/$image_file' width='88' height='65' border='0' align='absmiddle' title='{$list[$i][wr_subject]}'></a></td>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$wr_content2}'><img src="http://222.231.1.41/~sjabcua/skin/latest/ttbasic_l/img/icon_title.gif" border=0><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
}
?>
</td>
<? if (count($list) == 0) { ?>게시물이 없습니다.<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td></td>";
} }
?>
</table>
타이틀 프리뷰는
$wr_content2 = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
따로 잡었어요^^
왜냐하면 본문 글 줄이는 함수와는 별도로 전체문장이 나와야 해서요^^
정말 감사합니다
아래 전문
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width='500' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td colspan=2 style=padding-bottom:3px;>
<img src=<?=$latest_skin_path?>/img/top_bar.gif><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()' onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('more2','','<?=$g4['path']?>/images/top_bar2_up.GIF',1)"><img src=<?=$latest_skin_path?>/img/top_bar2.gif name="more2" border="0" ></a>
</td>
</tr>
<?
$cols = 2; // 가로 셀 수
$image_h = 2; // 상하 간격
for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td style=padding:5px; align="center">
<?{
//섬네일 관련 설정
$thumb1_width=120;//섬네일 최대폭
$thumb1_height=100;//섬네일 최대높이
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
if(!is_file('$g4[path]/data/file/$bo_table/thumb_$image')){
include_once "$g4[path]/thumbEngine/dq_thumb_engine2.php";
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg="$g4[path]/data/file/$bo_table/thumb_" . $image;
make_thumb($thumb1_width,$thumb1_height,$thumbsource,$thumbimg);
chmod($thumbimg, 0606);
}
}
$image_file = "thumb_".$image;
$image_url = "$g4[path]/data/file/$bo_table";
$wr_content = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content2 = preg_replace("/<(.*?)\>/","",$list[$i][wr_content]);
$wr_content = cut_str(strip_tags($list[$i][wr_content]), 50, '...');//본문 글 줄이는 함수
if (!file_exists($image_url) || !$list[$i][file][0][file]){
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$wr_content2}'><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
else {
echo <<<HEREDOC
<table width=215 border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign=top width=57 height=57><a href='{$list[$i][href]}'><img src='$image_url/$image_file' width='88' height='65' border='0' align='absmiddle' title='{$list[$i][wr_subject]}'></a></td>
<td valign=top style=padding:5px; overflow:hidden;><a href='{$list[$i][href]}' title='{$wr_content2}'><img src="http://222.231.1.41/~sjabcua/skin/latest/ttbasic_l/img/icon_title.gif" border=0><font style='font-family:돋움; font-size:9pt; color:#003366;'><strong>{$list[$i]['subject']}</strong></font></a><br><font style='font-family:돋움; font-size:9pt; color:gray;'>{$wr_content}</font></td>
</tr>
</table>
HEREDOC;
}
}
?>
</td>
<? if (count($list) == 0) { ?>게시물이 없습니다.<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td></td>";
} }
?>
</table>
잘 되었네요, 축하드립니다^^

최근글 뽑기 스킨을 변경하시면 어렵지 않게 html 소스 제거하실 수 있으실듯 싶네요.
내용출력할 때
<?=$list[$i]['wr_content']?>
wr_content 를 출력하라고 하면 html 코드 적용된 최근글을 볼 수 있습니다.
내용출력할 때
<?=$list[$i]['wr_content']?>
wr_content 를 출력하라고 하면 html 코드 적용된 최근글을 볼 수 있습니다.

저도 cheditor을 쓰면서 메인에 글을 뽑아올때 문제가 되었었는데..
php의 strip_tags() 함수가 도움이 될지도 모르겠어요..
http://kr2.php.net/manual/kr/function.strip-tags.php
php의 strip_tags() 함수가 도움이 될지도 모르겠어요..
http://kr2.php.net/manual/kr/function.strip-tags.php
cheditor스킨의 본문글을 뽑아올 때 strip_tags() 이게 안 먹히더군요.^^;

$wr_content = preg_replace("/<(.*?)\>/","",$list[$idx][$i][content]);
$wr_content = preg_replace("/<(.*?)\>/","",$wr_content);
$wr_content = str_replace(";","",$wr_content);
$wr_content = str_replace(" "," ",$wr_content);
$wr_content = cut_str(get_text($wr_content),150);
"&l t" 와 "&g t" 로 표기되는 부분이 있어 줄였습니다. 그것만 줄이니 왜그리 ";" 이게 엄청 많이 생겨서..ㅋㅋ
근데 가 변환이 않되는군요.. 저것만 되면 딱인데..
$wr_content = preg_replace("/<(.*?)\>/","",$wr_content);
$wr_content = str_replace(";","",$wr_content);
$wr_content = str_replace(" "," ",$wr_content);
$wr_content = cut_str(get_text($wr_content),150);
"&l t" 와 "&g t" 로 표기되는 부분이 있어 줄였습니다. 그것만 줄이니 왜그리 ";" 이게 엄청 많이 생겨서..ㅋㅋ
근데 가 변환이 않되는군요.. 저것만 되면 딱인데..
$wr_content = str_replace(" "," ",$wr_content);
이걸
$wr_content = str_replace("/ /"," ",$wr_content);
이렇게 해보세요.
이걸
$wr_content = str_replace("/ /"," ",$wr_content);
이렇게 해보세요.
좋군요

좋은 소스 감사합니다.