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

따라다니는 배너 관련 문의좀 드리겠습니다. 채택완료

미스터고 9년 전 조회 4,159

 

http://sir.kr/g5_tip/2660?sfl=wr_subject%7C%7Cwr_content&stx=%EB%B0%B0%EB%84%88" style="color: rgb(0, 0, 0);">http://sir.kr/g5_tip/2660?sfl=wr_subject%7C%7Cwr_content&stx=%EB%B0%B0%EB%84%88 

 

해당 게시물의 따라다니는 배너를 사용 중입니다.

 

근데,

 

이게 어떤 페이지를 가도 계속 따라다니게 되어있는데요..

 

메인페이지 에서만 따라다니고,

 

그외의 다른 화면에서는 이미지가 따라다니지 않고 고정되게 하고 싶습니다.

 

어떤 방법이 있을까요????  

 

(그누보드 순정 기준입니다)

 

 

아래는 해당 소스입니다.

 

 

</p><pre style="line-height: normal;"><!--
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 = '170';
$tmpMarginBottom = '5';
$tmpBorder = '0';
$arrL = array(
	array('#', '/theme/basic1/img/left/center.gif', '상담전화', '_blank'),
	//array('#', '/theme/basic1/img/left/call.png', '상담전화', '_blank'),
	//array('#', '/theme/basic1/img/left/call.png', '상담전화', '_blank'),
	array('#', '/theme/basic1/img/left/account.png', '계좌정보' ,'_blank'),
);
$arrR = array(
	array('/bbs/board.php?bo_table=catalog', '/theme/basic1/img/right/cata.gif', '카달로그', '_self'),
	//array('#', '/theme/basic1/img/left/call.png', 'untitled' ,'_blank'),
	//array('#', '/theme/basic1/img/left/call.png', 'untitled', '_blank'),
	array('/bbs/board.php?bo_table=estimate', '/theme/basic1/img/right/right02.jpg', '견적문의', '_self')
);
?>

<script type="text/javascript" src=" <?php echo G5_THEME_JS_URL ?>/follower.js"></script>
<script type="text/javascript"> 
//<![CDATA[ 
$(document).ready(function() {
  $('#floatR').scrollFollower({
    pageAlign:'center',
    pageWidth:1000, //컨텐츠 블럭의 폭(필수값)
    type:'right',
    topMargin:160, //페이지 최상단과의 거리
    minTop:80,
    margin:5,
    speed:500,
    easing:'swing',
    zindex:10
  });
  $('#floatL').scrollFollower({
    pageAlign:'center',
    pageWidth:1000,
    type:'left',
    topMargin:160,
    minTop:-5,
    margin:5,
    speed:500,
    easing:'linear',
    zindex:10
  });
});
//]]> 
</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>
<? } ?>
</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>
<? } ?>
</div></pre><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">

 

 

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

답변 3개

채택된 답변
+20 포인트
p
9년 전

tail.php에 아래와 같이 코드를 넣어 보세요.

</p><p><?php</p><p>if(defined('_INDEX_')) {</p><p>   include_once(G5_PATH.'/banner_fly.php');</p><p>}</p><p>?>  </p><p>
 

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

답변에 대한 댓글 1개

미스터고
9년 전
tail.php에
banner_fly.php (index에서만 출력) 와 banner_fly2.php를 넣었습니다.
정상적으로 메인화면에서는 banner_fly가 나오고 그외의 화면은banner_fly2가 나오구요
근데 banner_fly2는 좌 우측 따라다니는 스크롤이 아니라. 그냥 고정하고 싶습니다.
이런저런 방법을 써봐도 고정이 안되네요... 이거좀 알려주실 수 있을까요??

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

f
9년 전

<?php</p><p>if(defined('_INDEX_') && !is_mobile()) {</p><p>    include_once(G5_THEME_PATH.'/skin/banner/banner_fly.php'); // 스크롤 배너</p><p>}</p><p>?>

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

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

메인페이지에서는 그냥 위 소스를 쓰시고

 

다른페이지에서 쓰실거는

위 소스중 floatL 과 floatR 을 이름 변경후

div 를 위치를 잡으신다음 fixed 주시면 될것 같습니다. 

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

답변에 대한 댓글 1개

미스터고
9년 전
저걸 tail.php에 넣어서 사용중인데 죄송한데 자세히좀 설명해주시면 안될까요ㅠㅠ

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

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

로그인