최근게시물에서 첫번째 이미지가 아닌 두번째 이미지가 최근게시물에 나올수 있는 방법 문의드려요. 정보
최근게시물에서 첫번째 이미지가 아닌 두번째 이미지가 최근게시물에 나올수 있는 방법 문의드려요.본문
첫번째 이미지를 추출해서 뿌려주는데 두번째 이미지를 추출해서 뿌려주고 싶은데 어디를 고쳐야하나요?
<? for ($i=0; $i<count($list); $i++) { ?>
<?
if($list[$i]['file']['0']['view']) {
$src = $list[$i]['file']['0']['path']."/".$list[$i]['file']['0']['file'];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}else{
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$file = $g4['path'].'/' . $tmp['0']; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}
}
?>
<a href="<?=$thumb?>" rel="<?=$list[$i]['href']?>" target="_blank"><?=$list[$i]['subject']?></a>
<? } ?>
초짜라 참 어렵네요....
<? for ($i=0; $i<count($list); $i++) { ?>
<?
if($list[$i]['file']['0']['view']) {
$src = $list[$i]['file']['0']['path']."/".$list[$i]['file']['0']['file'];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}else{
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$file = $g4['path'].'/' . $tmp['0']; // 파일명
$thumb = thumbnail($file, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
}
}
?>
<a href="<?=$thumb?>" rel="<?=$list[$i]['href']?>" target="_blank"><?=$list[$i]['subject']?></a>
<? } ?>
초짜라 참 어렵네요....
댓글 전체
if($list[$i]['file']['0']['view']) { <== 이부분에서 0을 1로하면 두번째파일이 됩니다
~~~
~~~
----------------------------------------------------------------------------
if($list[$i]['file']['1']['view']) {
$src = $list[$i]['file']['1']['path']."/".$list[$i]['file']['1']['file'];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
위와같은 식으로 해보세욤~
~~~
~~~
----------------------------------------------------------------------------
if($list[$i]['file']['1']['view']) {
$src = $list[$i]['file']['1']['path']."/".$list[$i]['file']['1']['file'];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 2, '', $filter, $noimg);
위와같은 식으로 해보세욤~
위의식으로 해보았었는데 꽃이미지의 백그라운드가 깔리면서 마우스를 가져가야 2번째 이미지가 보이면서 롤링하네요...
url을 알려주세요~~