묻고답하기

pop_up.addon.php는

 

<?PHP

    if(!defined("__ZBXE__")) exit();

    if(false || $called_position == 'before_module_proc' ) {  
  
  
  function getPopupScript($val){

   if($val->content){
    $order   = array("\r\n", "\n", "\r");
    $replace = '';

    $val->content = str_replace($order, $replace, $val->content);
   }
    
   return " jQuery('<div></div>').xe_popup({id:'".$val->popup_conn_srl."'"
    .($val->popup_type?",popup_type:'".$val->popup_type."'":"")
    .($val->content?",content:'".$val->content."'":"")
    .($val->popup_url?",url:'".$val->popup_url."'":"")
    .($val->popup_linkto?",linkto:'".$val->popup_linkto."'":"")
    .($val->popup_linkto_newwindow?",linkto_newwindow:'".$val->popup_linkto_newwindow."'":"")
    .($val->open_type?",open_type:'".$val->open_type."'":"")
    .($val->top?",top:'".$val->top."px'":"")
    .($val->left?",left:'".$val->left."px'":"")
    .($val->width?",width:'".$val->width."px'":"")
    .($val->height?",height:'".$val->height."px'":"")
    .($val->exp_days?",exp_days:'".$val->exp_days."'":"")
    ."});"."\n";
  }

  // disable when admin module
  // disable when there's no module_srl
  if($this->module_info->module != 'admin' && $this->module_info->module_srl){
            //
            $args->site_srl = $this->module_info->site_srl;
            $output = executeQuery('module.getSite', $args);

   $domain = $output->data->domain;

   $oPopupModel = &getModel('pop_up');
   $targets->module_srl = $this->module_info->module_srl;
   $popupList = $oPopupModel->getPop_upsForThisSrl($targets);

   if($popupList){
    Context::addJsFile('./addons/pop_up/pop_up.js');
    

    $addPopupScript = '<script type="text/javascript">'."\n";
    $addPopupScript .= 'jQuery(function(){'."\n";

    if($popupList) {     
     if(!is_array($popupList)) $popupList = array($popupList);

     foreach($popupList as $val){
      $addPopupScript .= getPopupScript($val);
     }
    }

    $addPopupScript .= '});'."\n";
    $addPopupScript .= '</script>'."\n";
    Context::addHtmlHeader($addPopupScript);
   }
  }
    }
?>

이렇게 햇구요

 

pop_up.js는

 

/*
 * jQuery popup
 *
 * Author : zirho
 *
 * Copyright (c) 2009 http://www.wingtech.co.kr
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://www.wingtech.co.kr
 *
 * Depends:
 * jquery.js
 */


(function(jQuery) {

 jQuery.fn.xe_popup = function(options) {

  // build main options before element iteration
  var main_opts = jQuery.extend({}, jQuery.fn.xe_popup.defaults, options);

  // iterate and reformat each matched element
  return this.each(function() {
   
   var jQuerythis = jQuery(this);
   var opts = jQuery.metadata ? jQuery.extend({}, main_opts, jQuerythis.metadata()) : main_opts;
 
   if (!getCookie(opts.id) || getCookie(opts.id) != "no"){

    var popupbody = jQuery("<div></div>");

    if(opts.popup_type == 'content'){
     popupbody.html(opts.content);
     jQuerythis.show("fast");
    }else if(opts.popup_type == 'url'){
     popupbody.load(opts.url, function(){jQuerythis.show("fast")});
    }
    
    var popupcloser = jQuery("<div class='popupcloser' style='cursor:move;'></div>");
    var popupclosercheck = jQuery("<div style='cursor:pointer; border:0px red solid; width:25px; height:33px; display: -moz-inline-stack; display: inline-block; zoom: 1; *display: inline; vertical-align:top;'><input type='checkbox' style='margin:8px 0 0 8px;' /></div>");
    var popupclosertext = jQuery("<div style='padding-top:8px; overflow:hidden; border:0px red solid; width:"+ (parseInt(opts.width) - 61)+"px; height:33px; display: -moz-inline-stack; display: inline-block; zoom: 1; *display: inline; vertical-align:top;'>"+opts.exp_days + "일 동안 다시보지 않기"+"</div>");
    var closebutton = jQuery("<div class='iePngFix' style='cursor:pointer; background:url(\"./addons/pop_up/x.png\") no-repeat; border:0px red solid; width:33px; height:33px; display: -moz-inline-stack; display: inline-block; zoom: 1; *display: inline; vertical-align:top;'></div>");

    var popup = jQuerythis;
    var target = jQuery("body");

    
    popup.css('width',opts.width)
     .css('height',parseInt(opts.height) + parseInt(opts.closerheight))
     .css('top',opts.top)
     .css('left',opts.left)
     .css('border','2px #CECECE solid')
     .css('position','absolute')
     .css('z-index','999')
     .css('background','white')
     .css('display','inline');

    if (opts.linkto){
     popupbody.css('cursor','pointer');
     if (opts.linkto_newwindow == 'true')
      popupbody.click(function(){window.open(opts.linkto); jQuerythis.hide("fast");});
     else
      popupbody.click(function(){document.location.href=opts.linkto;});
    }

    popupbody.css('width',opts.width)
     .css('height',opts.height)
     .css('overflow',"hidden")
     .css('cursor','hand')
     .css('position','relative')
     .css('z-index','999');
    popupcloser
     .css('background','#1a1a1a')
     .css('padding', '0')
     .css('color', 'white')
     .css('width',opts.width)
     .css('overflow','hidden')
     .css('vertical-align', 'middle')
     .css('height', opts.closerheight);

    popupclosercheck.attr('id', opts.id);
    popupclosercheck.click(function(){setCookie(opts.id, "no", opts.exp_days); jQuerythis.hide("fast");});

    closebutton.click(function(){jQuerythis.hide("fast");});

    popupcloser.append(popupclosercheck);
    popupcloser.append(popupclosertext);
    popupcloser.append(closebutton);

    popup.draggable();
    //popup.append(popupbody);
    popup.append(popupcloser);
    target.append(popup);
   }

   function setCookie( id, value, exp_days )
   {
     var todayDate = new Date();
     todayDate.setDate( todayDate.getDate() + exp_days );
     document.cookie = id + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
   }

   function getCookie(name)
   {
    var value=null, search=name+"=";
    if (document.cookie.length > 0) {
     var offset = document.cookie.indexOf(search);
     if (offset != -1) {
      offset += search.length;
      var end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      value = unescape(document.cookie.substring(offset, end));
     }
    }
    return value;
   }
  });
 };

 //
 // plugin defaults
 //
 jQuery.fn.xe_popup.defaults = {
  id: 'xe_popup',
  popup_type: 'content',
  content: '',
  open_type: 'inner',
  exp_days: '1',
  width: '0px',
  height: '0px',
  top: '0px',
  left: '0px',
  url: '/shopxe/example_popup',
  linkto: '',
  linkto_newwindow: '',
  popupname: 'xe_popup',
  closerheight: '35px'
 };
//
// end of closure
//
})(jQuery);

이렇게 했는데

 

 return " jQuery('<div></div>').xe_popup({id:'".$val->popup_conn_srl."'"
    .($val->popup_type?",popup_type:'".$val->popup_type."'":"")
    .($val->content?",content:'".$val->content."'":"")
    .($val->popup_url?",url:'".$val->popup_url."'":"")
    .($val->popup_linkto?",linkto:'".$val->popup_linkto."'":"")
    .($val->popup_linkto_newwindow?",linkto_newwindow:'".$val->popup_linkto_newwindow."'":"")
    .($val->open_type?",open_type:'".$val->open_type."'":"")
    .($val->top?",top:'".$val->top."px'":"")
    .($val->left?",left:'".$val->left."px'":"")
    .($val->width?",width:'".$val->width."px'":"")
    .($val->height?",height:'".$val->height."px'":"")
    .($val->exp_days?",exp_days:'".$val->exp_days."'":"")
    ."});"."\n";
  }

이 줄이

개체가 이속성 또는 메소드를 지원하지 않습니다.. 이런 오류가뜨네요ㅠㅠ

 

다른소스 찾아서도 해봤는데도 이유를 찾지못했습니다.. 왜 그런거죠?? ㅜㅜ

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
poltwo XE 게시판의 게시물을 안드로이드로 파싱하려합니다 [1] 2014.06.24 by 부산민지아빠
조아라8558 제로보드4 데이터 추출파일 갖고계신분 있나요? [6] 2014.06.24 by ZIBURO™
도메인8295 스티커 삽입 애드온 사용법좀요; [6] 2014.06.24 by 도메인8295
웃는기차 댓글을 고정내용으로만 입력받으려 하는데요... [3] 2014.06.24 by Kenta
pelican 한메일(Daum) 백지 현상(ID, PW 찾기, 가입인증 등) [2] file 2014.06.24 by pelican
ahiku 제로보드 왕초보 설치 개념 궁금한게 있어요 [2] file 2014.06.24 by ahiku
Lin-e 여기에 사용된 스킨이 뭘까요? [6] file 2014.06.24 by Kenta
원보드 일베와 똑같은 스킨을 쓰고 싶습니다. [8] 2014.06.24 by Kenta
유묭커뮤늬2 조회수//추천/비추천// 수정할 수 있는 모듈 없을까요? file  
TrustMe 자체 클래스 프로시져를 php에서 부를때;;;  
나의해 아이디 방식으로 로그인하는 방법좀 알려주세요 [2] 2014.06.24 by 제이슨5525
Lin-e 무한업데이트 오류 어떻게 해야 하나요? [5] file 2014.06.24 by Lin-e
메테워 DB에서 댓글을삭제하여 게시물이랑 댓글수가 안맞는문제 [7] 2014.06.24 by forest535
네오랑 페이지에서 hader와 content 위젯 사이의 여백 줄이는 법 문의 [8] file 2014.06.24 by 네오랑
데레뎁32 외부 페이지 링크 문의 드립니다. [2] 2014.06.24 by 데레뎁32
xe마스터하는그날까지 페이스북위젯만들기 file  
xe마스터하는그날까지 트위터,페이스북,블로그위젯질문 [1] file 2014.06.24 by 銀童
yusse 익스에서 게시글/댓글이 달리지 않습니다. [1] 2014.06.24 by 銀童
안드로이더스스 img 태그 쓰는법좀 도와주세요 ;; [1] 2014.06.24 by 휘즈
vardin 누리고 장바구니 애드온 사용시, 체크박스가 나타나지 않고, ncart mid 설정을 하라고 하네요. file