Topic: Solution for Easy Input of banners (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Topic: Solution for Easy Input of banners (Page 1 of 1)" rel="nofollow" >Topic: Solution for Easy Input of banners <span class="small">(Page 1 of 1)</span>\

Radical Rob
Paranoid (IV) Inmate

From: Lost Angeles Kalifornia, via Hawaii....
Insane since: Jun 2001

IP logged posted posted 02-21-2010 07:56 Edit Quote

Got an issue I'm trying to figure out the best solution for. Here's the scenario...

I have a "master site" that I built that has a couple of banners. (160x600) Now I want to include this banner dynamically on about 40 sites that we administrate. The content belongs to the site owners but we own a piece of the right column that we can post our banners. I'd like to be able to put one piece of code on each site.

I have a site that I've partnered with that offers a banner to their site in the form of:

<script src=""></script>

It's a flash banner, which is what we have. How would I impliment something like this? I thought of just having one banner.php file and using an <?php include("banner.php"); ?> but most of the sites are wordpress sites and it doesn't play niceley when placed in a widget text box.


Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

IP logged posted posted 02-23-2010 19:05 Edit Quote

You should basically do the same thing as your partner does using <script> tag to include javascript file that will simply perform a couple of document.write(); statements that will include your banner. An example:

Create banner.php file with code like this (obviously you can use PHP to output dynamic content if needed):

document.write('<img src="">');

And then add the following code on sites where you want to show your banners:

<script src=""></script>

And that's it.

Obsessive-Compulsive (I) Inmate

Insane since: Aug 2009

IP logged posted posted 03-26-2010 18:15 Edit Quote

Better yet could you not have a div element that you could stick your banner into rather than using document.write?

<div id="banner_div"> </div>
<script>getdiv = document.getElementById("banner_div");
getdiv.innerHTML = "<img src='myimage.jpg' />";

(Edited by revjx2 on 03-26-2010 18:15)

Post Reply
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
Your Text:
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu