vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   WHen adding adsense code it distorts the design (https://vborg.vbsupport.ru/showthread.php?t=315625)

John Diver 11-26-2014 08:45 AM

WHen adding adsense code it distorts the design
 
Hey,

I have added adsense, both in the breadcrumb template and in the ad_global_below_navbar template but when I do it is making the navigation move into the header.

Can anyone help with this please?
I have left it in the ad_global_below_navbar template so you can see the problem.

This is the code I am using:

<p align="center"><script type="text/javascript"><!--
google_ad_client = "ca-pub-9222821431952789";
/* ICF - Hdr 728 */
google_ad_slot = "2541901540";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

--------------- Added [DATE]1416998770[/DATE] at [TIME]1416998770[/TIME] ---------------

P.s. I also did it without <p> tags

ozzy47 11-26-2014 09:07 AM

Does it do the same thing on a unmodified default style?

John Diver 11-26-2014 11:48 AM

Hey ozzy,

This is the only modification made on the default design, everything else is default.

Thanks :)

Dave 11-26-2014 12:02 PM

Do you have a link to the forum where this issue is happening?

ForceHSS 11-26-2014 12:04 PM

<a href="http://www.deuceace.com" target="_blank">http://www.deuceace.com</a>
the homepage you have set on this site is not working you need to update it

John Diver 11-26-2014 12:04 PM

Sorry, I thought I included a link!

Http://www.InternationalChatForum.com - Just testing it out at the minute so its all default apart from this one change

Thanks

--------------- Added [DATE]1417010690[/DATE] at [TIME]1417010690[/TIME] ---------------

Its a new install with a database from vb 3.8 - So everything is as standard

ForceHSS 11-26-2014 12:05 PM

the footer code is messed up revert it and the code you have above make sure you add it to the bottom of the template

default below for google ads

ad_showthread_firstpost_start
Code:

<vb:if condition="$adsense_pub_id AND CONTENT_PAGE">
<vb:if condition="!$bbuserinfo['userid']">
<div style="float:right; width:300px; height:250px; margin-left:10px">
<script type="text/javascript"><!--
google_ad_client = "{vb:var adsense_pub_id}";
google_ad_host = "{vb:var adsense_host_id}";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "{vb:stylevar alt1_bgcolor_hex}";
google_color_bg = "{vb:stylevar alt2_bgcolor_hex}";
google_color_link = "{vb:stylevar body_link_n_fgcolor_hex}";
google_color_text = "{vb:stylevar body_fgcolor_hex}";
google_color_url = "{vb:stylevar body_link_n_fgcolor_hex}";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</vb:if>
</vb:if>

ad_navbar_below
Code:

<vb:if condition="$adsense_pub_id AND CONTENT_PAGE">
<div style="width:728px; margin:0 auto; padding-bottom:1em">
<script type="text/javascript"><!--
google_ad_client = "{vb:var adsense_pub_id}";
google_ad_host = "{vb:var adsense_host_id}";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "{vb:stylevar alt2_bgcolor_hex}";
google_color_bg = "{vb:stylevar alt1_bgcolor_hex}";
google_color_link = "{vb:stylevar body_link_n_fgcolor_hex}";
google_color_text = "{vb:stylevar body_fgcolor_hex}";
google_color_url = "{vb:stylevar body_link_n_fgcolor_hex}";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</vb:if>

ad_footer_start
Code:

<vb:if condition="$adsense_pub_id AND CONTENT_PAGE">
<div class="google_adsense_footer" style="width:728px; margin:0 auto; padding-top:1em">
<script type="text/javascript"><!--
google_ad_client = "{vb:var adsense_pub_id}";
google_ad_host = "{vb:var adsense_host_id}";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "{vb:stylevar page_bgcolor_hex}";
google_color_bg = "{vb:stylevar page_bgcolor_hex}";
google_color_link = "{vb:stylevar body_link_n_fgcolor_hex}";
google_color_text = "{vb:stylevar body_fgcolor_hex}";
google_color_url = "{vb:stylevar body_link_n_fgcolor_hex}";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</vb:if>


John Diver 11-26-2014 12:13 PM

Thanks for the reply, I was just trying if adsense worked on the footer, I have it reverted to the default again but its the same problem.

ForceHSS 11-26-2014 12:14 PM

above post updated

John Diver 11-26-2014 12:44 PM

Thanks for the reply, just wondering what the "AND CONTENT PAGE" in the code is for please.

I have reverted all templates so its back to complete default now.

I would like to have adsense on the header and footer of all pages.

Thanks for the help :)


All times are GMT. The time now is 05:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01084 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete