PDA

View Full Version : Show Thread Enhancements - Adsense as second post. 2 Sizes - Big for guests, small for members


StarBuG
01-16-2007, 10:00 PM
Hi

I made this template mod for my medical Forum and I decided to share this with you

This hack is for forums that use the standard Postbit Template

If you use the postbit_legacy template >> click here << (https://vborg.vbsupport.ru/showthread.php?t=139093)

What this hack does:
This modification displays adsense as second post in every thread.
Guest see a post like adsense with a product Referral (firefox in this code) and a large rectangle as post content. Members only see a standard banner so they don't get annoyed by the big advertising. I also included an information for guests, that they see a different not so disturbing ad if they register. This serves to purposes, one is to get more members to register of course the second purpose is to blend the advertising better into the post layout.

ADD-ON:
In addition you can add a Google Adsense link unit as last post of a thread on any page for members and guests. This advertising will only show if the thread has more then one post so that it does not show 2 advertisings directly below each other in case that the thread has no replies yet. Google Adsense has updated its ToS so that you are now allowed to use up to three link units on one page. So if you already use my "Adsense Link Unit in Navbar (https://vborg.vbsupport.ru/showthread.php?t=146581)" Mod there woun't be a problem.

See screenshots ;)

How to install:

In template postbit search:



<!-- / post $post[postid] popup menu -->
Add below:



<!-- Google AdSense in Posts for Guests -->
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND (!$show[member])">

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="currentPost">
<div class="normal">
<!-- status icon and date -->
<img title="Alt" class="inlineimg" src="images/statusicon/post_old.gif" alt="Alt" border="0"></a> Today
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding: 0px;">
<!-- user info -->
<table border="0" cellpadding="0" cellspacing="6" width="100%">
<tbody>
<tr>
<td class="alt2">
<!-- Adsense Referal Code start -->
<script type="text/javascript"><!--
google_ad_client = "YOUR PUB ID HERE";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as_rimg";
google_cpa_choice = "CAAQ0f2XhAIaCA6IC4oIlz0_KK2293M";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<!-- Adsense Referal Code end-->

</td>
<td nowrap="nowrap">
<span class="bigusername"><u>Advertising</u></span><br />
<span class="smallfont">Google Adsense</span>
</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">
<div class="smallfont">
<div>This advertising will not be shown</div>
<div>in this way to registered members.</div>
<div><a href="register.php">Register</a> your free account today</div>
<div>and become a member on</a></div>
<div>$vboptions</div>
</div>
</td>
</tr>
</tbody></table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->
<!-- icon and title -->
<div class="smallfont">

<img title="Standard" class="inlineimg" src="images/icons/icon14.gif" alt="Standard" border="0">
<strong>Sponsored Links</strong>
</div>
<hr style="color: rgb(134, 134, 134);" size="1">
<!-- / icon and title -->
<!-- message -->
<div>
<!-- Adsense large rectangle start -->
<script type="text/javascript"><!--
google_ad_client = "YOUR PUB ID HERE";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<!-- Adsense large rectangle end -->
</div>
<!-- / message -->
<!-- message, attachments, sig -->
</td>
</tr>
</tbody></table>
<!-- / post $post[postid] popup menu -->
</if>
<!-- / Google AdSense in Posts for Guests End-->

<!-- Google AdSense in Posts for Members -->
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND ($show[member])">

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="td_post_$post[postid]">
<div class="normal">
&nbsp;
</div>
</td>
</tr>
<tr>
<td class="alt1" align="center">
<div>
<!-- Adsense standard banner start -->
<script type="text/javascript"><!--
google_ad_client = "YOUR PUB ID HERE";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<!-- Adsense standard banner End -->
</div>
</td>
</tr>
</tbody>
</table>
</if>
<!-- / Google AdSense in Posts for Members end-->
ADD-ON:


Add this code below the last line of my above code:



<!-- Google AdSense Link unit as last post for all -->
<if condition="THIS_SCRIPT == 'showthread' AND $post['islastshown'] and !$GLOBALS['vbulletin']->GPC['ajax'] AND $post[postcount]!=1">

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="td_post_$post[postid]">
<div class="normal">
&nbsp;
</div>
</td>
</tr>
<tr>
<td class="alt1" align="center">
<div>
<!-- Adsense Link Unit start -->
<script type="text/javascript"><!--
google_ad_client = "YOUR PUB ID HERE";
google_alternate_color = "F5F5FF";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_color_border = "F5F5FF";
google_color_bg = "F5F5FF";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "000000";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Adsense Link Unit end -->
</div>
</td>
</tr>
</tbody>
</table>
</if>
<!-- Google AdSense Link unit as last post for all -->
You now just need to customize the adsense code marked with:
<!-- Adsense Referal Code start -->
<!-- Adsense large rectangle start -->
<!-- Adsense standard banner start -->

Add-on:
<!-- Adsense Link Unit start -->

replace "YOUR PUB ID HERE" with your pub-ID and fit the colors of adsense to your color scheme


Demo: Elternfragen.net - Das Forum f?r Eltern mit (medizinischen) Fragen (http://www.elternfragen.net) Just go into any thread.


I hope you like it and if you do, don't forget to mark es installed ;)


Changelog:
v1.15 - 2007/07/22: NO CHANGES, just removed my Pub-ID from the hack!
v1.15 - 2007/06/11: Add-on - Google Adsense Link unit as last post of every thread for guests and members.
v1.1 - 2007/05/06: Condition altered to show advertising as second post on every page, not just the first.

If you want more good placements for adsense then check out my newest mod:

Adsense Link Unit in Navbar (https://vborg.vbsupport.ru/showthread.php?t=146581)

StarBuG

[B]If you did not register for an Adsense account yet but you plan to, feel free to contact me. If you register via my referral I am willing to help you get the most out of your adsense placement by assisting you during the setup process and implementing the best adsense modifications. Just write me a Private message.

o0Hubba0o
01-21-2007, 04:02 AM
Nevermind, had adblock extension on firefox on and it wasn't showing up lol, works great!

azn_romeo_4u
01-21-2007, 07:26 PM
Awesome mod, but i got a question, how do I make it so that it only shows on the first page for everyone and not just admins? Because I'm seeing that it displays on everyone page for members, but not for admins. So i want to disable on every other page but for the first page.

Also for guests it should show on each page.

StarBuG
01-21-2007, 07:39 PM
For guests it does show on every page.
I am a little confused right now why it does not show for admins on second page.
I totaly missed that because I block advertisings anyway on my browser.

I took the condition from some similar hack I found a longer time ago.

I realy have no clue but I think it has something to do with
$post[postid] == $GLOBALS['qrfirstpostid']

Sorry that I can't help you with that but maybe someone else has an Idea?

azn_romeo_4u
01-21-2007, 07:54 PM
O_O yup can't wait for it.

tsptom
01-22-2007, 02:11 AM
Just what I was looking for - thanks a lot! Is this OK with Google's TOS?

StarBuG
01-22-2007, 06:01 AM
Yes it is.
The Ads are clearly marked as such and there is no "tricking the user" to click.

But if you want to be sure write them and ask google to review your placement if it confirms with their ToS.
That is always the safest way to go.

tsptom
01-22-2007, 08:15 PM
Confirmed. :)

Per Google:

I can confirm that your current implementation is compliant with our policies and is a well optimized ad layout up for your forums.

Thanks again!

StarBuG
01-23-2007, 04:11 AM
Your welcome ;)

letsjoy
01-26-2007, 05:17 AM
thanks goin to install

kylek
01-26-2007, 05:38 AM
Thank you, nice and easy to install.

jacki
01-29-2007, 01:13 PM
Thank You, very Good :)

ShackMaster
01-30-2007, 05:21 AM
Installed with modifications to fit postbit legacy.

You can check out how I did it here... http://www.hometheatershack.com/forums

StarBuG
01-30-2007, 06:48 AM
My postbit_legacy Version looks like this:

http://www.patientenfragen.net/showthread.php?p=11399&styleid=6

