테스트 사이트 - 개발 중인 베타 버전입니다

게시판에서 공지로 선택했을때 db어디에 저장되나요? 채택완료

smltree 1년 전 조회 1,385

게시판에서 글을쓸때 공지를 선택해서 맨 위로 올렸을때

db에서는 어디에 저장되나요?

 

최신글 스킨에서 $list[$i]['is_notice'] 로 표시되어

해당 컬럼이 있나 봤더니 없더라구요

그러고 보니 db에서 는 다른게시물과 똑같더라구요

 

공지로 선택된 글은 db에서 어떻게 저장되는지 알고싶습니다.

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트

디비가 아니라 함수인데 common.lib.php 에 있구요

get_list(); 함수에 있어요

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

리오닥터
1년 전
function get_list($write_row, $board, $skin_url, $subject_len=40)
{
global $g5, $config, $g5_object;
global $qstr, $page;

//$t = get_microtime();

$g5_object->set('bbs', $write_row['wr_id'], $write_row, $board['bo_table']);

// 배열전체를 복사
$list = $write_row;
unset($write_row);

$board_notice = array_map('trim', explode(',', $board['bo_notice']));
$list['is_notice'] = in_array($list['wr_id'], $board_notice);

if ($subject_len)
$list['subject'] = conv_subject($list['wr_subject'], $subject_len, '…');
else
$list['subject'] = conv_subject($list['wr_subject'], $board['bo_subject_len'], '…');

if( ! (isset($list['wr_seo_title']) && $list['wr_seo_title']) && $list['wr_id'] ){
seo_title_update(get_write_table_name($board['bo_table']), $list['wr_id'], 'bbs');
}

// 목록에서 내용 미리보기 사용한 게시판만 내용을 변환함 (속도 향상) : kkal3(커피)님께서 알려주셨습니다.
if ($board['bo_use_list_content'])
{
$html = 0;
if (strstr($list['wr_option'], 'html1'))
$html = 1;
else if (strstr($list['wr_option'], 'html2'))
$html = 2;

$list['content'] = conv_content($list['wr_content'], $html);
}

$list['comment_cnt'] = '';
if ($list['wr_comment'])
$list['comment_cnt'] = "<span class=\"cnt_cmt\">".$list['wr_comment']."</span>";

// 당일인 경우 시간으로 표시함
$list['datetime'] = substr($list['wr_datetime'],0,10);
$list['datetime2'] = $list['wr_datetime'];
if ($list['datetime'] == G5_TIME_YMD)
$list['datetime2'] = substr($list['datetime2'],11,5);
else
$list['datetime2'] = substr($list['datetime2'],5,5);
// 4.1
$list['last'] = substr($list['wr_last'],0,10);
$list['last2'] = $list['wr_last'];
if ($list['last'] == G5_TIME_YMD)
$list['last2'] = substr($list['last2'],11,5);
else
$list['last2'] = substr($list['last2'],5,5);

$list['wr_homepage'] = get_text($list['wr_homepage']);

$tmp_name = get_text(cut_str($list['wr_name'], $config['cf_cut_name'])); // 설정된 자리수 만큼만 이름 출력
$tmp_name2 = cut_str($list['wr_name'], $config['cf_cut_name']); // 설정된 자리수 만큼만 이름 출력
if ($board['bo_use_sideview'])
$list['name'] = get_sideview($list['mb_id'], $tmp_name2, $list['wr_email'], $list['wr_homepage']);
else
$list['name'] = '<span class="'.($list['mb_id']?'sv_member':'sv_guest').'">'.$tmp_name.'</span>';

$reply = $list['wr_reply'];

$list['reply'] = strlen($reply)*20;

$list['icon_reply'] = '';
if ($list['reply'])
$list['icon_reply'] = '<img src="'.$skin_url.'/img/icon_reply.gif" class="icon_reply" alt="답변글">';

$list['icon_link'] = '';
if ($list['wr_link1'] || $list['wr_link2'])
$list['icon_link'] = '<i class="fa fa-link" aria-hidden="true"></i> ';

// 분류명 링크
$list['ca_name_href'] = get_pretty_url($board['bo_table'], '', 'sca='.urlencode($list['ca_name']));

$list['href'] = get_pretty_url($board['bo_table'], $list['wr_id'], $qstr);
$list['comment_href'] = $list['href'];

$list['icon_new'] = '';
if ($board['bo_new'] && $list['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - ($board['bo_new'] * 3600)))
$list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" class="title_icon" alt="새글"> ';

$list['icon_hot'] = '';
if ($board['bo_hot'] && $list['wr_hit'] >= $board['bo_hot'])
$list['icon_hot'] = '<i class="fa fa-heart" aria-hidden="true"></i> ';

$list['icon_secret'] = '';
if (strstr($list['wr_option'], 'secret'))
$list['icon_secret'] = '<i class="fa fa-lock" aria-hidden="true"></i> ';

// 링크
for ($i=1; $i<=G5_LINK_COUNT; $i++) {
$list['link'][$i] = set_http(get_text($list["wr_link{$i}"]));
$list['link_href'][$i] = G5_BBS_URL.'/link.php?bo_table='.$board['bo_table'].'&amp;wr_id='.$list['wr_id'].'&amp;no='.$i.$qstr;
$list['link_hit'][$i] = (int)$list["wr_link{$i}_hit"];
}

// 가변 파일
if ($board['bo_use_list_file'] || ($list['wr_file'] && $subject_len == 255) /* view 인 경우 */) {
$list['file'] = get_file($board['bo_table'], $list['wr_id']);
} else {
$list['file']['count'] = $list['wr_file'];
}

if ($list['file']['count'])
$list['icon_file'] = '<i class="fa fa-download" aria-hidden="true"></i> ';

return $list;
}

참고 해보세요. 첫번째 줄에 보면 있네요

댓글을 작성하려면 로그인이 필요합니다.

1년 전

g5_board 테이블 bo_notice에 저장되긴합니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인