댓글 새창 사용 제거

This commit is contained in:
gnuboard
2012-12-28 10:08:03 +09:00
parent 830cefce6a
commit 35e2a0e572
11 changed files with 21 additions and 74 deletions

View File

@ -53,7 +53,6 @@ $sql = " insert into {$g4['board_table']}
bo_use_secret = '{$board[bo_use_secret]}',
bo_use_dhtml_editor = '{$board[bo_use_dhtml_editor]}',
bo_use_sideview = '{$board[bo_use_sideview]}',
bo_use_comment = '{$board[bo_use_comment]}',
bo_use_good = '{$board[bo_use_good]}',
bo_use_nogood = '{$board[bo_use_nogood]}',
bo_use_signature = '{$board[bo_use_signature]}',

View File

@ -304,16 +304,6 @@ include_once ('./admin.head.php');
<label for="chk_use_file_content">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_comment">댓글 새창 사용</label></th>
<td>
<input type="checkbox" id="bo_use_comment" name="bo_use_comment" value="1" <?=$board['bo_use_comment']?'checked':'';?>>사용 (댓글수 클릭시 새창으로 보임)
</td>
<td class="group_setting">
<input type="checkbox" id="chk_use_comment" name="chk_use_comment" value="1">
<label for="chk_use_comment">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_secret">비밀글 사용</label></th>
<td>

View File

@ -87,7 +87,6 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_use_secret = '{$_POST[bo_use_secret]}',
bo_use_dhtml_editor = '{$_POST[bo_use_dhtml_editor]}',
bo_use_rss_view = '{$_POST[bo_use_rss_view]}',
bo_use_comment = '{$_POST[bo_use_comment]}',
bo_use_good = '{$_POST[bo_use_good]}',
bo_use_nogood = '{$_POST[bo_use_nogood]}',
bo_use_name = '{$_POST[bo_use_name]}',
@ -262,7 +261,6 @@ if ($chk_category_list) {
}
if ($chk_use_sideview) $s .= " , bo_use_sideview = '{$bo_use_sideview}' ";
if ($chk_use_file_content) $s .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if ($chk_use_comment) $s .= " , bo_use_comment = '{$bo_use_comment}' ";
if ($chk_use_secret) $s .= " , bo_use_secret = '{$bo_use_secret}' ";
if ($chk_use_dhtml_editor) $s .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
if ($chk_use_rss_view) $s .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";

View File

@ -1,16 +1,8 @@
<?
include_once('./_common.php');
$cwin = "";
if (isset($_GET['cwin']) && $_GET['cwin']) {
$cwin = $_GET['cwin'];
}
if (!$board['bo_table']) {
if ($cwin) // 코멘트 보기
alert_close('존재하지 않는 게시판입니다.', $g4['path']);
else
alert('존재하지 않는 게시판입니다.', $g4['path']);
alert('존재하지 않는 게시판입니다.', $g4['path']);
}
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
@ -19,10 +11,7 @@ if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
if (!$bo_table) {
$msg = "bo_table 값이 넘어오지 않았습니다.\\n\\nboard.php?bo_table=code 와 같은 방식으로 넘겨 주세요.";
if ($cwin) // 코멘트 보기
alert_close($msg);
else
alert($msg);
alert($msg);
}
// wr_id 값이 있으면 글읽기
@ -30,20 +19,14 @@ if (isset($wr_id) && $wr_id) {
// 글이 없을 경우 해당 게시판 목록으로 이동
if (!$write['wr_id']) {
$msg = '글이 존재하지 않습니다.'.PHP_EOL.PHP_EOL.'글이 삭제되었거나 이동된 경우입니다.';
if ($cwin)
alert_close($msg);
else
alert($msg, './board.php?bo_table='.$bo_table);
alert($msg, './board.php?bo_table='.$bo_table);
}
// 그룹접근 사용
if (isset($group['gr_use_access']) && $group['gr_use_access']) {
if ($is_guest) {
$msg = "비회원은 이 게시판에 접근할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.";
if ($cwin)
alert_close($msg);
else
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
}
// 그룹관리자 이상이라면 통과
@ -195,26 +178,21 @@ $admin_href = "";
if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id']))
$admin_href = $g4['admin_path'].'/board_form.php?w=u&amp;bo_table='.$bo_table;
if (!($board['bo_use_comment'] && $cwin))
include_once('./board_head.php');
include_once('./board_head.php');
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
if (!($board['bo_use_comment'] && $cwin)) {
// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
if (isset($wr_id) && $wr_id) {
include_once('./view.php');
}
// 전체목록보이기 사용이 "예" 또는 wr_id 값이 없다면 목록을 보임
//if ($board['bo_use_list_view'] || empty($wr_id))
if ($member['mb_level'] >= $board['bo_list_level'] && $board['bo_use_list_view'] || empty($wr_id))
include_once ('./list.php');
include_once('./board_tail.php');
// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
if (isset($wr_id) && $wr_id) {
include_once('./view.php');
}
else
include_once('./view_comment.php');
// 전체목록보이기 사용이 "예" 또는 wr_id 값이 없다면 목록을 보임
//if ($board['bo_use_list_view'] || empty($wr_id))
if ($member['mb_level'] >= $board['bo_list_level'] && $board['bo_use_list_view'] || empty($wr_id))
include_once ('./list.php');
include_once('./board_tail.php');
echo "\\n<!-- 사용스킨 : {$board['bo_skin']} -->\\n";

View File

@ -83,5 +83,5 @@ sql_query(" delete from {$g4[board_new_table]} where bo_table = '{$bo_table}' an
// 4.1
@include_once($board_skin_path.'/delete_comment.tail.skin.php');
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$write[wr_parent].'&amp;cwin='.$cwin.'&amp;page='.$page. $qstr);
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$write[wr_parent].'&amp;page='.$page. $qstr);
?>

View File

@ -62,7 +62,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
{
if ($row['mb_id'] == $member['mb_id'] || $is_admin)
{
$list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;cwin='.$cwin.'&amp;page='.$page.$qstr;
$list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
$list[$i]['is_edit'] = true;
$list[$i]['is_del'] = true;
}
@ -70,7 +70,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
else
{
if (!$row['mb_id']) {
$list[$i]['del_link'] = './password.php?w=x&amp;bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;cwin='.$cwin.'&amp;page='.$page.$qstr;
$list[$i]['del_link'] = './password.php?w=x&amp;bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;page='.$page.$qstr;
$list[$i]['is_del'] = true;
}
}

View File

@ -8,10 +8,7 @@ set_session('ss_wr_id', $wr_id);
// 090713
if (!$board['bo_table']) {
if ($cwin) // 코멘트 보기
alert_close('존재하지 않는 게시판입니다.', $g4['path']);
else
alert('존재하지 않는 게시판입니다.', $g4['path']);
alert('존재하지 않는 게시판입니다.', $g4['path']);
}
if (!$bo_table) {

View File

@ -339,5 +339,5 @@ else if ($w == 'cu') // 코멘트 수정
@include_once($board_skin_path.'/write_comment_update.skin.php');
@include_once($board_skin_path.'/write_comment_update.tail.skin.php');
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr[wr_parent].'&amp;page='.$page.$qstr.'&amp;cwin='.$cwin.'#c_'.$comment_id);
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr[wr_parent].'&amp;page='.$page.$qstr.'&amp;#c_'.$comment_id);
?>

View File

@ -339,10 +339,7 @@ function get_list($write_row, $board, $skin_path, $subject_len=40)
$list['ca_name_href'] = $g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'&amp;sca='.urlencode($list['ca_name']);
$list['href'] = $g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'&amp;wr_id='.$list['wr_id'].$qstr;
if ($board['bo_use_comment'])
$list['comment_href'] = "javascript:win_comment('{$g4['bbs_path']}/board.php?bo_table={$board['bo_table']}&amp;wr_id={$list['wr_id']}&amp;cwin=1');";
else
$list['comment_href'] = $list['href'];
$list['comment_href'] = $list['href'];
$list['icon_new'] = '';
if ($list['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))

View File

@ -8,8 +8,6 @@ var char_min = parseInt(<?=$comment_min?>); // 최소
var char_max = parseInt(<?=$comment_max?>); // 최대
</script>
<? if ($cwin==1) { ?><table width=100% cellpadding=10 align=center><tr><td><?}?>
<!-- 코멘트 리스트 -->
<div id="commentContents">
<?
@ -93,7 +91,6 @@ for ($i=0; $i<count($list); $i++) {
<input type=hidden name=stx value='<?=$stx?>'>
<input type=hidden name=spt value='<?=$spt?>'>
<input type=hidden name=page value='<?=$page?>'>
<input type=hidden name=cwin value='<?=$cwin?>'>
<input type=hidden name=is_good value=''>
<table width=100% cellpadding=3 height=156 cellspacing=0 bgcolor="#ffffff" style="border:1px solid #fff; background:url(<?=$board_skin_path?>/img/co_bg.gif) x-repeat;">
@ -315,5 +312,3 @@ function comment_delete(url)
comment_box('', 'c'); // 코멘트 입력폼이 보이도록 처리하기위해서 추가 (root님)
</script>
<? } ?>
<? if($cwin==1) { ?></td><tr></table><p align=center><a href="javascript:window.close();"><img src="<?=$board_skin_path?>/img/btn_close.gif" border="0"></a><br><br><?}?>

View File

@ -1,7 +1,5 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// $cwin 은 댓글 새창일 때
?>
<script>
@ -10,8 +8,6 @@ var char_min = parseInt(<?=$comment_min?>); // 최소
var char_max = parseInt(<?=$comment_max?>); // 최대
</script>
<? if ($cwin==1) { ?><?}?>
<!-- 댓글 리스트 -->
<section id="commentContents">
<h2>댓글</h2>
@ -71,7 +67,6 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="cwin" value="<?=$cwin?>">
<input type="hidden" name="is_good" value="">
<div id="comment_write">
@ -278,5 +273,3 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
</script>
<? } ?>
</section>
<? if($cwin==1) { ?><?}?>