웹마스터 팁

기본적으로 iframe을 사용하기에 원치 않는 분은 수정하지 말아주세요

지금 아래 적혀있는 코드는 layout.html 에 iframe을 이용해서 로고를 넣고

로고는 기본적으로 n개의 이미지로 슬라이드 쑈를 하는.. 자바 스크립트 파일입니다.

이미지나 결과물은 저작권 문제로 첨부하지 않습니다.

회사에서 사용하는 거라. ^^



레이 아웃 파일에서 로고 부분을 다음과 같이 수정 (layouts/xxxx/layout.html)
 <!-- 로고설정 --> 
<iframe src="/layouts/xxxx/leftFrame/slideshow.html" width=249 height=207 frameborder=0 border=0 align=right noframe allowTransparency="true" scrolling="No">
 </iframe>


 iframe src="/layouts/xxxx/leftFrame/slideshow.html"

여기서 xxxx는 스킨 폴더라시는거 아시죠??
leftFrame이라는 폴더를 만들어서 슬라이드 쇼를 하는 html 코드를 삽입시킨 경우입니다.

ps. 이미지는, 저작권 때문에 첨부를 하지 못합니다.



./layouts/xxxx/leftFrame/slideshow.html

<SCRIPT SRC="frame_Left.js"></SCRIPT> 
<!--
<script>
if (ie4||dom)
 document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div  id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;filter:alpha(opacity=10);-moz-opacity:10"></div></div>')
else
 document.write('<img name="defaultslide" src="'+fadeimages[0]+'">')
 
</script>
-->
<script>
if (ie4||dom)
 document.write('<div style="position:absolute;top:0;left:0;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div  id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;filter:alpha(opacity=10);-moz-opacity:10"></div></div>')
else
 document.write('<img name="defaultslide" src="'+fadeimages[0]+'">')
 
</script>




./layouts/xxxx/leftFrame/frame_Left.js

var curpos=10
  
var curcanvas="canvas0"
var curimageindex=0
var nextimageindex=1
var fadeimages=new Array()
var slideshow_width=247 // image width
var slideshow_height=207 // image height
var pause=2500 // speed (3000=3 seconds)
// image list
fadeimages[0]="./main_02.jpg"
fadeimages[1]="./main_03.jpg"
fadeimages[2]="./main_04.jpg"
fadeimages[3]="./main_05.jpg"
fadeimages[4]="./main_06.jpg"
fadeimages[5]="./main_07.jpg"
fadeimages[6]="./main_08.jpg"
fadeimages[7]="./main_09.jpg"
fadeimages[8]="./main_10.jpg"
fadeimages[9]="./main_11.jpg"
fadeimages[10]="./main_12.jpg"
fadeimages[11]="./main_01.jpg"
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
function fadepic(){
 if (curpos<100){
  curpos+=10
  if (tempobj.filters)
  tempobj.filters.alpha.opacity=curpos
  else if (tempobj.style.MozOpacity)
  tempobj.style.MozOpacity=curpos/100
 }
 else{
  clearInterval(dropslide)
  nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
  tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
  tempobj.innerHTML='<img src="'+fadeimages[nextimageindex]+'">'
  nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
  setTimeout("rotateimage()",pause)
 }
}
    
function rotateimage(){
 if (ie4||dom){
  resetit(curcanvas)
  var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
  crossobj.style.zIndex++
  var temp='setInterval("fadepic()",50)'
  dropslide=eval(temp)
  curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
 }
 else
  document.images.defaultslide.src=fadeimages[curimageindex]
 curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
}
function resetit(what){

 curpos=10
 var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
 if (crossobj.filters)
  crossobj.filters.alpha.opacity=curpos
 else if (crossobj.style.MozOpacity)
  crossobj.style.MozOpacity=curpos/100
}
function startit(){
 var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
 crossobj.innerHTML='<img src="'+fadeimages[curimageindex]+'">'
 rotateimage()
}
if (ie4||dom)
 window.onload=startit
else
 setInterval("rotateimage()",pause)



fadeimages[] 에 있는 부분이 이미지 파일들입니다.
이미지는
./layouts/xxxx/leftFrame/ 하위에 집어 넣으시면 됩니다.

제목 글쓴이 날짜
게시판 데이터 일괄 삽입 방법 [1] Happyphp 2014.07.26
CURL 등 리퀘스트가 느리다고 생각될때 [1] 銀童 2014.07.25
xe module, sample 생성기 [9] 천재ㅐ재 2014.07.24
아이디 첫글자에 숫자 허용 [2] wooildang 2014.07.24
[초보팁] .htaccess 파일을 이용하여 여러가지 주소 한 주소로 리다이렉트 하기 ( 주소 통합 ) [5] 태풍_님 2014.07.23
빈공간 더블 클릭시 상하 이동 스크립트 socialskyo 2014.07.23
php로 간단하게 신규쪽지(읽지않은쪽지) 표시해주기 [2] 졸라맨 2014.07.23
간단하게 외부 SMTP 로 인증메일 보내기. [1] file AJKJ 2014.07.22
Windows10 에서 IIS + mysql + PHP 설치 [10] file HSJI 2014.07.21
회원 비밀번호 수정시 자동으로 로그아웃 되게 하는 방법 [4] sejin7940 2014.07.18
게시판 글 엑셀로 출력하기(확장변수 포함) [15] 한이73 2014.07.17
모바일(또는 textarea형)에서 댓글 수정시 줄바꿈 유지되도록 수정 [2] sejin7940 2014.07.17
댓글등록에 단축키 사용하기 ひりゅう. 2014.07.15
SocialXE 관련 사용팁 적용 수정 파일 [3] file 휘즈 2014.07.13
lang.xml 파일 다이어트 자동화 [5] file 산하2 2014.07.09
편리한 안드로이드 크로스 브라우징 테스트 Tip - 안드로이드 가상화 file AJKJ 2014.07.09
외부 페이지에서 회원 extra_vars 변수 가져오기 [1] Happyphp 2014.07.09
XE 알림센터 Lite 사용시에 쪽지나 호출에 대해서만 알림음을 적용하기 [17] SeungXE 2014.07.06
MRTG에서 네트워크및 CPU, 메모리점유율을 기록하기 ひりゅう. 2014.07.05
xe 1.7.4 이상 object cache 및 template cache 적용 방법 [3] XE러버 2014.07.04