게시판 리스트보면 클래스 적용해서 색깔지정 된거 있잖아요..? 정보
그누보드 게시판 리스트보면 클래스 적용해서 색깔지정 된거 있잖아요..?본문
게시판 리스트 보면 제일 밑에는 획색이고 그다음은 흰색 그다음은 회색 , 흰색 순으로 반복 되게 색깔이 되어있잖아요..
그거를 최근게시물에 구현 할라고 하는데 잘안데네요. 어떻게 고치면 됩니까?
최강그누보드..
그거를 최근게시물에 구현 할라고 하는데 잘안데네요. 어떻게 고치면 됩니까?
최강그누보드..
댓글 전체
아 다 안된는거 같아요..
머시 잘못 된거지..
아...
머시 잘못 된거지..
아...
미안합니다.
쓱 있는 동안에 vc님이 올리셨군요...
<tr class=list<?=($i%2)?>>
<td>게시물 들어갈 자리<?=$list[$i][subject]?><?=$list[$i][date]?>
</td>
</tr>
이렇게 해 보아보셔요..
<td>게시물 들어갈 자리<?=$list[$i][subject]?><?=$list[$i][date]?>
</td>
</tr>
이렇게 해 보아보셔요..
관리자님이 만든 그샵의 wishlist.php 의 한 부분입니다.
이걸 적용시켜도 되겠군요.
list0 , list1 이렇게 스타일 시트에 클래스를 두개 정의하고
아래의 내용을 참고 하면 될것 같습니다.
---------------------------------------------------------------------
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// 상품명
$img = item_img("{$row[it_id]}_{$cfg[arrimg1][0]}", $img_w, $img_h);
$link = "./?doc=$cfg[shop_dir]/item.php&it_id=$row[it_id]";
$list = ($i%2);
echo "<tr class='list$list ht' align=center>";
.
.
.
--------------------------------------------------------------------
이걸 적용시켜도 되겠군요.
list0 , list1 이렇게 스타일 시트에 클래스를 두개 정의하고
아래의 내용을 참고 하면 될것 같습니다.
---------------------------------------------------------------------
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// 상품명
$img = item_img("{$row[it_id]}_{$cfg[arrimg1][0]}", $img_w, $img_h);
$link = "./?doc=$cfg[shop_dir]/item.php&it_id=$row[it_id]";
$list = ($i%2);
echo "<tr class='list$list ht' align=center>";
.
.
.
--------------------------------------------------------------------
<table width=100% cellpadding=0 cellspacing=0>
<tr><td class='subjectbg ht' colspan=3> <a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table"?>'><span class=subject><?=$bo_subject?></span></a></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22 <?=($i%2)?>>
<td width=60><?=$list[$i][date]?></td>
<td><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <?=$list[$i][commentcnt]?></td>
<td width=70 align=center><?=$list[$i][name]?></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
<tr><td class='subjectbg ht' colspan=3> <a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table"?>'><span class=subject><?=$bo_subject?></span></a></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height=22 <?=($i%2)?>>
<td width=60><?=$list[$i][date]?></td>
<td><?=$list[$i][icon_new]?><a href='<?="./$cfg[index]?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'><span class=content><?=$list[$i][subject]?></span></a> <?=$list[$i][commentcnt]?></td>
<td width=70 align=center><?=$list[$i][name]?></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=3 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>