고수님들 도와주세요~ > 그누4 질문답변

그누4 질문답변

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

고수님들 도와주세요~ 정보

고수님들 도와주세요~

본문

위의 이미지에서 체크한것처럼 게시글의 다운로드 두번째 파일을 최신글 이미지 로 뽑을려면어떻게 해야 되나요?[보통은 첫번째 파일이 이미지로 나오잖아요 그걸 두번째 파일로 바꿀려고 하는거에요 ]

아래는 최신글 소스입니다. 어느부분을 어떻게 수정해야되는지 정말 부탁드려요 ㅠㅠ

<?
if (!defined("_GNUBOARD_")) exit; // °³º° Æ&auml;&Agrave;&Igrave;&Aacute;&ouml; &Aacute;&cent;±&Ugrave; º&Ograve;°¡
if (!defined("_GNUBOARD_")) exit; // °³º° Æ&auml;&Agrave;&Igrave;&Aacute;&ouml; &Aacute;&cent;±&Ugrave; º&Ograve;°¡
if (!$board[bo_1]) alert("&Ccedil;Ø´&ccedil; °&Ocirc;½&Atilde;Æ&Ccedil; ¼³&Aacute;¤ : ¿&copy;ºÐ &Ccedil;&Ecirc;&micro;&aring; 1 ¿¡ ¸&ntilde;·&Iuml;¿¡¼­ º¸¿&copy;&Aacute;&uacute; &Agrave;&Igrave;¹&Igrave;&Aacute;&ouml;&Agrave;&Ccedil; Æø&Agrave;&raquo; ¼³&Aacute;¤&Ccedil;&Iuml;½&Ecirc;½&Atilde;¿&Agrave;. (&Ccedil;&Egrave;¼¿ ´&Uuml;&Agrave;§)");
if (!$board[bo_2]) alert("&Ccedil;Ø´&ccedil; °&Ocirc;½&Atilde;Æ&Ccedil; ¼³&Aacute;¤ : ¿&copy;ºÐ &Ccedil;&Ecirc;&micro;&aring; 2 ¿¡ ¸&ntilde;·&Iuml;¿¡¼­ º¸¿&copy;&Aacute;&uacute; &Agrave;&Igrave;¹&Igrave;&Aacute;&ouml;&Agrave;&Ccedil; &Aacute;&uacute;(quality)&Agrave;&raquo; º&ntilde;&Agrave;²·&Icirc; ¼³&Aacute;¤&Ccedil;&Iuml;½&Ecirc;½&Atilde;¿&Agrave;. (100 &Agrave;&Igrave;&Ccedil;&Iuml;)");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 &Agrave;&Igrave;&raquo;&oacute; ¹&ouml;&Agrave;&uuml;&Agrave;&Igrave; ¼³&Auml;¡&micro;&Ccedil;¾&icirc; &Agrave;&Ouml;¾&icirc;¾ß &raquo;&ccedil;¿&euml;&Ccedil;&Ograve; ¼&ouml; &Agrave;&Ouml;´&Acirc; ½º&Aring;² &Agrave;&Ocirc;´&Iuml;´&Ugrave;.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

?>
<table width=98% cellpadding=1 cellspacing=1 align="center">
<?
for ($i=0; $i<count($list); $i++) {
    $img = $latest_skin_path."/img/no_image.gif";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    if (!file_exists($thumb))
    {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
        {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $board[bo_1] / $size[0];
            $height = (int)($size[1] * $rate);

            $dst = imagecreatetruecolor($board[bo_1], $height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
            imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }

    if (file_exists($thumb))
        $img = $thumb;

if($i == 0) {
?>
<tr>
<td style="padding:4 0 4 0" align="center"><a href='<?=$list[$i][href]?>'><img src="<?=$img?>" width="215" height="110" border="0"></a></td>
</tr>
<tr>
  <td>
  <?
    echo "¤&yacute;";
echo "<a href='{$list[$i][href]}'>";
echo "{$list[$i]['subject']}</a>";
echo " ". $list[$i]['icon_new'];
?> 
  </td>
</tr>
<?
}else{
?>
<tr>
  <td>
  <?
    echo "¤&yacute;";
echo "<a href='{$list[$i][href]}'>";
echo "{$list[$i]['subject']}</a>";
echo " ". $list[$i]['icon_new'];
?> 
  </td>
</tr>
<? }} ?>

<? if (count($list) == 0) { ?><tr><td align=center>°&Ocirc;½&Atilde;¹°&Agrave;&Igrave; ¾ø½&Agrave;´&Iuml;´&Ugrave;.</td></tr><? } ?>
</table>

댓글 전체

필히 업로드시 2번째 파일이어야 합니다.

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

$file = $list[$i][file][1][path] .'/'. $list[$i][file][1][file];
로 수정
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT