Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Google Adsense After first post (with scrolling option) Details »
Google Adsense After first post (with scrolling option)
Mod Version: 1.00, by xMrCanadax (Designer) xMrCanadax is offline
Developer Last Online: Sep 2020 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (5 votes - 5.00 average) Installs: 36
Released: 11 Sep 2011 Last Update: Never Downloads: 0
Supported Template Edits Re-usable Code  

How To Install
Step.1:
GoTo Styles & Templates>Search in Templates>your style then search for "postbit_legacy" without quotations.

at the very bottom before "{vb:raw template_hook.postbit_end}"
add :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 2: (centering and coloring your adsense)
GoTo Styles & Templates>Search in Templates>your style then search for additional.css and anywhere add :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 3: (IF YOU WANT SCROLL ONLY)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Only add this if you want your banner to scroll. This can be used for others things other then adsense also.

You are finished! you can see a Demo Here

Customize the CSS as you wish. Hope this helped.

To exempt usergroups :

To exempt usergroups just do this

Replace :
<vb:if condition="$post['isfirstshown']

With :
<vb:if condition="$post['isfirstshown'] AND !in_array($bbuserinfo[usergroupid], array(X,Y,A))">

X,Y,A Being Usergroup ID's

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements Google Adsense after first post (or other advertisements) Allan vBulletin 4.x Add-ons 97 23 Aug 2018 23:00
Mini Mods A Neater Google Adsense After First Post ShawneyJ vBulletin 4.x Template Modifications 86 06 Aug 2015 21:49
Forum Display Enhancements Google AdSense (or other) after post... goranbaxy vBulletin 3.6 Template Modifications 46 10 Sep 2010 04:04

  #16  
Old 20 Oct 2011, 07:28
karel1985 karel1985 is offline
 
Join Date: Mar 2007
Real name: Karel B.
I use it for showing the ads after each 3th post

<vb:if condition="(THIS_SCRIPT == showthread) AND (($post[postcount] % 3) == 0)">
<li class="firstpost_advert_container"><div class="firstpost_advert">

YOUR AD CODE

</li>
</vb:if>
__________________
Dutch Pc Helpforum - www.pc-helpforum.be
Reply With Quote
  #17  
Old 20 Oct 2011, 22:35
amorosso amorosso is offline
 
Join Date: Apr 2010
Awesome thank you very much
Reply With Quote
  #18  
Old 24 Oct 2011, 03:28
xMrCanadax xMrCanadax is offline
 
Join Date: Aug 2011
Thanks for the awesome feedback guys. need any other mods pm me details and I will try at it.
__________________
Want to learn how to program? www.legionrs.com
Reply With Quote
  #19  
Old 22 Nov 2011, 13:43
temsamane temsamane is offline
 
Join Date: Sep 2010
Originally Posted by karel1985 View Post
I use it for showing the ads after each 3th post

<vb:if condition="(THIS_SCRIPT == showthread) AND (($post[postcount] % 3) == 0)">
<li class="firstpost_advert_container"><div class="firstpost_advert">

YOUR AD CODE

</li>
</vb:if>
i need an adsense after each 9th post of a page. so if you go the the second page, its still on the 9th post of the page etc.
__________________
Temsamane
Reply With Quote
  #20  
Old 25 Nov 2011, 04:01
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Works juts great, my only problem is that adsense is showing after second post

Probably it is cause I use mod "first post on every page"
http://www.vbulletin.org/forum/showt...=239282&page=9

Any ideas, for now I left it under second post but I would like it under first as it is better like that I think.
Maybe to put it above "first post" in my case, lol ? (how to do that)

Thanks
Reply With Quote
  #21  
Old 25 Nov 2011, 04:37
xMrCanadax xMrCanadax is offline
 
Join Date: Aug 2011
Originally Posted by goxy63 View Post
Works juts great, my only problem is that adsense is showing after second post

Probably it is cause I use mod "first post on every page"
http://www.vbulletin.org/forum/showt...=239282&page=9

Any ideas, for now I left it under second post but I would like it under first as it is better like that I think.
Maybe to put it above "first post" in my case, lol ? (how to do that)

Thanks
Try disabling your other mod, it should work then?
__________________
Want to learn how to program? www.legionrs.com
Reply With Quote
  #22  
Old 25 Nov 2011, 10:42
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Originally Posted by xMrCanadax View Post
Try disabling your other mod, it should work then?
Yes, after disabling mentioned mod its just as it should be, that is GREAT

