2011-06-09, 05:41 PM
Hello i was thinking to iframe this on my forum but thought it could cause problems and be annoying...
I was creating a random advertisement that shows for people with a post count less than 50 (in the code it says 500000 that is for testing purposes)
Can anyone change this to a plugin so i don't need iframes all over my site???
Thanks! :/
Think i found one that was created already <3
http://mods.mybb.com/view/my-advertisements
I was creating a random advertisement that shows for people with a post count less than 50 (in the code it says 500000 that is for testing purposes)
Can anyone change this to a plugin so i don't need iframes all over my site???
<?php
define('IN_MYBB', 0);
require "./global.php";
if(intval($mybb->user['postnum']) < 5000000000){
$number = rand(1, 5);
if($number == 1){
//Walmart Offer
echo '<a href="http://cw.nu/click?aid=8078&linkid=B16962&subid=&subid2=&subid3=&subid4=&subid5="><img border="0" width="728" height="90" src="http://cw.nu/banner?aid=8078&linkid=B16962"></a>';
}
if($number == 2){
//Free iPad2
echo '<a href="http://cw.nu/click?aid=8078&linkid=B18276&subid=&subid2=&subid3=&subid4=&subid5="><img border="0" width="468" height="60" src="http://cw.nu/banner?aid=8078&linkid=B18276"></a> ';
}
if($number == 3){
echo '<a href="http://cw.nu/click?aid=8078&linkid=B16195&subid=&subid2=&subid3=&subid4=&subid5="><img border="0" width="468" height="60" src="http://cw.nu/banner?aid=8078&linkid=B16195"></a> ';
}
}
?>
Thanks! :/
Think i found one that was created already <3
http://mods.mybb.com/view/my-advertisements