No such plugin? Or a manual solution..
I’m also looking for something like that.
751672
I’m not overly familiar with WP but…
You could have your link requests redirect to an ad page and have the ad page use a template that has META redirect or JavaScript.
I don’t think a plugin would ork here because the redirect is delayed and I’m not sure if plugins/filters are executed before any data is sent to the screen — if not then calling a server side redirect is impossible unless output buffering is used. Again I’m not familiar enough with WP internals to say for sure or not.
The META/JavaScript solution is probably best but the problem is you want it automated and I”m nto sure what part you want automated???
You could implement a filter which was called before HTML was sent to the screen, have some fancy regex look for links which point to certain resources (PDF, XLS, etc) and have the link re-written to redirect to the ad page…which would then redirect to the actual resource and begin downloading after the 5 seconds or whatever.
This works in single.php but..
<META HTTP-EQUIV=Refresh CONTENT=”3; URL=http://www.xxx.com”> </div>
The URL is suppose to be absolute, so how do we capture the URL which is suppose to be relative?
Found the solution. When your page is loaded, another window(your advertisement will appear and the time delayed can be set. Once it finishes counting, the window disappears.
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
function delayer() { //DOM
if (document.getElementById){
document.getElementById(‘prepage’).style.visibility=’hidden’;
}else{
if (document.layers){ //NS4
document.prepage.visibility = ‘hidden’;
}
else { //IE4
document.all.prepage.style.visibility = ‘hidden’;
}
}
}
// End –>
</SCRIPT>
<body onLoad=” setTimeout(‘delayer()’, 5000) “>
<div id=”prepage” style=”position:absolute; font-family:arial; font-size:16; left:0px;
top:0px; background-color:white; layer-background-color:white; height:100%; width:100%;”>
<table width=100%><tr><td><font color=”red”>YOUR ADVERTISEMENT CODE HERE</td></tr></table>
</div>
</body>