Closed Thread Icon

Topic awaiting preservation: Solution for Easy Input of banners (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=31683" title="Pages that link to Topic awaiting preservation: Solution for Easy Input of banners (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: 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

posted posted 02-21-2010 07:56

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="http://www.internetsafety.com/banners/default.php?size=20&id=949"></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.

Thanks.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 02-23-2010 19:05

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):

code:
document.write('<img src="http://www.yoursite.com/banner001.png">');



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

code:
<script src="http://www.yoursite.com/banner.php"></script>



And that's it.


revjx2
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2009

posted posted 03-26-2010 18:15

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

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



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

« BackwardsOnwards »

Show Forum Drop Down Menu