에디터로 올린 사진 나오게 하고 싶은데 안되는건가요… 정보
에디터로 올린 사진 나오게 하고 싶은데 안되는건가요…본문
질문답변 게시판에 글 올리고 이리저리 알아봤는데 안되네요..
이건 해결이 안되는건가요?
불당썸 이용한 최신글 인데요.
에디터로 올린 이미지가 최신글에 안나오는데요
어떻게 고치면 될까요.?
고수님 있으면 도움좀 주세요.!!!!
<?
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>
0
댓글 2개

이 글 참고해 보세요~
황이팅 하세요~~~
파일에
//소스추가 : 에디터로 올라간 wr_content에서 이미지 태그 추출하는 부분
$img_tag = "/<img [^<>]*src\=[(\"|')]{0,1}([^(\"|')>]*)/i";
preg_match_all($img_tag , $list['wr_content'], $matches);
$list['img'] = $matches[1][0];
추가 했고요..
latest.skin.php 파일에서 (위에서스)
//소스추가 : 에디터로 저장된 사진의 썸네일을 만들기 위함
if(!$list[$i][file][0][file]){
$file = $list[$i]['img'];
$find = strrpos($file,'data');
$file ="../".substr($file,$find);
}
추가 했습니다.
그런데 위에 소스에서 보다시피
if ( !$list[$i]['img'] && !$list[$i][file][0][file])
로 수정하는곳이 없습니다.