답변 4개
코어파일을 건들거나 hook을 사용해도 되는데 스킨 편집이 수월할것 같네요.
1:1 문의라고 하셨으니 /skin/qa/basic/list.skin.php 파일을 열면 다음과 같은 부분이 있습니다.
for ($i=0; $i<count($list); $i++) {</p>
<p>...</p>
<p>}</p>
<p>
그 안에 이렇게 넣어보세요.
다만 이 경우 손댈 부분이 많을거에요.
</p>
<p>for ($i=0; $i<count($list); $i++) {</p>
<p> if (date('Y-m-d H:i:s', strtotime($list[$i]['qa_datetime'] . ' +2 day')) < date('Y-m-d H:i:s')) {</p>
<p> 기존 내용...</p>
<p> }</p>
<p>}</p>
<p>
아니면 배열을 날려도 됩니다.
</p>
<p>for ($i=0; $i<count($list); $i++) {</p>
<p> if (date('Y-m-d H:i:s', strtotime($list[$i]['qa_datetime'] . ' +2 day')) < date('Y-m-d H:i:s')) {</p>
<p> unset($list[$i]);</p>
<p> }</p>
<p>}</p>
<p>for ($i=0; $i<count($list); $i++) {</p>
<p> 기존 내용...</p>
<p>}</p>
<p>
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
이럴 경우 관리자 페이지에서 1:1 문의 글 목록을 보여주는 곳에 상태를 설정하여 관리자만 볼 수 있게 하는 방법이 있습니다. 예를 들어, 문의 글이 2일 이상 지난 글은 관리자만 볼 수 있게 하고 회원에게는 보여주지 않게 할 수 있습니다.
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 목록헤드
if(isset($wset['hskin']) && $wset['hskin']) {
add_stylesheet('<link rel="stylesheet" href="'.G5_CSS_URL.'/head/'.$wset['hskin'].'.css" media="screen">', 0);
$head_class = 'div-head list-head';
} else {
$head_class = (isset($wset['hcolor']) && $wset['hcolor']) ? 'div-head border-'.$wset['hcolor'] : 'div-head border-black';
}
?>
<div class="list-board">
<div class="<?php echo $head_class;?>">
<span class="num hidden-xs">번호</span>
<span class="reply">답변</span>
<span class="subj">제목</span>
<span class="name hidden-xs">이름</span>
<span class="date hidden-xs">날짜</span>
<?php if ($is_checkbox) { ?>
<span class="chk">
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
</span>
<?php } ?>
</div>
<ul id="list-container" class="board-list">
<?php
$n = $list_cnt;
for ($i=0; $i<$list_cnt; $i++) {
$qa_date = apms_date(strtotime($list[$i]['qa_datetime']), 'orangered', 'before', 'm.d', 'Y.m.d');
?>
<li class="list-item">
<div class="num hidden-xs"><?php echo ($list[$i]['num']) ? $list[$i]['num'] : $n; ?></div>
<div class="reply">
<?php if($list[$i]['qa_status']) { ?>
<span class="orangered">완료</span>
<?php } else { ?>
<span class="text-muted">대기</span>
<?php } ?>
</div>
<div class="subj">
<a href="<?php echo $list[$i]['view_href']; ?>" class="ellipsis">
<?php echo ($list[$i]['category']) ? '['.$list[$i]['category'].']' : ''; ?>
<?php echo $list[$i]['subject']; ?>
<?php echo $list[$i]['icon_file']; ?>
</a>
<div class="subj-item font-12 visible-xs">
<span class="xs-name"><i class="fa fa-user"></i> <?php echo $list[$i]['name']; ?></span>
<span><i class="fa fa-clock-o"></i> <?php echo $qa_date; ?></span>
</div>
</div>
<div class="name hidden-xs"><?php echo $list[$i]['name']; ?></div>
<div class="date hidden-xs"><?php echo $qa_date; ?></div>
<?php if ($is_checkbox) { ?>
<div class="chk">
<label for="chk_qa_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject']; ?></label>
<input type="checkbox" name="chk_qa_id[]" value="<?php echo $list[$i]['qa_id'] ?>" id="chk_qa_id_<?php echo $i ?>">
</div>
<?php } ?>
</li>
<?php $n--;} ?>
</ul>
<?php if ($i == 0) { ?>
<div class="list-none text-center text-muted">문의글이 없습니다.</div>
<?php } ?>
</div> [/code]
댓글을 작성하려면 로그인이 필요합니다.
/bbs/qalist.php 일대일문의가 아니고 qa 게시판인가 봐요?
그렇다면,
/bbs/list.php 177라인 정도에 있는
$sql = " select * from {$write_table} where wr_is_comment = 0 ";
코드를
</p>
<p>if($bo_table == "qa" && $is_admin != "super") {</p>
<p> $sql = " select * from {$write_table} where wr_is_comment = 0 and TO_DAYS( curdate()) - TO_DAYS( wr_datetime ) >= 2";
}</p>
<p>else {</p>
<p> $sql = " select * from {$write_table} where wr_is_comment = 0 ";
}</p>
<p>
정도로 고치면 되지 않을까 싶습니다.
답변에 대한 댓글 2개
QA게시판 스킨이 저는 1:1 문의로 나오네요
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
/skin/qa/basic/list.skin.php
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$skin_url.'/style.css" media="screen">', 0);
// 헤더 출력
if($header_skin)
include_once('./header.php');
$is_view = false;
$list_cnt = count($list);
?>
<section class="qa-list<?php echo (G5_IS_MOBILE) ? ' font-14' : '';?>">
<div class="qsearch-box">
<form name="fsearch" method="get" role="form" class="form">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<div class="row row-15">
<div class="col-sm-4 col-sm-offset-3 col-xs-7 col-15">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="form-control input-sm" maxlength="15" placeholder="검색어">
</div>
</div>
</div>
<div class="col-sm-2 col-xs-5 col-15">
<div class="form-group">
<button type="submit" class="btn btn-black btn-sm btn-block"><i class="fa fa-search"></i> 검색</button>
</div>
</div>
</div>
</form>
</div>
<?php if($category_option) include_once($skin_path.'/category.skin.php'); // 카테고리 ?>
<div class="list-wrap">
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post" role="form" class="form">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<?php include_once($skin_path.'/list.rows.php'); ?>
<div class="list-btn-box">
<?php if ($list_href || $write_href) { ?>
<div class="form-group pull-right list-btn">
<div class="btn-group">
<?php if ($list_href) { ?>
<a href="<?php echo $list_href ?>" class="btn btn-black btn-sm"><i class="fa fa-bars"></i> 목록</a>
<?php } ?>
<?php if ($write_href) { ?>
<a href="<?php echo $write_href ?>" class="btn btn-color btn-sm"><i class="fa fa-pencil"></i> 글쓰기</a>
<?php } ?>
</div>
</div>
<?php } ?>
<?php if ($is_checkbox || $admin_href || $setup_href) { ?>
<div class="form-group list-btn">
<div class="btn-group btn-group-sm">
<?php if ($is_checkbox) { ?>
<input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value" class="btn btn-black btn-sm">
<?php } ?>
<?php if ($admin_href) { ?>
<a href="<?php echo $admin_href ?>" class="btn btn-black btn-sm"><i class="fa fa-cog"></i></a>
<?php } ?>
<?php if($setup_href) { ?>
<a class="btn btn-color btn-sm win_memo" href="<?php echo $setup_href;?>">
<i class="fa fa-cogs"></i> 스킨설정
</a>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="clearfix"></div>
</div>
</form>
</div>
<?php if($is_checkbox) { ?>
<noscript>
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
</noscript>
<?php } ?>
<div class="list-page text-center">
<ul class="pagination pagination-sm en">
<?php echo preg_replace('/(\.php)(&|&)/i', '$1?', apms_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './qalist.php'.$qstr.'&page='));?>
</ul>
</div>
<div class="clearfix"></div>
</section>
<?php if ($is_checkbox) { ?>
<script>
function all_checked(sw) {
var f = document.fqalist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_qa_id[]")
f.elements[i].checked = sw;
}
}
function fqalist_submit(f) {
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_qa_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
return false;
}
return true;
}
</script>
<?php } ?>