열

최근게시물 출력시 이미지가 없을경우 대체하는이미지 설정좀 도와주세요.

· 2011-02-04 (금) 09:23:00 · 1547 · 2
최근게시물을 이용하는데요. 이미지가없으면 X창이 뜨더라구요.ㅠ보기싫게
그래서 이미지를 넣어주려고하는데 어딜수정해야될지몰라서요

소스는
<?
if (!defined("_GNUBOARD_")) exit; //

?>
<style type="text/css">
<!--
A:link {text-decoration:none; color:black}
A:visited {text-decoration:none; color:black}
A:active {text-decoration:none; color:black}
A:hover {text-decoration:underline; color:black}
-->
</style>


<div align="left">
<table width = "517" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left" width="517">
<span style="font-size:1pt;"><? for ($i=0; $i<count($list); $i++) { ?></span><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr><? $sub[0]=cut_str($list[0]['subject'],20,"...");}?>
<td width="38%" align="center" rowspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="162" height="71">
<tr>
<td width="162" height="132" background="skin/latest/game_01/img/latcommidi1.gif">
<p align="center"><a href='<?=$list[0]['href']?>' target="_parent"><font color="#DDDDDD"><img width="150" height="120" src="<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$list[0][file][0][file]?>" border="0" align="bottom" /></font></a></td>
</tr>
<tr>
<td height="35" width="162">
<p align="center"><a href='<?=$list[0]['href']?>' class="word1" target="_parent"><font face="돋움"><span style="font-size:8.7pt;"><?=$sub[0]?></span></font></a></td>
</tr>
</table>
</td>
<td width="62%" align="left" valign="top" style="padding-left:3px" height="6">
<p><span style="font-size:1pt;"> </span></p>
</td></tr>
<tr> <td width="62%" align="left" valign="top" style="padding-left:3px" height="148">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<? for ($t=1;$t<6;$t++){
$sub[$t]=cut_str($list[$t]['subject'],47,"...");
?>
<tr>
<td height="21" width="309"><font face="돋움" color="black"><span style="font-size:8.7pt;"><? echo "<img src=\"skin/latest/game_01/img/latest_icon.gif\" />  <a href='{$list[$t][href]}' class='blackfont1' target='_parent'>{$sub[$t]}</a>";?></span></font></td>
</tr><? }?>
</table>
<p> </p>
</td></tr>
</table>



</td>
</tr></table>
</div>

입니다. 수정할부분좀 꼭좀알려주세요
|

댓글 2개

흠...머 일단 이 소스 그대로 쓰신다면
<img width="150" height="120" src="<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$list[0][file][0][file]?>" border="0" align="bottom" />
이부분을
<? if($list[0][file][0][view]) { ?>
<img width="150" height="120" src="<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$list[0][file][0][file]?>" border="0" align="bottom" />
<? } else { ?>
<img width="150" height="120" src="노이미지경로" border="0" align="bottom" />
<? } ?>


썸네일 적용된 최신글 사용하시는게 좋을 것 같습니다만,
일단은 저렇게 해도 나옵니다용.
2011-02-05 (토) 19:46:11
서누니님 너무 좋은정보 감사합니다 정말 도움이 많이됩니다!
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
11-02-04 조회 1,641
11-02-04 조회 1,850
11-02-04 조회 1,100
11-02-04 조회 1,657
11-02-04 조회 3만
11-02-04 조회 1,093
11-02-04 조회 1,313
11-02-04 조회 1,617
11-02-04 조회 1,259
11-02-04 조회 1,548
11-02-04 조회 1,603
11-02-03 조회 2,076
11-02-03 조회 1,652
11-02-03 조회 1,535
11-02-03 조회 1,711
11-02-03 조회 1,051
11-02-03 조회 2,011
11-02-03 조회 1,611
11-02-02 조회 1,538
11-02-02 조회 1,778