TinyPortal

Development => Block Codes => Topic started by: JCphotog on January 11, 2007, 02:21:13 AM

Title: php ads new invocation code?
Post by: JCphotog on January 11, 2007, 02:21:13 AM
Hi.  Are any of you using phpadsnew as an adserver?  I'd love to put a small vertical banner in a block on the side bar.  When ever I add the invocation code I get an error.  I'd love some insight on the issue!  Thanks so much!  Maybe there's a snippet that would help?
Title: Re: php ads new invocation code?
Post by: rebelrose on January 11, 2007, 03:29:37 AM
Your using Tiny Portal correct? What type of block did you add it to ?
Title: Re: php ads new invocation code?
Post by: JCphotog on January 11, 2007, 04:44:40 AM
Yes! I tried the php code in a php block and the remote java code in a script block. 
Title: Re: php ads new invocation code?
Post by: akulion on January 11, 2007, 05:20:42 AM
I havent used it myself, but if you put a sample code of what the codes the adverts usually have,Im sure someone could help out :up:
Title: Re: php ads new invocation code?
Post by: JCphotog on January 11, 2007, 01:49:44 PM
Have you run into a better adserver?  There are still a few things that I'm having issues with... 

Here's the code (you would replace mysite with what ever your domain is):

<script language="JavaScript" type="text/javascript">
<!--
   if (!document.phpAds_used) document.phpAds_used = ",";
   
_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.mysite.com/adserver/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.mysite.com/adserver/adclick.php?n=aa4398ed" target="_blank"><img src="http://www.mysite.com/adserver/adview.php?what=zone:1&amp;n=aa4398ed" border="0" alt=""></a></noscript>