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.

Need help with adsense.. Please

Discussion in 'AdSense' started by MMD, Sep 2, 2007.

  1. #1
    Hey i want to add a link unit to the first post in my blog ( by the way I'm using Blogger)

    But when i put the adsense code in it put's the link unit on each of the posts... which is against adsense Tos because your only allowed one link unit on each page and i have about 5-6 posts on each page, so that 5-6 link units on each page

    So how would i get to it only put the ad on the first post of that page...?


    Here's the code... Could you help me out please :confused:

    The part i need help with is right at the bottom... it's cut off by (------)
    i thought i should post most of the css...


    
    
    body{
    	margin:0;
    	padding:0;
    	background:#e6e6e6;
    	color:#333;
    	text-align:center;
    	background-color: #FFFFFF;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 76%;
    }
    
    #navbar-iframe {
                  height:0px;
                  visibility:hidden;
                  display:none;
       margin-top: 0px;}
            
    a{
    text-decoration:none;
    color:#269;
    font-weight:bold;
    }
    
    a:hover{
    text-decoration:underline;
    }
    
    p{
    	line-height:1.5em;
    	margin-top: 0;
    	margin-right: 0;
    	margin-bottom: 15px;
    	margin-left: 25px;
    }
    
    h1,h2,h3,h4{
    margin:0;
    padding:0;
    font-weight:normal;
    }
    
    h1{
    	font-size:3.2em;
    	letter-spacing:-3px;
    	margin:12px 0px 5px 20px;
    	color: fe7003;
    }
    
    h1 a:hover{
    text-decoration:none;
    }
    
    h2{
    font-size:1.8em;
    letter-spacing:-1px;
    margin:-10px 0 10px 0px;
    color:#888;
    }
    
    h3{
    color: #555;
    font-size:1.1em;
    margin:1em 0 1.5em 0em;
    }
    
    h4{
    font-size:1.2em;
    font-weight:bold;
    }
    
    #container{
    	width:880px;
    	padding:0 10px;
    	margin:0 auto;
    	background:#f0f0f0;
    	color:#333;
    	text-align:left;
    	border-left:1px solid #eef;
    	border-right:1px solid #eef;
    	float: center;
    }
    
    #header{
    background-color: #000000;
    }
    
    #sitetitle{
    	float:left;
    	height:110px;
    	width: auto;
    	color: #333;
    	background-color: #000000;
    	margin: 0px -5px 0px 0px;
    }
    
    #sitetitle a{
    color:#fe7003;
    font-weight:normal;
    background-color: #000000;
    }
    
    #sitetitle a:hover{
    color:#fe7003;
    background-color: #000000;
    }
    
    #menu{
    	height:75px;
    	padding-top:35px;
    	text-align: right;
    	background-color: #000000;
    }
    
    #menu a{
    margin:0;
    height:100px;
    padding:34px 6px 41px 6px;
    font-size:1.6em;
    font-weight:normal;
    letter-spacing:-1px;
    color: #CCCCCC;
    background-color: #000000;
    }
    
    #menu a:hover{
    	color:#fe7003;
    	text-decoration:none;
    	padding:34px 5px 41px 5px;
    	border-left: 1px solid #eee;
    	border-right: 1px solid #eee;
    	background-color: #CCCCCC;
    }
    
    #content{
    margin-top:30px;
    width:100%;
    clear:both;
    }
    
    #content h2{
    	color:#555;
    	border-bottom:2px solid #abb;
    	margin-top: 0px;
    }
    
    #content h2 a{
    color:#555;
    font-weight:normal;
    }
    
    #content h2 a:hover{
    color:#269;
    text-decoration:none;
    background:none;
    }
    
    #content p{
    margin:0.5em 1em 0.8em 1em;
    }
    
    #left{
    width:500px;
    float:left;
    }
    
    #right{
    margin-left:62%;
    margin-top:0px;
    }
    
    #sidebar, .profile-datablock, .profile-data, .widget-item-control, .item-control blog-admin{
    margin:0px;
    padding:0px;
    }
    
    .widget {
      margin-bottom: 1em;
    }
    
    .widget-content {
      margin: 0 5px;
    }
    
    #right h2{
    	width:98%;
    	font-size:1.6em;
    	top: 0px;
    	margin-top: 0px;
    	margin-right: 0;
    	margin-bottom: 5px;
    	margin-left: 0;
    	padding-top: 15px;
    	padding-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    }
    
    #right li, #right ul{
      list-style:none;
      margin:3px 0;
      padding:3px;
    }
    
    #right li a:hover{
    color:#48b;
    text-decoration:none;
    }
    
    #footer{
    clear:both;
    padding:10px 0 12px 24px;
    text-align:left;
    color:#888;
    }
    
    #footer a{
    color:#888;
    font-weight:normal;
    }
    
    #footer span{
    color:#aaa;
    font-size:2em;
    letter-spacing:-2px;
    }
    
    .entry{
    	position:relative;
    	border:2px solid #fff;
    	background:#ffffff;
    	color:#333;
    	width: 480px;
    	margin-top: 0;
    	margin-right: 0;
    	margin-bottom: 20px;
    	padding: 15px;
    }
    
    .entry a:hover, .intro a:hover{
    text-decoration:none;
    padding-bottom:2px;
    }
    
    .link{
    color:#269;
    display:block;
    margin:4px 0 0 0;
    padding:2px 1em;
    }
    
    .link:hover{
    color:#48b;
    text-decoration:none;
    }
    .meta{
    	clear:both;
    	border-top: 0px solid #ccc;
    	padding: 5px 1px 0 0;
    	text-align:right;
    	font-size:0.9em;
    	color: #567;
    	margin-bottom: 30px;
    }
    
    .pagenav{
    color: #888;
    text-align:center;
    }
    
    .entry img{
    position:relative;
    }
    
    .subcontainer {
    	width:98%;
    	margin-top: 25px;border:
    }
    
    .rightsub{
    float:left;
    width:130px;
    vertical-align: text-top;
    }
    
    .rightsub2{
    	margin-left:50%;
    	width:150px;
    	margin: 0px 2px 0px 0px;
    	overflow: hidden;
    	padding: 0px px 0px 0px;
    }
    
    .date{
    float:left;
    font-weight:bold;
    }
    
    .right{
    text-align:right;
    }
    
    .center{
    text-align:center;
    }
    
    .clear{
    clear:both;
    }
    
    .hide{
    display:none;
    }
    .style3 {color: #fe7003}
    .style1 {color: #FFFFFF}
    .style4 {color: #CCCCCC}
    blockquote{margin:20px 0;padding:0 20px 0 50px;background:url('http://photos1.blogger.com/blogger/7994/1253/1600/quote.jpg') 10px top no-repeat;border:none}
    ]]></b:skin>
    
     </head>
    
      <body>
      <div id='container'>
    
        <!-- skip links for text browsers -->
        <span id='skiplinks' style='display:none;'>
          <a href='#main'>skip to main </a> |
          <a href='#sidebar'>skip to sidebar</a>
        </span>
    
        <div id='header'>
        <div id='sitetitle'>
          <b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
    <b:widget id='Header1' locked='true' title='Runescape Tips (Header)' type='Header'>
    <b:includable id='main'>
      	  <h1>
          <b:if cond='data:blog.url == data:blog.homepageUrl'>
            <data:title/>
          <b:else/>
            <a class='style3' expr:href='data:blog.homepageUrl'><data:title/></a>
          </b:if>
             </h1>
          <p class='description style4'><strong><data:description/></strong></p>
    </b:includable>
    </b:widget>
    </b:section>
        </div>
    
    		<div id='menu'>
            <a expr:href='data:blog.homepageUrl' title='Home'>home</a>
    	<a href='http://runescape.com' title='Runescape'>runescape</a>
    
    		</div>
        </div>
    
        <div id='content'>
    
    		<div class='entry' id='left'>
            <b:section class='main' id='main' showaddelement='no'>
    <b:widget id='HTML5' locked='false' title='' type='HTML'>
    <b:includable id='main'>
      <!-- only display title if it's non-empty -->
      <b:if cond='data:title != ""'>
        <h2 class='title'><data:title/></h2>
      </b:if>
      <div class='widget-content'>
        <data:content/>
      </div>
    
      <b:include name='quickedit'/>
    </b:includable>
    </b:widget>
    <b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>
    <b:includable id='nextprev'>
      <div class='blog-pager' id='blog-pager'>
        <b:if cond='data:newerPageUrl'>
          <span id='blog-pager-newer-link'>
          <a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'><data:newerPageTitle/></a>
          </span>
        </b:if>
    
        <b:if cond='data:olderPageUrl'>
          <span id='blog-pager-older-link'>
          <a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'><data:olderPageTitle/></a>
          </span>
        </b:if>
    
        <b:if cond='data:blog.homepageUrl != data:blog.url'>
          <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
          <b:else/>
          <b:if cond='data:newerPageUrl'>
            <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
          </b:if>
        </b:if>
    
      </div>
      <div class='clear'/>
    </b:includable>
    <b:includable id='backlinks' var='post'>
      <a name='links'/><h4><data:post.backlinksLabel/></h4>
      <b:if cond='data:post.numBacklinks != 0'>
        <dl class='comments-block' id='comments-block'>
          <b:loop values='data:post.backlinks' var='backlink'>
            <div class='collapsed-backlink backlink-control'>
              <dt class='comment-title'>
                <span class='backlink-toggle-zippy'> </span>
                <a expr:href='data:backlink.url' rel='nofollow'><data:backlink.title/></a>
                <b:include data='backlink' name='backlinkDeleteIcon'/>
              </dt>
              <dd class='comment-body collapseable'>
                <data:backlink.snippet/>
              </dd>
              <dd class='comment-footer collapseable'>
                <span class='comment-author'><data:post.authorLabel/> <data:backlink.author/></span>
                <span class='comment-timestamp'><data:post.timestampLabel/> <data:backlink.timestamp/></span>
              </dd>
            </div>
          </b:loop>
        </dl>
      </b:if>
      <p class='comment-footer'>
        <a class='comment-link' expr:href='data:post.createLinkUrl' expr:id='data:widget.instanceId + "_backlinks-create-link"' target='_blank'><data:post.createLinkLabel/></a>
      </p>
    </b:includable>
    <b:includable id='post' var='post'>
    	  <a expr:name='data:post.id'/>
        <b:if cond='data:post.title'>
         <h2>
         <b:if cond='data:post.link'>
           <a expr:href='data:post.link'><data:post.title/></a>
         <b:else/>
            <b:if cond='data:post.url'>
              <a expr:href='data:post.url'><data:post.title/></a>
            <b:else/>
              <data:post.title/>
            </b:if>
         </b:if>
         </h2>
        </b:if>
      
    -------------------------------------------------------------------
    
    <div class='post-header-line-1'/>
    &lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
    google_ad_client = &quot;pub-0000000000000000000&quot;;
    google_ad_width = 468;
    google_ad_height = 15;
    google_ad_format = &quot;468x15_0ads_al_s&quot;;
    //2007-09-02: In posts
    google_ad_channel = &quot;000000000001&quot;;
    google_color_border = &quot;FFFFFF&quot;;
    google_color_bg = &quot;FFFFFF&quot;;
    google_color_link = &quot;006699&quot;;
    google_color_text = &quot;000000&quot;;
    google_color_url = &quot;006699&quot;;
    //--&gt;
    &lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;
      src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
    &lt;/script&gt;
    
    
    -------------------------------------------------------------------
    
    
      
    
    </body>
    </html>
                    
    PHP:
     
    MMD, Sep 2, 2007 IP
  2. wissam

    wissam Well-Known Member

    Messages:
    2,289
    Likes Received:
    78
    Best Answers:
    1
    Trophy Points:
    185
    #2
    Don't worry, google knows about this, you can put the code and leave the rest to Google, automatically google will show only 3 .
     
    wissam, Sep 2, 2007 IP
  3. MMD

    MMD Well-Known Member

    Messages:
    251
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    118
    #3
    Ooo ok thanks wissam :) much appreciated


    Anyone else have any comments ??
     
    MMD, Sep 3, 2007 IP