웹마스터 팁
글을 읽을때 마다 조회수가 증가 하는 팁 (1.0.0↑)
2008.04.12 21:37
1.0.0 버전 이상
zbxe\modules\document에서 document.controller.php의 325번~357번 라인을 수정해주시면 됩니다.
/**
* @brief 해당 document의 조회수 증가
**/
function updateReadedCount($oDocument) {
$document_srl = $oDocument->document_srl;
$member_srl = $oDocument->get('member_srl');
$logged_info = Context::get('logged_info');
// 조회수 업데이트가 되면 trigger 호출 (after)
$output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
if(!$output->toBool()) return $output;
/* session에 정보로 조회수를 증가하였다고 생각하면 패스
if($_SESSION['readed_document'][$document_srl]) return false; */
// 글의 작성 ip와 현재 접속자의 ip가 동일하면 패스
if($document->ipaddress == $_SERVER['REMOTE_ADDR']) {
$_SESSION['readed_document'][$document_srl] = true;
return false;
}
// document의 작성자가 회원일때 글쓴이와 현재 로그인 사용자의 정보가 일치하면 읽었다고 판단후 세션 등록하고 패스
if($member_srl && $logged_info->member_srl == $member_srl) {
$_SESSION['readed_document'][$document_srl] = true;
return false;
}
// 조회수 업데이트
$args->document_srl = $document_srl;
$output = executeQuery('document.updateReadedCount', $args);
// 세션 등록
$_SESSION['readed_document'][$document_srl] = true;
}
댓글 5
-
font
2008.04.13 18:45
하이퍼링크 게시판의 "게시물리스트페이지" 링크에서 링크 ( 확장값에서 홈페이지 주소)를 클릭했을때에도 조회수가 올라가나요? -
SKYMARU
2008.04.13 20:27
페이지 로드가 다시 되지 않는 이상 조회수는 올라가지 않는걸로 알고 있습니다.
-
행복한일상
2008.04.28 06:52
블로그 형태에서도 올라가는지요...
저 같은 경우엔 리스트형태가 아닌 블로그 형태로 하니까 다른회원이 접속해서 읽어도 조회수 변화가 없습니다.
리스트로 변경해서 읽으면 변화가 계속 생기는데 말입니다. -
asdasd
2009.03.06 08:49
In winter, I haveRunescape Money in the indoorRunescape Power leveling comfort. My Runescape Gold apartment colleagues, friends, IFinal Fantasy XI gil worked day andffxi gil night. They are buy ffxi gil accustomed to behind dofus kamas the soul, the need kamas dofus for money was so official. I dofus kamas would like to spendkamas dofus the nightdofus kamas in strange house, with kamas dofus creaks of the wall, I do dofus kamas not know, and sitkamas dofus on the phone that ourdofus kamas landlord had been kamas dofus closed, and talk aboutbuy kamas the past, to the voice of my mother's ring, my best friend -
zxc
2009.03.06 08:54
In winter, I haveRunescape Money in the indoorRunescape Power leveling comfort. My Runescape Gold apartment colleagues, friends, IFinal Fantasy XI gil worked day andffxi gil night. They are buy ffxi gil accustomed to behind dofus kamas the soul, the need kamas dofus for money was so official. I dofus kamas would like to spendkamas dofus the nightdofus kamas in strange house, with kamas dofus creaks of the wall, I do dofus kamas not know, and sitkamas dofus on the phone that ourdofus kamas landlord had been kamas dofus closed, and talk aboutbuy kamas the past, to the voice of my mother's ring, my best friend
제목 | 글쓴이 | 날짜 |
---|---|---|
(보드 모듈) 글 목록을 조회수 별로 색상 지정하기 [15] | Simulz | 2007.09.27 |
글을 읽을때마다 조회수 증가 하게 하는 팁 [19] | 비밀얌 | 2007.11.06 |
글을 읽을때 마다 조회수 증가시키기 (0.2.9수정#3) [1] | SKYMARU | 2008.02.20 |
글을 읽을때 마다 조회수가 증가 하는 팁 (1.0.0↑) [5] | SKYMARU | 2008.04.12 |
게시물목록의 조회수 등의 글씨(폰트), 폰트 크기, 색깔 변경 [1] | winter548 | 2008.05.17 |
☆조회수.추천수 구간에 따른 이미지 나타내기(Hot 등..) - 갤러리게시판&최근이미지위젯☆ [5] | 오기오기 | 2008.06.12 |
글 읽을 때마다 조회수 증가하는 법 알려주세요 [1] | 홍정환873 | 2009.03.27 |
클릭마다 조회수 올리기 [1.4.0] [12] | 지B | 2009.04.04 |
게시판 스킨에서 조회수, 추천수, 최근 수정일 외 항목도 정렬가능하게 하기 | SMaker | 2009.06.11 |
게시글 조회수 바꾸기 [4] | 지B | 2009.08.15 |
주소 보여주기 시를 때 제가 자주 쓰는 방법 이건 조회수 빵이다 ㅡ0ㅡ; [21] | ☆좀비파우더™ | 2003.01.28 |
조회수 클릭때마다 올라가기(1.4.5.7 버전에서 되네요) [2] | 아네모네 | 2011.06.20 |
조회수 제한 풀고, 조회수 증가값을 더 크게 하는 소스 [7] | sejin7940 | 2011.08.21 |
조회수 클릭때마다 올라가기(1.5.2 버전) 송동우님 팁 [7] | 때린데 또때려 | 2012.04.08 |
[주옥시리즈]글 목록을 조회수 별로 색상 지정하기 [9] | socialskyo | 2013.09.06 |
[주옥시리즈]글 목록을 조회수 별로 색상 지정하기 | socialskyo | 2013.09.09 |
XE Core:1.7.5.3 조회수 증가, 자기 게시글 클릭시 조회수 증가 [1] | 때린데 또때려 | 2014.07.04 |