최근게시물에 게시판 제목을 넣고싶습니다. 꼭 부탁드립니다. > 그누4 질문답변

그누4 질문답변

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

최근게시물에 게시판 제목을 넣고싶습니다. 꼭 부탁드립니다. 정보

최근게시물에 게시판 제목을 넣고싶습니다. 꼭 부탁드립니다.

본문

최근게시물 스킨에서 제목앞에 게시판제목을 넣고 싶습니다.
그래서 제목앞에 <span class="Num_stitle">[<?=$board[bo_subject]?>]&nbsp;/</span>&nbsp;
이부분을 추가로 넣어 줬습니다.
그런데
$board[bo_subject]를 넣으면 20개의 리스트를 불로오는데 리스트 첫번째의 게시판 제목으로 모든 리스트의 제목앞에 게시판 제목이 뜹니다.

[공지사항] 게시물3
[공지사항] 게시물3
[공지사항] 게시물1
 
이런식으로요.
게시물에 맞게 게시판제목을 뜨게 하려면 어떻게 해야할까요?

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$style_name = "mw-latest-list-$bo_table-$rows-$subject_len";
?>
<style type="text/css">
.<?=$style_name?> { border:0px solid #e1e1e1; text-align:left; margin:1px 0 0 0;}
.<?=$style_name?> .subject { background-color:#FFFFFF; height:30px; margin:0 0 7px 0;}
.<?=$style_name?> .subject .bo_table { margin:8px 0 0 15px; float:left; }
.<?=$style_name?> .subject .bo_table a { font-size:12px; color:#000; font-weight:bold; letter-spacing:-1px; text-decoration:none; }
.<?=$style_name?> .subject .list { margin:5px 5px 0 0; float:right; }
.<?=$style_name?> .subject .list a { font-weight:normal; font-size:11px; letter-spacing:-1px; color:#555; }
.<?=$style_name?> ul { margin:0 0 5px 7px; padding:0; list-style:none; }
.<?=$style_name?> ul li { margin:0; padding:0 0 0 7px; background:url(<?=$latest_skin_path?>/img/dot.gif) no-repeat 0 5px; height:20px; }
.<?=$style_name?> ul li a:hover { color:#438A01; text-decoration:underline; }
.<?=$style_name?> .file-img { width:100px; height:65px; border:1px solid #e1e1e1; }
.<?=$style_name?> .file-subject { line-height:15px; font-size:11px; letter-spacing:-1px; width:100px; height:28px; margin:3px 0 0 0; overflow:hidden; }
.<?=$style_name?> .file a:hover { color:#438A01; text-decoration:underline; }
.<?=$style_name?> .line { font-size:1px; line-height:1px; height:1px; border-bottom:1px dotted #e1e1e1; margin-bottom:10px; }
.Num_stitle { color:#a1a1a1; }
.title_s { font-weight:bold; font-size:13px; font-family:돋움;}
.title_o { font-weight:bold; font-size:11px; font-family:돋움; color:#FF0000;}
</style>

<div class="<?=$style_name?>">
<div style="border:0px solid #fff">
<div class="subject" style="border-bottom:1px dotted #b1b1b1">
<div class="bo_table"><span class="title_s">최신글</span>&nbsp;<span class="title_o">new</span></div>
</div>

<? for ($a=0; $a<$rows/5; $a++) {?>
<? if ($a > 0) echo "<div class='line'></div>"; ?>

<table border=0 cellpadding=0 cellspacing=0>
<tr>
<? if ($is_img && $file[0]) { ?>
<td width=120 align=center class=file>
    <a href="<?=$file[0][href]?>"><div><img src="<?=$file[0][path]?>" class="file-img"></div> <div class="file-subject"><?=$file[0][subject]?></div></a>
</td>
<? }  ?>
<td valign=top>
    <ul>
    <?
    $s = $a*5;
    $e = ($a+1)*5;
    $r = rand($s, $e-1);
    for ($i=$s; $i<$e; $i++) {
    If ($r == $i) $list[$i][subject] = "<strong>".$list[$i][subject]."</strong>";
    if ($list[$i][icon_secret]) $list[$i][subject] .= "&nbsp;&nbsp;" . $list[$i][icon_secret];
    if ($list[$i][icon_file]) $list[$i][subject] .= "&nbsp;" . $list[$i][icon_file];
    if ($list[$i][icon_new]) $list[$i][subject] .= "&nbsp;" . $list[$i][icon_new];
    //if ($list[$i][icon_hot]) $list[$i][subject] .= "&nbsp;" . $list[$i][icon_hot];
    $list[$i][subject] = mw_builder_reg_str($list[$i][subject]);
    $sql = " select * from {$g4['board_table']} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
?>
    <li><span class="Num_stitle">[<?=$board[bo_subject]?>]&nbsp;/</span>&nbsp;<a href="<?=$list[$i][href]?>"><?=$list[$i][subject]?></a></li>
    <? } ?>
    </ul>
</td>
</tr>
</table>
<? } ?>
</div>
</div>
  • 복사

댓글 전체

게시물에 맞게 게시판제목을 뜨게 하려면<--- 이것이 무슨말인지 모르겠네요
게시판이 하나인데 게시판 제목이 모두 똑같이 나오는 것이 맞는 것아닌가요?

여러 게시판 최신글을 모아서 보여주는 스킨이란 말인가요?
게시물에 맞는 게시판 제목은 여러 게시판의 최신그을 모아서 보여주는 스킨인데.
$board[bo_subject]로 집어넣으면 다양한 게시판임에도 불구하고
한가지 게시판 제목으로만 나열이 됩니다.
예를들어 자유게시판도 공지사항으로 커뮤니티도 공지사항으로 말이죠...
꼭좀 도와주세요!!!
그건 스킨만 보아서는 알수 없으니 추측으로....
$sql = " select * from {$g4['board_table']} where bo_table = '$list[$i][bo_table]'"; //$bo_table수정
$board = sql_fetch($sql);

위와 같이 해보세요
안된다면 최신글을 추출하는 함수(함수명은 기본 함수가 아니니 무엇인지 알수 없음)를 수정해야 합니다
그걸 올려보세요
© SIRSOFT
현재 페이지 제일 처음으로