3dsoft
01-31-2007, 08:27 AM
Is it also possible to hide adsense from certain usergroups? What is the difference between postbit & postbit_legacy?

thanks

StarBuG
01-31-2007, 03:16 PM
In the if condition at the very beginning of my code add:

AND $bbuserinfo['usergroupid'] == 'X'
at the end, where X is the usergroup ID.

So that it looks like this:

<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND (!$show[member]) AND $bbuserinfo['usergroupid'] == '1'">


postbit_legacy is the old version to display posts (from vB 2.x times).
The userinfos are on the left site not on the top like it is here.

StarBuG

3dsoft
01-31-2007, 06:11 PM
Hi StarBuG,
thank you for answering that fast. It somehow does not work , yet. ;)
I would like adsense not to show up for moderators (usergroup: 7) & admins (6). You could also say that I only want registered users who belong to usergroup 2 should see adsense.

I have tried to add "AND $bbuserinfo['usergroupid'] == 'X'' at he begining of the code. But the beginning of your code is for guests, right? The problem is that I want logged in moderators & admins not to see adsense.

I also tried to use:
<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND (!$show[member]) AND $bbuserinfo['usergroupid'] == '1'">

...within the second part, but either all logged in users see adsense or all logged in users don't see adsense!?

FSHD
02-01-2007, 04:09 PM
This is really nice.

StarBuG
02-04-2007, 06:51 AM
to exclude usergroups you need to add:

AND $bbuserinfo['usergroupid'] != 'X'




to include Usergroups:

AND $bbuserinfo['usergroupid'] == 'X'



you could also wrap my whole code from above inside this:

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

</if>


and for the X put all the Usergroups you want to see the ADs, like 1,2,3,4,7,9,10 etc ;)

roger.kore
02-10-2007, 12:50 PM
I think this modification doesn't work if you have this installed
https://vborg.vbsupport.ru/showthread.php?threadid=131544

Im using 3.6.4

insolentmuse
02-11-2007, 06:44 AM
How should this be modified for Legacy? I'm using a skin that doesn't have the new postbit option :(

StarBuG
02-11-2007, 10:37 AM
@roger.kore: I have not installed the hack you mentioned but from the quick look I see no reason why it should not work.

@insolentmuse: I have published the postbit_legacy Version here: https://vborg.vbsupport.ru/showthread.php?t=139093

StarBuG

jeffcoll
02-11-2007, 03:06 PM
Exactly what I wanted and so easy to install. It took just a couple of minutes.

I like how it encourages visitors to join and avoid the advertising.

insolentmuse
02-11-2007, 04:13 PM
@roger.kore: I have not installed the hack you mentioned but from the quick look I see no reason why it should not work.

@insolentmuse: I have published the postbit_legacy Version here: https://vborg.vbsupport.ru/showthread.php?t=139093

StarBuG


Thank you, I guess I need to learn how to search better. :eek:

Alien
02-11-2007, 11:49 PM
How would I adjust this, so that even registered members (like guests) will see an ad on the second post of EVERY page. I'd still like registered members to only see the thin display as you have it.

We have a 'premium user' class that we'll show zero ads for.

Thank you so much!

StarBuG
02-12-2007, 05:46 AM
Thank you, I guess I need to learn how to search better. :eek:

No.
I published it because you were the first to ask ;)

insolentmuse
02-12-2007, 06:46 AM
No.
I published it because you were the first to ask ;)

Oh good, then I'm not completely incompetent.

It works great, btw :) Thanks!

Alien
02-13-2007, 09:33 AM
No matter what I do with all of your suggestions, I can't exclude a usergroup no matter which method I use...

Can anyone confirm a method that works perfectly?

StarBuG
02-13-2007, 07:42 PM
<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND ($show[member]) AND $bbuserinfo['usergroupid'] != 'X'">

This means... if user is a registered member and NOT a member of usergroup X then show the advertising.

StarBuG

Alien
02-13-2007, 11:08 PM
That code would seem not to work with any users who don't have the usergroup as top level.

How would I get this:

<if condition="is_member_of($bbuserinfo,14)">

