따라다니는 스크롤 문의좀 드립니다!!
본문
https://sir.kr/g5_tip/2660?sfl=wr_subject%7C%7Cwr_content&stx=%EB%B0%B0%EB%84%88이스킨사용중입니다
<!--
ver1.0 150421 @_untitle_d
http://untitled.untitle311apyxry1w48.com/5yj67ft
-->
<?php
$tmpWidth = '150';
$tmpMarginBottom = '5';
$tmpBorder = '0';
$arrL = array(
array('#', '/img/mainimmg4.png', 'untitled' ,'_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg4.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg2.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg3.png', 'untitled', '_blank')
);
$arrR = array(
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled' ,'_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/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>
<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
<?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';
$arrL = array(
array('#', '/img/mainimmg4.png', 'untitled' ,'_blank'),
array('http://untitled.untitle311apyxry1w48.com/', $notice, 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg2.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg3.png', 'untitled', '_blank')
);
$arrR = array(
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled' ,'_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank'),
array('http://untitled.untitle311apyxry1w48.com/', '/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 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>
<script type="text/javascript">
$(document).ready(function() {
var w = $(window).width();
var h = $(window).height();
var adj = (w - 1200) / 2;
if (w > 1270 && h > 500) {
$('#floatL, #floatR').show();
} else {
$('#floatL, #floatR').hide();
}
$(window).resize(function() {
var w = $(window).width();
var h = $(window).height();
if (w > 1270 && h > 500) {
$('#floatL, #floatR').show();
} else {
$('#floatL, #floatR').hide();
}
});
});
function updateImageWidth() {
var w = window.innerWidth;
var adj = (w - 1200) / 2;
var images = document.getElementsByClassName('dynamic-width');
for (var i = 0; i < images.length; i++) {
images[i].setAttribute('width', adj);
images[i].style.maxWidth = '160px';
}
}
window.onload = updateImageWidth;
window.onresize = updateImageWidth;
</script>
$arrL = array(
array('link', 'text', '_blank'),array('link', 'text', '_blank'),array('link', 'text', '_blank')
);
<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>
답변을 작성하시기 전에 로그인 해주세요.