최신글 내용 글자수 고정 정보
최신글 내용 글자수 고정본문
최신글 스킨인데요.
<?=nl2br(stripslashes($list[$i][wr_content]))?>
이부분이 내용이 출력 되는거죠? 근데 내용이 전부 다 나오네요.
내용이 길어지면 최신글 테이블도 쭉~ 늘어나요;;
몇자로 줄이는거 있죠 ...으로 보이고 싶은데 어떻게 하면 되죠?
<?=nl2br(stripslashes($list[$i][wr_content],20))?> <- 이렇게 하면 되나요? 안되는데 OTL
아래는 소스의 일부..
------------------------------------------------------------------------------------------------------------------------------
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF" valign="top">
<? for ($i=0; $i<count($list); $i++) {
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 75);
$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/noimage.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
?>
<table background="<?=$img?>" width="100%" border="0" cellspacing="0" cellpadding="0" height="180">
<tr>
<td align="right" valign="bottom">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="filter:alpha(opacity=40)"><a href='<?=$list[$i]['href']?>'><?=nl2br(stripslashes($list[$i][wr_content]))?></a></td>
<td width="30"></td>
</tr>
</table>
</td>
</tr>
<tr>
<?=nl2br(stripslashes($list[$i][wr_content]))?>
이부분이 내용이 출력 되는거죠? 근데 내용이 전부 다 나오네요.
내용이 길어지면 최신글 테이블도 쭉~ 늘어나요;;
몇자로 줄이는거 있죠 ...으로 보이고 싶은데 어떻게 하면 되죠?
<?=nl2br(stripslashes($list[$i][wr_content],20))?> <- 이렇게 하면 되나요? 안되는데 OTL
아래는 소스의 일부..
------------------------------------------------------------------------------------------------------------------------------
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF" valign="top">
<? for ($i=0; $i<count($list); $i++) {
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 75);
$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/noimage.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
?>
<table background="<?=$img?>" width="100%" border="0" cellspacing="0" cellpadding="0" height="180">
<tr>
<td align="right" valign="bottom">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="filter:alpha(opacity=40)"><a href='<?=$list[$i]['href']?>'><?=nl2br(stripslashes($list[$i][wr_content]))?></a></td>
<td width="30"></td>
</tr>
</table>
</td>
</tr>
<tr>
댓글 전체
최신글을 불러오는 곳에서 글자수를 20으로 지정하면 안되나요?
<?=latest("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수)?>
<?=latest("스킨디렉토리", "게시판 아이디", 출력라인수, 제목글자수)?>
이미지 위에 내용과 제목이 보이는데
내용의 글자수를 제한 하고 싶습니다.
내용의 글자수를 제한 하고 싶습니다.
아~ 내용을 말하는거였군요^^;;
latest.skin.php에 68줄쯤..
$content = cut_str(get_text($list[$i][wr_content]), 75);
이 75 를 20으로 수정합니다....
그다음 <?=nl2br(stripslashes($list[$i][wr_content]))?> 이 부분을
<?=nl2br(stripslashes($content))?> 이렇게 고치면 되네요..
latest.skin.php에 68줄쯤..
$content = cut_str(get_text($list[$i][wr_content]), 75);
이 75 를 20으로 수정합니다....
그다음 <?=nl2br(stripslashes($list[$i][wr_content]))?> 이 부분을
<?=nl2br(stripslashes($content))?> 이렇게 고치면 되네요..
너무너무 감사합니다 ^^
그런데, 그렇게 하니깐 되긴 하는데요.
내용의 <br>태그까지 다 나오네요.
왜그럴까요? ;; 일단 답변하실때까지 열심히 알아 보고 있겠습니다. ㄳㄳ
그런데, 그렇게 하니깐 되긴 하는데요.
내용의 <br>태그까지 다 나오네요.
왜그럴까요? ;; 일단 답변하실때까지 열심히 알아 보고 있겠습니다. ㄳㄳ
그니깐 태그가 안먹히고 내용만 고스라니 출력되네요. orz
● $content = cut_str(get_text($list[$i][wr_content]), 20);
└> $content = cut_str(stripslashes($list[$i][wr_content]), 20);
아 ㄳㄳ 됐어요~ 위에 처럼 get_text -> stripslashes 하니깐 되네요~
되긴 됐는데 맞나요? 제대로 한건가요?
get_text 이게 뭐고 stripslashes 이건 뭐죠?
어쨌든 너무 감사드립니다~
하시는 일 모두 다 잘~ 되시고 항상 행복하세요~ ^^
└> $content = cut_str(stripslashes($list[$i][wr_content]), 20);
아 ㄳㄳ 됐어요~ 위에 처럼 get_text -> stripslashes 하니깐 되네요~
되긴 됐는데 맞나요? 제대로 한건가요?
get_text 이게 뭐고 stripslashes 이건 뭐죠?
어쨌든 너무 감사드립니다~
하시는 일 모두 다 잘~ 되시고 항상 행복하세요~ ^^