...to work inside of YOUR conditional? :) Usergroup 14 above is my "Premium" group, but I don't put members in their as their MAIN group.

Wrapping the whole conditional I just stated around the "ads for members" section of your code will NOT work. There is a conflict somehow contained in your if if I put my if before it (which has worked before when I simply put the google ads at the top of the showthread before I tried your mod).. Any suggestions? :)

Alien
02-14-2007, 12:17 AM
I found the resolution...

In order to not show this to a particular group (difference here being this works even if it's not their MAIN group), insert this code instead..


<!-- Google AdSense in Posts for Members -->
<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND ($show[member]) AND !is_member_of($bbuserinfo, X, X, X)">


Where X, X, X is the usergroup id's you DON'T want to see the ads. Mine is 14, which is my premium group, and I also added my staff groups. I want everyone else to see them. Of course if a person is a guest, he'll still see the large format ads.

Hope that helps someone...

StarBuG
02-14-2007, 07:05 AM
Yes, that works as well

Glad you figured it out ;)

If you lose the ! before "is_member_of", the statement will only include the usergroups you named (X) by the way ;)

Cheertobi
02-20-2007, 06:39 PM
What is this condition good for?!

<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>

Tobi

StarBuG
02-21-2007, 06:14 PM
This code is copied from the "postbit_wrapper" template.

Here it does not serve any purpose.
I just forgot to take it out.
You can delete it if you want.

It is just an html comment that is added when the the above post is followed by another one.

StarBuG

2 FN LOW
02-27-2007, 08:32 PM
how do you know what postbit you use?

StarBuG
02-28-2007, 02:30 PM
If you are asking that, then you are using the "postbit" template ;)

To use the "postbit_legacy" template you have to copy the content from that template to "Postbit" ;)

ccmoon
03-17-2007, 03:55 AM
Thanks for this great hack. However, I don't like guest to see the "wide" ad, it looks early that way. How do I make guest will see ads the same way as registered users?
Thanks

StarBuG
03-17-2007, 07:05 AM
If you want everyone to see the same ad you don't need the coditions.
Simply only use the member code and get rid of all the rest.

use this:

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="td_post_$post[postid]">
<div class="normal">
&nbsp;
</div>
</td>
</tr>
<tr>
<td class="alt1" align="center">
<div>
<!-- Adsense standard banner start -->
<script type="text/javascript"><!--
google_ad_client = "pub-5988350962952956";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "5238041056";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<!-- Adsense standard banner End -->
</div>
</td>
</tr>
</tbody>
</table>


then everyone including members, guests, admins, mods etc are seeing your ad as second post.

DiSpy
03-31-2007, 04:50 PM
Hi,

How can I change this so that it shows up as the last post on a page? (instead of the second post)

THANKS! :D

tsptom
03-31-2007, 05:12 PM
use this as your 1st IF statement:

<if condition="$post[postcount] == 10">

DiSpy
03-31-2007, 10:47 PM
After a day of searching the forums, I found this:


<if condition="$post['islastshown']">


Trying it now... will post again if it doesn't work.

EDIT: Works perfect.

popowich
04-15-2007, 01:16 AM
StarBug, you're my hero! At least for the next few minutes. :D

I wish there was a way to highlight this mod to separate it from the other "adsense in threads" mods.

-Raymond

Caddyman
04-15-2007, 05:28 AM
how can i show this after say the 5th post on every page?

popowich
04-15-2007, 10:21 AM
I think after the first makes more sense. You won't always have 4 posts.

Anyways, is there a way to make it show up as the second post on every page?

-Raymond

Mrdby
04-17-2007, 04:07 PM
i added it...saved it and it's not showing anything

Mrdby
04-17-2007, 04:26 PM
i use 3.6.5 i added everything..the google link show up..but not the referral icon or anything.

StarBuG
04-17-2007, 05:15 PM
Do you use a ad blocker?
Sometimes the easiest solution is the right one.

If not copy and paste my code above into the templates and check if it shows up.
If it does you did something wrong. Replace my adsense code with yours and you are good to go.

@popowich: to be honest I have no clue. I am not a big programmer, I call myself "modifier" ;)

