Where to insert Banner invocation code

Started by JeF4y, September 13, 2004, 08:49:43 AM

Previous topic - Next topic

Elijah Bliss

Quote from: [Unknown] on September 14, 2004, 02:15:11 AM
Add this code:



<!--
   if (!document.phpAds_used) document.phpAds_used = ",";
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
   document.write ("<" + "script language=\"JavaScript\" type=\"text/javascript\" src=\"");
   document.write ("http://www.cbr1000rr.net/phpAdsNew-2.0/adjs.php?n=" + phpAds_random);
   document.write ("&amp;what=zone:1");
   document.write ("&amp;exclude=" + document.phpAds_used);
   if (document.referer)
      document.write ("&amp;referer=" + escape(document.referer));
   document.write ("\"><" + "/script>");
//-->



-[Unknown]

I'm afraid I need some help as well. I followed what you did to the javascript make this work in the index.template.php...
<script language="JavaScript" type="text/javascript">
<!--
   if (!document.phpAds_used) document.phpAds_used = ",";
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
   document.write ("<" + "script language=\"JavaScript\" type=\"text/javascript\" src="");
   document.write ("http://www.blaqboard.com/banners/phpAdsNew-2.0/adjs.php?n=" + phpAds_random);
   document.write ("&amp;what=zone:1");
   document.write ("&amp;exclude=" + document.phpAds_used);
   if (document.referer)
      document.write ("&amp;referer=" + escape(document.referer));
   document.write ("\"><" + "/script>");
//-->
</script><noscript><a href="http://www.blaqboard.com/banners/phpAdsNew-2.0/adclick.php?n=ab350813" target="_blank"><img src="http://www.blaqboard.com/banners/phpAdsNew-2.0/adview.php?what=zone:1&amp;n=ab350813" border="0" alt=""></a></noscript>


but not matter where I place it it doesn't work. I tested the unmodified code on a regular html page and it's working. Very frustrating to say the least.

Elijah Bliss

I removed the <noscript> tags and things are working now. Before I get excited, are the <noscript> tags a necessity or can I get away with not using them?

[Unknown]

Without the noscript, people can turn off JavaScript to turn off your ads.

But... that shouldn't have caused a problem.  There aren't any single quotes in there, are there?

-[Unknown]

Elijah Bliss

Quote from: [Unknown] on September 28, 2004, 06:24:28 PM
Without the noscript, people can turn off JavaScript to turn off your ads.

But... that shouldn't have caused a problem.  There aren't any single quotes in there, are there?

-[Unknown]

Well, I tested the script sans the <noscript> tags in IE6, Safari, and Firefox, with javascript enabled, and without javascript enabled, and all the AdViews are registering as they should.

With the <noscript> tags the banner wouldn't show up at all.

[Unknown]

Quote from: Elijah Bliss on September 28, 2004, 08:43:25 PM
With the <noscript> tags the banner wouldn't show up at all.

That's strange.  What "noscript" is for is providing an alternative for browsers that don't support JavaScript or don't have it enabled.

-[Unknown]

Elijah Bliss

Quote from: [Unknown] on September 29, 2004, 03:49:29 AM
Quote from: Elijah Bliss on September 28, 2004, 08:43:25 PM
With the  tags the banner wouldn't show up at all.

That's strange.  What "noscript" is for is providing an alternative for browsers that don't support JavaScript or don't have it enabled.

-[Unknown]

Now the invocation code with the noscript tags works fine in a basic html and php document. Could there be some javascript conflict in SMF?

Elijah Bliss

So I tested the invocation code, placed in the index.template.php sans the noscript tags in Netscape Communicator 4.8 and IE5 with javascript disabled and everything worked, the banner appeared, and my adviews were registering. For all intents and purposes it's working, and I believe I covered all my bases, although I may be alienating some Netscape 3.0 users.

[Unknown]

Quote from: Elijah Bliss on September 29, 2004, 01:38:38 PM
So I tested the invocation code, placed in the index.template.php sans the noscript tags in Netscape Communicator 4.8 and IE5 with javascript disabled and everything worked, the banner appeared, and my adviews were registering. For all intents and purposes it's working, and I believe I covered all my bases, although I may be alienating some Netscape 3.0 users.

Who cares about Netscrape 3/4 :P?

-[Unknown]

JCphotog

I'm sorry to bring back an old topic, though this is a great topic. I was able to get a banner showing at the bottom of my forum.  Everything looked great untill one user wanted to post a flash banner.  It resolves well in Safari, Netscape, Firefox, but not in IE.  Any thoughts?

Advertisement: