한줄에 최신이미지 2개씩 나타나게 하는 방법

2latest.gif
아래 소스는 한줄이 1개씩 최신이미지를 세로로 출력하는 latest.skin.php 소스입니다.
이 소스를 이미지처럼 한줄에 2개씩 세로로 출력하는 최신글 소스로 수정하려고 합니다.
검색해봐도 이런 팁이 없네요.
고수님들 도움 부탁드립니다.
감사합니다.

------------------------------------------------------------------------------------------------------------------------------

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$board[bo_table_width]="285"; //테이블 폭
?>

<table width="380" border="0" cellpadding="0" cellspacing="0">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td height=4 colspan=3></td>
</tr>
<tr>
<td width="20" height="22" align="center"><img src='<?=$latest_skin_path?>/img/top.gif' border=0 width="6" height="7"></td>
<td width="294" style='word-break:break-all;;'>
<?
echo $list[$i][icon_reply] . " ";
// 팝업창으로 내용 보기 echo "<a href=\"javascript:popup_window('$g4[bbs_path]/board.php?bo_table=$board[bo_table]&wr_id={$list[$i][wr_id]}','winBoard','left=30, top=30, width=700, height=500, scrollbars=yes,resizable=no')\">";
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:#222222;'>{$list[$i][subject]}</font>";
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];
?> </td>
<td width="66" align="right" style='word-break:break-all;;'> <span style="font-size:8pt; color:#6A6A6A;"><?=$list[$i][datetime]?></span>&nbsp;</td>
</tr>
<tr>
<td height=1 colspan=3 background='<?=$latest_skin_path?>/img/line.gif'></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>등록된 내용이 없습니다.</td></tr>"; } ?>
<tr>
<td height="13" colspan=3 ></td>
</tr>
</table>

첨부파일

2latest.gif (39.9 KB)
0회 2005-11-21 01:17
|

댓글 2개

보통.. 임의의 카운트를 세서.. 한줄에 출력될 수와 나눠서 나머지가 0일경우 줄넘김..

<table width="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<? $max=1;
for ($i=0; $i<count($list); $i++) {

echo "<td>내용(이미지)출력</td>";
$max++;

if($i+1%$max==0) echo "</tr><tr>";
}
?>
</table>

이런식이죠... 틀력으면말씀해주세여 ;ㅅ;
이 부분을 어디에 추가해야 되는지 모르겠네요.
조금 상세히 알려주시면 감사하겠습니다.
이 기능이 꼭 필요해서요..
감사합니다!!!
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
20년 전 조회 1,358
20년 전 조회 1,579
20년 전 조회 2,421
20년 전 조회 1,510
20년 전 조회 1,539
20년 전 조회 1,697
20년 전 조회 1,580
20년 전 조회 1,508
20년 전 조회 1,545
20년 전 조회 1,599
20년 전 조회 3,950
20년 전 조회 1,560
20년 전 조회 1,519
20년 전 조회 1,513
20년 전 조회 1,516
20년 전 조회 1,615
20년 전 조회 1,566
20년 전 조회 1,631
20년 전 조회 1,511
20년 전 조회 1,501
🐛 버그신고