최신게시물이 이상해요.. 자꾸 <br> 이런게 나와요. 정보
최신게시물이 이상해요.. 자꾸 <br> 이런게 나와요.본문
댓글 전체
get_text($content) ~ 또는,
get_text($wr_content) ~ 또는,
get_text($wr_content) ~ 또는,
어디다가 넣어야되는건가요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$thumb_w = "100"; // 가로
$thumb_h = "75"; // 세로
$thumb_c = "180"; // 내용 글자수
$thumb_q = "100"; // 퀼리티
$data_path = $g4['path']."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'.$thumb_w.'x'.$thumb_h;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<? for ($i=0; $i<count($list); $i++) {
{
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i]['file']['0']['path'] .'/'. $list[$i]['file']['0']['file'];
if (preg_match("/\.(jp['e']?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size['2'] == 1)
$src = imagecreatefromgif($file);
else if ($size['2'] == 2)
$src = imagecreatefromjpeg($file);
else if ($size['2'] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_w / $size['0'];
$height = (int)($size['1'] * $rate);
if ($height < $thumb_h)
$dst = imagecreatetruecolor($thumb_w, $height);
else
$dst = imagecreatetruecolor($thumb_w, $thumb_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_w, $height, $size['0'], $size['1']);
imagepng($dst, $thumb_path.'/'.$list[$i]['wr_id'], $thumb_q);
chmod($thumb_path.'/'.$list[$i]['wr_id'], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str(get_text($list[$i][wr_content]),$thumb_c)."</span>";
}
?>
<? if ($i==i) { ?>
<table width="100%" height="85" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style='word-break:break-all;' valign="top" align="left">
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='<?=$list[$i][href]?>'><?=$img?></a></div></td>
<td></td>
<td valign='top'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><strong><?=$subject?></strong></a><?=$comment_cnt?> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><?=$wr_content?> <font color='#999999'><<?=$list[$i][datetime]?>></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
<? if ($i==1) { ?>
<table width="100%" height="85" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style='word-break:break-all;' valign="top" align="left">
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='<?=$list[$i][href]?>'><?=$img?></a></div></td>
<td></td>
<td valign='top'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><strong><?=$subject?></strong></a><?=$comment_cnt?> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><?=$wr_content?> <font color='#999999'><<?=$list[$i][datetime]?>></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
<? if ($i==2) { ?>
<table width="100%" height="91" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style='word-break:break-all;' valign="top" align="left">
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='<?=$list[$i][href]?>'><?=$img?></a></div></td>
<td></td>
<td valign='top'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><strong><?=$subject?></strong></a><?=$comment_cnt?> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><?=$wr_content?> <font color='#999999'><<?=$list[$i][datetime]?>></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td background="<?=$latest_skin_path?>/img/btn_line_bg.gif" width="100%" height="1"></td></tr>
<tr><td height="5"></td></tr>
</table>
<? } ?>
<? if ($i<3) { ?>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="20" align="center" valign="middle"><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td style='word-break:break-all;'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
?>
</td>
<td align=right><font style=font-size:8pt; color=#999999>[<?=$list[$i][datetime]?>]</font></td>
<td width=15></td>
</tr>
</table>
<? } ?>
<? } ?>
</td></tr></table>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$thumb_w = "100"; // 가로
$thumb_h = "75"; // 세로
$thumb_c = "180"; // 내용 글자수
$thumb_q = "100"; // 퀼리티
$data_path = $g4['path']."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb'.$thumb_w.'x'.$thumb_h;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<? for ($i=0; $i<count($list); $i++) {
{
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i]['file']['0']['path'] .'/'. $list[$i]['file']['0']['file'];
if (preg_match("/\.(jp['e']?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size['2'] == 1)
$src = imagecreatefromgif($file);
else if ($size['2'] == 2)
$src = imagecreatefromjpeg($file);
else if ($size['2'] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $thumb_w / $size['0'];
$height = (int)($size['1'] * $rate);
if ($height < $thumb_h)
$dst = imagecreatetruecolor($thumb_w, $height);
else
$dst = imagecreatetruecolor($thumb_w, $thumb_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $thumb_w, $height, $size['0'], $size['1']);
imagepng($dst, $thumb_path.'/'.$list[$i]['wr_id'], $thumb_q);
chmod($thumb_path.'/'.$list[$i]['wr_id'], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$subject = "<span $style>".cut_str($list[$i][subject],1000)."</span>";
$wr_content = "<span $style>".cut_str(get_text($list[$i][wr_content]),$thumb_c)."</span>";
}
?>
<? if ($i==i) { ?>
<table width="100%" height="85" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style='word-break:break-all;' valign="top" align="left">
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='<?=$list[$i][href]?>'><?=$img?></a></div></td>
<td></td>
<td valign='top'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><strong><?=$subject?></strong></a><?=$comment_cnt?> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><?=$wr_content?> <font color='#999999'><<?=$list[$i][datetime]?>></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
<? if ($i==1) { ?>
<table width="100%" height="85" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style='word-break:break-all;' valign="top" align="left">
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='<?=$list[$i][href]?>'><?=$img?></a></div></td>
<td></td>
<td valign='top'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><strong><?=$subject?></strong></a><?=$comment_cnt?> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><?=$wr_content?> <font color='#999999'><<?=$list[$i][datetime]?>></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
<? if ($i==2) { ?>
<table width="100%" height="91" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style='word-break:break-all;' valign="top" align="left">
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td width='100' height='75' align=center><div style='width:100px; height:75px; position: relative; overflow:hidden;' align=center><a href='<?=$list[$i][href]?>'><?=$img?></a></div></td>
<td></td>
<td valign='top'>
<table cellspacing='0' cellpadding='0' border='0'>
<tr>
<td height='20' style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><strong><?=$subject?></strong></a><?=$comment_cnt?> <?=$list[$i][icon_new]?></td>
</tr>
<tr>
<td style='padding:0 10' valign='top'><a href='<?=$list[$i][href]?>'><?=$wr_content?> <font color='#999999'><<?=$list[$i][datetime]?>></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td background="<?=$latest_skin_path?>/img/btn_line_bg.gif" width="100%" height="1"></td></tr>
<tr><td height="5"></td></tr>
</table>
<? } ?>
<? if ($i<3) { ?>
<? } else { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="20" align="center" valign="middle"><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td style='word-break:break-all;'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
?>
</td>
<td align=right><font style=font-size:8pt; color=#999999>[<?=$list[$i][datetime]?>]</font></td>
<td width=15></td>
</tr>
</table>
<? } ?>
<? } ?>
</td></tr></table>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
파일을 올렸습니다.. 나스카님 감사합니다.. 확인점 해주세요..ㅠㅠ 최근글 스킨 입니다.
코멘트로 등록한 소스코드에서,
$wr_content = "<span $style>".cut_str(get_text($list[$i][wr_content]),$thumb_c)."</span>";
~ 상단과 같은 구문을 체크해 보셔야 할 것 같습니다.
아울러 문서 기입형태가 단순히 게시물 작성시 html옵션을 체크한 경우인지,
아니면 외부 또는 특정 웹문서의 html소스코드를 그대로 붙여넣기 한 경우인지도 고려되어야 합니다.
아울러 그누보드의 특정 버전 이상/이하에서는 $wr_content부분을 끌어오는 방식도 다릅니다.
즉, 상단에 기재한 소스코드를 다음과 같은 형태로도 변경해 보십시오.
$wr_content = "<span $style>".cut_str(get_text($list[$i][content]),$thumb_c)."</span>";
코멘트로 등록된 소스코드 자체로는 질문과 같은 문제는 드러나지 않습니다만,
이전에 그누보드 버전에 따라서 $list[$i][wr_content]와 $list[$i][content]의
웹페이지 출력형태가 다르던(소스코드의 출력) 버전이 있습니다.
물론 현재도 그 가능성은 여전히 남아 있습니다만...
$wr_content = "<span $style>".cut_str(get_text($list[$i][wr_content]),$thumb_c)."</span>";
~ 상단과 같은 구문을 체크해 보셔야 할 것 같습니다.
아울러 문서 기입형태가 단순히 게시물 작성시 html옵션을 체크한 경우인지,
아니면 외부 또는 특정 웹문서의 html소스코드를 그대로 붙여넣기 한 경우인지도 고려되어야 합니다.
아울러 그누보드의 특정 버전 이상/이하에서는 $wr_content부분을 끌어오는 방식도 다릅니다.
즉, 상단에 기재한 소스코드를 다음과 같은 형태로도 변경해 보십시오.
$wr_content = "<span $style>".cut_str(get_text($list[$i][content]),$thumb_c)."</span>";
코멘트로 등록된 소스코드 자체로는 질문과 같은 문제는 드러나지 않습니다만,
이전에 그누보드 버전에 따라서 $list[$i][wr_content]와 $list[$i][content]의
웹페이지 출력형태가 다르던(소스코드의 출력) 버전이 있습니다.
물론 현재도 그 가능성은 여전히 남아 있습니다만...
4.21.02버전에 적용되는 결과,
원본의 소스코드는 출력에 문제가 없습니다.
태그를 벗겨버리는 오달수님께서 답변해 주신 내용으로 적용하시면 될 것 같습니다.
원본의 소스코드는 출력에 문제가 없습니다.
태그를 벗겨버리는 오달수님께서 답변해 주신 내용으로 적용하시면 될 것 같습니다.