1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Commenting out adsense...

Discussion in 'AdSense' started by NewComputer, Jun 23, 2005.

  1. #1
    Anyone have any luck doing this? I am building a template. The company wants the index page and a few of the other pages to go live, but the ones without content, they want a coming soon. I have decided to comment out the adsense <!-- but in IE it displays the closing set, but not in FF. Just wondering if anyone has done this before?
     
    NewComputer, Jun 23, 2005 IP
  2. Critters

    Critters Guest

    Messages:
    754
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I put my ads in server side includes case I want to change the look of them and not have to update all the pages, then you can just not do the include code on the pages you dont want the ad.

    <!--#include file="ad.asp"-->
     
    Critters, Jun 23, 2005 IP
  3. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #3
    I don't have that option with their server...
     
    NewComputer, Jun 23, 2005 IP
  4. Liminal

    Liminal Peon

    Messages:
    1,279
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i've seen the problem you are describing as well. so, i've just been avoiding commenting out adsense blocks and remove them completely until i need to make them visible
     
    Liminal, Jun 23, 2005 IP
  5. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #5
    There has to be a work around....

     
    NewComputer, Jun 23, 2005 IP
  6. jedweb

    jedweb Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Is there any problem with use javascript includes for adsense ads? There are two scripts for every ad; do they have to be in separate .js files?

    Google doesn't care about having the files in includes I dont' imagine...

    jw
     
    jedweb, Jun 24, 2005 IP
  7. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I would do it like this:
    original
    <script type="text/javascript"><!--
    google_ad_client = "pub-000000000000000";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text";
    google_ad_channel ="4359828472";
    google_color_border = "FFF8E8";
    google_color_bg = "FFF8E8";
    google_color_link = "009A00";
    google_color_url = "990000";
    google_color_text = "000000";
    //--></script>
    <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    Code (markup):
    commented out
    <script type="text/javascript"><!--
    google_ad_client = "pub-000000000000000";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text";
    google_ad_channel ="4359828472";
    google_color_border = "FFF8E8";
    google_color_bg = "FFF8E8";
    google_color_link = "009A00";
    google_color_url = "990000";
    google_color_text = "000000";
    //--></script>
    <[COLOR="Red"]!-- [/COLOR]script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script[COLOR="Red"] --[/COLOR]>
    Code (markup):
     
    exam, Jun 24, 2005 IP
  8. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thinking about it, if that commenting doesn't work, comment out all the script tags like so..
    <script type="text/javascript"><!--
    google_ad_client = "pub-000000000000000";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text";
    google_ad_channel ="4359828472";
    google_color_border = "FFF8E8";
    google_color_bg = "FFF8E8";
    google_color_link = "009A00";
    google_color_url = "990000";
    google_color_text = "000000";
    //--></script>
    <!-- script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js" -->
    <!-- /script -->
    Code (markup):
     
    exam, Jun 24, 2005 IP
  9. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #9
    This has long been debated, if you cut and paste the code, that is considered 'editing' the code, but at the same time, when it is served, displays the same...

     
    NewComputer, Jun 24, 2005 IP
  10. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I think Google's intent is that we don't modify the AS code, in that we don't change what it does and how it displays
     
    exam, Jun 24, 2005 IP
  11. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #11
    That could be a costly assumption.. ;)

     
    NewComputer, Jun 24, 2005 IP
  12. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #12
    You just might be right:) BTW, did you get your AdSense code commented out?
     
    exam, Jun 24, 2005 IP
  13. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #13
    Yes and no, FF it is, IE shows a couple of the tags...
     
    NewComputer, Jun 25, 2005 IP
  14. Josh

    Josh Peon

    Messages:
    893
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Why comment it? Just remove it until you need it.

    I've found the same problem though, and now what I do is just use PHP to comment them out.. but this will only work if you're working on a PHP site.

    You'd do it like this:

    <?php
    /*
    <script...... adsense code></script>
    */
    ?>


    Works great ;)


    Josh
     
    Josh, Jun 25, 2005 IP
  15. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #15
    Yea, that may just work...

    Thanks Josh...

    Now, if I could just someone to help me with my frames issue

    (that's right, I am hojacking my OWN thread...hehe)
     
    NewComputer, Jun 25, 2005 IP
  16. Stin

    Stin Guest

    Messages:
    264
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #16
    watch out we got a HOJACKER!
     
    Stin, Jun 25, 2005 IP