0

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

· 2009-12-22 (화) 12:45:06 · 1457 · 3

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

<?
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>

|

댓글 3개

$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);
해보시고 경로 수정해보세요~~
안되요..
print_r2($tmp);
로 수정하는건 어떻게 하라는 말슴이진지요..
2010-02-27 (토) 02:43:43
이것때문에 고생했는데 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
09-12-22 조회 1,458
09-12-22 조회 1,855
09-12-22 조회 981
09-12-22 조회 1,036
09-12-22 조회 1,727
09-12-22 조회 1,614
09-12-22 조회 1,029
09-12-22 조회 1,624
09-12-21 조회 1,159
09-12-21 조회 1,739
09-12-21 조회 983
09-12-21 조회 1,695
09-12-21 조회 1,050
09-12-21 조회 1,610
09-12-21 조회 4,404
09-12-21 조회 1,033
09-12-21 조회 837
09-12-21 조회 1,601
09-12-21 조회 1,627
09-12-21 조회 1,168