제로보드 XE 1.1.0 업데이트 후 게시판 조회수 변경은?


1.1.0 업후에 조회수 클릭마다 올라가게 하려면 document.controller 어디를 수정해야하나요?


337.
/**
338.
 * @brief 해당 document의 조회수 증가
339. **/
340.function updateReadedCount($oDocument) {
341.    $document_srl = $oDocument->document_srl;
342.    $member_srl = $oDocument->get('member_srl');
343.    $logged_info = Context::get('logged_info');
344.  
345.    // 조회수 업데이트가 되면 trigger 호출 (after)
346.    $output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
347.    if(!$output->toBool()) return $output;
348.    // session에 정보로 조회수를 증가하였다고 생각하면 패스
349.    if($_SESSION['readed_document'][$document_srl]) return false;
350.  
351.    // 글의 작성 ip와 현재 접속자의 ip가 동일하면 패스
352.    if($document->ipaddress == $_SERVER['REMOTE_ADDR']) {
353.        $_SESSION['readed_document'][$document_srl] = true;
354.        return false;
355.    }
356.  
357.    // document의 작성자가 회원일때 글쓴이와 현재 로그인 사용자의 정보가 일치하면 읽었다고 판단후 세션 등록하고 패스
358.    if($member_srl && $logged_info->member_srl == $member_srl) {
359.        $_SESSION['readed_document'][$document_srl] = true;
360.        return false;
361.    }
362.  
363.    // 조회수 업데이트
364.    $args->document_srl = $document_srl;
365.    $output = executeQuery('document.updateReadedCount', $args);
366.  
367.    // 세션 등록
368.    $_SESSION['readed_document'][$document_srl] = true;
369.}


348~361줄 제거하시면 됩니다.
혹은, 아래로 대체

337./**
338. * @brief 해당 document의 조회수 증가
339. **/
340.
function updateReadedCount($oDocument) {

341.    $document_srl = $oDocument->document_srl;
342.    $member_srl = $oDocument->get('member_srl');
343.    $logged_info = Context::get('logged_info');
344.  
345.    // 조회수 업데이트가 되면 trigger 호출 (after)
346.    $output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
347.    if(!$output->toBool()) return $output;
348.  
349.    // 조회수 업데이트
350.    $args->document_srl = $document_srl;
351.    $output = executeQuery('document.updateReadedCount', $args);
352.}




 


아이폰으로 TV를 볼 수 있는 페이지 입니다. 개인 소장용 페이지라고 보시면 됩니다. 소문은 내지 마세요. 짤립니다.
※ 아이폰 사파리로 접속하세요. torrento.kr

댓글을 달아 주세요

<PREV 1 ... 41 42 43 44 45 46 47 48 49 ... 281 NEXT>