묻고답하기

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 남기남
지난해11월 관리자 페이지에 들어 갈 수 있는 부관리자 만들 수 있나요? [2] 2013.03.11 by 지난해11월
천제아 로그인 방식을 변경했더니 관리자 계정 로그인이 안됨 [1] 2013.03.11 by 송동우
러브탱 처음 셋팅후 스크립트 ...오류  
5duck! sejin7940 님의 작성댓글보기 관련 질문드립니다. [1] file 2013.03.11 by sejin7940
gusdk8318 xe 게시판 데이터 제로보드로 이전할수 있나요?? [1] 2013.03.11 by sejin7940
정동석744 사진게시판에 사진이 안올라가는 현상 [2] file 2013.03.11 by 정동석744
검정고내 로그인위젯스킨팝업div 문제...  
madab 현재 운영중인 사이트 오류 확인 부탁드립니다. [1] 2013.03.11 by 푸시아
도토리맘 공식홈과 같은 breadcrumb 을 어떻게 해야하는지 [1] file 2013.03.11 by Sulli
safddsf 추천/비추천 애드온오류 [1] 2013.03.11 by haha0
KTK 추천 수 초기화 후 추천문제 ㅠㅠ [1] 2013.03.11 by sejin7940
하늘편지2 최근글 출력 리스트... [1] 2013.03.11 by 송동우
mindori66 IP 변경 관련.. [2] 2013.03.11 by 송동우
007611 게시글 권한이 없는경수 "경고 메세지" 창 팝업하는 법 [1] 2013.03.11 by OEZ
withover 1.4 -> 1.7 로 업데이트 가능한가요?  
맨발의심봉이 Warning: require(/var/www/html/customPages/_cache/connectedUsers/index.php) [function.require]: failed to open stream: No such file or directory in F:\play10\classes\template\TemplateHandler.class.php(211) : eval()'d code on line 36 이렇게 나옵니다..  
친절뺀질이 XE DB관련 문의입니다.  
david7 관리자 페이지 접속 오류입니다 (고수님들 도와주세요) [1] 2013.03.11 by david7
Zeebada 댓글 권한 설정에 대하여  
망고좋아 회원그룹별 보기  
궁금궁금궁금이 IP 입력 문의  
암지 포인트 선물모듈...  
nugul 왜 글이 보였다 안보였다 할까요?  
지난해11월 카테고리에 공지글 등록 할 수 있나요?(재등록 죄송합니다) [2] 2013.03.12 by 지난해11월
곰사탕 외부페이지를 불러왔을 때 스크립트가 안나옵니다. [1] 2013.03.12 by OEZ
SEAN76 관리자 페이지 error [1] 2013.03.12 by OEZ
오락실주인 이번 XE1.7 버젼 검색창 수정 [헬프미] [1] file 2013.03.12 by OEZ
je313 제로보드 xe 사용방법좀 알려주세요 [1] 2013.03.12 by sejin7940
Seoooong 확장변수 페이지가 나오질 않아요. [1] file 2013.03.12 by sejin7940
미추어버리겠네 팝업관련입니다.ㅠㅠ