But my users already got use to this option (first post on every page), even I did...its kinda natural to have first one.... specially on forums where you have 100-200... pages

Not a coder just dont know how to fix this


Thanks
Reply With Quote
  #23  
Old 09 Dec 2011, 12:31
datoneer datoneer is offline
 
Join Date: Jul 2011
I cannot see adsense ad. I have vb 4.1.8. Where's the problem?
Reply With Quote
  #24  
Old 17 Dec 2011, 07:20
xMrCanadax xMrCanadax is offline
 
Join Date: Aug 2011
Can you show me what you see @datoneer?
__________________
Want to learn how to program? www.legionrs.com
Reply With Quote
  #25  
Old 09 Mar 2012, 12:42
BlueCheri's Avatar
BlueCheri BlueCheri is offline
 
Join Date: Jul 2009
Working fine with upgrade.

G!
Reply With Quote
  #26  
Old 17 Mar 2012, 18:38
chrisngrod's Avatar
chrisngrod chrisngrod is offline
 
Join Date: Oct 2010
I'm going to mark this as installed. I am pretty sure I used your post to help me configure my pages.

I really hate the sites where it looks like they had some postbot insert the ads btw.

This is the code I inserted in my forum just in case people want to do something similar.


<!--begin ads after first post-->

<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">

<vb:if condition="is_member_of($bbuserinfo, 1)">

<li class="firstpost_advert_container">
<div class="firstpost_advert">

<script type="text/javascript"><!--
google_ad_client = "ca-pub-1026739116117253";
/* CricketUsers (300 x 250 In Thread Box Ad) */
google_ad_slot = "6476112708";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-1026739116117253";
/* CricketUsers (300 x 250 In Thread Box Ad) */
google_ad_slot = "6476112708";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<center>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/jquery-1.6.2-min.js'></script>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/jquery-ui-min.js'></script>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/ebay_activeContent-min.js'></script>
<script charset="utf-8" type="text/javascript">
document.write('\x3Cscript type="text/javascript" charset="utf-8" src="http://adn.ebay.com/cb?programId=1&campId=5337045326&toolId=10026&customId=Thread&keyword=bad+esn&wi dth=605&height=90&font=4&textColor=000000&linkColor=373C6B&arrowColor=8BBC01&col or1=058A13&color2=FFFFFF&format=Html2&contentType=TEXT_AND_IMAGE&enableSearch=n& useeBayT=n&usePopularSearches=n&freeShipping=n&topRatedSeller=n&itemsWithPayPal= n&descriptionSearch=n&showKwCatLink=n&excludeCatId=&excludeKeyword=&catId=15032& disWithin=200&ctx=n&flashEnabled=' + isFlashEnabled + '&pageTitle=' + _epn__pageTitle + '&cachebuster=' + (Math.floor(Math.random() * 10000000 )) + '">\x3C/script>' );
</script>
</center>

<center>
<a href="/payments.php">Remove this advertisement</a>.
</center>

</div>
</li>


<vb:if condition="$adsshown[] = 2"></vb:if></vb:if><vb:if condition="is_member_of($bbuserinfo, 2)">

<li class="firstpost_advert_container">

<div class="firstpost_advert">

<script type="text/javascript"><!--
google_ad_client = "ca-pub-1026739116117253";
/* CricketUsers (300 x 250 In Thread Box Ad) */
google_ad_slot = "6476112708";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-1026739116117253";
/* CricketUsers (300 x 250 In Thread Box Ad) */
google_ad_slot = "6476112708";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<br />


<script type="text/javascript" src='http://adn.ebay.com/files/js/min/jquery-1.6.2-min.js'></script>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/jquery-ui-min.js'></script>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/ebay_activeContent-min.js'></script>
<script charset="utf-8" type="text/javascript">
document.write('\x3Cscript type="text/javascript" charset="utf-8" src="http://adn.ebay.com/cb?programId=1&campId=5337045326&toolId=10026&customId=Thread&keyword=bad+esn&wi dth=605&height=90&font=4&textColor=000000&linkColor=373C6B&arrowColor=8BBC01&col or1=058A13&color2=FFFFFF&format=Html2&contentType=TEXT_AND_IMAGE&enableSearch=n& useeBayT=n&usePopularSearches=n&freeShipping=n&topRatedSeller=n&itemsWithPayPal= n&descriptionSearch=n&showKwCatLink=n&excludeCatId=&excludeKeyword=&catId=15032& disWithin=200&ctx=n&flashEnabled=' + isFlashEnabled + '&pageTitle=' + _epn__pageTitle + '&cachebuster=' + (Math.floor(Math.random() * 10000000 )) + '">\x3C/script>' );
</script>


