PDA

View Full Version : random chance of apopup for guests


MentaL
01-16-2005, 03:29 AM
Say a guest comes to forum

theres say a 1/5 chance of a popup

this be a good hack

Ppl could use this to gain allot of money ;)

trafix
01-16-2005, 03:30 AM
Say a guest comes to forum

theres say a 1/5 chance of a popup

this be a good hack

Ppl could use this to gain allot of money ;)
and the point is?

when pop up blockers are so prevelant now days

MentaL
01-17-2005, 08:39 PM
still, there is like a 50% chance of them not having.. still , a code modification to earn u money :)

Guy G
01-17-2005, 08:50 PM
still, there is like a 50% chance of them not having.. still , a code modification to earn u money :)
Possible, ill try and do one :P
you probably know me as well mental :]

Guy G
01-17-2005, 10:02 PM
Say a guest comes to forum

theres say a 1/5 chance of a popup

this be a good hack

Ppl could use this to gain allot of money ;)
Ok here you go :)

1.open the template FORUMHOME in the template manager.

2.After $headinclude (just above the </head>) add this code:

<script type="text/javascript">
function getNum()
{
return Math.floor((Math.random()*5)+1);
}
function popup()
{
var num=getNum();
if (num%5=0)
{
window.open(http://whatever.com,'Title','height=200,width=150');
}
}
</script>


3. now on the same template find the <body> tag.
change it to this instead of the all body tag.

<if condition="$bbuserinfo['userid'] == 0">
<body onLoad="popup();">
<else />
<body>
</if>


Should work, test it :) its zorobz by the way... ;]

Murphinator
01-18-2005, 01:31 AM
it didnt work :(