고수님들 도와 주세요... 정보
고수님들 도와 주세요...
본문
<?
$image_height = 70; // 높이
$image_width = 90; // 너비
?>
<table width="325" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width=100% cellpadding=0 cellspacing=0 align=center border=0>
<tr>
<td height="1" class=line1></td>
</tr>
<tr>
<td height="1" class=line2></td>
</tr>
<tr bgcolor=202020>
<td height=22 class="shiniya_thm03"> <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color=#dddddd><b><?=$board[bo_subject]?></b></font></a></td>
</tr>
<tr>
<td height="1" class=line1></td>
</tr>
<tr>
<td height="1" class=line2></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){?>
<tr onMouseOver=this.style.backgroundColor='#484848' onMouseOut=this.style.background=''>
<td height=22 class="shiniya_thm03">
<nobr style='display:block; overflow:hidden; width:320px;'>
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<strong>{$list[$i][subject]}</strong>";
else
echo "{$list[$i][subject]}";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
?> </nobr></td>
</tr>
<tr>
<td height="1" class=line1></td>
</tr>
<tr>
<td height="1" class=line2></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="90" class=input style='filter:gray' onmouseover=this.style.filter='' onmouseout=this.style.filter='gray'><?
echo "<a href='{$list[$i][href]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
echo "<img src='$g4[path]/data/file/$bo_table/$image' width='$image_width' height='$image_height' border=0>"; // 이미지크기
} else
echo "<img src='$latest_skin_path/img/no_image.gif' width='$image_width' height='$image_height' border=0>";
echo "</a>";
?></td>
<td width="235" class=input>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class=shiniya_thm03 style='padding-left:10px;'>
<a href='<?=$list[$i][href]?>'><font style='font-family:돋움; font-size:9pt; color:#999999;'><?=nl2br(stripslashes(cut_str($list[$i][wr_content], 70, '....' )))?></font></a>
</td>
</tr>
</table>
</td>
<!-- 경계선 -->
<tr>
<td height="1" colspan="3" class=line1></td>
</tr>
<tr>
<td height="1" colspan="3" class=line2></td>
</tr>
<? }else{?>
<tr onMouseOver=this.style.backgroundColor='#484848' onMouseOut=this.style.background=''>
<td height="22" colspan=3 class="shiniya_thm03">
<nobr style='display:block; overflow:hidden; width:320px;'>
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<strong>{$list[$i][subject]}</strong>";
else
echo "{$list[$i][subject]}";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
?>
</nobr>
</td>
</tr>
<tr>
<td height="1" colspan="3" class=line1></td>
</tr>
<tr>
<td height="1" colspan="3" class=line2></td>
</tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
</td>
</tr>
</table>
위의 소스는 최신글 스킨 입니다.
웹진 형태 인데요.
본문 내용이 없으면
"본문내용이 없습니다"
이렇게 나오게 바꾸고 싶은데
도무지 감이 안잡히네요ㅜ.ㅡ
도와 주세요.
$image_height = 70; // 높이
$image_width = 90; // 너비
?>
<table width="325" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width=100% cellpadding=0 cellspacing=0 align=center border=0>
<tr>
<td height="1" class=line1></td>
</tr>
<tr>
<td height="1" class=line2></td>
</tr>
<tr bgcolor=202020>
<td height=22 class="shiniya_thm03"> <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color=#dddddd><b><?=$board[bo_subject]?></b></font></a></td>
</tr>
<tr>
<td height="1" class=line1></td>
</tr>
<tr>
<td height="1" class=line2></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){?>
<tr onMouseOver=this.style.backgroundColor='#484848' onMouseOut=this.style.background=''>
<td height=22 class="shiniya_thm03">
<nobr style='display:block; overflow:hidden; width:320px;'>
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<strong>{$list[$i][subject]}</strong>";
else
echo "{$list[$i][subject]}";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
?> </nobr></td>
</tr>
<tr>
<td height="1" class=line1></td>
</tr>
<tr>
<td height="1" class=line2></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="90" class=input style='filter:gray' onmouseover=this.style.filter='' onmouseout=this.style.filter='gray'><?
echo "<a href='{$list[$i][href]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
echo "<img src='$g4[path]/data/file/$bo_table/$image' width='$image_width' height='$image_height' border=0>"; // 이미지크기
} else
echo "<img src='$latest_skin_path/img/no_image.gif' width='$image_width' height='$image_height' border=0>";
echo "</a>";
?></td>
<td width="235" class=input>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class=shiniya_thm03 style='padding-left:10px;'>
<a href='<?=$list[$i][href]?>'><font style='font-family:돋움; font-size:9pt; color:#999999;'><?=nl2br(stripslashes(cut_str($list[$i][wr_content], 70, '....' )))?></font></a>
</td>
</tr>
</table>
</td>
<!-- 경계선 -->
<tr>
<td height="1" colspan="3" class=line1></td>
</tr>
<tr>
<td height="1" colspan="3" class=line2></td>
</tr>
<? }else{?>
<tr onMouseOver=this.style.backgroundColor='#484848' onMouseOut=this.style.background=''>
<td height="22" colspan=3 class="shiniya_thm03">
<nobr style='display:block; overflow:hidden; width:320px;'>
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<strong>{$list[$i][subject]}</strong>";
else
echo "{$list[$i][subject]}";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][icon_new];
echo " " . $list[$i][icon_file];
echo " " . $list[$i][icon_link];
echo " " . $list[$i][icon_hot];
echo " " . $list[$i][icon_secret];
?>
</nobr>
</td>
</tr>
<tr>
<td height="1" colspan="3" class=line1></td>
</tr>
<tr>
<td height="1" colspan="3" class=line2></td>
</tr>
<? } ?>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
</td>
</tr>
</table>
위의 소스는 최신글 스킨 입니다.
웹진 형태 인데요.
본문 내용이 없으면
"본문내용이 없습니다"
이렇게 나오게 바꾸고 싶은데
도무지 감이 안잡히네요ㅜ.ㅡ
도와 주세요.
댓글 전체
<?
if ($list[$i][wr_content]) {
echo nl2br(stripslashes(cut_str($list[$i][wr_content], 70, '....' )));
} else {
echo "본문내용이 없습니다.";
}
?>
요렇게 하시면 안될까요?
if ($list[$i][wr_content]) {
echo nl2br(stripslashes(cut_str($list[$i][wr_content], 70, '....' )));
} else {
echo "본문내용이 없습니다.";
}
?>
요렇게 하시면 안될까요?
헉~ 그리 간단히 너무 감사합니다.^^"