Previous Thread
Next Thread
Print Thread
Hop To
#32341 12/03/2003 11:05 PM
Anonymous
Unregistered
Anonymous
Unregistered
Hi,

I'm trying to install a banner rotating program on my UBB Threads forum and can't seem to get it to work.

I'm basically adding this code to my forum header:

<?
require "ad.php";
$advertisement = show_ad();

// page shows something here
echo $advertisement // the banner appears
?>

Can someone point me in the right direction to get this script to work? It works on the main site, but not on the UBB Threads forum.

Thanks in advance.

#32342 12/03/2003 11:44 PM
Anonymous
Unregistered
Anonymous
Unregistered
PHP won't execute inside the header, but you can put it inside the /templates/default/ubbt_header.tmpl

Try adding this:

<pre>
require "ad.php";
$advertisement = show_ad();

// page shows something here
echo $advertisement // the banner appears
</pre>

between these 2 lines:

<pre>
UBBTPRINT
/* UBBTREMARK */ ?>
</pre>

#32343 12/04/2003 10:48 AM
Anonymous
Unregistered
Anonymous
Unregistered
Thanks,

I can't seem to get this to work, either.

Should it look like this?

<?
UBBTPRINT
require "ad.php";
$advertisement = show_ad();

// page shows something here
echo $advertisement // the banner appears
/* UBBTREMARK */ ?>

How are other people who run UBB Threads adding self run banner ads to their site if PHP doesn't work? Javascript/SSI, Perl?

Please help, I have a customer who paid for this already and I want to fulfill.

Thanks in advance.

#32344 12/04/2003 8:24 PM
Anonymous
Unregistered
Anonymous
Unregistered
You shouldn't need the opening php tag - as it's already inside a tag.

I've done banner ads with a similar trick.

Do you get any errors or anything?

#32345 08/02/2004 11:06 AM
Joined: Jun 2006
Posts: 73
C
journeyman
journeyman
C Offline
Joined: Jun 2006
Posts: 73
Josh -

I need to serve banner ads from DoubleClick. Would you care to share some code to do this? By the way, the DoubleClick banner code looks like this:
Code
&lt;a href="http://ad.doubleclick.net/jump/realtree.com/;sz=468x60;tile=1;ord=[randomnumber]?"&gt;
&lt;img src="http://ad.doubleclick.net/ad/realtree.com/;sz=468x60;tile=1;ord=[samerandomnumber]?" height="60" width="468" alt="Please visit our sponsor"&gt;
&lt;/a&gt;

I don't know much about PHP, but I found the following that generates the random number that's required by DoubleClick. I just don't know how to put all of this together.
Code
srand((double)microtime()*1000000);
echo rand(0,10000000); 

#32346 08/02/2004 12:18 PM
Joined: Jun 2006
Posts: 73
C
journeyman
journeyman
C Offline
Joined: Jun 2006
Posts: 73
Nevermind...

I'm just using javascript so I can control the placement as well.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Who's Online Now
2 members (Gizmo, 1 invisible), 901 guests, and 169 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240501)