자동등록방지 숫자에 관하여...

자동등록방지 숫자에 관하여...

QA

자동등록방지 숫자에 관하여...

본문

 

저도 이용중인 워드프레스 게시판에 

그누프레스를 깔았어요,

전체적인 분위기를 맞추고 싶어서 

CSS를 조금 만졌는데... (디폴트 CSS 외에는 만진게 없습니다.)

그런데 자동등록방지 숫자 이미지가 안뜨는데..

뭐가 잘못된 걸까요? ㅠ ㅠ

 

http://nanati.me/guestbook?wr_id=1 

 

이 페이지거든요~ 아시는 분 답변 부탁드립니다. 감사합니다^^

이 질문에 댓글 쓰기 :

답변 2

나나티님 알려주셔서 감사합니다.

 

/gnupress/lib/g5_var.class.php 에서

 

20번째줄 

 

    protected function __construct() {

        $this->get_table_array();

        $this->get_config();

        $this->get_config_js();

    } 

 

이렇게 되어 있는것을 아래와 같이 바꿔주세요.

 


protected function __construct() { 
}

 

그리고 거의 끝 줄에 보시면

 

    public function get_options($options='db_tables') {

        return $this->$options;

    } 

 

이렇게 되어 있는것을 아래와 같이 바꿔주세요.

 


    public function get_options($options='db_tables') {
 
        if( ! $this->db_tables && $options == 'db_tables' ){
            $this->get_table_array();
        } else if( ! $this->config && $options == 'config' ){
            $this->get_config();
        } else if( ! $this->js && $options == 'js' ){
            $this->get_config_js();
        }
 
        return $this->$options;
    } 

 

답변 다시 추가 ㅠㅠ

또 고칠게 있네요 ㅠㅠ

 

    public function get_config_js() {

 

        $this->js = apply_filters( 'g5_js_defaults', array(

            'bbs_url' => get_permalink( get_the_ID() ),

            'is_member' => get_current_user_id() ? true : false,

            'is_admin' => current_user_can( 'administrator' ) ? 'super' : '',

            'is_mobile' => wp_is_mobile(),

            'bo_table' => '',

            'plugin_url' => G5_PLUGIN_URL,

            'ajax_url' => admin_url('admin-ajax.php')

        ));

    } 

 

이렇게 되어 있는것을 아래와 같이 고쳐주세요.


    public function get_config_js() {
 
        $tmp_url = explode('wp-content', G5_PLUGIN_URL);
 
        $this->js = apply_filters( 'g5_js_defaults', array(
            'bbs_url' => get_permalink( get_the_ID() ),
            'is_member' => get_current_user_id() ? true : false,
            'is_admin' => current_user_can( 'administrator' ) ? 'super' : '',
            'is_mobile' => wp_is_mobile(),
            'bo_table' => '',
            'plugin_url' => site_url('/wp-content'.$tmp_url[1]),
            'ajax_url' => admin_url('admin-ajax.php')
        ));
    } 

 

수정된것은 다음 버젼에 배포하겠습니다.

나나티님 죄송해요 ㅠ
또 고칠게 있네요.
 
    public function get_config_js() {
 
        $this->js = apply_filters( 'g5_js_defaults', array(
            'bbs_url' => get_permalink( get_the_ID() ),
            'is_member' => get_current_user_id() ? true : false,
            'is_admin' => current_user_can( 'administrator' ) ? 'super' : '',
            'is_mobile' => wp_is_mobile(),
            'bo_table' => '',
            'plugin_url' => G5_PLUGIN_URL,
            'ajax_url' => admin_url('admin-ajax.php')
        ));
    }
 
이렇게 되어 있는것을 아래와 같이 고쳐주세요.


    public function get_config_js() {
 
        $tmp_url = explode('wp-content', G5_PLUGIN_URL);
 
        $this->js = apply_filters( 'g5_js_defaults', array(
            'bbs_url' => get_permalink( get_the_ID() ),
            'is_member' => get_current_user_id() ? true : false,
            'is_admin' => current_user_can( 'administrator' ) ? 'super' : '',
            'is_mobile' => wp_is_mobile(),
            'bo_table' => '',
            'plugin_url' => site_url('/wp-content'.$tmp_url[1]),
            'ajax_url' => admin_url('admin-ajax.php')
        ));
    } 

해당 부분 확인 부탁드립니다.

 

 

 

XMLHttpRequest cannot load http://nanati.me/wp-admin/admin-ajax.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nanati.boo.jp' is therefore not allowed access. 

 

해결방법은 아래 링크 참조하세요.

 

http://ysoftman.blogspot.kr/2014/09/javascript-no-access-control-allow.html 

... 답변 감사합니다 ㅠ ㅠ
죄송한데 서버관련쪽은 전혀 몰라서...
링크 들어가서 봤는데
어디를 어떻게 수정하라는 건지 전혀 모르겠네요;;
그 문제 같기도 한데...  분명 한글인데 외국어 같네요 ㅠ ㅠ

답변을 작성하시기 전에 로그인 해주세요.
전체 123,823 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT