[G5] 댓글, 비밀번호 찾기, ajax 에 SSL( https ) 적용하기 > 기술자료

본문 바로가기

사이트 내 전체검색

[G5] 댓글, 비밀번호 찾기, ajax 에 SSL( https ) 적용하기 > 기술자료

그누보드 [G5] 댓글, 비밀번호 찾기, ajax 에 SSL( https ) 적용하기

페이지 정보


본문

아래 이슈는 그누보드 5.2.9 ( https://sir.kr/g5_pds/3678 )에서 해결되었습니다.
https://github.com/gnuboard/gnuboard5/commit/7bb40dd8828264f8ddceb2ba0db3da4e9ba2d435

++++++++++++++++++++++++++++++++++++++++++++++++++++

그누보드5 / config.php 의 설정을 아래와 같이 사용 하는 경우 https 적용 하기
define('G5_DOMAIN', 'https://www.happyjung.com');
define('G5_HTTPS_DOMAIN', 'https://www.happyjung.com:12345');

게시글 작성은 https 가 정상작동되지만, 댓글 작성과 패스워드(비밀번호) 찾기의 경우는 적용이 안됩니다. 



1. 그누보드5 / skin / board / basic / view_comment.skin.php   94라인 내용에서

    <form name="fviewcomment" action="...
 
의 action 내용을 아래와 같이 변경합니다.
 
    <form name="fviewcomment" action="<?php echo https_url(G5_BBS_DIR); ?>/write_comment_update.php" onsubmit="return 



2. 그누보드5 / bbs / password.php 를 아래와 같이 변경합니다.

<?php
include_once('./_common.php');

$g5['title'] = '비밀번호 입력';

$https_url = G5_HTTPS_DOMAIN."/bbs";
$http_url = G5_DOMAIN."/bbs";

switch ($w) {
    case 'u' :
        $action = $https_url.'/write.php';
        $return_url = $http_url.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
        break;
    case 'd' :
        set_session('ss_delete_token', $token = uniqid(time()));
        $action = $https_url.'/delete.php?token='.$token;
        $return_url = $http_url.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
        break;
    case 'x' :
        set_session('ss_delete_comment_'.$comment_id.'_token', $token = uniqid(time()));
        $action = $https_url.'/delete_comment.php?token='.$token;
        $row = sql_fetch(" select wr_parent from $write_table where wr_id = '$comment_id' ");
        $return_url = $http_url.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_parent'];
        break;
    case 's' :
        // 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
        if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
            goto_url($http_url.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
        else {
            $action = $https_url.'/password_check.php';
            $return_url = $http_url.'/board.php?bo_table='.$bo_table;
        }
        break;
    case 'sc' :
        // 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
        if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
            goto_url($http_url.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
        else {
            $action = $https_url.'/password_check.php';
            $return_url = $http_url.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
        }
        break;
    default :
        alert('w 값이 제대로 넘어오지 않았습니다.');
}

include_once(G5_PATH.'/head.sub.php');

//if ($board['bo_include_head']) { @include ($board['bo_include_head']); }
//if ($board['bo_content_head']) { echo stripslashes($board['bo_content_head']); }

/* 비밀글의 제목을 가져옴 지운아빠 2013-01-29 */
$sql = " select wr_subject from {$write_table}
                      where wr_num = '{$write['wr_num']}'
                      and wr_reply = ''
                      and wr_is_comment = 0 ";
$row = sql_fetch($sql);

$g5['title'] = get_text($row['wr_subject']);

include_once($member_skin_path.'/password.skin.php');

//if ($board['bo_content_tail']) { echo stripslashes($board['bo_content_tail']); }
//if ($board['bo_include_tail']) { @include ($board['bo_include_tail']); }

include_once(G5_PATH.'/tail.sub.php');
?>

댓글목록

등록된 댓글이 없습니다.


Total 2,650건 33 페이지
  • RSS
기술자료 목록
열람
그누보드   18646  2017-07-02 01:41 ~ 2017-11-01 16:16  
2009
그누보드   16186  2017-06-30 02:56 ~ 2017-07-02 00:00  
2008
그누보드   11039  2017-06-29 18:46  
2007
테크노트   12045  2017-06-28 15:53  
2006
영카트   11904  2017-06-27 14:03  
2005
영카트   15723  2017-06-27 13:03  
2004
영카트   22096  2017-06-22 21:47 ~ 2017-07-03 00:00  
2003
영카트   11294  2017-06-22 17:17  
2002
Secure   10938  2017-06-15 14:32  
2001
그누보드   13252  2017-06-15 11:52 ~ 2021-07-08 07:58  
2000
Secure   11644  2017-06-14 13:45  
1999
그누보드   16052  2017-06-09 17:39  
1998
영카트   16328  2017-06-08 03:35  
1997
etc쇼핑몰   11145  2017-06-07 13:40  
1996
그누보드   15565  2017-06-02 00:55 ~ 2018-07-06 11:36  
1995
Secure   18334  2017-06-01 03:31  
1994
그누보드   13531  2017-05-30 03:39  
1993
그누보드   16940  2017-05-29 23:19 ~ 2019-08-12 11:18  
1992
그누보드   16294  2017-05-29 18:49 ~ 2017-11-10 06:17  
1991
PHP   14040  2017-05-26 17:29  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 1동 222호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 제2024-대전대덕-0405호 [사업자등록확인]  
Copyright 2001~2026 해피정닷컴. All Rights Reserved.