Announcement

Collapse
No announcement yet.

how to display randome ads

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to display randome ads

    hello friends,

    we are two friends and both are partner, we both have adsense and adbride account,

    we want to display both of our ads randomly on the site,

    as we had decided that there will be only on ad space on our site and we got 4 ads code
    • my google
    • my adbride
    • partners google
    • partners adbride

    now how i can do this can you help me,

    i want to display all the ad code only at one place randomly at the change of each view.

    hope you guys understand what i want to say?

  • #2
    Here is one way:

    http://www.vbulletin.com/forum/showthread.php?t=170826

    Comment


    • #3
      i am getting this error

      Code:
      [B]Parse error[/B]:  parse error, unexpected T_LNUMBER in [B]/home/content/d/e/e/deepmob/html/global.php(611) : eval()'d code[/B] on line [B]18[/B]
      my plugging code is like this

      PHP Code:
      $random_number rand(15); 

      $random_banner[1] = '<script type="text/javascript"><!-- 
      google_ad_client = "pub-2029105257712613"; 
      /* Symbiansector guest */ 
      google_ad_slot = "2189701015"; 
      google_ad_width = 728; 
      google_ad_height = 90; 
      //--> 
      </script> 
      <script type="text/javascript" 
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
      </script>'

      $random_banner[2] = '<!-- Begin: AdBrite, Generated: 2008-10-01 2:20:34  --> 
      <script type="text/javascript"> 
      var AdBrite_Title_Color = '
      0000FF'; 
      var AdBrite_Text_Color = '
      000000'; 
      var AdBrite_Background_Color = '
      FFFFFF'; 
      var AdBrite_Border_Color = '
      FFFFFF'; 
      var AdBrite_URL_Color = '
      008000'; 
      try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';} 
      </script> 
      <span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' 
      src="http://ads.adbrite.com/mb/text_group.php?sid=858917&zs=3732385f3930&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script> 
      <a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=858917&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#FFFFFF;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> 
      <!-- End: AdBrite -->'

      $random_banner[3] = '<script type="text/javascript"><!-- 
      google_ad_client = "pub-2029105257712613"; 
      /* Symbiansector guest */ 
      google_ad_slot = "2189701015"; 
      google_ad_width = 728; 
      google_ad_height = 90; 
      //--> 
      </script> 
      <script type="text/javascript" 
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
      </script>'

      $random_banner[4] = '<!-- Begin: AdBrite, Generated: 2008-10-01 2:20:34  --> 
      <script type="text/javascript"> 
      var AdBrite_Title_Color = '
      0000FF'; 
      var AdBrite_Text_Color = '
      000000'; 
      var AdBrite_Background_Color = '
      FFFFFF'; 
      var AdBrite_Border_Color = '
      FFFFFF'; 
      var AdBrite_URL_Color = '
      008000'; 
      try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';} 
      </script> 
      <span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' 
      src="http://ads.adbrite.com/mb/text_group.php?sid=858917&zs=3732385f3930&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script> 
      <a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=858917&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#FFFFFF;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> 
      <!-- End: AdBrite -->'

      $random_banner[5] = '<script type="text/javascript"><!-- 
      google_ad_client = "pub-2029105257712613"; 
      /* Symbiansector guest */ 
      google_ad_slot = "2189701015"; 
      google_ad_width = 728; 
      google_ad_height = 90; 
      //--> 
      </script> 
      <script type="text/javascript" 
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
      </script>'

      any suggestion

      Comment


      • #4
        There is an error on line 18. It looks like you are using single quotes in your HTML without escaping them. If you have some coding ability then you can post on www.vbulletin.org for help with this.

        Comment


        • #5
          no i don't have any coding ability please help

          Comment


          • #6
            As Jake said try www.vbulletin.org for help with this.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X