최신글 게시판내용 추출시 길이 문의합니다. 정보
최신글 게시판내용 추출시 길이 문의합니다.본문
<?
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줘서 강제로 안보이게 해놨는데 잘안되네요...
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줘서 강제로 안보이게 해놨는데 잘안되네요...
댓글 전체
/lib/common.lib.php 에 보시면 cut_str이라는 함수 있습니다.
이걸 활용하시면...
이걸 활용하시면...