RadarURL

조회 수 5368 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
오래전 어떤분이 올린 팁이라 좋아서 다시 한번 올립니다
아래팁으로 하니까 게시판 아래 게시물을 읽은 사람 리스트가 다 쭈욱 나옵니다..
그런데 문제는 관리자, 회원 모두가 보여 집니다
아무래도 회원이 자신이 노출이 되면 거부반응이 생기겠지요
그래서 관리지만 볼수 있게 할려면 어떻게 해야 하나 그것은 고수님들이 알려 주시기 바랍니다

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
table에 field를 추가하지 않고 예비용 field인 x,y를 이용해서 하는 법입니다.

먼저, 읽은 사람 리스트를 적용할 게시판의 id에 해당하는 테이블인
zetyx_board_id 테이블의 x,y의 자료형을 text로 수정하고요,

적용할 스킨의 view.php파일의 적당한 곳에 다음 내용을 삽입합니다.

<!--본문 읽은 회원 표시 시작-->
<?
$_zb_path = "/home/php/zb/"; // 제로보드 절대경로
include $_zb_path."outlogin.php";

if (10>$member[level]) {
$strArray = "";
$strArray = explode(" ",$data[x]);
if (($member[is_admin]==1) or ($data[name] == $member[name]) or array_search($member[user_id],$strArray)) {
$x=$data[x];
$y=$data[y];
} else {
if (!$data[x] and !$data[y]) {
$x=" ".$member[user_id];
$y=$member[name];
} else {
$x=$data[x]." ".$member[user_id];
$y=$data[y].",".$member[name];
}
}

@mysql_query("update $t_board"."_$id set x='$x' where no='$no'") or error(mysql_error());
@mysql_query("update $t_board"."_$id set y='$y' where no='$no'") or error(mysql_error());

echo "<table border=0 cellspacing=0 cellpadding=2 width=$width><tr>
<td bgcolor=#EEEEEE><font color=#555555>
이글을 읽은 회원들 : $y
</td>
</tr></table>";
}
?>
<!--끝-->


위와 같이 작성하면,

글작성자, 관리자는 표시되지 않고요,
한번 이상 글을 읽은 사람은 한번만 표시됩니다.


관리자만 보게 하기//


@mysql_query("update $t_board"."_$id set x='$x' where no='$no'") or error(mysql_error());
@mysql_query("update $t_board"."_$id set y='$y' where no='$no'") or error(mysql_error());

echo "<table border=0 cellspacing=0 cellpadding=2 width=$width><tr>
<td bgcolor=#EEEEEE><font color=#555555>
이글을 읽은 회원들 : $y
</td>
</tr></table>";
}
?>
<!--끝-->

를 아래와 같이 바꿔 주세요.===============================


@mysql_query("update $t_board"."_$id set x='$x' where no='$no'") or error(mysql_error());
@mysql_query("update $t_board"."_$id set y='$y' where no='$no'") or error(mysql_error());

if ($member[is_admin]==1) {
echo "<table border=0 cellspacing=0 cellpadding=2 width=$width><tr>
<td bgcolor=#EEEEEE><font color=#555555>

이글을 읽은 회원들 : $y ";

}
else
{
}
echo "
</td>
</tr></table>";
}
?>
<!--끝-->

================================= 관리자 외에는
이글을 읽은 회원들 :
항목이 보이지 않습니다.

출처 : http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=읽은&select_arrange=headnum&desc=asc&no=7003
?

공부 게시판

공부에 도움되는 글을 올려주세요.

  1. [공지] 공부 게시판 입니다.

    Date2003.08.18 By처누 Views928138
    read more
  2. WIndows Application의 실행 속도 측정

    Date2023.09.06 Category응용 프로그래밍 ByJaeSoo Views3185
    Read More
  3. 메모리 부족 현상 (allowed memory size of 134217728 bytes..)

    Date2023.08.01 Category웹 프로그래밍 ByJaeSoo Views2207
    Read More
  4. Guzzle - cURL error 60: SSL certificate problem: unable to get local issuer certificate 문제 해결

    Date2023.07.30 Category웹 프로그래밍 ByJaeSoo Views2188
    Read More
  5. XE 캐시파일 재성생후 404 Oops, Sorry. Page is not found! 나올때

    Date2023.07.29 Category웹 프로그래밍 ByJaeSoo Views2117
    Read More
  6. [Apple] 엔터프라이즈 계정신청 (Enterprise Program)

    Date2023.03.27 Category응용 프로그래밍 ByJaeSoo Views267
    Read More
  7. XE - " Fatal error: Class 'Object' not found in " / class 낫파운드 오류

    Date2023.03.20 Category웹 프로그래밍 ByJaeSoo Views147
    Read More
  8. [MSA] MSA란 무엇인가? 개념 이해하기

    Date2023.01.26 Category응용 프로그래밍 ByJaeSoo Views210
    Read More
  9. iOS 앱 개발을 위한 인증서 생성 및 관리

    Date2023.01.18 Category웹 프로그래밍 ByJaeSoo Views218
    Read More
  10. [ iOS ] 앱 스토어 개인, 회사, 엔터프라이즈 차이점

    Date2023.01.09 Category프로그래밍 ByJaeSoo Views237
    Read More
  11. PHP 파서 이해하기 (<?php의 php를 생략하고 간단히 <? 태그 와 ?> 태그를 사용하는 방법)

    Date2016.08.10 Category웹 프로그래밍 ByJaeSoo Views322
    Read More
  12. SVN의 cleanup 에러시 해결방법

    Date2016.05.05 Category프로그래밍 ByJaeSoo Views728
    Read More
  13. [오류해결] svn cleanup failed-previous operation has not finished; run cleanup if it was interrupted

    Date2016.05.05 Category프로그래밍 ByJaeSoo Views611
    Read More
  14. TortoiseSVN 계정변경

    Date2016.05.05 Category프로그래밍 ByJaeSoo Views582
    Read More
  15. SVN passwd 설정 : 계정 (users/passwd)

    Date2016.05.04 Category프로그래밍 ByJaeSoo Views543
    Read More
  16. XE 비회원 글쓰기 항목 지우기

    Date2016.04.28 Category웹 프로그래밍 ByJaeSoo Views499
    Read More
  17. 메모리 영역 (code, data, stack, heap)

    Date2016.03.23 Category응용 프로그래밍 ByJaeSoo Views747
    Read More
  18. [SVN] Subversion 명령들

    Date2016.02.06 Category응용 프로그래밍 ByJaeSoo Views967
    Read More
  19. IBM JDK 1.6 에서 Spring 2.5.2를 사용할 때 GenericTypeResolver 에서 NullPointerException이 발생하는 문제

    Date2016.01.27 Category응용 프로그래밍 ByJaeSoo Views787
    Read More
  20. 오른쪽 마우스 금지 소스 / 드래그 금지 소스

    Date2016.01.20 Category웹 프로그래밍 ByJaeSoo Views475
    Read More
  21. [전자정부 표준프레임워크] 톰캣(Tomcat) 설치하기

    Date2016.01.02 Category응용 프로그래밍 ByJaeSoo Views535
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 18 Next
/ 18


즐겨찾기 (가족)

JAESOO's HOMEPAGE


YOUNGAE's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

숭실대 컴퓨터 통신연구실 (서창진)

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

아스가르드 좋은사람/나쁜사람

JServer.kr

제이서버 메타블로그

재수 티스토리


즐겨찾기 (강의, 커뮤니티)

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너