도와주세요 작성된 소스에서 이미가 없으면 이미지 없음 출력하고 싶습니다. 도와주세요. > 그누4 질문답변

그누4 질문답변

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

도와주세요 작성된 소스에서 이미가 없으면 이미지 없음 출력하고 싶습니다. 도와주세요. 정보

도와주세요 작성된 소스에서 이미가 없으면 이미지 없음 출력하고 싶습니다. 도와주세요.

본문

이미지 최신글입니다.

소스에서 이미가 없으면 이미지 없음 출력하고 싶습니다. 도와주세요. 지금은 아무것도 뜨지 않아서요. 부탁드려요.


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

<table width="462" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr>
<td bgcolor="F4F4F4" class="title1"><?=$board[bo_subject]?>
    <img src="<?=$latest_skin_path?>/img/left_news_icon.gif" align="absmiddle"></td>
  </tr>
<tr>
  <td height="1" bgcolor="D9D9D9"></td>
  </tr>-->
<tr>
<td style="padding:10px 5px 10px 8px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<? for ($i=0; $i<count($list); $i++) {?>
<?
  $subject = cut_str($list[$i][wr_subject],500,"...");
?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="120" height="85" rowspan="2">
<?
// 파일 출력
$file_url = $list[$i][file][0][path]."/".$list[$i][file][0][file];
$img_info = @getimagesize($file_url);
if (preg_match("/\.($config[cf_image_extension])$/i", $file_url) || $img_info[2]==1 || $img_info[2]==2 )
echo "<a href='{$list[$i][href]}'><img src='$file_url' width='120' height='85' border='0'></a>";

?>

<?$filter_arr = array("[미디어인뉴스]");
$wr_content = str_replace($filter_arr, "[미디어인뉴스]", $wr_content); ?> </td>
<td width="50" rowspan="2">&nbsp;</td>
    <td width="1344"><span class="t_board" style="padding-bottom:3px;"><span class="t_board" style="padding-bottom:3px;"><span class="t_board" style="padding-bottom:3px;"><a href='<?=$list[$i][href]?>'>
      <?=$subject?>
    </a></span></span></span></td>
</tr>
<tr>
  <td><span style="color:666666; letter-spacing:-0.5px; font-size:11px; font-family:돋음;">
    <?
$html = 0;
if (strstr($list['wr_option'], "html1"))
$html = 1;
else if (strstr($list['wr_option'], "html2"))
$html = 2;

echo cut_str(strip_tags(str_replace("미디어인뉴스", "코리아닷미", $list[$i]['wr_content']) ),500,"...");
?>
  </span></td>
  </tr>
</table> </td>
</tr>
<? if( $i < count($list)-1 ) { ?>
<tr>
<td height="10"></td>
</tr>
<? } ?>
<? } ?>
</table> </td>
</tr>
</table>
</td>
  </tr>
</table>

댓글 전체

// 파일 출력
$file_url = $list[$i][file][0][path]."/".$list[$i][file][0][file];
if(!$file_url) $file_url = "noimage 파일 경로";  // 첫번재 첨부(위 경로) 없을 경우 출력할 noimage

추가 후 우선 테스트
if (preg_match("/\.($config[cf_image_extension])$/i", $file_url) || $img_info[2]==1 || $img_info[2]==2 )
    echo "<a href='{$list[$i][href]}'><img src='$file_url' width='120' height='85' border='0'></a>";

else
  echo "<img src="노이미지 경로" width="120" height="85" border="0">
전체 90 |RSS
그누4 질문답변 내용 검색

회원로그인

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