에디터로 올린 사진 나오게 하고싶어요.!! > 그누4 질문답변

그누4 질문답변

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

에디터로 올린 사진 나오게 하고싶어요.!! 정보

에디터로 올린 사진 나오게 하고싶어요.!!

본문

불당썸 이용한 최신글 입니다.
에디터로 올린 이미지가 최신글에 안나오는데요
어떻게 고치면 될까요.?
수정좀 해주세요.!!

<?
include_once("$g4[path]/lib/thumb.lib.php");  
$img_width = '60'; //썸네일 가로길이
$img_height = '45'; //썸네일 세로길이
$img_quality = '99'; //퀼리티 100이하로 설정
$data_path = $g4[path]."/data/file/$bo_table"; ?>
<style>
.dm-subject { font:bold; font-size:18px; color:#000000; padding:5 10 5 5; }
.dm-hit { text-align:center; font:bold; font-size:14px; color:#e95eee; }
</style>
<div align="center">
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
    <? for ($i=0; $i<count($list); $i++) { ?>
  <tr>    <td style="padding:5 5 5 5;" width="80%">
           <div style="margin-bottom:5px;"><span class="dm-subject">
           <a href="<?=$list[$i][href]?>"><?=$list[$i][subject]?></a></span></div>
    </td>
    <td width="10%" align="center" valign="middle">
<?
  $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
  $img = thumbnail($file, $img_width, $img_height, $img_quality);
  $img = "<a href='{$list[$i][href]}'><img src='$img' width='$img_width' height='$img_height' border='0' style='border:1 #eee solid' onmouseover=this.style.filter='alpha(opacity=60)' onmouseout=this.style.filter='' title='{$list[$i][subject]}'></a>";
?><a href='<?=$list[$i][href]?>'><?=$img?></a> 
    </td>
  </tr>
  <tr><td colspan="3" height="1" bgcolor="#f3f3f3"></td></tr>
  <? } ?>
  <? if (count($list) == 0) { echo "<tr><td align=center height=50><font color=#6A6A6A>오늘 등록된 게시물이 없습니다.</a></td></tr>"; } ?>
</table>
</div>

  • 복사

댓글 전체

$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

이부분을

if($list[$i][file][0][file])
  $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
else if (eregi("data/[^<>]*\.(gif|jpg|png|bmp)", $list[$i]['wr_content'], $tmp))
  $file = $g4['path'].'/'.$tmp[0]; // 파일명

로 수정해보세요. 안될경우
print_r2($tmp);
해보시고 경로 수정해보세요~~
© SIRSOFT
현재 페이지 제일 처음으로