테스트 사이트 - 개발 중인 베타 버전입니다

자동등록방지 숫자에 관하여... 채택완료

nanati 10년 전 조회 3,402

 

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

그누프레스를 깔았어요,

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

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

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

뭐가 잘못된 걸까요? ㅠ ㅠ

 

http://nanati.me/guestbook?wr_id=1" target="_self">http://nanati.me/guestbook?wr_id=1 

 

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

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

답변 2개

채택된 답변
+20 포인트
thisgun
10년 전

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

 

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

 

20번째줄 

 

    protected function __construct() {

        $this->get_table_array();

        $this->get_config();

        $this->get_config_js();

    } 

 

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

 

</p><p>protected function __construct() { </p><p>}</p><p>

 

그리고 거의 끝 줄에 보시면

 

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

        return $this->$options;

    } 

 

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

 

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

 

답변 다시 추가 ㅠㅠ

또 고칠게 있네요 ㅠㅠ

 

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

        ));

    } 

 

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

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

 

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

로그인 후 평가할 수 있습니다

답변에 대한 댓글 4개

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

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]
n
nanati
10년 전
오마이갓!! 감사합니다 ㅎ건님!!
해결되었어요 숫자가 잘 보이네요 ^^
항상 감사합니다~~~
t
thisgun
10년 전
피드백 감사합니다~

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

p
10년 전

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

 

 

 

XMLHttpRequest cannot load http://nanati.me/wp-admin/admin-ajax.php">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">http://nanati.boo.jp' is therefore not allowed access. 

 

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

 

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

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

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

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

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

로그인