Mrdby
04-17-2007, 05:22 PM
I will try again

Mrdby
04-18-2007, 12:41 AM
i added your full code...on the default and all i get is the KATRINA add showing.

StarBuG
04-18-2007, 03:41 PM
Ok then you have no problem at all ;)
You are currently receiving public service ads.

Google adsense takes a few days to display relevant ads to your site.

Replace my code with your adsense code (you can leave mine if you feel generous :p) and wait a few days. The ads will show up over time, depending on the saturation of your keywords.
And make your forum readable for guests. Only this way google can serve you relevant ads.

If you want to take a read on google adsense I would suggest:

http://forums.digitalpoint.com/ (http://www.forums.digitalpoint.com)

This is a great community for webmasters.

Good Luck

StarBuG

Mrdby
04-18-2007, 03:42 PM
what do u mean? I thought soon as I ad that code..the ads should come up? I did just add google ad at the footer of my forum and they start running asap.

StarBuG
04-19-2007, 03:47 AM
Read the adsense FAQ.

This is not a problem of this modification, it is a normal adsense behavior

Mrdby
04-19-2007, 03:49 AM
Read the adsense FAQ.

This is not a problem of this modification, it is a normal adsense behavior
So how long does it take?

StarBuG
04-19-2007, 02:45 PM
Normaly 3-5 days.

Take a read in the forum I suggested above.
You'll find every question answered there plus hundrets of tips to improve your adsense earnings. ;)

StarBuG
05-06-2007, 07:43 AM
I have changed the condition to show the advertising on every page as second post, not just on page one.

The old condition was:

<if condition="THIS_SCRIPT == 'showthread' AND $post[postid] == $GLOBALS['qrfirstpostid'] AND ($show[member])">


the new condition is:

<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND ($show[member])">


Simply replace the old conditions (2x) with the new one and the ads will show on every page of every thread as second post.

StarBuG

The hack is now version 1.1

Best regards

StarBuG

Propozime
06-09-2007, 10:09 PM
hi guys i done everything what is sayis in the install pack but nothing is showing up can some one help me please

StarBuG
06-10-2007, 08:46 AM
Do you use an adblock software?

Propozime
06-10-2007, 09:12 AM
i fixt this thanks :)

StarBuG
06-10-2007, 09:29 AM
You'r welcome ;)

StarBuG
06-11-2007, 09:52 AM
I have just released an add-on for this mod.


ADD-ON:
In addition you can add a Google Adsense link unit as last post of a thread on any page for members and guests. This advertising will only show if the thread has more then one post so that it does not show 2 advertisings directly below each other in case that the thread has no replies yet. Google Adsense has updated its ToS so that you are now allowed to use up to three link units on one page. So if you already use my "Adsense Link Unit in Navbar (https://vborg.vbsupport.ru/showthread.php?t=146581)" Mod there woun't be a problem.

I hope you like it.

Let me know how it works out ;)

StarBuG

popowich
06-16-2007, 07:18 PM
v1.15 - 2007/06/11: Add-on - Google Adsense Link unit as last post of every thread for guests and members.

It makes more sense to me for this to be a separate mod.

It is out of scope for the original product name.

Actually, I've already done the linkbar as last post w/ another product.

-Raymond

MajorFm.com
06-17-2007, 02:15 PM
how can i make the link unit be the 2nd post?

StarBuG
06-17-2007, 04:11 PM
Just replace the existing adsense code in my original modification with the adsense code for the link unit.

John Diver
07-01-2007, 06:41 PM
Nothing is coming up on my design for some reason...

This is my postbit code:

<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-right: 0px" $post[scrolltothis]>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-left: 0px" align="$stylevar[right]">
&nbsp;
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

<div class="smallfont">
&nbsp;<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><div><if condition="$show['reppower']"><span id="reppower_$post[postid]_$post[userid]">$vbphrase[reppower]</span>: $post[reppower]</if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

</td>
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
<else />
<td class="alt1" id="td_post_$post[postid]" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
</if>

<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>

<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>

<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>

<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>

<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>

