View Single Post
Old 07-13-2010, 09:52 AM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
:stoned This AD will make you SHITLOADS of money !!!!

While the concept isn't new this method has been pulling some serious coin from some very low profit sites for me so i thought i would share.

The ad is a very lightweight cookie based overlay that is very easy to modify to promote any site/sponsor/niche/product.

Basically it is an overlay that is based on cookies so it only is displayed one time to your surfers. The overlay displays an iframe/ad of your choice with a special one time offer

To see what the overlay would look like on this thread CLICK HERE

To test what it would look like on your site CLICK HERE and enter your site url

The example script is hosted courtesy of PAPERSTREETCASH , if you plan on using the code or just need a solid sponsor please sign up , if you are a sponsor who wants to use the code for your affiliates to use shoot me an icq first ( or an epass payment )



save code as code.js , place before closing body tag


Code:

// test for ie
var IE = /*@cc_on!@*/false;

// overlay url (displayed in iframe)
var ourl = "http://yoururl/iframe.html";

// cookie name
var cun = "mypop";

// overlay width
var owi = 750;

// overlay height
var ohi = 400;

// exit url for using as adult content warning
var xit = "http://google.com";


// overlay height plus space for close url
var ohf = ohi + 15;




// grab cookie
stbc=getCookie(cun);

// set overlay after 1.5 seconds
setTimeout('pover();', 1500);

function pover(){
if (stbc =="1"){  
// do nothing - cookie is already set
} else {
// user has no cookie

// start creating overlay

// create div
var divTag = document.createElement("div");
                divTag.id = "stb";
                divTag.setAttribute("width","100%");
                divTag.setAttribute("height","100%");
                divTag.className ="stbovera";
                divTag.innerHTML = "<table width='100%' height='100%' bgcolor=black><tr><td align='center' valign='middle' width='100%' height='100%'><center><table style='z-index:11111' width='" + owi + "' height='" + ohi + "'><tr><td><center><br></td></tr></table></td></tr></table>";
                document.body.appendChild(divTag);
// modify div1
document.getElementById("stb").style.opacity="0.8";
document.getElementById("stb").style.left="0px";
document.getElementById("stb").style.top="0px";
document.getElementById("stb").style.width="100%";
document.getElementById("stb").style.height="100%";
document.getElementById("stb").style.position="fixed";
document.getElementById("stb").style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=80)";
// create div2
var divTag = document.createElement("div");
                divTag.id = "sbt";
                divTag.setAttribute("width","100%");
                divTag.setAttribute("height","100%");
                divTag.className ="stboverb";
                divTag.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><center><table style='z-index:11112' width='" + owi + "' height='" + ohf + "' bgcolor=red><tr><td><center><div id=filla></div><a href='javascript:jah(0);'><font color=white>NO THANKS</font></a><br></td></tr></table></td></tr></table>";
                document.body.appendChild(divTag);
// modify div2
document.getElementById("sbt").style.left="0px";
document.getElementById("sbt").style.top="0px";
document.getElementById("sbt").style.width="100%";
document.getElementById("sbt").style.height="100%";
document.getElementById("sbt").style.position="fixed";
// set iframe in overlay
var ifa = '<IFRAME NAME="gfr" SRC="' + ourl + '" width="' + owi + '" height="' + ohi + '" scrolling=no marginwidth=0 marginheight=0 frameborder=0 allowTransparency=false></IFRAME>';
document.getElementById("filla").innerHTML = ifa;


}

}

// function for clicking close

function jah(bam){


   if (bam == 1){
window.open(xit,"_top");
    } else {
// set cookie 365 days
setCookie(cun,'1',365);
document.getElementById("stb").style.display="none";
document.getElementById("sbt").style.display="none";
window.focus();
setTimeout('window.focus()', 500);



    }


}

// get and set cookie functions
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
* important note
to use this code your page must have a valid doctype or ie7 users will not see the overlay properly
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
place at the very top of your page before <html>
__________________
hatisblack at yahoo.com

Last edited by SmokeyTheBear; 07-13-2010 at 09:53 AM..
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote