메인에 빼는 썸네일 이미지가 안떠요ㅠ > 그누4 질문답변

그누4 질문답변

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

메인에 빼는 썸네일 이미지가 안떠요ㅠ 정보

메인에 빼는 썸네일 이미지가 안떠요ㅠ

본문

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=2358&sca=%EC%B5%9C%EC%8B%A0%EA%B8%80&page=70

 

이 소스 활용했는데요. 시키는대로 고......대로

밑에 댓글에도 .....

썸네일이 안보인다는데 ..

완존 초보 입니다. 무슨 폴더를 어쩌라는거죠!!!!!!!!

글은 나오는데.... 이미지가 안나와요; ㅠ_ㅠ......

 

 

이미지 경로가

자꾸

/data/file//982918002~~~ 이렇게 뜨는데..

실제 이미지 들어있는 폴더명이

/data/file/album/~~ 이거든요..

 

이미지 경로에 album이 안나옵니다. ㅠㅠ

 

-------------------

 

<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td width='100%' >&nbsp;&nbsp;<a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/main/title4.jpg" border="0" /></a><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'></a></td>
    <td width=37 ><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' class="more">more</a></td>
</tr>
</table>

<?

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


$thumbx = 77;
$thumby =77;
$thumbyy = $thumby+6;
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
 
 <tr>
  <td colspan=10>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