</div>
<!-- / attachments -->
</if>

<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>

<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>

</td>
</tr>
<tr>
<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
$post[onlinestatus]
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
&nbsp;
</td>
<if condition="$show['moderated']">
<td class="alt2" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-left: 0px; border-top: 0px">
<else />
<td class="alt1" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-left: 0px; border-top: 0px">
</if>

<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
<!-- / controls -->
</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->
<!-- Google AdSense in Posts for Guests -->
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND (!$show[member])">

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="currentPost">
<div class="normal">
<!-- status icon and date -->
<img title="Alt" class="inlineimg" src="images/statusicon/post_old.gif" alt="Alt" border="0"></a> Today
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding: 0px;">
<!-- user info -->
<table border="0" cellpadding="0" cellspacing="6" width="100%">
<tbody>
<tr>
<td class="alt2">
<!-- Adsense Referal Code start -->
<script type="text/javascript"><!--
google_ad_client = "pub-5988350962952956";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as_rimg";
google_cpa_choice = "CAAQ0f2XhAIaCA6IC4oIlz0_KK2293M";
google_ad_channel = "6607026933";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Tester1
<!-- Adsense Referal Code end-->

</td>
<td nowrap="nowrap">
<span class="bigusername"><u>Advertising</u></span><br />
<span class="smallfont">Signup Through Us For Free POker Tournaments</span>
</td>
<td width="100%">&nbsp;</td>
<td valign="top" nowrap="nowrap">
<div class="smallfont">
<div>This advertising will not be shown</div>
<div>in this way to registered members.</div>
<div><a href="register.php">Register</a> your free account today</div>
<div>and become a member on</a></div>
<div>$vboptions[bbtitle]</div>
<div>By registering you will receive</div>
<div>free entry to our regular tournaments!</div><br />
<div><a href="register.php">Register</a> your free account today</div>
</div>
</td>
</tr>
</tbody></table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->
<!-- icon and title -->
<div class="smallfont">

<img title="Standard" class="inlineimg" src="images/icons/icon14.gif" alt="Standard" border="0">
<strong>Unique Bonuses Just For DeuceAce Members!</strong>
</div>
<hr style="color: rgb(134, 134, 134);" size="1">
<!-- / icon and title -->
<!-- message -->
<div>
<!-- Adsense large rectangle start -->
Tester2
<!-- Adsense large rectangle end -->
</div>
<!-- / message -->
<!-- message, attachments, sig -->
</td>
</tr>
</tbody></table>
<!-- / post $post[postid] popup menu -->
</if>
<!-- / Google AdSense in Posts for Guests End-->

<!-- Google AdSense in Posts for Members -->
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND ($show[member])">

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="td_post_$post[postid]">
<div class="normal">
&nbsp;
</div>
</td>
</tr>
<tr>
<td class="alt1" align="center">
<div>
Test Guests End //
</div>
</td>
</tr>
</tbody>
</table>
</if>
<!-- / Google AdSense in Posts for Members end-->
<!-- Google AdSense Link unit as last post for all -->
<if condition="THIS_SCRIPT == 'showthread' AND $post['islastshown'] and !$GLOBALS['vbulletin']->GPC['ajax'] AND $post[postcount]!=1">

<if condition="$show['spacer']">
</div>
$spacer_close
</if>

<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
<td class="thead" id="td_post_$post[postid]">
<div class="normal">
&nbsp;
</div>
</td>
</tr>
<tr>
<td class="alt1" align="center">
<div>
Testing End//
</div>
</td>
</tr>
</tbody>
</table>
</if>
<!-- Google AdSense Link unit as last post for all -->

ANyone know what could be wrong?
I just changed a few things for the adsense code for testing.

Looking forward to getting this working :)

Thanks

StarBuG
07-03-2007, 03:34 PM
Add your template as txt file attachment, it is horrible to read through code like this ;)

John Diver
07-04-2007, 02:56 PM
Added :)

Thanks for the help!

StarBuG
07-05-2007, 05:18 PM
I just created a new style and pasted your postbit into it.

It works perfectly for me.