</div>

<br />

<center>

<script type="text/javascript" src='http://adn.ebay.com/files/js/min/jquery-1.6.2-min.js'></script>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/jquery-ui-min.js'></script>
<script type="text/javascript" src='http://adn.ebay.com/files/js/min/ebay_activeContent-min.js'></script>
<script charset="utf-8" type="text/javascript">
document.write('\x3Cscript type="text/javascript" charset="utf-8" src="http://adn.ebay.com/cb?programId=1&campId=5337045326&toolId=10026&customId=Thread&keyword=bad+esn&wi dth=605&height=90&font=4&textColor=000000&linkColor=373C6B&arrowColor=8BBC01&col or1=058A13&color2=FFFFFF&format=Html2&contentType=TEXT_AND_IMAGE&enableSearch=n& useeBayT=n&usePopularSearches=n&freeShipping=n&topRatedSeller=n&itemsWithPayPal= n&descriptionSearch=n&showKwCatLink=n&excludeCatId=&excludeKeyword=&catId=15032& disWithin=200&ctx=n&flashEnabled=' + isFlashEnabled + '&pageTitle=' + _epn__pageTitle + '&cachebuster=' + (Math.floor(Math.random() * 10000000 )) + '">\x3C/script>' );
</script>
</center>

<center>
<a href="/payments.php">Remove</a> this advertisement.
</center>

</li>

<vb:if condition="$adsshown[] = 12"></vb:if></vb:if><vb:if condition="is_member_of($bbuserinfo, 5, 6, 7, 10, 12, 15, 16, 17, 18, 19, 24)">

<vb:if condition="$bbuserinfo['field13'] == 'No'">

<vb:else />

<li class="firstpost_advert_container">

<div class="firstpost_advert">

<script type="text/javascript"><!--
google_ad_client = "ca-pub-1026739116117253";
/* CricketUsers (300 x 250 In Thread Box Ad) */
google_ad_slot = "6476112708";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-1026739116117253";
/* CricketUsers (300 x 250 In Thread Box Ad) */
google_ad_slot = "6476112708";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


</div>

</li>

</vb:if>

</vb:if>

</vb:if>

<!--end ads after first post-->

So after the first post it gives guests and registered members 3 ads. Two adsense and one eBay.

For supporting members, it gives them two adsense by default. If they go into their profile and turn off the in post ads (field13), it will remove them.

By turning ads back on for my supporting members be default, I have received no complaints, yet have increased my ad revenue.


Yes I used depreciated <center> tags. One day when I'm not lazy or this becomes a real issue, I'll put it all in a div.
__________________
Cricket Users - Cricket Wireless Forum
Reply With Quote
  #27  
Old 27 May 2012, 17:16
g00gl3r g00gl3r is offline
 
Join Date: Sep 2005
Hi,

I'm trying to get this to work and it just doesn't seem to do anything at all with the newer versions of vBulletin.

Any help?
Reply With Quote
  #28  
Old 27 May 2012, 17:19
g00gl3r g00gl3r is offline
 
Join Date: Sep 2005
Originally Posted by chrisngrod View Post
I'm going to mark this as installed. I am pretty sure I used your post to help me configure my pages.

I really hate the sites where it looks like they had some postbot insert the ads btw.

This is the code I inserted in my forum just in case people want to do something similar.




So after the first post it gives guests and registered members 3 ads. Two adsense and one eBay.

For supporting members, it gives them two adsense by default. If they go into their profile and turn off the in post ads (field13), it will remove them.

By turning ads back on for my supporting members be default, I have received no complaints, yet have increased my ad revenue.


Yes I used depreciated <center> tags. One day when I'm not lazy or this becomes a real issue, I'll put it all in a div.
I tried to add this before the last line in postbit, and nothing shows at all.

What am I doing wrong?
Reply With Quote
  #29  
Old 03 Jun 2012, 04:55
Naijasite's Avatar
Naijasite Naijasite is offline
 
Join Date: Mar 2012
thanks alot its working fine on my Forum http://www.naijafinder.com/forum.php
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:25.

Layout Options | Width: Wide Color: