Pereiti prie turinio

Rekomenduojami pranešimai

Sveiki žodžiu susiradau tokį skriptą pavizdys čia: http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow.htm

popunderis, bet ji tinklapyje pastoviai meta perverčiant puslapį, o man reikia kad jį mestu tik vieną kartą per dieną vienam IP adresui arba vieną kartą per 24 h tam pačiam lankytojui, gal kas galite padėti kaip perdaryti šitą skriptą, o gal netgi kažką reikia tik dadėti. Iš anksto dėkui. O skriptas toks:

 

Add the following script into the <HEAD> section of your page:

 

<script>

//DHTML Window script- Copyright Dynamic Drive (http://www.dynamicdrive.com)
//For full source code, documentation, and terms of usage,
//Visit http://www.dynamicdrive.com/dynamicindex9/dhtmlwindow.htm

var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none"
}

function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}

</script>

 

Add the below to the <BODY> section, preferably at the end of the page:

 

<div id="dwindow" style="position:absolute;background-color:#EBEBEB;cursor:hand;left:0px;top:0px;display:none" onMousedown="initializedrag(event)" onMouseup="stopdrag()" onSelectStart="return false">
<div align="right" style="background-color:navy"><img src="max.gif" id="maxname" onClick="maximize()"><img src="close.gif" onClick="closeit()"></div>
<div id="dwindowcontent" style="height:100%">
<iframe id="cframe" src="" width=100% height=100%></iframe>
</div>
</div>

<script>
//Use below code to load DHTML Window as page loads 
if (ns6) window.onload=new Function('loadwindow("http://www.google.com",600,400)')
else
loadwindow("http://www.google.com",600,400)
</script>

<!--Use below code to load DHTML window via link-->
<a href="java script:loadwindow('http://www.google.com',600,400)">Geocities</a>

Nuoroda į pranešimą
Dalintis kituose puslapiuose

Tau reiktų susirasti pavyzdukus kaip javascriptu sukuriami ir nuskaitomi Cookies ir tada nustatyti kad ko pirmojo parodymo įrašomas sausainėlis 1 parai, o popunderis tikrina ar sausainėlis egzistuoja. Jeigu egzistuoja popunderio nerodai, jeigu Cookie nėra - rodai.

Redagavo Carlsberg
Nuoroda į pranešimą
Dalintis kituose puslapiuose

Na turiu dar vieną skriptuką kuriame galima nustatyti kad vienam lankytojui rodytu vieną kartą per parą, bet su šiuo skriptuku galima dėti tiktai iššokantį banerį ar kokį iššokantį paveikslėlį kaip reklamą ir man jis netinka todėl reikalingas pirmas nes su pirmu skriptuku iškyla internetinis langas o ne kaip baneris taigi skriptas:

 

Add the following script into the <HEAD> section of your page:

 

<style>
<!--

/*Post-it note script- by javascriptkit.com
Visit JavaScript Kit (http://javascriptkit.com) for script
Credit must stay intact for use*/

#postit{
position:absolute;
width:240px;
padding:5px;
background-color:0;
border:0px solid black;
visibility:hidden;
z-index:100;
cursor:hand;
cursor: pointer;
}

-->
</style>

 

Add the below to the <BODY> section, preferably at the end of the page:

 

<div id="postit" style="left:150px;top:150px">
<div align="right"><b><a href="java script:closeit()">[Close It]</a></b></div>

<!--INSERT YOUR CONTENT HERE-->

<p><a href="http://yousite.com" target="_new"><img src=" http://yousite.com/uploads/1240239621_pop-up_ads.jpg "</a>
<!--END YOUR CONTENT HERE-->

</div>

<script>

//Post-it only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause postit to display every time page is loaded
var once_per_browser=1

///No need to edit beyond here///

var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ns4)
crossobj=document.layers.postit
else if (ie4||ns6)
crossobj=ns6? document.getElementById("postit") : document.all.postit


function closeit(){
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
crossobj.visibility="hide"
}

function get_cookie(Name) {
 var search = Name + "="
 var returnvalue = "";
 if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
  offset += search.length
  // set index of beginning of value
  end = document.cookie.indexOf(";", offset);
  // set index of end of cookie value
  if (end == -1)
	 end = document.cookie.length;
  returnvalue=unescape(document.cookie.substring(offset, end))
  }
  }
 return returnvalue;
}

function showornot(){
if (get_cookie('postdisplay')==''){
showit()
document.cookie="postdisplay=yes"
}
}

function showit(){
if (ie4||ns6)
crossobj.style.visibility="visible"
else if (ns4)
crossobj.visibility="show"
}

if (once_per_browser)
showornot()
else
showit()

</script>

<script language="JavaScript1.2">

//drag drop function for ie4+ and NS6////
/////////////////////////////////

function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx+'px'
crossobj.style.top=tempy+event.clientY-offsety+'px'
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+'px'
crossobj.style.top=tempy+e.clientY-offsety+'px'
return false
}
}

function initializedrag(e){
if (ie4&&event.srcElement.id=="postit"||ns6&&e.target.id=="postit"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")

</script>

 

 

taigi šitas:

//Post-it only once per browser session? (0=no, 1=yes)

//Specifying 0 will cause postit to display every time page is loaded

var once_per_browser=1

manau ir nurodo kad atidarytu viena karta, bet pats bandžiau daryti iš dviejų skriptų vieną ir man niekas nesigauna. Gal atsirastu mokantis žmogus kuris gal net ir padarytų kažką iš dviejų viena.

Nuoroda į pranešimą
Dalintis kituose puslapiuose

Prisijunkite prie diskusijos

Jūs galite rašyti dabar, o registruotis vėliau. Jeigu turite paskyrą, prisijunkite dabar, kad rašytumėte iš savo paskyros.

Svečias
Parašykite atsakymą...

×   Įdėta kaip raiškusis tekstas.   Atkurti formatavimą

  Only 75 emoji are allowed.

×   Nuorodos turinys įdėtas automatiškai.   Rodyti kaip įprastą nuorodą

×   Jūsų anksčiau įrašytas turinys buvo atkurtas.   Išvalyti redaktorių

×   You cannot paste images directly. Upload or insert images from URL.

Įkraunama...
  • Dabar naršo   0 narių

    Nei vienas registruotas narys šiuo metu nežiūri šio puslapio.

  • Prisijunk prie bendruomenės dabar!

    Uždarbis.lt nariai domisi verslo, IT ir asmeninio tobulėjimo temomis, kartu sprendžia problemas, dalinasi žiniomis ir idėjomis, sutinka būsimus verslo partnerius ir dalyvauja gyvuose susitikimuose.

    Užsiregistruok dabar ir galėsi:

    ✔️ Dalyvauti diskusijose;

    ✔️ Kurti naujas temas;

    ✔️ Rašyti atsakymus;

    ✔️ Vertinti kitų žmonių pranešimus;

    ✔️ Susisiekti su bet kuriuo nariu asmeniškai;

    ✔️ Naudotis tamsia dizaino versija;

    ir dar daugiau.

    Registracija trunka ~30 sek. ir yra visiškai nemokama.

  • Naujausios temos

  • Karštos temos

×
×
  • Pasirinkite naujai kuriamo turinio tipą...