View Single Post
  #27  
Old 03-17-2012, 05:38 PM
chrisngrod's Avatar
chrisngrod chrisngrod is offline
 
Join Date: Oct 2010
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

Quote:

<!--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&cust omId=Thread&keyword=bad+esn&width=605&height=90&fo nt=4&textColor=000000&linkColor=373C6B&arrowColor= 8BBC01&color1=058A13&color2=FFFFFF&format=Html2&co ntentType=TEXT_AND_IMAGE&enableSearch=n&useeBayT=n &usePopularSearches=n&freeShipping=n&topRatedSelle r=n&itemsWithPayPal=n&descriptionSearch=n&showKwCa tLink=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&cust omId=Thread&keyword=bad+esn&width=605&height=90&fo nt=4&textColor=000000&linkColor=373C6B&arrowColor= 8BBC01&color1=058A13&color2=FFFFFF&format=Html2&co ntentType=TEXT_AND_IMAGE&enableSearch=n&useeBayT=n &usePopularSearches=n&freeShipping=n&topRatedSelle r=n&itemsWithPayPal=n&descriptionSearch=n&showKwCa tLink=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&cust omId=Thread&keyword=bad+esn&width=605&height=90&fo nt=4&textColor=000000&linkColor=373C6B&arrowColor= 8BBC01&color1=058A13&color2=FFFFFF&format=Html2&co ntentType=TEXT_AND_IMAGE&enableSearch=n&useeBayT=n &usePopularSearches=n&freeShipping=n&topRatedSelle r=n&itemsWithPayPal=n&descriptionSearch=n&showKwCa tLink=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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01056 seconds
  • Memory Usage 1,815KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete