i

댓글 삭제버튼이 관리자에게만 보입니다

· 2013-07-13 (토) 15:03:53 · 1467 · 2
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=122854&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EB%A9%94%EB%AA%A8%EC%9E%A5

원본 게시판은 위의 링크입니다.
수정해서 사용하고 있는데 댓글 삭제버튼이 관리자에게만 보여요. 왜 그런지 이유를 모르겠습니다ㅠㅠ
그리고 비밀글을 작성하면 작성한 본인만 내용이 보이고 관리자에게도 보이지 않습니다.
전에도 질문을 드려서 답변해주신대로 했는데 해결이 되지 않아서 이부분도 다시한번 질문드립니다.
제가 수정해서 사용하고 있는 스킨파일 첨부할게요.
문제되면 말씀 부탁드립니다.

첨부파일

memo.zip (36.4 KB) 0회 2013-07-13 15:03
|

댓글 2개

소스 파일을 봐야 알수있겠지만 삭제버튼 위쪽부분에 is_admin 이나 super 조건문이 작성되어 있는지 살펴보시기 바랍니다
답변 감사드립니다~ 확인이 늦었네요ㅠㅠ. 방명록형 게시판이라 list.skin.php에 코멘트 리스트가 출력되는데 저로서는 어디서 잘못된 건지 잘 모르겠습니다. 다른 스킨과도 비교해봤지만 딱히 어디가 문제인지...ㅠㅠ 혹 시간이 되시면 한번 봐주십사 부탁드립니다

<!-- 코멘트 리스트 -->
<?
$cosql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";
$coresult = sql_query($cosql);

for ($ii=0; $corow=sql_fetch_array($coresult); $ii++)
{
$colist[$ii] = $corow;

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



// 공백없이 연속 입력한 문자 자르기 (way 보드 참고. way.co.kr)

$c_secret_f= 1;
$colist[$ii][content] = $colist[$ii][content1]= "비밀글 입니다";
if (!strstr($corow[wr_option], "secret") ||
$is_admin ||
($write[mb_id]==$member[mb_id] && $member[mb_id]) ||
($corow[mb_id]==$member[mb_id] && $member[mb_id])) {
$c_secret_f= 0;
$colist[$ii][content1] = $corow[wr_content];
$colist[$ii][content] = conv_content($corow[wr_content], 0, 'wr_content');
$colist[$ii][content] = search_font($stx, $colist[$ii][content]);
}

$colist[$ii][trackback] = url_auto_link($corow[wr_trackback]);
$colist[$ii][datetime] = substr($corow[wr_datetime],0,16);

// 관리자가 아니라면 중간 IP 주소를 감춘후 보여줍니다.
$colist[$ii][ip] = $corow[wr_ip];
if (!$is_admin)
$colist[$ii][ip] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $corow[wr_ip]);

$colist[$ii][is_reply] = false;
$colist[$ii][is_edit] = false;
$colist[$ii][is_del] = false;
if ($is_comment_write || $is_admin)
{
if ($member[mb_id])
{
if ($corow[mb_id] == $member[mb_id] || $is_admin)
{
$colist[$ii][del_link] = "./delete_comment.php?bo_table=$bo_table&comment_id=$corow[wr_id]&token=$token&cwin=$cwin&page=$page".$qstr;
$colist[$ii][is_edit] = true;
$colist[$ii][is_del] = true;
}
}
else
{
if (!$corow[mb_id]) {
$colist[$ii][del_link] = "./password.php?w=x&bo_table=$bo_table&comment_id=$corow[wr_id]&cwin=$cwin&page=$page".$qstr;
$colist[$ii][is_del] = true;
}
}

if (strlen($corow[wr_comment_reply]) < 5)
$colist[$ii][is_reply] = true;
}

// 05.05.22
// 답변있는 코멘트는 수정, 삭제 불가
if ($ii > 0 && !$is_admin)
{
if ($corow[wr_comment_reply])
{
$tmp_comment_reply = substr($corow[wr_comment_reply], 0, strlen($corow[wr_comment_reply]) - 1);
if ($tmp_comment_reply == $colist[$ii-1][wr_comment_reply])
{
$colist[$ii-1][is_edit] = false;
$colist[$ii-1][is_del] = false;
}
}
}

$t_name= $colist[$ii][name];
$t_content= $colist[$ii][content];
$t_date= $colist[$ii][datetime];
$t_id= $colist[$ii][wr_id];

echo "<div style='padding:5 10 10 10;text-align:justify;'>";
for ($tc= 0; $tc< strlen($colist[$ii][wr_comment_reply]); $tc++) echo "     ";
if($c_secret_f)
echo "<span class='small' style='color:#ff6600;'>$t_content</span> <span class='c_date'>$t_date</span>";
else {
if ($colist[$ii][wr_homepage]) { echo "<a href=\"http://{$colist[$ii][wr_homepage]}\">"; }
else if ($colist[$ii][wr_email]) { echo "<a href=\"mailto:{$colist[$ii][wr_email]}\">"; }
else {echo "<a name=\"\">"; }
echo "<span class='c_name'><NOBR>$t_name</NOBR></span></a>  <span class='c_date'>$t_date</span>";
if ($colist[$ii][is_del])
echo "  <a href=\"javascript:comment_delete('{$colist[$ii][del_link]}');\" class='write'>-delete</a> ";
if(strstr($corow[wr_option], "secret"))
echo "<span style='color:#ff6600;'><br />$t_content";
else
echo "<br />$t_content";
}
echo "</div>";
}
?>
<!-- 코멘트 리스트 끝 -->
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-07-14 조회 1,761
13-07-14 조회 997
13-07-14 조회 1,119
13-07-14 조회 2,235
13-07-14 조회 1,155
13-07-14 조회 1,686
13-07-14 조회 1,956
13-07-14 조회 1,726
13-07-13 조회 1,731
13-07-13 조회 1,773
13-07-13 조회 1,706
13-07-13 조회 1,245
13-07-13 조회 2,042
13-07-13 조회 1,692
13-07-13 조회 1,086
13-07-13 조회 1,656
13-07-13 조회 1,239
13-07-13 조회 1,468
13-07-13 조회 2,057
13-07-13 조회 1,841