Results 1 to 4 of 4

Thread: Where To Place Adsense Code In My Header?

  1. #1
    New to vBFAQ
    Join Date
    Apr 2008
    Posts
    2

    Where To Place Adsense Code In My Header?



    Please take a look at the above image. I'd like to replace a blue rectangle with an adsense ad. Below is my header. Could you tell me please what should I replace with adsense code in order for adsense ad to be shown instead of a blue rectangle? Thank you in advance. Here is my header code :

    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td style="background: url($stylevar[imgdir_misc]/nav_bg.gif) repeat-x center center;">$header_advertisement</td>
    </tr>
    </table>
    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" style="background: url(images/bigred/gradients/gradient_nav.gif) repeat-x;">
    <tr>
    <td><a href="index.php"><img src="$stylevar[imgdir_misc]/home.gif" alt="" border="0" /></a></td>
    <td><a href="usercp.php"><img src="$stylevar[imgdir_misc]/usercp.gif" alt="" border="0" /></a></td>
    <td><a href="memberlist.php"><img src="$stylevar[imgdir_misc]/members.gif" alt="" border="0" /></a></td>
    <td><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow"><img src="$stylevar[imgdir_misc]/search.gif" alt="" border="0" /></a></td>
    <if condition="$bbuserinfo['userid']">
    <td id="usercptools"><img src="$stylevar[imgdir_misc]/quick.gif" alt="" border="0" /><script type="text/javascript">vbmenu_register("usercptools", true); </script></td></if>
    <if condition="$show['registerbutton']">
    <td><a href="register.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/register.gif" alt="" border="0" /></a></td>
    </if>
    </tr>
    </table>
    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
    <tr style="height: 15px;">
    <td colspan="3" style="background: #610000;">$header_advertisement</td>
    </tr>
    <tr style="height: 110px;" valign="top">
    <td width="191"><img src="$stylevar[imgdir_misc]/logo.gif" alt="" /></td>
    <td style="background: url('$stylevar[imgdir_misc]/ad_bkg.gif') no-repeat;" width="542"><img src="$stylevar[imgdir_misc]/banner.gif" alt="banner" style="display: block; margin: 29px 0px 0px 40px;" /></td>
    <td style="background: url(images/bigred/gradients/gradient_banner.gif) repeat-x;">$header_advertisement</td></tr>
    </tr>
    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td background="$stylevar[imgdir_misc]/nav_bg.gif"><img src="$stylevar[imgdir_misc]/nav_bg.gif" alt="" width="738" height="38"></td>
    </tr>
    </table>
    <!-- content table -->
    $spacer_open
    $leftcolumn_advertisement
    $_phpinclude_output



    Waiting for your help

  2. #2
    Moody Admin Peggy's Avatar
    Join Date
    Jan 2005
    Location
    Youngstown, OH
    Posts
    12,414
    Quote Originally Posted by kortic View Post

    Please take a look at the above image. I'd like to replace a blue rectangle with an adsense ad. Below is my header. Could you tell me please what should I replace with adsense code in order for adsense ad to be shown instead of a blue rectangle? Thank you in advance. Here is my header code :

    <table width="100&#37;" align="center" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td style="background: url($stylevar[imgdir_misc]/nav_bg.gif) repeat-x center center;">$header_advertisement</td>
    </tr>
    </table>
    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" style="background: url(images/bigred/gradients/gradient_nav.gif) repeat-x;">
    <tr>
    <td><a href="index.php"><img src="$stylevar[imgdir_misc]/home.gif" alt="" border="0" /></a></td>
    <td><a href="usercp.php"><img src="$stylevar[imgdir_misc]/usercp.gif" alt="" border="0" /></a></td>
    <td><a href="memberlist.php"><img src="$stylevar[imgdir_misc]/members.gif" alt="" border="0" /></a></td>
    <td><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow"><img src="$stylevar[imgdir_misc]/search.gif" alt="" border="0" /></a></td>
    <if condition="$bbuserinfo['userid']">
    <td id="usercptools"><img src="$stylevar[imgdir_misc]/quick.gif" alt="" border="0" /><script type="text/javascript">vbmenu_register("usercptools", true); </script></td></if>
    <if condition="$show['registerbutton']">
    <td><a href="register.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/register.gif" alt="" border="0" /></a></td>
    </if>
    </tr>
    </table>
    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
    <tr style="height: 15px;">
    <td colspan="3" style="background: #610000;">$header_advertisement</td>
    </tr>
    <tr style="height: 110px;" valign="top">
    <td width="191"><img src="$stylevar[imgdir_misc]/logo.gif" alt="" /></td>
    <td style="background: url('$stylevar[imgdir_misc]/ad_bkg.gif') no-repeat;" width="542"><img src="$stylevar[imgdir_misc]/banner.gif" alt="banner" style="display: block; margin: 29px 0px 0px 40px;" /></td>
    <td style="background: url(images/bigred/gradients/gradient_banner.gif) repeat-x;">$header_advertisement</td></tr>
    </tr>
    <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td background="$stylevar[imgdir_misc]/nav_bg.gif"><img src="$stylevar[imgdir_misc]/nav_bg.gif" alt="" width="738" height="38"></td>
    </tr>
    </table>
    <!-- content table -->
    $spacer_open
    $leftcolumn_advertisement
    $_phpinclude_output



    Waiting for your help
    Wow that's some header code. It looks like there are actually two different places that you could place the code. Where is says $header_advertisement. Try both of those.

    I could be wrong tho, so if someone else sees something else, jump in here.

  3. #3
    vBFAQ Adminstrator Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Posts
    6,504
    $header_advertisement tells me you have some kind of hack to serve ads...

  4. #4
    New to vBFAQ
    Join Date
    Apr 2008
    Posts
    2
    Quote Originally Posted by Joeychgo View Post
    $header_advertisement tells me you have some kind of hack to serve ads...
    Yes, I use VbAdManagement hack. But in a given case it doesn't matter. I tried to replace<img src="$stylevar[imgdir_misc]/banner.gif" alt="banner" style="display: block; margin: 29px 0px 0px 40px;" /> in the header template with adsense code. Please take a look at the below image. This is the result. What am I doing wrong?




    I got the next tip:
    "For a non-image in that space like adsense code, you will have to include the style="display: block; margin: 29px 0px 0px 40px;" code in your adsense code as well to position it." But according to google TOS I can't change adsense code. So, how to place adsense ad exactly into the rectangle???

Similar Threads

  1. how to place flash header and logo
    By TheBiller in forum Help Wanted
    Replies: 1
    Last Post: 03-09-2009, 01:45 AM
  2. New Adsense Code
    By popowich in forum Google Adsense
    Replies: 2
    Last Post: 11-21-2007, 01:36 PM
  3. Replies: 13
    Last Post: 07-03-2007, 04:09 AM
  4. code ad into header?
    By Caddyman in forum HTML, Design, DHTML, CSS
    Replies: 9
    Last Post: 05-06-2007, 11:18 PM
  5. Adsense in Header
    By b2w in forum vBulletin Discussion and Questions
    Replies: 8
    Last Post: 08-09-2006, 04:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •