f

최신글에서 공지글은 항상 맨위에 위치시키려면...?

· 20년 전 · 1664
test2.gif
염치없이 또 질문을 하게 되네요.
g6man님 도움으로 이미지관련해서는 해결이 되었는데,

최신글에서 '공지글'의 정렬과 관련 재질문입니다.

최신글의 경우, 입력순서대로 위에서 뿌려주고 차례대로 밀려나갑니다.

그런데 게시물의 글이 '공지글'인 경우 최신글에서 줄에 밀려 나가지 않고
항상 최신글 리스트목록의 제일 윗쪽(위그림에서 보면 '답변글'이 위치한 자리) 에 위치시킬수는 없는지요?


게시판에서는 보면 항상 최신글이 제일윗쪽에 머물러 있는데...
최신글에서도 이런식으로 좀 구현할수 있는 방법이 있다면 도움을 좀 부탁드립니다.
(스킨하나 만들때 마다...질문만 쏟아내는군요.. -_- ;;)


>> 아래 코드는 현재 작업중인 최신글의 코드내용입니다.
-------------------------------------------------------------------------------

<table width=100% cellpadding=0 cellspacing=0 border=0>

<? for ($i=0; $i<count($list); $i++) { ?>

<? // 이미지가 있으면 첫번째 이미지 변수로 저장하기
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
?>

<tr>
<td align=center>

<table width=100% cellpadding=2 cellspacing=0 border=0>
<tr>
<td height=25>

<img src='<?=$latest_skin_path?>/img/icon_squre01.gif' width='10' height='11' align='absmiddle'>
<font color='666666'>[<?=$list[$i][datetime2]?>]</font>&nbsp;

<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' class='la_sub'>";
if ($list[$i][is_notice])
echo "<font color='#FF9900'>{$list[$i][subject]}</font>";
else
echo "{$list[$i][subject]}";
echo "</a>";

if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:tahoma,Tahoma,돋움; font-size:8pt; color:#888888;'>{$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='20%' align='right' nowrap>&nbsp;</td>
</tr>

<tr>
<td colspan=2 class='la_lh'>

<? if($list[$i][file][0][view]) { // 첫번재 파일이 이미지인경우, 보여주기 ?>
<img src="<?=$img?>" width="45" height="40" border="0" title="$title" align='left' style='border:1px solid #666666'></a>
<? } ?>

<?=cut_str($list[$i][wr_content], 190, "...") // 본문내용 요약해서 보여주기 ?>

<a href='<?=$list[$i][href]?>'><img src='<?=$latest_skin_path?>/img/more.gif' width='41' height='15' align='absmiddle'></a>

</td>
</tr>

<tr><td colspan=2 bgcolor=#EBEBEB height=1></td></tr>
</table>

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

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

</table>

첨부파일

test2.gif (21.2 KB)
0회 2005-08-25 16:46
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
20년 전 조회 2,156
20년 전 조회 2,138
20년 전 조회 1,770
20년 전 조회 1,691
20년 전 조회 1,923
20년 전 조회 2,425
20년 전 조회 2,641
20년 전 조회 2,459
20년 전 조회 2,182
20년 전 조회 1,665
20년 전 조회 1,874
20년 전 조회 2,026
20년 전 조회 1,560
20년 전 조회 1,508
20년 전 조회 1,640
20년 전 조회 2,843
20년 전 조회 1,621
20년 전 조회 2,214
20년 전 조회 2,003
20년 전 조회 3,531
🐛 버그신고