한줄에 최신이미지 2개씩 나타나게 하는 방법 정보
한줄에 최신이미지 2개씩 나타나게 하는 방법본문
아래 소스는 한줄이 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> </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>
이 소스를 이미지처럼 한줄에 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> </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>
댓글 전체
보통.. 임의의 카운트를 세서.. 한줄에 출력될 수와 나눠서 나머지가 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>
이런식이죠... 틀력으면말씀해주세여 ;ㅅ;
<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>
이런식이죠... 틀력으면말씀해주세여 ;ㅅ;
이 부분을 어디에 추가해야 되는지 모르겠네요.
조금 상세히 알려주시면 감사하겠습니다.
이 기능이 꼭 필요해서요..
감사합니다!!!
조금 상세히 알려주시면 감사하겠습니다.
이 기능이 꼭 필요해서요..
감사합니다!!!