도움바랍니다. 정보
도움바랍니다.본문
이하는 최신글 코드인데요... 첫번째 게시글은 이미지만 나올뿐 제목이 나오지 않습니다.
첫번째 글은 이미지+다음글부터 제목 식으로 나옵니다.,
어떻게 하면 첫글은 이미지도 나오고 리스트에서도 제목이 나오게 할까요?
베이직스킨의 리스트를 그대로 넣어도 않되네요..
잘 아시는 분 도움부탁드립니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
$image_height = 100; // 높이
$image_width = 130; // 너비
?>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
$image_height = 100; // 높이
$image_width = 130; // 너비
?>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<Td height="16"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td bgcolor="#f8f6f6"> <img src="/images/pdca_ha5_78.gif" width="10" height="9" /><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>
<?=$board[bo_subject]?>
</a></strong></td>
<td align="right" bgcolor="#f8f6f6"> </td>
<td width="41" align="center" bgcolor="#f8f6f6"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><img src="<?=$latest_skin_path?>/img/more.gif" border="0" /></a></td>
</tr>
</tbody>
</table></Td>
</tr>
<tr>
<td height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" height="5"></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=1 style="table-layout: fixed;">
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){?>
<tr>
<td width="28%" rowspan=4>
<!--리스크 개수 !-->
<?
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=3 style='border-color:EFEFEF;' align=left>"; // 이미지크기
} else
if (file_exists($list[$i][file_image1])) { $gznews_img = "width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>"; }
?>
</td>
<? }else{?>
<td width="57%" style="border-bottom-width:1;border-bottom-color:#dddddd;border-bottom-style:dotted;"> <img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:µ¸¿ò; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:µ¸¿ò; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
echo "</a>";
<tr>
<Td height="16"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td bgcolor="#f8f6f6"> <img src="/images/pdca_ha5_78.gif" width="10" height="9" /><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'>
<?=$board[bo_subject]?>
</a></strong></td>
<td align="right" bgcolor="#f8f6f6"> </td>
<td width="41" align="center" bgcolor="#f8f6f6"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><img src="<?=$latest_skin_path?>/img/more.gif" border="0" /></a></td>
</tr>
</tbody>
</table></Td>
</tr>
<tr>
<td height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" height="5"></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=1 style="table-layout: fixed;">
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){?>
<tr>
<td width="28%" rowspan=4>
<!--리스크 개수 !-->
<?
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=3 style='border-color:EFEFEF;' align=left>"; // 이미지크기
} else
if (file_exists($list[$i][file_image1])) { $gznews_img = "width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>"; }
?>
</td>
<? }else{?>
<td width="57%" style="border-bottom-width:1;border-bottom-color:#dddddd;border-bottom-style:dotted;"> <img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:µ¸¿ò; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:µ¸¿ò; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
echo "</a>";
?>
</td>
<td width="15%" align="center" style="border-bottom-width:1;border-bottom-color:#dddddd;border-bottom-style:dotted;"><font color="#999999">
<?=$list[$i][datetime]?>
</font></td>
</tr>
<? } ?>
<? } ?>
</table></td>
</tr>
</table>
</td>
<td width="15%" align="center" style="border-bottom-width:1;border-bottom-color:#dddddd;border-bottom-style:dotted;"><font color="#999999">
<?=$list[$i][datetime]?>
</font></td>
</tr>
<? } ?>
<? } ?>
</table></td>
</tr>
</table>
댓글 전체
첫번째 이미지부분에 제목이 안나온다는 말씀이라면,
if (file_exists($list[$i][file_image1])) { $gznews_img = "width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>"; }
?>
</td>
<? }else{?>
부분을
if (file_exists($list[$i][file_image1])) { $gznews_img = "width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>"; }
?>
<!--제목--><?=$list[$i]['subject']?>
</td>
<? }else{?>
로 수정하세요
if (file_exists($list[$i][file_image1])) { $gznews_img = "width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>"; }
?>
</td>
<? }else{?>
부분을
if (file_exists($list[$i][file_image1])) { $gznews_img = "width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>"; }
?>
<!--제목--><?=$list[$i]['subject']?>
</td>
<? }else{?>
로 수정하세요