최신글 추출하고 제목 밑에 게시판 내용을 추가하고 싶어요

최신글 추출하고 제목 밑에 게시판 내용을 추가하고 싶어요

QA

최신글 추출하고 제목 밑에 게시판 내용을 추가하고 싶어요

답변 2

본문

안녕하세요.

최신글을 추출했는데 (갤러리)

썸네일

게시판 제목

내용

이렇게 추출하고 싶은데 

 

내용 추출을 어떻게 해야하는지 모르겠어요 ㅠㅠ

 

 

latest 소스 입니다.

<?

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

include_once("$g4[path]/lib/thumb.lib.php");

$data_path = $g4[path]."/data/file/$bo_table";

$thumb_path = $data_path.'/thumb_neo';

$opts = explode("|",$options);

 

$img_cols=$opts[0];//가로 라인수

$img_width = $opts[1]; //갤러리형 썸네일 가로 크기

$img_height = $opts[2]; //갤러리형 썸네일 세로 크기

$img_quality = '99';

 

 

@mkdir($thumb_path, 0707);

@chmod($thumb_path, 0707);

 

?>

 

<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="padding-top:0px" align=center>

 

<!--<td align=right><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' ><img src='<?=$latest_skin_path?>/img/img_more.gif' border=0></a> </td>-->

</tr>

</table>

 

<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" style="padding-top:0px" align=center>

<tr>

<? 

 

for ($i=0; $i<count($list); $i++) 

{

     

    $file = "$g4[path]/data/file/$bo_table/".$list[$i][file][0][file];

    if (!file_exists($file) || !$list[$i][file][0][file]){//이미지가 없다면

       $thumb = "$latest_skin_path/img/no_img.gif";

    }else{

$thumb = thumbnail($file, $img_width, $img_height, 0, 1,$img_quality,"",  $filter, $noimg); //언샾마스크추가

}

 

    

 

 

echo " <td valign=top>

<table width='99%'  cellpadding='0' cellspacing='0' border='0' style='padding:0px;' >

<tr align=center>

<td style='padding-top:0px;'>

    <table  bgcolor='#ffffff' cellpadding='3' cellspacing='0' border='0' width='{$img_width}'>

<tr><td align='center' valign='middle' style=''><a href='{$list[$i][href]}'>

<img src='{$thumb}' width='{$img_width}' height='{$img_height}' border='0'  ></a></td>

</tr>

<tr height=30>

<td> <a href='{$g4[bbs_path]}/board.php?bo_table={$bo_table}' ><strong>{$board[bo_subject]}</strong></a></td>

<tr><td height=8 align=center><a href='{$list[$i]['href']}' >

{$list[$i]['subject']}</a>

</td></tr>

 

</table>

</td>

</tr>

</table>

</td>

";

 

 

if($i !=0 && ($i+1)%$img_cols==0 &&( $i+1)<count($list)){

echo "</tr><tr>";

}

 

}

 

?>

 

<?

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>";

?>

 

 

</tr>

</table>

 

 

 

아시는분 좀 도와주세요 ㅠㅠㅠㅠ

 

이 질문에 댓글 쓰기 :

답변 2

보통 최신글에는 $list[$i]['content']​ 로 사용하게 되면 content 가 설정이 되어있는것이 아니라서 

표현이 안되실 수 있습니다.

 

최신글에서 표현하시려면 

wr_content​ 로 사용하셔서 표현하시고 관련하여 태그삭제나 글자길이 조절까지 하시면 될듯합니다.

 

 

{$list[$i]['subject']} 이 제목이라면

{$list[$i]['content']}가 내용이 될거같네여~

추측입니다. 보통 그렇게들 쓰니까여~

위소스만 바서는 내용을 어떻게 뽑는다 확답은 못하겠네여

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 32
© SIRSOFT
현재 페이지 제일 처음으로