Are you sure you are not using an adblocker that blocks advertising?
Do you see the ads here: http://www.patientenfragen.net/showthread.php?t=2278

???

Greetings

StarBuG

John Diver
07-06-2007, 09:38 AM
Thanks for this! Best support I have seen for a product!

I see the ad on your style and don't have any adblockers installed.

I can't think of any reason why it wouldn't be showing up.

Thanks again

StarBuG
07-06-2007, 11:30 AM
Is this the first time you are using adsense on your site?

If it is it can take up to 3 weeks for google to show ads on your site.
In my adsense code I have set the ads to not show public service ads instead just show the background color.
Maybe this is the case for you too?

StarBuG

John Diver
07-13-2007, 10:50 AM
Hey,

Sorry, I thought I replied to this.

If you take a look at the code, Im not using adsense but different advertising code for poker sites, so adsense crawling shouldnt be a problem.

Thanks
John

John Diver
07-20-2007, 11:04 AM
Hey,

Just checking if you have any idea whats wrong?

StarBuG
07-20-2007, 04:49 PM
Like I said, I used your postbit on my forum and everything worked perfect

There seems to be something wrong with the different ad code you are using.

Sorry, I can't help you here.

StarBuG

esck
08-13-2007, 09:02 PM
great mod, thanks a lot

jacki
08-21-2007, 07:47 PM
in below code, post is specified, I want to show that in three different posts, how can I manage it?


<!-- Adsense large rectangle start -->
<if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1,')">
<br />

StarBuG
08-22-2007, 02:43 PM
<if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1') OR ($post[postcount] == '2') OR ($post[postcount] == '3')">

jmw
08-28-2007, 10:38 PM
Like this hack. Starbug,

1. Does it work with 3.6.8?
2. If so, how can I just show ads to everybody, myself admin included?

Using the legacy.

WarLion
08-29-2007, 11:57 AM
If you are asking that, then you are using the "postbit" template ;)

To use the "postbit_legacy" template you have to copy the content from that template to "Postbit" ;)

StarBuG, actually no you can change your style of postbit in admincp --> vboptions --> configuration style & lenguage

, this is a cool hack thanks for that im testing in vb3.6.8 but i haave one problem , mi second addon is not showing nothis the firs one only shows Make your donation today (about the huracain that hit here in yucatan "im from cancun that was close") i just get yi adsense is this ok , this will show in a few days or i am making somethin wrong

if you like to see
http://www.warlionhosting.com/foro/showthread.php?p=70#post70


thanks for you help

StarBuG
08-29-2007, 02:29 PM
Yes it works with 3.6.8.
to show it to everyone remove the member part code block and from the guest code (at the top) remove "AND (!$show[member])" from the condition.

Adsense shows public service ads if your site is not yet spidered, this will change in a few days.

StarBuG

romanticyao
02-02-2008, 08:46 PM
this is very useful, thanx

xony
06-12-2008, 09:07 PM
3.7.1. not found?:(

StarBuG
06-15-2008, 08:06 AM
3.7.1. not found?:(

of course it is there.

I use 3.7.1 and the template search finds:

<!-- / post $post[postid] popup menu -->

xony
06-18-2008, 04:19 PM
Thanks:D

ShackMaster
07-15-2008, 07:43 PM
The link to go to the last post to read is taking us to the Adsense Link... then we have to scroll up to read the actual last post.

ShackMaster
07-15-2008, 07:54 PM
Actually... make that the little button link that takes me to the last "unread" post... it always takes me to the Adsense link, which is the last post.

I'll have to temporarily uninstall that portion until there is a fix for this.

unixboard
07-17-2008, 06:40 AM
Any solution to post the ads on every first post of a page?
in our Forum the Threads sometimes more than 100 Pages long :-)

ArnyVee
08-04-2008, 02:48 PM
* tagged *

I have another mod in for my 2nd post of every thread, but this one seems like a normal post which could assist rather than just having the ads 'in between' the posts.

jhambly
08-19-2011, 11:29 PM
I don't know if this is still maintained but my postbit does not contain that code above..its the newest version of vbulletin