Google Ad sense - How to set back ground colour?

Discussion in 'vBulletin' started by policy, Jun 11, 2010.

  1. #1
    Hi I have put the Google Ad sense after first Post -
    <vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">
    <div class="postbit">
    <div style="text-align: center;">
    <div class="postbody"><script type="text/javascript"><!--
    google_ad_client = "pub-XXXXXXXXXXXXX";
    /* 728x90, created 5/7/10 */
    google_ad_slot = "9218029326";
    google_ad_width = 728;
    google_ad_height = 90;
    google_color_border = "#fafafa";
    google_color_bg = "#fafafa";
    
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </div>
    </div>
    </div>
    <br />
    </vb:if>  
    Code (markup):
    How to set back ground colour of the box as Vbulletin default colour?
     
    policy, Jun 11, 2010 IP
  2. CalebSpilchen

    CalebSpilchen Well-Known Member Affiliate Manager

    Messages:
    898
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    140
    Digital Goods:
    2
    #2
    Read over your code again

    Find out (by looking at the CSS again) what the default VB CSS color is, and then just change that code, I quoted to that.
     
    CalebSpilchen, Jun 11, 2010 IP
  3. policy

    policy Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply. But I am looking for the background colour of the ad box after the first post. As in DP.
     
    policy, Jun 14, 2010 IP
  4. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can change that when your making the AD itself.
     
    ChopSuey, Jun 14, 2010 IP
  5. policy

    policy Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Complete Box not just Ad-sense Background as in DP.
     
    policy, Jun 17, 2010 IP
  6. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ohh it goes with the skin your using. Sorry.
     
    ChopSuey, Jun 17, 2010 IP
  7. policy

    policy Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I am using default Vbulletin Skin.
     
    policy, Jun 18, 2010 IP
  8. sachin410

    sachin410 Illustrious Member

    Messages:
    6,422
    Likes Received:
    573
    Best Answers:
    0
    Trophy Points:
    410
    #8
    This is how I do it:

    <if condition="$post[postcount] == 1">
    
    <table width="100%" align="center" border="1" border-color="#0b198c">
    <td bgcolor="#D4DFA7" align="center" >
    
    GOOGLE ADSENSE CODE
    
    </td>
    </table>
    </if>
    Code (markup):
     
    sachin410, Jun 22, 2010 IP
  9. policy

    policy Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Its not working. May be the code is for 3.8
     
    policy, Jun 26, 2010 IP
  10. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #10
    It is for 3.x

    Real easy to convert to vB4 code. :)
     
    ChopSuey, Jun 26, 2010 IP
  11. sachin410

    sachin410 Illustrious Member

    Messages:
    6,422
    Likes Received:
    573
    Best Answers:
    0
    Trophy Points:
    410
    #11
    Then, why don't you tell us? :D.
     
    sachin410, Jun 26, 2010 IP
  12. Rafaweborama

    Rafaweborama Member

    Messages:
    52
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #12
    This is the converted code:

    <vb:if condition="$post[postcount] == 1">
    
    <table width="100%" align="center" border="1" border-color="#0b198c">
    <td bgcolor="#D4DFA7" align="center" >
    
    GOOGLE ADSENSE CODE
    
    </td>
    </table>
    </vb:if>
    PHP:
    But I preffer to use CSS instead of that...
     
    Rafaweborama, Jun 26, 2010 IP
  13. policy

    policy Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    He wants us to go to his forum - 'vBulletin Help Forums' and post there for answer
     
    policy, Jun 26, 2010 IP
  14. policy

    policy Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Thanks for the code. But still the box is not matching the default VB 4.0.
     
    policy, Jun 26, 2010 IP
  15. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Yes sir...
     
    ChopSuey, Jun 27, 2010 IP