vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Management Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=217)
-   -   vBulletin Google Adsense Deep Integration Tutorial (https://vborg.vbsupport.ru/showthread.php?t=107965)

NeutralizeR 10-14-2008 08:53 AM

Hmm... i checked your page source code and noticed you have the wrong ad code for the 728X90 ad unit. You have double "" for one of the values.

glenbelt 10-14-2008 06:53 PM

Quote:

Originally Posted by NeutralizeR (Post 1644748)
Hmm... i checked your page source code and noticed you have the wrong ad code for the 728X90 ad unit. You have double "" for one of the values.

Thanks very much for pointing that out, really didn't notice it :( :o

Thanks for all the help, seems to be working fine now

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

Sorry to post again but got another question. When I click on someone's post, it shows a section below their post which is labelled "Sponsored Posts". Any idea which part of the template this is in?


Thanks

NeutralizeR 10-17-2008 10:55 AM

It must be a differrent modification. I don't remember something like that.

Markos 01-02-2009 09:09 PM

hi I'm trying to do the thread one but would like to use images and links instead of the google ads is there anyway i could do this ?????


Quote:

Originally Posted by NeutralizeR (Post 900036)
Open your FORUMDISPLAY template: vBulletin AdminCP > Styles & Templates > Edit Templates > Forum Display Templates > FORUMDISPLAY

(First thread)

Find:

<if condition="$show['threads']">

Add below:

<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Links</td>

<td class="alt1" align="center">-</td>
<td class="alt2" align="center">-</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center">-</td></if>

</tr>


(Last thread)

Find:

<!-- end show threads -->

Add below:

<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>

<td class="alt2 smallfont" align="center">Sponsored Links</td>

<td class="alt1" align="center">-</td>
<td class="alt2" align="center">-</td>
<if condition="$show['inlinemod']"><td class="alt1" align="center">-</td></if>

</tr>

Results:




Save.

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

ok i got it so far but getting a extra box at the end any one know what it can be

http://img.photobucket.com/albums/v3...g?t=1230946799

heres the code i used

PHP Code:

<!-- BEGIN Ad Block CODE -->
<
div align="center" style="margin: -5px 0px 10px 0px;">
<
table width="100%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#F4F4F4">
  <
tr>

<!-- 
Ad Block ONE -->

    <
td width="16%" bgcolor="#F4F4F4" align="center" valign="top"><a rel="nofollow" href='http://googleads.g.doubleclick.net/pagead/iclk?sa=l&ai=BcHi546deSYGPCpLGjgKY3cyzB-_ItHvVn66cDcCNtwHAqQcQARgBIIG9zwkoAzgAUJ-Rzon4_____wFgu9bJg9wKoAHtzsj-A7IBJXd3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWu6AQk3Mjh4OTBfYXPIAQHaAS1odHRwOi8vd3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51ay-pAkQbCtvrdrg-qAMByAMH6APfBPUDAAEABJgEAA&num=1&adurl=http://www.reptile-food-direct.co.uk/acatalog/Foods_and_Supplements.html&client=ca-pub-7237502076132128&nm=16' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/LiveFoodsLogo.jpg' border='0' alt='' style="border-color:#F4F4F4" /></a><br>
    <
font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://googleads.g.doubleclick.net/pagead/iclk?sa=l&ai=BcHi546deSYGPCpLGjgKY3cyzB-_ItHvVn66cDcCNtwHAqQcQARgBIIG9zwkoAzgAUJ-Rzon4_____wFgu9bJg9wKoAHtzsj-A7IBJXd3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWu6AQk3Mjh4OTBfYXPIAQHaAS1odHRwOi8vd3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51ay-pAkQbCtvrdrg-qAMByAMH6APfBPUDAAEABJgEAA&num=1&adurl=http://www.reptile-food-direct.co.uk/acatalog/Foods_and_Supplements.html&client=ca-pub-7237502076132128&nm=16" target="_blank">Reptile Food direct</a> </font> </td>

<!-- 
Ad Block TWO -->

    <
td width="16%" bgcolor="#F4F4F4" align="center" valign="top"><a rel="nofollow" href='http://googleads.g.doubleclick.net/pagead/iclk?sa=l&ai=B2CVb46deSYGPCpLGjgKY3cyzB-ni9DqP-OTLBMCNtwGQsAoQAxgDIIG9zwkoAzgAUIG0yLT7_____wFgu9bJg9wKsgEld3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51a7oBCTcyOHg5MF9hc8gBAdoBLWh0dHA6Ly93d3cuc2NvdHRpc2hleG90aWNyZXB0aWxlc2ZvcnVtLmNvLnVrL4ACAakCRBsK2-t2uD6oAwHIAwfoA98E9QMAAQAEmAQA&num=3&adurl=http://www.livefoodsdirect.co.uk&client=ca-pub-7237502076132128&nm=6' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/reptile_food_direct_logo.jpg' border='0' alt='' style="border-color:#F4F4F4"></a><br>
    <
font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://googleads.g.doubleclick.net/pagead/iclk?sa=l&ai=B2CVb46deSYGPCpLGjgKY3cyzB-ni9DqP-OTLBMCNtwGQsAoQAxgDIIG9zwkoAzgAUIG0yLT7_____wFgu9bJg9wKsgEld3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51a7oBCTcyOHg5MF9hc8gBAdoBLWh0dHA6Ly93d3cuc2NvdHRpc2hleG90aWNyZXB0aWxlc2ZvcnVtLmNvLnVrL4ACAakCRBsK2-t2uD6oAwHIAwfoA98E9QMAAQAEmAQA&num=3&adurl=http://www.livefoodsdirect.co.uk&client=ca-pub-7237502076132128&nm=6" target="_blank">Live Foods Direct</a> </font> </td>

<!-- 
Ad Block THREE -->

    <
td width="16%" bgcolor="#F4F4F4" align="center" valign="top"><a rel="nofollow" href='http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BIHMfi7BeScCgFITAiQL_7ejvB4O3407bzoHDB8CNtwHQhgMQFBgEIIG9zwkoBDgAUNmGrML8_____wFgu9bJg9wKkAEFsgEld3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51a7oBDXNtYS03Mjh4OTBfYXPIAQHaAS1odHRwOi8vd3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51ay_gAQOpAkQbCtvrdrg-yAKby4wJqAMByAMH6APfBPUDAAEABJgEAA&num=4&ggladgrp=7700716015936752994&gglcreat=12698893765199320887&adurl=http://www.shopzilla.co.uk/mkt.xpml%3Fmkt_id%3D405651406&client=ca-pub-7237502076132128&nm=6' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/shopzilla.jpg' border='0' alt='' style="border-color:#F4F4F4"  /></a><br>
    <
font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow"href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BIHMfi7BeScCgFITAiQL_7ejvB4O3407bzoHDB8CNtwHQhgMQFBgEIIG9zwkoBDgAUNmGrML8_____wFgu9bJg9wKkAEFsgEld3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51a7oBDXNtYS03Mjh4OTBfYXPIAQHaAS1odHRwOi8vd3d3LnNjb3R0aXNoZXhvdGljcmVwdGlsZXNmb3J1bS5jby51ay_gAQOpAkQbCtvrdrg-yAKby4wJqAMByAMH6APfBPUDAAEABJgEAA&num=4&ggladgrp=7700716015936752994&gglcreat=12698893765199320887&adurl=http://www.shopzilla.co.uk/mkt.xpml%3Fmkt_id%3D405651406&client=ca-pub-7237502076132128&nm=6" target="_blank">ShopZilla</a> </font> </td>

<!-- 
Ad Block FOUR -->

    <
td width="17%" bgcolor="#F4F4F4" align="center" valign="top"><a rel="nofollow" href='http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BFZ-CpqpeSd3pPIvUiQLAv_XvB9ecgpUBx8GttQrAjbcBsNsGEBEYAiCBvc8JKAQ4AFCf18en______8BYLvWyYPcCpABBbIBJXd3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWu6AQ1zbWEtNzI4eDkwX2FzyAEB2gEtaHR0cDovL3d3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWsv4AEDgAIBqQJEGwrb63a4PtACAagDAcgDB-gD3wT1AwABAASYBAA&num=2&adurl=http://www.netpetshop.co.uk/c-327-vivariums.aspx&client=ca-pub-7237502076132128&nm=6' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/NetPetShop.jpg' border='0' alt='' style="border-color:#F4F4F4"  /></a><br>
    <
font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BFZ-CpqpeSd3pPIvUiQLAv_XvB9ecgpUBx8GttQrAjbcBsNsGEBEYAiCBvc8JKAQ4AFCf18en______8BYLvWyYPcCpABBbIBJXd3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWu6AQ1zbWEtNzI4eDkwX2FzyAEB2gEtaHR0cDovL3d3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWsv4AEDgAIBqQJEGwrb63a4PtACAagDAcgDB-gD3wT1AwABAASYBAA&num=2&adurl=http://www.netpetshop.co.uk/c-327-vivariums.aspx&client=ca-pub-7237502076132128&nm=6" target="_blank">Net Pet Shop</a> </font> </td>

<!-- 
Ad Block FIVE -->

    <
td width="17%" bgcolor="#F4F4F4" align="center" valign="top"><a rel="nofollow" href='http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BzOTeiKpeSebTJ8PZ-Abf083tAYS7_Y0BpvHD1wnAjbcBgPEEEAwYASCBvc8JKAQ4AFDqpJu1-v____8BYLvWyYPcCpABBLIBJXd3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWu6AQ1zbWEtNzI4eDkwX2FzyAEB2gEtaHR0cDovL3d3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWsv4AEDqQJSZBU8Klq3PqgDAcgDB-gD3wT1AwABAASYBAA&num=1&adurl=http://www.pythonkings.nl&client=ca-pub-7237502076132128&nm=21' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/pythonkings.jpg' border='0' alt='' style="border-color:#F4F4F4"  /></a><br>
    <
font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BzOTeiKpeSebTJ8PZ-Abf083tAYS7_Y0BpvHD1wnAjbcBgPEEEAwYASCBvc8JKAQ4AFDqpJu1-v____8BYLvWyYPcCpABBLIBJXd3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWu6AQ1zbWEtNzI4eDkwX2FzyAEB2gEtaHR0cDovL3d3dy5zY290dGlzaGV4b3RpY3JlcHRpbGVzZm9ydW0uY28udWsv4AEDqQJSZBU8Klq3PqgDAcgDB-gD3wT1AwABAASYBAA&num=1&adurl=http://www.pythonkings.nl&client=ca-pub-7237502076132128&nm=21" target="_blank">Python Breeding Game</a></font></td>

  </
tr>
</
table>
</
div>
<!-- 
END Ad Block CODE --> 


thanks Markos

Hendrizius 01-04-2009 07:23 PM

I have been working for quite some time together with Vbulletin and Adsense. Those placements are good, but there are better ones.

Check out two of my articles:
-The best Vbulletin Adsense locations
-Adsense training Video

enci 01-23-2009 07:50 PM

I used this tutorial a few months ago to add Google Ads to my forum, and everything turned out great. Now, however, the Google Ads (the long rectangle in navbar) do not show up on my forum's home page, but they do show up when you click on a specific subforum. Any idea why? All I see is a blank rectangle on my forum's home page. I've updated my Google Adsense code as well. TIA.

Riccardo83 02-02-2009 10:30 AM

Hey Guys, Please Please Help.

Adding this:

Quote:

<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
<center>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</if>
Will mess up the design with the Quotes of a Post. It pushes them to the right.

I Once found another Version, but there Quotes overlap the ad.

Is there any way to get this working with QUOTES??????

Smitty 05-09-2009 10:17 PM

Just bumping. This was/is a good old thread.

Anyone have any new ideas to add for those of us who don't want the now 'built in' vBulletin AdSense thingie??

I'm particularly interested in any left sidebar Archive ideas.

KevinGupta 05-22-2009 05:18 AM

Hi Guys,

I'm trying to work with this code... itself....


Code:

Open your postbit(legacy) template: vBulletin AdminCP > Styles & Templates > Edit Templates > Postbit Templates > postbit(legacy)

(First post and last shown post)

Find:
<!-- / message -->
Add below:
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
<center>
<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "FF0000";
google_color_url = "000000";
google_color_text = "22229C";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</if>


However I got few questions to ask very quickly...
in

1) "youradsensecode" part do I put it in my google adsense pub-id? Or is it the full code that goes with it?

and
2) what do I put in here? :-- "yourchannelcode"

3) and how do I put in a usergroup permissions in here? Do I just add this code:

<if condition="is_member_of($bbuserinfo, X, Y, Z)">

AFTER

<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">

4) I'm using vB 3.8.x .. Is this going to stuff anything up?

Please let me know... Thanks...!

root's 12-17-2009 06:30 PM

Can you give appropriate memberinfo templatesini to 3.8 series?

Jeweetog 12-24-2009 04:52 PM

Does this work for version 4.0.0 too?

ps2wiz 01-26-2010 08:50 AM

Quote:

Originally Posted by Jeweetog (Post 1937401)
Does this work for version 4.0.0 too?

Same question.

floggerss 02-23-2010 01:10 PM

How do i Add an adsense SEARCH BOx in the header?

tommac3 05-25-2010 10:57 PM

what is the best tool for 4.0? I am looking for something to place customize and optimized ads ... I dont think the standard 4.0 is enough ... is there a new article/mod based on 4.0?

jnrdavo 06-04-2010 01:35 AM

hoping somebody can help..

I added in adsense for the first time to my site, worked for a few days, not getting an scripting error..

So I've tried to add this to help, but like others above, would like confirmation what is required for:

google_ad_client = "pub-nnnnnnnnnnnnnn"; ??

and

google_ad_channel ="345xxxxxx"; ??

Also, I was using this in ad_board_below_whats_going_on, but now not working...

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxx";
/* VW 250x250, created 5/30/10 */
google_ad_slot = "nnnnn";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

ptceuro 03-31-2012 05:06 PM

wow, thats an awesome tutorial, thanks so much!!

g00gl3r 04-04-2012 04:46 PM

Anything like this for VB4?

Bulent Tekcan 10-07-2012 08:15 AM

We are waiting 4.0.x news...

doctorseoul 02-06-2013 02:26 PM

Has anyone tried installing this hack in 4.2? Were there any problems? Appreciate any feedback...

ramesh_umk3 05-24-2013 04:59 PM

Successfully Applied on vBulletin 4.2.x but the code in the 1st post need some changes to make it work properly

Demo:
CLICK HERE

mykkal 05-08-2015 03:51 AM

Quote:

Originally Posted by ramesh_umk3 (Post 2423956)
Successfully Applied on vBulletin 4.2.x but the code in the 1st post need some changes to make it work properly

Demo:
CLICK HERE

Could you share these changes? This is a magnificent article. I wish it were updated. I'm using 4.2.3 beta 4 with php 5.5


All times are GMT. The time now is 03:35 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02485 seconds
  • Memory Usage 1,862KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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