Add javascript banner ad to in single photo page

kellthaqtpie

Joined: 2008-03-26
Posts: 6
Posted: Mon, 2008-06-09 15:52

Hey guys! I am having trouble with adding an ad with javascript to the single photo page. Any suggestions? I want it to appear centered below the photo.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-06-09 16:21

Add your code under:

            {g->text text="There is nothing to view for this item."}
          {/if}
        </div>

in photo.tpl

use literal tags for the JS:
http://www.smarty.net/manual/en/language.function.literal.php

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kellthaqtpie

Joined: 2008-03-26
Posts: 6
Posted: Mon, 2008-06-09 21:02

Thanks so much, dave....this is what im running into. this is the javascript im using:

<script type="text/javascript" language="JavaScript">

rnum=Math.round(Math.random() * 100000);

ts=String.fromCharCode(60);

if (window.self != window.top) {nf=''} else {nf='NF/'};

document.write(ts+'script
src="http://bet.burstnet.com/cgi-bin/ads/ad17311a.cgi/v=2.3S/sz=300x250A/NZ/
'+rnum+'/'+nf+'RETURN-CODE/JS/">'+ts+'/script>');

</script><noscript><a
href="http://bet.burstnet.com/ads/ad17311a-map.cgi/ns/v=2.3S/sz=300x250A/"
target="_top">

<img
src="http://bet.burstnet.com/cgi-bin/ads/ad17311a.cgi/ns/v=2.3S/sz=300x250A/
" border="0" alt="Click Here" /></a>

</noscript>

I wrapped it in literal tags and noticed the ad wasnt appearing, so I removed <noscript> tags and POW it shows up. but now that is affecting the way the ads are coming up. basically, only one ad is being pulled, instead of it changing etc. which messes up my stats. did i go about it the wrong way?