최신게시판 내용을 출력하고 싶습니다! 부탁드려요 ^^; > 그누4 질문답변

그누4 질문답변

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

최신게시판 내용을 출력하고 싶습니다! 부탁드려요 ^^; 정보

최신게시판 내용을 출력하고 싶습니다! 부탁드려요 ^^;

본문

베이직으로 라테스트에서 메인에 이미지 뽑아보려고 시작중에 디자인 변경하다보니 여기까지;;

내용출력은 고수님들이 제시해주는 소르를 다적용해본것 같은대 계속 안나오네요;;;

또다른 스킨에서는 내용이 출력이되는대 이미지가 안나오는 ;;

내용출력되는 소스 부탁드려요~


<?=cut_str( get_text($list[$i]['wr_content'],1), 120, "...")?>

<?=$list[$i][content]?>

<?=cut_str($list[$i][content], 50, '..')?>


   
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>" . $view[file][$i][content] . "<p>";

}
?>




다적용 해봣는대 안대요

내용 출력하는 소스로 <?=$view[content];?> 요렇게 부탁해요 이프문은보기만했어요;
부탁드려요

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$img_width = 68;
$img_height = 68;
$img_quality = 100;

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_ch';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);

?>


<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td  style="padding-left:5px;" height="24" valign="top"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="images/tit_news.gif" /></a></td>
    <td width="35"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' style="text-decoration:none;"><span style="padding-top:9px; font:12px '돋음'; color:#212121;">more</span></a></td>
</tr>
</table>
<table width="63" cellspacing="0" cellpadding="0">
  <tr>
    <td width="63" height="2"bgcolor="#7f7f7f"></td>
  </tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" height="1"bgcolor="#7f7f7f"></td>
  </tr>
  <tr>
  <td width="100%" height="9"></td>
  </tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 >
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td >
        <table width=100%>
        <tr>
          <td width="100%">
                 
<div style="float:left; width:68px; height:68px;">



<? for ($i=0; $i<count($list); $i++) {
$j = $i + 1; 
if ($j == "1") {
echo ""; }
?>
<?
//썸네일 생성
$thumfile = "";
    $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
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);


            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        } else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$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
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}' border='0'></a>";
else
//이미지가 없으면
$thumfile="";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
 
  cut_str($str, $len, $suffix="…")
 
?><a href='<?=$list[$i][href]?>'><?=$thumfile?></a>

<? } ?>

</div>


       
<div style="width:114px; height:15px; float:right; font:bold 12px/15px '돋음';">           
<? for ($i=0; $i<count($list); $i++) { ?>

<? if ($i<count($list)-1) { // 마지막 라인 출력 안함 ?> <? } ?>

<?

echo "<a href='{$list[$i]['href']}' title='{$list[$i]['subject']}'>";

if ($list[$i]['is_notice'])
echo "{$list[$i]['subject']}";
else
echo "{$list[$i]['subject']}";
echo "</a>";

?>
         
<? } ?>




   
   
</div>
<div style="width:114px; height:50px; float:right; overflow:hidden; padding-top:7px;">

<?=cut_str($list[$i][content], 50, '..')?>


</div>



</td></tr>
        </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>











댓글 전체

관리자설정을 안해주신것 아닌가요?

게시판 관리자 가시면
 
전체목록보이기 사용 이라고 있습니다

이거 체크 안하시면 내용을 안읽어 옵니다.
<? for ($i=0; $i<count($list); $i++) {
$j = $i + 1; 
if ($j == "1") {
echo ""; }
?>

이소스 위에
 <?=cut_str( get_text($list[$i]['wr_content'],1), 120, "...")?>

을 먹이면 내용이 출력이 되는대요 그 밑부분에서 꼬인것 같아요 ^^;;

밑부분에 내용을 넣어야하는대 어느곳이 잘못된걸까요 ;;
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT