XE Tip
xpressengine.com에서 제가 필요해 가져온 XE TIp들입니다.
BGM설치팁
글 수 186
2008.07
15
| 원작자 | dhseo |
|---|---|
| 출처 | ![]() |
| 적용여부 | NO |
기본적으로 iframe을 사용하기에 원치 않는 분은 수정하지 말아주세요
지금 아래 적혀있는 코드는 layout.html 에 iframe을 이용해서 로고를 넣고
로고는 기본적으로 n개의 이미지로 슬라이드 쑈를 하는.. 자바 스크립트 파일입니다.
이미지나 결과물은 저작권 문제로 첨부하지 않습니다.
회사에서 사용하는 거라. ^^
레이 아웃 파일에서 로고 부분을 다음과 같이 수정 (layouts/xxxx/layout.html)
view plaincopy to clipboardprint?
- <!-- 로고설정 -->
- <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" 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>
<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
view plaincopy to clipboardprint?
- 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)
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/ 하위에 집어 넣으시면 됩니다.



자료실
MH 슬라이딩 배너 0....
MH 위젯스타일
prettyphoto - 본문내...
SCM 플레이어 사용법
XE 1.4.4.2버전 이후에...
네비게이션 위젯
IE 버젼별로 css 따로...
문서보기 유저 지정
문하우스 게시판스킨 V...
내용글 출력시 주소창에...





