최신글 게시판내용 추출시 길이 문의합니다.

· 2013-08-28 (수) 12:05:46 · 1251 · 1
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">



/* Common */
.latset_main_wrap {
width:240px;
}
.latest_main_title {
width:100%;
height:25px;
}
.font_title2 {
font-size:11px;
font-weight:bold;
color:#0e75bc;
}
</style>


<div class='latest_main_wrap'>
<!--
<div class='latest_main_title'>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><span class="font_title2"><?=$board[bo_subject]?></span></a>
</div>
-->


<? for ($i=0; $i<count($list); $i++) { ?>
<div style='float:left; font-size:13px; font-weight:bold; color:#3c3c3c; padding-top:1px; font-style:italic;'><?=$list[$i]['datetime']?></div>
<div style="float:left; width:480px; height:80px; margin-left:20px;">
<?
if($list[$i]['wr_content']) {
if($list[$i]['icon_reply']) echo $list[$i]['icon_reply'] . " ";

echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<font style='color:#2C88B9;'><strong>{$list[$i]['wr_content']}</strong></font>";
else
echo "<font style='color:#6A6A6A;'>{$list[$i]['wr_content']}</font>";
echo "</a>";

if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-size:11px; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";

//echo " " . $list[$i]['icon_new'];
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

} else {
echo "게시글이 없습니다.";
}
?>

</div>
<div style='clear:both; padding:3px;'></div>
<? } ?>
</div>

최신글 추출시 게시판 내용이 추출되고 있습니다.

추출시 게시판 내용 길이를 정해주고

글맨뒤에 ...을 나타나게 해주고 싶은데 어떻게 해야될까요?

현재는 div에 height줘서 강제로 안보이게 해놨는데 잘안되네요...
|

댓글 1개

/lib/common.lib.php 에 보시면 cut_str이라는 함수 있습니다.
이걸 활용하시면...
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-08-28 조회 1,446
13-08-28 조회 1,640
13-08-28 조회 1,119
13-08-28 조회 1,656
13-08-28 조회 1,626
13-08-28 조회 2,123
13-08-28 조회 952
13-08-28 조회 1,252
13-08-28 조회 924
13-08-28 조회 1,816
13-08-28 조회 921
13-08-28 조회 1,714
13-08-28 조회 2,183
13-08-28 조회 1,685
13-08-28 조회 1,922
13-08-27 조회 1,636
13-08-27 조회 1,020
13-08-27 조회 2,668
13-08-27 조회 1,707
13-08-27 조회 1,914