채택완료

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

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

그누프레스를 깔았어요,

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

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

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

뭐가 잘못된 걸까요? ㅠ ㅠ

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

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

|

답변 2개 / 댓글 5개

채택된 답변
+20 포인트

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

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

20번째줄 

    protected function __construct() {

        $this->get_table_array();

        $this->get_config();

        $this->get_config_js();

    } 

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

Copy
protected function __construct() { }

그리고 거의 끝 줄에 보시면

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

        return $this->$options;

    } 

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

Copy
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')

        ));

    } 

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

Copy
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')        ));    }

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

답변에 대한 댓글 4개

감사합니다 잘 부탁드립니다 ^^
(근데 적용했는데 하얗게만 보이고 안보여서용;;)
나나티님 죄송해요 ㅠ
또 고칠게 있네요.

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')
));
}

이렇게 되어 있는것을 아래와 같이 고쳐주세요.
[code]
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')
));
}
[/code]
오마이갓!! 감사합니다 ㅎ건님!!
해결되었어요 숫자가 잘 보이네요 ^^
항상 감사합니다~~~
피드백 감사합니다~

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

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 

답변에 대한 댓글 1개

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

답변을 작성하려면 로그인이 필요합니다.