PDA

View Full Version : Where To Place Adsense Code In My Header?



kortic
04-01-2008, 08:52 AM
http://i275.photobucket.com/albums/jj320/kortic/rectan.jpg

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

Peggy
04-01-2008, 09:53 AM
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 helpWow 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.

Joeychgo
04-01-2008, 10:11 AM
$header_advertisement tells me you have some kind of hack to serve ads...

kortic
04-01-2008, 10:35 AM
$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?

http://i275.photobucket.com/albums/jj320/kortic/77777777777.jpg


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???