Page 1 of 1

Creating an ad bbcode php help

Posted: Tue Feb 13, 2007 12:17 am
by aliks0905
Everah | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


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.

Code: Select all

<?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.


Everah | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Feb 13, 2007 12:52 am
by RobertGonzalez
You are probably going to want to look into using querystring vars or something of the like.