phpNuke and adding an ad box
Posted: Tue May 16, 2006 8:15 am
I'd like to incorporate an ad box to my phpNuke site but I don't want one of those annoying "it pops up all the freaking time" type.
I have a sample code:
But what I'd like it to do is actually something a little smarter.
1) I only want it to do this one time a day. That's first and foremost.
2) I'd like to be able to somehow control the information that goes into the ad and see:
A) Who clicks to read more
B) Number of Views
I also want to be able to put this litterally anywhere on my site. I don't want to be stuck with it being on the home page.
Any idea how I could easily do this?
I have a sample code:
Code: Select all
<?php
function place_ad( $title )
{
?>
<div class="ad-box" id="ad">
<div class="ad-box-title">
<?php echo( $title ); ?>
</div>
<p>
MTGO TRADERS is Sponsoring DarkWars
$8 Certificate for 1st place!
Format FFA ( check site for format)
8:00pm eastern start time
event website:
http://www.taylormadeparties.com/DarkWars.html
-------------------------------------------------------------------------------
</p>
<p style="text-align: right;">
<a href="javascript:closead();">close</a>
</p>
</div>
<?php
}
?>
<html>
<head>
<title>Ad box demonstration</title>
<style>
body {
width: 800px;
}
.ad-box {
background: #eee;
border: 1px solid black;
padding: 5px;
position: absolute;
left: 50px;
top: 50px;
width: 600px;
}
.ad-box-title {
background: #ccc;
padding: 5px;
font-weight: bold;
font-size: large;
text-align: center;
text-transform: uppercase;
letter-spacing: 0.2em;
}
</style>
<script>
function closead()
{
var obj = document.getElementById( "ad" );
obj.style.visibility = "hidden";
}
</script>
</head>
<body>
<?php place_ad( "Today's Event!" ); ?>
<p>This is our event calendar.</p>
</body>
</html>1) I only want it to do this one time a day. That's first and foremost.
2) I'd like to be able to somehow control the information that goes into the ad and see:
A) Who clicks to read more
B) Number of Views
I also want to be able to put this litterally anywhere on my site. I don't want to be stuck with it being on the home page.
Any idea how I could easily do this?