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)

Dan 05-27-2006 09:20 PM

Interesting guide on placement of Adsense ads, very useful. Might even use a few of the locations you suggested :) Thanks

obmob 06-02-2006 03:51 PM

XD i was trying to click "install" button, very useful, not only for vB pages.

thanks

version2 06-02-2006 05:29 PM

Damn, that forum is way too annoying. Sorry, not trying to be an ass....just too busy...too much stuff moving around.

NeutralizeR 06-03-2006 12:31 AM

Quote:

Originally Posted by version2
Damn, that forum is way too annoying. Sorry, not trying to be an ass....just too busy...too much stuff moving around.

Thank you :)

NeutralizeR 06-09-2006 12:10 PM

RECOMMENDED

Results:
http://img135.imageshack.us/img135/2866/snap17va.th.gif

http://img119.imageshack.us/img119/2517/snap21ew.th.gif

BLazeD1 06-21-2006 03:04 AM

Can someone post results with this please?

Thank you!

webgroup 06-30-2006 04:19 PM

Quote:

Originally Posted by deep_blue
I tried to edit FORUMDISPLAY template and post coes to get google ad on forum display pages but got this error

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/coolaven/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 41

Is my VB got corrupt


Same here, it happens when trying to edit the templates.
Vbulletin warns you of the error and let you choose to go back or continue anyways.
I tried in 2 forums with 3.5.4

With both FORUMDISPLAY and POSTBIT

NeutralizeR 06-30-2006 06:54 PM

Quote:

Originally Posted by webgroup
Same here, it happens when trying to edit the templates.
Vbulletin warns you of the error and let you choose to go back or continue anyways.
I tried in 2 forums with 3.5.4

With both FORUMDISPLAY and POSTBIT

Copy the codes to your text editor first and check for any special characters possibly added by vBulletin... and re-check your google adsense codes.

BTW, I've upgraded my forum to vb 3.6 Beta 3 and it seems this guide doesn't need to be updated.

Regards

webgroup 06-30-2006 07:17 PM

Quote:

Originally Posted by NeutralizeR
Copy the codes to your text editor first and check for any special characters possibly added by vBulletin... and re-check your google adsense codes.

BTW, I've upgraded my forum to vb 3.6 Beta 3 and it seems this guide doesn't need to be updated.

Regards


I'm getting the error by just pasting the initial part of the code.

Just by pasting this in the FORUMDISPLAY:
Code:

<tr>
<td align="center" class="alt1">-</td>
<td align="center" class="alt2">-</td>
<td class="alt1">
<div>


NeutralizeR 06-30-2006 07:21 PM

*edit*

It seems ok... Can you try editing your templates via another browser?

Martin64 07-07-2006 03:14 AM

Excellent little tutorial, cheers. :)

Also, here's a little tip in case you only want to display it for guests, not members. Simply put the codes (as instructed in the first posts) between these tags:

<if condition="!$bbuserinfo[userid]">

*code*

</if>

Macktr 07-13-2006 09:52 AM

thank you NeutralizeR

dsmoke 07-29-2006 12:04 PM

this looks amazing can anyone say that their adsense revenue went up x% after doing this?

sportsoutlaw 07-29-2006 06:34 PM

yes, I can say it did.

I didn't use this exactly though.

I still use a leaderboard below the navbar in showthread and above quick reply.
I am doing this in place of the DAI tutorial section that places adsense directly inside a members post. I didn't feel comfortable with that portion of the tutorial. (just my personal preference, not knocking it in any way)

DeepXP 08-14-2006 11:01 PM

sorry to bump topic like this but the guide mentioned for first and last post ads does not work well with vbulletin 3.6

it shows ads in first 3 posts in the thread....

NeutralizeR 08-14-2006 11:30 PM

Quote:

Originally Posted by DeepXP
sorry to bump topic like this but the guide mentioned for first and last post ads does not work well with vbulletin 3.6

it shows ads in first 3 posts in the thread....

Not tested yet but these conditionals should still work:

Quote:

<if condition="(($post[postcount]==1) or ($post[islastshown]))">
*ad*
</if>
Quote:

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

DeepXP 08-14-2006 11:38 PM

That was QUICK!!!

The first condition worked....

Code:

<if condition="(($post[postcount]==1) or ($post[islastshown]))">
*ad*
</if>

Thanks
Deep

DeepXP 08-16-2006 11:39 AM

OKay I am back, try the 2nd condition if you have AJAX Quick reply enabled...

Code:

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

if you try first then it shows blank page once you reply usuing quick reply option...

ish 08-23-2006 01:56 PM

WOW! absolutely amazing - i got this to work! a deep feelgood moment taking place :) thankyou.

and thank for this too martin64:
Quote:

Originally Posted by Martin64
Also, here's a little tip in case you only want to display it for guests, not members. Simply put the codes (as instructed in the first posts) between these tags:

<if condition="!$bbuserinfo[userid]">

*code*

</if>


bbcentral 08-25-2006 12:51 PM

Great tutorial!
I will use some of the info, but no matter how much money NeutralizeR is making off his forum, nothing will convince me to make my members suffer like that. Sorry man, the site is plain shocking. I care about my members far too much to make them go through an epileptic-fit-inducing experience like your site. My browser struggled to scroll down!
Anyway, at least you've given us lots of examples to check out, very much appreciated! :D

NeutralizeR 08-25-2006 02:23 PM

Quote:

Originally Posted by bbcentral
Great tutorial!
I will use some of the info, but no matter how much money NeutralizeR is making off his forum, nothing will convince me to make my members suffer like that. Sorry man, the site is plain shocking. I care about my members far too much to make them go through an epileptic-fit-inducing experience like your site. My browser struggled to scroll down!
Anyway, at least you've given us lots of examples to check out, very much appreciated! :D

You are welcome :)

Yes, i don't know who visits and registers my web site but they are really insistent on that :P Google likes me...

doushx 08-26-2006 05:56 PM

greatly thanks

J-TEK 09-02-2006 12:10 AM

Nice work, seems great.

Klaymen TK 09-02-2006 10:27 PM

Really [for 1000] great tutorial. Really [for others 1000] thanks!

NeutralizeR 09-11-2006 09:35 AM

And your members doesn't even notice your ads anymore?

Then change the ad colors while keeping the default colors for the visitors.

Quote:

google_color_border = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","FFFF00","011160","FF0000"];</if>
google_color_bg = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","011160","FFFFE1","FFFFFF"];</if>
google_color_link = <if condition="$show['guest']">"FF0000";<else />["FF0000","FFFF00","FF0000","FF0000"];</if>
google_color_url = <if condition="$show['guest']">"000000";<else />["000000","FFFFFF","000000","000000"];</if>
google_color_text = <if condition="$show['guest']">"0000A0";<else />["0000A0","FFFFFF","0000A0","0000A0"];</if>
Quote:

<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_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>
Example:
Quote:

<script type="text/javascript"><!--
google_ad_client = "youradsensecode";
google_alternate_ad_url = "http://www.yourwebsite.com/collapsible_ad.html";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="yourchannelcode";
google_color_border = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","FFFF00","011160","FF0000"];</if>
google_color_bg = <if condition="$show['guest']">"CDE7FF";<else />["CDE7FF","011160","FFFFE1","FFFFFF"];</if>
google_color_link = <if condition="$show['guest']">"FF0000";<else />["FF0000","FFFF00","FF0000","FF0000"];</if>
google_color_url = <if condition="$show['guest']">"000000";<else />["000000","FFFFFF","000000","000000"];</if>
google_color_text = <if condition="$show['guest']">"0000A0";<else />["0000A0","FFFFFF","0000A0","0000A0"];</if>
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Visitors will always see the ads in their default colors.

Members will see them in four rotating color combinations.


Test Account @ My forum:
Username: Tester
Password: asd123

http://www.msxlabs.org/forum/

VBUsers 09-11-2006 10:13 PM

how can i put my google adsense after every first post of a page? when i add it it shows under every post instead of just the first one on that page.

dougeetx 09-11-2006 10:21 PM

Quote:

Originally Posted by AR Forums
how can i put my google adsense after every first post of a page? when i add it it shows under every post instead of just the first one on that page.


There's another thread that tells how to do that. Look on my site at http://www.RealityTVFriends.com/forum and you'll see how it works.

VBUsers 09-11-2006 10:27 PM

Quote:

Originally Posted by dougeetx
There's another thread that tells how to do that. Look on my site at http://www.RealityTVFriends.com/forum and you'll see how it works.

do you happen to know where the thread is? nice site by the way. hope it goes good for you.

NeutralizeR 09-12-2006 04:14 AM

Quote:

Originally Posted by AR Forums
how can i put my google adsense after every first post of a page? when i add it it shows under every post instead of just the first one on that page.

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

(First post and last shown post)

Find:
Quote:

<!-- / message -->
Add below:
Quote:

<if condition="(($post[postcount]==1) 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>
Save.
https://vborg.vbsupport.ru/showp...30&postcount=7

VBUsers 09-12-2006 06:54 PM

Quote:

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

(First post and last shown post)

Find:

Add below:


Save.
https://vborg.vbsupport.ru/showp...30&postcount=7

great post and it works some what but i really wanted to look like a post and on every page in the thread. is there a way to do that?

IngoPan 09-13-2006 10:50 AM

Quote:

Originally Posted by AR Forums
great post and it works some what but i really wanted to look like a post and on every page in the thread. is there a way to do that?


maybe try this: https://vborg.vbsupport.ru/showthrea...ghlight=banner

R.Solutions 09-16-2006 06:25 AM

anyway any of this can be converted into 3.6.0?

NeutralizeR 09-16-2006 08:17 AM

Quote:

Originally Posted by R.Solutions
anyway any of this can be converted into 3.6.0?

You can use this guide on vb 3.6, too.

R.Solutions 09-16-2006 06:44 PM

I tried it, it expands my forums badly. Any way around this.

NeutralizeR 09-16-2006 06:50 PM

Quote:

Originally Posted by R.Solutions
I tried it, it expands my forums badly. Any way around this.

Which template did you edit? Which part of the guide did you apply?

Please paste the code here...

Skyline_GT 09-23-2006 08:52 AM

very nice tutorial. Thanks.

spipo 09-23-2006 11:32 AM

how can I put adsense before the First post of every thread . 3.5.4
I mean ads before the first post ( and not after) ..
thanks

NeutralizeR 09-30-2006 03:42 PM

Quote:

Originally Posted by spipo
how can I put adsense before the First post of every thread . 3.5.4
I mean ads before the first post ( and not after) ..
thanks

Open your SHOWTHREAD template,
Find:
Quote:

<!-- / toolbar -->
Add below:
Quote:

<center>
<< adsense codes comes here >>
</center>
Save.

Your PM request:
http://img509.imageshack.us/img509/3324/ggggmg8.jpg
:)

spipo 09-30-2006 03:53 PM

thanks man i will try it

Smoothie 09-30-2006 09:20 PM

Ok, next easy question. Where in showthread template to add adsense directly after last post, attached to it, similar to the first post. I assume you would need a conditional to show this?


All times are GMT. The time now is 03:55 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.01858 seconds
  • Memory Usage 1,842KB
  • 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
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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