최근게시물 출력시 이미지가 없을경우 대체하는이미지 설정좀 도와주세요. 정보
최근게시물 출력시 이미지가 없을경우 대체하는이미지 설정좀 도와주세요.본문
최근게시물을 이용하는데요. 이미지가없으면 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>
입니다. 수정할부분좀 꼭좀알려주세요
그래서 이미지를 넣어주려고하는데 어딜수정해야될지몰라서요
소스는
<?
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>
입니다. 수정할부분좀 꼭좀알려주세요
댓글 전체
흠...머 일단 이 소스 그대로 쓰신다면
<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" />
<? } ?>
썸네일 적용된 최신글 사용하시는게 좋을 것 같습니다만,
일단은 저렇게 해도 나옵니다용.
<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" />
<? } ?>
썸네일 적용된 최신글 사용하시는게 좋을 것 같습니다만,
일단은 저렇게 해도 나옵니다용.
서누니님 너무 좋은정보 감사합니다 정말 도움이 많이됩니다!