최근게시물 공지만 출력 도움주세요 > 그누4 질문답변

그누4 질문답변

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

최근게시물 공지만 출력 도움주세요 정보

최근게시물 공지만 출력 도움주세요

본문

http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=16440


latest.skin.php 첫부분에 추가하세요

foreach( $list as $key => $value) $tmp_notice[$key] = $value['is_notice'] *100000 + $value['wr_id'];
 array_multisort($tmp_notice, SORT_DESC, $list);
-------------------------------------------------------
10만을 곱해준 이유는 wr_id 값이 큰 순서로 정렬하기 위함입니다(한개 이상의 공지 및공지가 아닌 게시물들의 출력 순서 결정) -- 10 이나 100 등 아무것이나 할 수 있지만 출력할 목록수보다는 커야겠지요
최신글은 출력할 갯수가 많지않으므로 공지가 있는지 없는지 검사 후에 위 스크립트를
실행 하는 루틴은 생략 했습니다

이것이 필요하다면 latest.lib.php에서 get_list() 다음행에 아래 스크립트를 추가한 후 위 스크립트에 조건으로 넣어주면 됩니다 ( if($notice>0 )
      if($list[$i]['is_notice'] ) $notice++;

위 의활요팁에있는내용 입니다.
최근스킨에다 끼워넣어라고 하는데  어떻해 해도 안됩니다.   
아래 제가 가쓰는 스킨  어디다 끼워넣어야되는지 
도와주세요 

답변 감사합니다. 


제가 쓰고 있는 최근 스킨 
last.skin.php---

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

$latest_table = '400'; //테이블폭

?>

<style>
.la_he  {  font-family:굴림; font-size:9pt;  color:#636363;line-height:150%;}
</style>

<table width='<?=$latest_table?>' cellpadding='0' cellspacing='0' border='0' align='left'>

<? for ($i=0; $i<count($list); $i++) { ?>
 <tr>
  <td width='20' height='23' style='padding-left:5px;'><img src='<?=$latest_skin_path?>/img/latest_icon.gif' width='9' height='9' border='0'></td>
  <td width='<?=$latest_table-90?>' valign='bottom' class='la_he'>

<?

    $style = "font-family:돋움; font-size:9pt; color:#636363;";
    if ($list[$i][icon_new])


    $style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],47)."</span>"; //제목 글자수 자르기


echo $list[$i][icon_reply] . " ";
        echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>{$subject}";

if ($list[$i][comment_cnt])
echo " <span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span>";

echo " " . $list[$i][icon_new];
        echo "</a>";
        ?>

  </td>
  <td width='70' align='center' class='la_he' valign='bottom'><span style='font-size:8pt; color:#999999;'><?=$list[$i][datetime]?></span>
  </td>
 </tr>
 <tr>
  <td height='1' colspan='3' background='<?=$latest_skin_path?>/img/line.gif'></td>
 </tr>
<? } ?>

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

댓글 전체

저건 공지글과 일반글을 모두 출력하는 곳에서 공지글을 먼저 출력하는 팁입니다
위 소스를 사용한다면 ?> 바로 윗줄에 넣으면 됩니다
안된다는 건 어떤 상황이라는 것인지....

공지만 출력하는 건 아래 팁입니다
http://sir.co.kr/bbs/tb.php/g4_tiptech/16131/ef478afbccbd2ca801a996facf24092c
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT