Forum'da ara:
Ara


« Önceki başlık :: Sonraki başlık »  
Yazar Mesaj
Mesaj18.07.2009, 15:54 (UTC)    
Mesaj konusu: Sitenize Kayan Reklam Kodu

Kod:
<style type="text/css">
02.#topbar{
03.position:absolute;
04.border: 0px solid black;
05.padding: 0px;
06.background-color: black;
07.width: 120px;
08.visibility: hidden;
09.z-index: 0;
10.}
11.</style>
12.<script type="text/javascript">
13.var persistclose=1
14.var startX = 10
15.var startY = 5
16.var verticalpos="fromtop"
17.function iecompattest(){
18.return (document.compatMode &amp;&amp; document.compatMode!="BackCompat")? document.documentElement : document.body
19.}
20.function get_cookie(Name) {
21.var search = Name + "="
22.var returnvalue = "";
23.if (document.cookie.length > 0) {
24.offset = document.cookie.indexOf(search)
25.if (offset != -1) {
26.offset += search.length
27.end = document.cookie.indexOf(";", offset);
28.if (end == -1) end = document.cookie.length;
29.returnvalue=unescape(document.cookie.substring(offset, end))
30.}
31.}
32.return returnvalue;
33.}
34.function closebar(){
35.if (persistclose)
36.document.getElementById("topbar").style.visibility="hidden"
37.}
38.function staticbar(){
39.barheight=document.getElementById("topbar").offsetHeight
40.var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
41.var d = document;
42.function ml(id){
43.var el=d.getElementById(id);
44.if (!persistclose || persistclose &amp;&amp; get_cookie("remainclosed")=="")
45.el.style.visibility="visible"
46.if(d.layers)el.style=el;
47.el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";};
48.el.x = startX;
49.if (verticalpos=="fromtop")
50.el.y = startY;
51.else{
52.el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
53.el.y -= startY;
54.}
55.return el;
56.}
57.window.stayTopright=function(){
58.if (verticalpos=="fromtop"){
59.var pY = ns ? pageYOffset : iecompattest().scrollTop;
60.ftlObj.y += (pY + startY - ftlObj.y)/8;
61.}
62.else{
63.var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
64.ftlObj.y += (pY - startY - ftlObj.y)/8;
65.}
66.ftlObj.sP(ftlObj.x, ftlObj.y);
67.setTimeout("stayTopright()", 0);
68.}
69.ftlObj = ml("topbar");
70.stayTopright();
71.}
72.if (window.addEventListener)
73.window.addEventListener("load", staticbar, false)
74.else if (window.attachEvent)
75.window.attachEvent("onload", staticbar)
76.else if (document.getElementById)
77.window.onload=staticbar
78.</script>
79.<div id="topbar">
80.<center>
81.<a href="javascript:;" onclick="closebar()">REKLAMI KAPAT</a>
82.<!-- REKLAM KODU -->
83.<a href="javascript:;" onclick="closebar()">REKLAMI KAPAT</a>
84.</center>
85.</div>
Sol Kolon Kayan Reklamı için;

01.<style type="text/css">
02.#topbar{
03.position:absolute;
04.border: 0px solid black;
05.padding: 0px;
06.background-color: black;
07.width: 120px;
08.visibility: hidden;
09.z-index: 0;
10.}
11.</style>
12.<script type="text/javascript">
13.var persistclose=1
14.var startX = 10
15.var startY = 5
16.var verticalpos="fromtop"
17.function iecompattest(){
18.return (document.compatMode &amp;&amp; document.compatMode!="BackCompat")? document.documentElement : document.body
19.}
20.function get_cookie(Name) {
21.var search = Name + "="
22.var returnvalue = "";
23.if (document.cookie.length > 0) {
24.offset = document.cookie.indexOf(search)
25.if (offset != -1) {
26.offset += search.length
27.end = document.cookie.indexOf(";", offset);
28.if (end == -1) end = document.cookie.length;
29.returnvalue=unescape(document.cookie.substring(offset, end))
30.}
31.}
32.return returnvalue;
33.}
34.function closebar(){
35.if (persistclose)
36.document.getElementById("topbar").style.visibility="hidden"
37.}
38.function staticbar(){
39.barheight=document.getElementById("topbar").offsetHeight
40.var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
41.var d = document;
42.function ml(id){
43.var el=d.getElementById(id);
44.if (!persistclose || persistclose &amp;&amp; get_cookie("remainclosed")=="")
45.el.style.visibility="visible"
46.if(d.layers)el.style=el;
47.el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
48.el.x = startX;
49.if (verticalpos=="fromtop")
50.el.y = startY;
51.else{
52.el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
53.el.y -= startY;
54.}
55.return el;
56.}
57.window.stayTopleft=function(){
58.if (verticalpos=="fromtop"){
59.var pY = ns ? pageYOffset : iecompattest().scrollTop;
60.ftlObj.y += (pY + startY - ftlObj.y)/8;
61.}
62.else{
63.var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
64.ftlObj.y += (pY - startY - ftlObj.y)/8;
65.}
66.ftlObj.sP(ftlObj.x, ftlObj.y);
67.setTimeout("stayTopleft()", 0);
68.}
69.ftlObj = ml("topbar");
70.stayTopleft();
71.}
72.if (window.addEventListener)
73.window.addEventListener("load", staticbar, false)
74.else if (window.attachEvent)
75.window.attachEvent("onload", staticbar)
76.else if (document.getElementById)
77.window.onload=staticbar
78.</script>
79.<div id="topbar">
80.<center>
81.<a href="javascript:;" onclick="closebar()">REKLAMI KAPAT</a>
82.<!-- REKLAM KODU -->
83.<a href="javascript:;" onclick="closebar()">REKLAMI KAPAT</a>
84.</center>
85.</div>
Şimdi gelelim açıklamaya.. Diyeceksiniz ki bu iki kod da aynı. Arada sadece 3 değişken değiştirerek, 2. kodu oluşturdum. (right yerine left)

Eğer REKLAMI KAPAT imgesinin bulunmasını istemiyorsanız;

1.<a href="javascript:;" onclick="closebar()">REKLAMI KAPAT</a>
Önceki mesajları göster:   


Powered by phpBB © 2001, 2005 phpBB Group
Türkçe Çeviri: phpBB Türkiye & Erdem Çorapçıoğlu