Extra Form
PHP PHP 5.5
CMS XpressEngine

2222.png

 

배너위젯을 사용중입니다.

url에 www.naver.com을 기입하고

배너를 클릭하면 "제홈페이지주소+www.naver.com"이 합쳐진

'제홈페이지주소/www.naver.com' 으로 이동이 됩니다.

소스를 아무리 찾아봐도 문제는 안보이는데 도와주세요.

 

아래는 해당 클래스파일입니다.

 

    class eond_fileboxBanner extends WidgetHandler {

        /**
         * @brief 위젯의 실행 부분
         *
         * ./widgets/위젯/conf/info.xml 에 선언한 extra_vars를 args로 받는다
         * 결과를 만든후 print가 아니라 return 해주어야 한다
         **/
        function proc($args) {
            foreach(array('title', 'url', 'img') as $type){
                for($i=1;$i<=20;$i++){
                    $key = $type . "_" . $i;
                    $widget_info->$key = $args->$key;
                }
            }
            Context::set('widget_info', $widget_info);
            

            $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
            Context::set('colorset', $args->colorset);

            $tpl_file = 'skin'; // 위젯 스킨의 템플릿 파일명을 지칭함. 해당 위젯의 스킨 파일은 이 이름을 써야 동작함.

            $oTemplate = &TemplateHandler::getInstance();
            return $oTemplate->compile($tpl_path, $tpl_file);
        }
    }

  • ?
    스킨을 그렇게 만드신거 같네요.
  • profile
    어떻게 해야 될까요? ㅠㅠ
  • ?
    설정에서 url 을 http 붙여서 해보시겠어요?
  • profile
    url 주소에 www.naver.com 만 쓰면 당연히 상대경로로 인식해 하위 주소로 생각 하지 않을까요?
    https://naver.com 으로 절대경로로 적어보세요.
  • profile profile
    헉 감사합니다. 상대경로로 인식한거 같습니다. 참 별 거 아닌걸로 한참 찾았네요. 감사합니다.