Jump to content

Creating an ad bbcode php help


aliks0905

Recommended Posts

I need to create a bbcode for one of my websites, but still quite difficult for me since I dont know anything about php and will get the book in a couple weeks. I know some php functions and the general idea of how it works, but need the exact syntax.

 

I need it so if a guest comes to my site, then they need to click on the banner to see the hidden content. If it is a registered member, then they just see the hidden content. So basically when a guest comes, they have to click on the ad to see the hidden content. The ad dissappears and theres the hidden content. This is what I have so far.

 

<php

$adcode = '<iframe allowtransparency="true" src="http://mysite.com/banner.php" width="468" height="60"

onload="javascript:var o=this;var l=o.contentWindow.length;var s=0;if(l>0){s=l;}else{j=1;for(var i=0;i<32;+...

style="border:0px;margin:0px;overflow:hidden" frameborder="0" scrolling="no"></iframe>';

 

if(USER) {

return $code_text;

}else{

return $adcode;

if <<Guest clicks on ad,

 

then << Guest sees $code_text

</?>

 

The '<<' areas are what I need help on...if I am doing this whole thing the wrong way, please explain and help me out. Thanks...much appreciate this forum.

Link to comment
https://forums.phpfreaks.com/topic/38268-creating-an-ad-bbcode-php-help/
Share on other sites

if(USER) {

return $code_text;

}else{

return $adcode;

if <<Guest clicks on ad,

 

then << Guest sees $code_text

 

 

wtf is the point in this first? if(USER) {

 

then if($adcode==NULL){ echo "<a href=link for ad code&adcode=$adcode>"; }else{ echo "your iframe.."

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.