<? for($i=0; $i<count($list); $i++) {$m++;
$file_name = get_thumb_filename2($list[$i][wr_id], 0);
$file = "$g4[path]/data/file/$bo_table/{$file_name}_s.jpg";
$destfile = $file.'dapThumbjpg';
 $size = @getimagesize($file);
 if(is_array($size) && !is_file($destfile)) {
  switch($size[2]) {
  case(1) :
    if(function_exists('ImageCreateFromGif')) $im = ImageCreateFromGif($file);
    break;
  case(2) :
    if(function_exists('ImageCreateFromJpeg')) $im = ImageCreateFromJpeg($file);
    break;
  case(3) :
    if(function_exists('ImageCreateFromPng')) $im = ImageCreateFromPng($file);
    break;
  }
  $fixsize = mando_image_size($size[0], $size[1], $thumbx, $thumby);
  if($im) {
  if($i==0) @exec("rm ".dirname($_SERVER[SCRIPT_FILENAME])."$g4[path]/data/file/$bo_table/*reportThumb -rf");
  if(function_exists('ImageCreateTrueColor')) $newim = ImageCreateTrueColor($fixsize[x],$fixsize[y]);
  else $newim = ImageCreate($fixsize[x],$fixsize[y]);
  if(function_exists('ImageCopyResampled')) ImageCopyResampled($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
  else ImageCopyResized($newim,$im,0,0,0,0,$fixsize[x],$fixsize[y],$size[0],$size[1]);
  ImageDestroy($im);
  ImageJpeg($newim, $destfile, 100);
  ImageDestroy($newim);
  unset($im, $newim);
  }
  $list[$i][img][x] = $fixsize[x];
  $list[$i][img][y] = $fixsize[y];
 } else {
  if(is_file($destfile)) {
  $size = @getimagesize($destfile);
  $list[$i][img][x] = $size[0];
  $list[$i][img][y] = $size[1];
  } else {
  $file = "$latest_skin_path/noimg.gif";
  $size = @getimagesize($file);
  $list[$i][img][x] = $size[0];
  $list[$i][img][y] = $size[1];
  }
 }
 if(is_file($destfile)) $file = $destfile;
 if(time()-(60*60*24) <= strtotime($list[$i][wr_datetime])) $list[$i][date] = date('H:i',strtotime($list[$i][wr_datetime]));
 else $list[$i][date] = date('Y.m.d',strtotime($list[$i][wr_datetime]));


?>
    <td align="center" width=20%>
      <table cellpadding="0" cellspacing="0" border="0" style="padding:0px;">
      <tr align=center>
        <td height='<?=$thumbyy?>' style='padding-top:0px;'>
            <table width="77" bgcolor='#ffffff' height=<?=$thumby?> cellpadding="3" cellspacing="0" border="0">
          <tr>
          <td align="center" valign="middle" style='border:1px solid #cfcfcf'><a href="<?=$list[$i][href]?>"><img src="<?= $file?>" width="<?=$list[$i][img][x]?>" height="<?=$list[$i][img][y]?>" border="0" alt="<?=$list[$i][wr_subject]?>"></a></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="center" valign="middle" style='padding-top:3px;border:0px solid #777777'><a href="<?=$list[$i][href]?>" style='font-family:돋움;font-size:11px;color:#336666'><?=$list[$i][subject]?></a><?=$list[$i][icon_new]?></td>
      </tr>
     
      </table>
    </td>
    <? if ($m%3==0){ ?></tr><tr><?}?>
<? } ?>
    </tr>
  </table>
  </td>

<? if(!count($list)) echo("<td align='center' valign='middle' height='50'><font color='gray'>등록된 사진이 없습니다.</font></td>"); ?>

 </tr>
</table>


--

주소는 : http://sarang3721.cafe24.com/main.php
입니당 ㅠㅠ
  • 복사

댓글 전체

대충 만들어 봣는데요...

<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td width='100%' >&nbsp;&nbsp;<a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/main/title4.jpg" border="0" /></a><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'></a></td>
    <td width=37 ><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' class="more">more</a></td>
</tr>
</table>

<?

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


$thumbx = 77;
$thumby =77;
$thumbyy = $thumby+6;

$quality= 100; //썸네일 퀄리티
$filter[type] = 99;
$filter[arg1] = 100;
$filter[arg2] = 1;
$filter[arg3] = 2;
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
 
 <tr>
  <td colspan=10>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
<? for($i=0; $i<count($list); $i++) {$m++;
//썸네일 생성
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$domain = "http://uani.wowip.kr";
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$img_url = "$domain/data/file/$bo_table/".$list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $thumbx, $thumby, 0, 1, $quality, 0, "",  $filter, $noimg); // 0 그대로 2 확대
} else { //에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb=thumbnail($file, $thumbx, $thumby, 0, 1, $quality, 0, "",  $filter, $noimg); // 0 그대로 2 확대

}
}
?>
    <td align="center" width=20%>
      <table cellpadding="0" cellspacing="0" border="0" style="padding:0px;">
      <tr align=center>
        <td height='<?=$thumbyy?>' style='padding-top:0px;'>
            <table width="77" bgcolor='#ffffff' height=<?=$thumby?> cellpadding="3" cellspacing="0" border="0">
          <tr>
          <td align="center" valign="middle" style='border:1px solid #cfcfcf'><a href="<?=$list[$i][href]?>"><img src="<?=$thumb?>" width="<?=$thumbx?>" height="<?=$thumby?>" border="0" alt="<?=$list[$i][wr_subject]?>"></a></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="center" valign="middle" style='padding-top:3px;border:0px solid #777777'><a href="<?=$list[$i][href]?>" style='font-family:돋움;font-size:11px;color:#336666'><?=$list[$i][subject]?></a><?=$list[$i][icon_new]?></td>
      </tr>
     
      </table>
    </td>
    <? if ($m%3==0){ ?></tr><tr><?}?>
<? } ?>
    </tr>
  </table>
  </td>

<? if(!count($list)) echo("<td align='center' valign='middle' height='50'><font color='gray'>등록된 사진이 없습니다.</font></td>"); ?>

 </tr>
</table>


이거 한 다음에

http://uani.wowip.kr/file/불당님의 불당썸.zip

받아서 속에꺼 그누보드에 압축 풀기 하시면 될꺼에요..

링크는 답변완료 되거나 필요없다고 생각되면 폭파합니다....
© SIRSOFT
현재 페이지 제일 처음으로