혹 가능한가 싶어 이렇게 했습니다.
그누 최신 (4.36.20) 버전 쓰구요.
그런데 안되네요. 팁자료실이나 질문답변 게시판에 계속 찾아봐도 과거 내용과 지금의 그누보드 구조가 변경 된 것인지 잘모르겠네요. 초보기도 하구요.
고수님들 답변 부탁 드려요.
[code]
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<base target="_main">
<table width=100% border="0" cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 align=center>
<table width=100% border="0" cellpadding="0" cellspacing="0">
<tr>
<td height=20 style="padding-top:4px;" valign="middle"><?
//echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}' target='_parent'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:11px; color:#4f4f4f;'>{$list[$i]['subject']}</font>";
// else
// echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$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></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
[/code]
그누 최신 (4.36.20) 버전 쓰구요.
그런데 안되네요. 팁자료실이나 질문답변 게시판에 계속 찾아봐도 과거 내용과 지금의 그누보드 구조가 변경 된 것인지 잘모르겠네요. 초보기도 하구요.
고수님들 답변 부탁 드려요.
[code]
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<base target="_main">
<table width=100% border="0" cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=4 align=center>
<table width=100% border="0" cellpadding="0" cellspacing="0">
<tr>
<td height=20 style="padding-top:4px;" valign="middle"><?
//echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}' target='_parent'>";
if ($list[$i]['is_notice'])
echo "<font style='font-family:돋움; font-size:11px; color:#4f4f4f;'>{$list[$i]['subject']}</font>";
// else
// echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$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></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
[/code]
댓글 3개
최신 basic 스킨에서 공지사항만 추출한 내용은 다음과 같습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 2;
if ($is_checkbox) $colspan++;
?>
<style>
.board_top { clear:both; }
.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd; }
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.subject { overflow:hidden; }
.board_list .notice { font-weight:normal; }
.board_list .current { font:bold 11px tahoma; color:#E15916; }
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 제목 -->
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 1;
?>
<tr class="bg<?=$bg?>">
<td class="num">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<b>공지</b>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span class='current'>{$list[$i][num]}</span>";
else
echo $list[$i][num];
?>
</td>
<td class="subject">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($list[$i][is_notice])
echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></a>";
echo $nobr_end;
?>
</td>
</tr>
<? } // end for ?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</td></tr></table>
<!-- 게시판 목록 끝 -->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 2;
if ($is_checkbox) $colspan++;
?>
<style>
.board_top { clear:both; }
.board_list { clear:both; width:100%; table-layout:fixed; margin:5px 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:34px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd; }
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.subject { overflow:hidden; }
.board_list .notice { font-weight:normal; }
.board_list .current { font:bold 11px tahoma; color:#E15916; }
.board_list .comment { font-family:Tahoma; font-size:10px; color:#EE5A00; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 제목 -->
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 1;
?>
<tr class="bg<?=$bg?>">
<td class="num">
<?
if ($list[$i][is_notice]) // 공지사항
echo "<b>공지</b>";
else if ($wr_id == $list[$i][wr_id]) // 현재위치
echo "<span class='current'>{$list[$i][num]}</span>";
else
echo $list[$i][num];
?>
</td>
<td class="subject">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($list[$i][is_notice])
echo "<a href='{$list[$i][href]}'><span class='notice'>{$list[$i][subject]}</span></a>";
echo $nobr_end;
?>
</td>
</tr>
<? } // end for ?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</td></tr></table>
<!-- 게시판 목록 끝 -->
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기