갤러리에 이미지가 등록 안되었을때 노이미지를 넣고싶은데요~ 정보
갤러리에 이미지가 등록 안되었을때 노이미지를 넣고싶은데요~본문
갤러리에 이미지가 등록 안되었을때 노이미지를 넣고싶은데요~
어떻게 하는지 ^^;;
아시는 분 답변 부탁드립니다.~
밑에 소스 첨부합니다~
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div style='width:100%; height:160;'>
<table cellpadding="0" cellspacing="0" width="100%" background="<?=$latest_skin_path?>/img/subject_bg.gif">
<tr>
<td>
<table cellpadding="5" cellspacing="0" width="100%" border="0">
<tr height="35">
<td style="padding-left:10;">
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#ffffff"><b><?=$board[bo_subject]?></b></font></a>
</td>
<td align="right"><span style="font-size: 10px; color: #FFFFFF; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'<b><font color="#ffffff"><b>MORE</a></span> </td>
</tr>
</table>
</td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td height="7"></td></tr>
<? for ($i=0; $i<count($list); $i++) {?>
<tr>
<td width="3"></td>
<td height="22">
<?
//날짜표시
$subject = $list[$i][subject];
$b_subject = "<strong>".$list[$i][subject]."<strong>";
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td style="padding-left:10;"><a href='<?=$list[$i][href]?>'><span style="color:#555555;"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
<span style="font-size:8pt;font-family:tahoma;color:#43b20d;vertical-align:1px;"><?=$list[$i][comment_cnt]
?> <?
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_secret];
?>
</span>
<!-- <span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][datetime2]?></span> -->
</td>
<!--<td width="60" align="center" class='small'><?=$list[$i][name]?></td> -->
</tr>
</table>
</td>
<!--게시물 추출 글자 설정 끝-->
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td align=center height=100 valign="middle"><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</tr>
<tr height="5"><td></td></tr>
</table>
<div>
어떻게 하는지 ^^;;
아시는 분 답변 부탁드립니다.~
밑에 소스 첨부합니다~
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div style='width:100%; height:160;'>
<table cellpadding="0" cellspacing="0" width="100%" background="<?=$latest_skin_path?>/img/subject_bg.gif">
<tr>
<td>
<table cellpadding="5" cellspacing="0" width="100%" border="0">
<tr height="35">
<td style="padding-left:10;">
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#ffffff"><b><?=$board[bo_subject]?></b></font></a>
</td>
<td align="right"><span style="font-size: 10px; color: #FFFFFF; font-family:dotum; letter-spacing:-1;"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'<b><font color="#ffffff"><b>MORE</a></span> </td>
</tr>
</table>
</td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td height="7"></td></tr>
<? for ($i=0; $i<count($list); $i++) {?>
<tr>
<td width="3"></td>
<td height="22">
<?
//날짜표시
$subject = $list[$i][subject];
$b_subject = "<strong>".$list[$i][subject]."<strong>";
?>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td style="padding-left:10;"><a href='<?=$list[$i][href]?>'><span style="color:#555555;"><?if ($list[$i][is_notice])
echo $b_subject;
else
echo $subject;
?></span></a>
<span style="font-size:8pt;font-family:tahoma;color:#43b20d;vertical-align:1px;"><?=$list[$i][comment_cnt]
?> <?
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_secret];
?>
</span>
<!-- <span style='font:normal 11px tahoma; color:#BABABA;'><?=$list[$i][datetime2]?></span> -->
</td>
<!--<td width="60" align="center" class='small'><?=$list[$i][name]?></td> -->
</tr>
</table>
</td>
<!--게시물 추출 글자 설정 끝-->
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td align=center height=100 valign="middle"><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</tr>
<tr height="5"><td></td></tr>
</table>
<div>
댓글 전체
휴~ 소스 엄청 지저분 하네요
위 최근글 소스는 파일 처리 부분이 보이지 않습니다.
이 스크립트는 파일이 있는지 검사한 후 처리해 주는 것
===========================================================
if ( file_exists($list[$i][file][0][file]) ) {
echo $list[$i][file][0][file];
}
else{
$latest_skin_path/ 노이미지 ; //노이미지경로 처리 해 주시면 되겠습니다.
}
===================================================================
대부분 썸 처리가 되어 있을 건데요
=========================================================
if ( file_exists(썸파일검사) ) {
썸파일 처리;
}
else
{
노이미지처리;
}
=============================================================
고맙습니다.
위 최근글 소스는 파일 처리 부분이 보이지 않습니다.
이 스크립트는 파일이 있는지 검사한 후 처리해 주는 것
===========================================================
if ( file_exists($list[$i][file][0][file]) ) {
echo $list[$i][file][0][file];
}
else{
$latest_skin_path/ 노이미지 ; //노이미지경로 처리 해 주시면 되겠습니다.
}
===================================================================
대부분 썸 처리가 되어 있을 건데요
=========================================================
if ( file_exists(썸파일검사) ) {
썸파일 처리;
}
else
{
노이미지처리;
}
=============================================================
고맙습니다.