News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Having some trouble installing phpads banner script

Started by ketchup, July 09, 2006, 10:46:29 AM

Previous topic - Next topic

ketchup

When I try to replace the banner code in the babylon theme wwith the phpads   java script code

I get this error, any ideas?




Arbalot


ketchup

#2
That was fast reply!  :D Thanks lol :)

Uhm but may I ask where is the caracter '


So this is the code on line 155

<script language='JavaScript' type='text/javascript' src='http://blahforums.com/phpadszz/banny/adx.js'></script>

I would make it like this?

<script language=\'JavaScript' type=\'text/javascript' src=\'http://tgirlforums.com/phpadszz/banny/adx.js'></script>

Arbalot

you change this code

<script language='JavaScript' type='text/javascript' src='http://blahforums.com/phpadszz/banny/adx.js'></script>

with

<script language=\'JavaScript\' type=\'text/javascript\' src=\'http://blahforums.com/phpadszz/banny/adx.js\'></script>

or try
<script language="JavaScript" type="text/javascript" src="http://blahforums.com/phpadszz/banny/adx.js"></script>
but you must change all js code as such

ketchup


.Darkman

Thats hard.
But an easy fix is here.
Add echo and its solved.
Your code
<script language='JavaScript' type='text/javascript' src='http://blahforums.com/phpadszz/banny/adx.js'></script>

It should be
echo '<script language='JavaScript' type='text/javascript' src='http://blahforums.com/phpadszz/banny/adx.js'></script>

Clever Tutorials - One place for all of them . . .
SMF Theme Works



ketchup

#6
ahhh this is giving me a headache  >:( :) My head is going to explode  :)

I tried both and keep getting a parse error

Here is the banner code

<script language='JavaScript' type='text/javascript' src='http://blahforums.com/phpadszz/banny/adx.js'></script>
<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://blahforums.com/phpadszz/banny/adjs.php?n=" + phpAds_random);
   document.write ("&amp;what=zone:1&amp;target=_blank");
   document.write ("&amp;exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&amp;referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://blahforums.com/phpadszz/banny/adclick.php?n=a1246fde'; target='_blank'><img src='http://blahforums.com/phpadszz/banny/adview.php?what=zone:1&amp;n=a1246fde'; border='0' alt=''></a></noscript>




Here is where I'm trying to install (deleting the red code)

// This part is the logo and forum name.  You should be able to change this to whatever you want...
   echo '
               <img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';
   if (empty($settings['header_logo_url']))
      echo '
               <span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
   else
      echo '
               <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';

   echo '
            </td>
         </tr>





Can somebody post the code so i can just copy it lol...I gave it a shot haha :)

Arbalot

you try
echo'
<script language=\'JavaScript\' type=\'text/javascript\' src=\'http://blahforums.com/phpadszz/banny/adx.js\'></script>
<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://blahforums.com/phpadszz/banny/adjs.php?n=" + phpAds_random);
   document.write ("&amp;what=zone:1&amp;target=_blank");
   document.write ("&amp;exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&amp;referer=" + escape(document.referrer));
   document.write ("\'><" + "/script>");
//-->
</script>
<noscript><a href=\'http://blahforums.com/phpadszz/banny/adclick.php?n=a1246fde\' target=\'_blank\'><img src=\'http://blahforums.com/phpadszz/banny/adview.php?what=zone:1&amp;n=a1246fde\' border=\'0\'></a></noscript>
';


ketchup

oook I your script worked I took out the extra echo! thanks! Much apprciated :)  :D :D :D :D

Advertisement: