최근게시글 리스트에서 글자수 제한하기
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]['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>";
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
최근게시글 스킨소스인데요.
글자수가 12자 이상이면 되면 "..."로 표현하고 싶은데요 어떻게 하는지를 모르겟습니다.
고수님들 도와주세요..
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 10개
$wr_subject = get_text(cut_str($list[$i][wr_subject], 12));
제가 왕 초보라서요...
$wr_subject = get_text(cut_str($list[$i][wr_subject], 20));
뒷부분의 숫자가 20으로 되어있을겁니다
그 숫자만 12로 수정하시면 됩니다.
$wr_subject = get_text(cut_str($list[$i][wr_subject], 12));
그리고 12자 이상이되면 뒤에 나오는 글자가 점 3개 "..."로 표현하고 싶어요...
위 링크의 new.skin.php 파일에 있습니다
최근게시물이란
http://www.sir.co.kr/bbs/board.php?bo_table=g4_dic&wr_id=30
최신글이란
http://www.sir.co.kr/bbs/board.php?bo_table=g4_dic&wr_id=29
최신글에서 글자수는...
최신글 스킨에서 {$list[$i]['subject']} 이부분을
다음 처럼 바꾸시면 됩니다.
{get_text(cut_str($list[$i]['subject'], 12))}
<? $subject = get_text(cut_str($list[$i]['subject'], 12)); ?>
넣어주시고
제목 부분을 {$subject} 로 변경해보세요
포인트 드릴게요 ^^