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

따라다니는 스크롤 문의좀 드립니다!! 채택완료

얌똥이 11개월 전 조회 1,073

https://sir.kr/g5_tip/2660?sfl=wr_subject%7C%7Cwr_content&stx=%EB%B0%B0%EB%84%88%EC%9D%B4%EC%8A%A4%ED%82%A8%EC%82%AC%EC%9A%A9%EC%A4%91%EC%9E%85%EB%8B%88%EB%8B%A4" rel="nofollow noreferrer noopener" target="_blank">https://sir.kr/g5_tip/2660?sfl=wr_subject%7C%7Cwr_content&stx=%EB%B0%B0%EB%84%88이스킨사용중입니다

</p>

<p><!--

ver1.0 150421 @_untitle_d

<a href="http://untitled.untitle311apyxry1w48.com/5yj67ft" target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/5yj67ft</a>

-->

 

<?php

 

$tmpWidth = '150';

$tmpMarginBottom = '5';

$tmpBorder = '0';

$arrL = array(

  array('#', '/img/mainimmg4.png', 'untitled' ,'_blank'),

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg4.png', 'untitled', '_blank'),

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg2.png', 'untitled', '_blank'),

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg3.png', 'untitled', '_blank')

);

$arrR = array(

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled', '_blank'),

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled' ,'_blank'),

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled', '_blank'),

  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled', '_blank')

);

?>

 

<script type="text/javascript" src="<?php echo G5_JS_URL ?>/follower.js"></script>

<script type="text/javascript">

//<![CDATA[

$(document).ready(function() {

  $('#floatR').scrollFollower({

    pageAlign:'center',

    pageWidth:1220, //컨텐츠 블럭의 폭(필수값)

    type:'right',

    topMargin:200, //페이지 최상단과의 거리

    minTop:10,

    margin:5,

    speed:0,

    easing:'swing',

    zindex:0

  });

  $('#floatL').scrollFollower({

    pageAlign:'center',

    pageWidth:1220,

    type:'left',

    topMargin:200,

    minTop:10,

    margin:5,

    speed:0,

    easing:'linear',

    zindex:0

  });

});

//]]>

</script>

 

<div id="floatL">

<?php foreach($arrL as $v){ ?>

  <div style="margin-bottom:<?=$tmpMarginBottom?>px">

    <a href="<?=$v[0]?>" target="<?=$v[3]?>"><img src="<?=$v[1]?>" width="<?=$tmpWidth?>" border="<?=$tmpBorder?>" alt="<?=$v[2]?>"></a>

  </div>

  <?php } ?>

</div></p>

<p> 

<div id="floatR">

<?php foreach($arrR as $v){ ?>

  <div style="margin-bottom:<?=$tmpMarginBottom?>px">

    <a href="<?=$v[0]?>" target="<?=$v[3]?>"><img src="<?=$v[1]?>" width="<?=$tmpWidth?>" border="<?=$tmpBorder?>" alt="<?=$v[2]?>"></a>

  </div>

  <?php } ?>

</div>

 

 

이 스킨을 사용해서 따라다니는 스크롤을 이용하고 있는데 array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg4.png', 'untitled', '_blank'),

여기부분에 이미지로 밖에 변경이 안되던데 자유게시판 notice 최신글을 출력하고 싶은데 코드를 어떤식으로 어떤 부븐을 수정해야 되는걸까여,,?공부중이라 아무리 검색해봐도 모르겠네여ㅠㅠ바쁘실텐데 알려주시면 감사하겠습니다!ㅠㅠ

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

답변 2개

채택된 답변
+20 포인트
들레아빠
11개월 전

</p>

<p><?php

 $notice = latest('theme/notice', 'notice', 1, 10,);echo '<style>h2 {display:none}.notice li {text-overflow:unset;overflow:unset;white-space:unset;}.notice{padding:0}</style>';

//$tmpWidth = '150';

$tmpMarginBottom = '5';

$tmpBorder = '0';</p>

<pre>
<code>$arrL = array(
  array('#', '/img/mainimmg4.png', 'untitled' ,'_blank'),
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> $notice, 'untitled', '_blank'),
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg2.png', 'untitled', '_blank'),
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg3.png', 'untitled', '_blank')
);
$arrR = array(
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled', '_blank'),
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled' ,'_blank'),
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled', '_blank'),
  array('<a href="http://untitled.untitle311apyxry1w48.com/'," target="_blank" rel="noopener noreferrer">http://untitled.untitle311apyxry1w48.com/',</a> '/img/mainimmg1.png', 'untitled', '_blank')
);</code></pre>

<p>?>

 

<script type="text/javascript" src="<?php echo G5_JS_URL ?>/follower.js"></script>

<script type="text/javascript">

//<![CDATA[

$(document).ready(function() {

  $('#floatR').scrollFollower({

    pageAlign:'center',

    pageWidth:1220, //컨텐츠 블럭의 폭(필수값)

    type:'right',

    topMargin:200, //페이지 최상단과의 거리

    minTop:10,

    margin:5,

    speed:0,

    easing:'swing',

    zindex:0

  });

  $('#floatL').scrollFollower({

    pageAlign:'center',

    pageWidth:1220,

    type:'left',

    topMargin:200,

    minTop:10,

    margin:5,

    speed:0,

    easing:'linear',

    zindex:0

  });

});

//]]>

</script>

 

<div id="floatL">

<?php foreach($arrL as $v){ ?>

  <div class="dynamic-width" style="margin-bottom:<?php echo $tmpMarginBottom?>px; border:1px solid #ddd; padding:10px;">

    <a href="<?php echo $v[0]?>" target="<?php echo $v[2]?>"><?php echo $v[1]?></a>

  </div>

<?php } ?>

</div>

<div id="floatR">

<?php foreach($arrR as $v){ ?>

  <div class="dynamic-width" style="margin-bottom:<?php echo $tmpMarginBottom?>px; border:1px solid #ddd; padding:10px;">

    <a href="<?php echo $v[0]?>" target="<?php echo $v[2]?>"><?php echo $v[1]?></a>

  </div>

<?php } ?>

</div></p>

<p><script type="text/javascript">

    $(document).ready(function() {

        var w = $(window).width();

        var h = $(window).height();

        var adj = (w - 1200) / 2;</p>

<p>        if (w > 1270 && h > 500) { 

            $('#floatL, #floatR').show();

        } else {

            $('#floatL, #floatR').hide();

        }</p>

<p>        $(window).resize(function() {

            var w = $(window).width();

            var h = $(window).height();

            if (w > 1270 && h > 500) { 

                $('#floatL, #floatR').show();

            } else {

                $('#floatL, #floatR').hide();

            }

        });

    });</p>

<p>    function updateImageWidth() {

      var w = window.innerWidth;

      var adj = (w - 1200) / 2;

      var images = document.getElementsByClassName('dynamic-width');</p>

<p>      for (var i = 0; i < images.length; i++) {

        images[i].setAttribute('width', adj);

        images[i].style.maxWidth = '160px';

      }

    }</p>

<p>    window.onload = updateImageWidth;

    window.onresize = updateImageWidth;

</script></p>

<p>

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

답변에 대한 댓글 2개

얌똥이
11개월 전
감사합니다! 한번 적용해보겠습니다! 즐거운 하루 보내시구 한해 마무리잘하세여!
들레아빠
11개월 전
채택 감사 합니다. 테스트 minyho.kr

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

11개월 전

</p>

<pre>
<code>$arrL = array(
  array('link', 'text', '_blank'),array('link', 'text', '_blank'),array('link', 'text', '_blank')
);</code></pre>

<pre>
<code>
<div id="floatL">
<?php foreach($arrL as $v){ ?>
  <div style="margin-bottom:<?=$tmpMarginBottom?>px">
    <a href="<?=$v[0]?>" target="<?=$v[2]?>"><?=$v[1]?></a>
  </div>
  <?php } ?>
</div></code></pre>

<p>

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

답변에 대한 댓글 1개

얌똥이
11개월 전
답변 남겨 주셔서 감사합니다! 이렇게도 한번 적용해 보겠습니다! 즐거운 하루 보내시구 한해 마무리잘하세여!

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

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

로그인