![]() |
Adsense after first post ONLY if there are more than X posts in the thread
Many forums use three ad units in their threads.. at the top, within the content, and then at the bottom. This mod was made with this kind of set up in mind.
The problem is the thread pages can tend to look horrible and overrun with ads if there is not enough content (say only a couple one line posts) between the ad units. This isnt for everyone as some people prefer to keep all their ads showing no matter what.. but for those interested, this template modification only displays adsense after first post if there are over X amount of posts in the thread. If you want everyone to see the ads you can remove the is_member_of AND line. Otherwise, you can add the user groups who you want to see the ads to it. (Don't forget to replace 'X' with a numerical value of your choice) Place the following at the very end of the postbit template: PHP Code:
|
Bingo! I've been waiting for this. Thank you very much, Moparx. :)
|
One thing, I would like to show my ads AFTER the post #5. How do I do that?
|
change:
PHP Code:
PHP Code:
|
screenshot?
|
Quote:
it displays an ad after the first post |
how about for forum display? Is there a way I could place it after certain amount of threads?
|
thank you! this work fine!
|
very useful
thanks |
I get a white blank page after i post, how do i fix this?
|
Be sure you've placed the ads code correctly.
|
Quote:
|
I've tried everything but can't get this to work, here is what I have been using:
<if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) AND !$GLOBALS['FIRSTPOSTID'] AND $GLOBALS[threadinfo][replycount] >= X"> $spacer_open <div class="page" style="width:100%; text-align:left"> <div style="padding:0px 0px 6px 0px"> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr> <td class="alt1"> <div align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-0348024283260953"; google_ad_width = 728; google_ad_height = 15; google_ad_format = "728x15_0ads_al"; google_ad_channel =""; //</script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> --> </div> </td> </tr> </table> </div> </div> $spacer_close </if> Please let me know if anything is incorrect |
Very sorry for the late responce..
Quote:
Try changing: PHP Code:
PHP Code:
Quote:
|
Tried that and it still does not work, used the number 3 instead of "x"...any suggestions?
|
it should be working fine for you then... it is definately added in the postbit template right?
|
Do you have a preview? :D
|
Yep...dunno what te problem is
|
I can't get this to show up for some reason. Is it compat with the newest ver of VB?
|
Quote:
replace your Code:
<if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) AND !$GLOBALS['FIRSTPOSTID'] AND $GLOBALS[threadinfo][replycount] >= X"> Code:
<if condition="!$GLOBALS['FIRSTPOSTID'] AND $GLOBALS[threadinfo][replycount] >= 3"> |
hmm, it looks like if you have two pages and its under the X post and you reply to it, it messed up.
|
Hello,
I want to make it after x no of replies any idea |
I added this mod to my VB 3.5.4 but nothing shows up. I only added the code to postbit template? Do I have to add it to any other templates as well? Does it take time for the change to take place? I assume I should be able to see the result instantly!
|
Quote:
|
Quote:
I dont have an ad blocker. I can see adsense on other pages just fine. |
Code did not work for me. Third hack on Vb.org that involves adsense that does not work.
|
Quote:
Quote:
Refer to and respond to this post.. include your version of vbulletin as well: https://vborg.vbsupport.ru/showpost....0&postcount=24 |
All times are GMT. The time now is 02:54 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|