문의드립니다.

· 2013-01-28 (월) 16:15:05 · 945 · 2
안녕하세요^^ 다름이 아니라

최근게시몰이 기본 가로로 4개씩 나오는대 이걸 3개로 하고 싶거덩요 ㅠ

3개로 2줄로요

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$gr = get_group($gr_id);
?>

<table align="left" cellpadding="0" cellspacing="0" width="100%" border="0">
<? for ($i=0; $i<count($list); $i++) {?>

<tr>
<td width="1" bgcolor="#1c1c1c"></td>
<td width="1"></td>
<td height="21">
<table cellpadding=0 cellspacing=0>
<tr>

<?
for ($i=0; $i<count($list); $i++) {
$list[$i]['content']=eregi_replace(" "," ",$list[$i]['content']);


if($list[$i][file][0][file]) {
$file = "<img src='".$list[$i][file][0][path] .'/'. $list[$i][file][0][file]."' align=absmiddle width=\"80\" height=\"80\">";
} else {
$file="";
}
?>
<td align=center>
<table width="80px">
<tr>

<td width="80" height="40" ><a href="<?=$list[$i]['href']?>"><?=$file?></a></td>
</tr>
<tr>
<td><a href="<?=$list[$i]['href']?>"><?=$list[$i]['subject']?></a></td>
</tr>
<tr>
<td><a href="<?=$list[$i]['href']?>"><span style='color:#666666;'><?=conv_subject($list[$i]['content'], 65, $cutopt="...")?></span></a></td>
</tr>
</table>
</td>
<?if($i!=count($list)-1) { ?>

<? } ?>
<? } ?>
</tr>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=30><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>
</td>
<!--게시물 추출 글자 설정 끝-->
<td width="1" bgcolor="#1c1c1c"></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><? } ?>
<tr height="1">
<td colspan="4"></td>
</tr>
</table>

이건데 어떻게 해야하나요?
|

댓글 2개

가로가 아니라 세로로 4줄 나오는 거겠죠?...
$i%2 = 값
값은 0 아니면 1이 나옵니다.
3 X 2 니까 6이 나오도록 설정하고요 (latest 로 불러온 곳에서 숫자로 수정합니다.)
값 마다 </tr><tr> 을 넣으면 가로 두줄로 표현 가능 합니다.
2013-01-29 (화) 07:50:08
아 어떻게 해야하는지 ㅠ
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-01-28 조회 639
13-01-28 조회 637
13-01-28 조회 751
13-01-28 조회 838
13-01-28 조회 1,063
13-01-28 조회 1,073
13-01-28 조회 842
13-01-28 조회 1,043
13-01-28 조회 1,042
13-01-28 조회 4,947
13-01-28 조회 1,791
13-01-28 조회 1,686
13-01-28 조회 946
13-01-28 조회 1,718
13-01-28 조회 1,048
13-01-28 조회 1,074
13-01-28 조회 1,607
13-01-28 조회 1,638
13-01-28 조회 1,907
13-01-28 조회 1,040