Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show Adsense After post number "x" and "x" Details »»
Show Adsense After post number "x" and "x"
Version: 1.00, by mcyates mcyates is offline
Developer Last Online: Jul 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.7.2 Rating:
Released: 08-05-2008 Last Update: Never Installs: 16
Template Edits
 
No support by the author.

Works With Vbulletin V3.7.2

This is a very simple template modification have similar to absence hack and the random postbit advert hack. But you have more control with this hack as you change the option for where the adverts will appear "after which message"

Add one of these codes to the bottom of your postbit template.

Here are the codes:

Code:
<if condition="$post[postcount]==1">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>
The above code would show an ad after the first post on every thread. Change this number to show the advert under a different post. Or use loads together like this:

Code:
<if condition="$post[postcount]==1">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>

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

[AD CODE GOES HERE]

</p>
</if>

<if condition="$post[postcount]==20">
<p align="center">

[AD CODE GOES HERE]

</p>
</if>
The above will show adverts after the 1st, 10th and 20th post in every thread.

Also there is another way for doing this:

Code:
<if condition="in_array($post['postcount'], array(1, 5, 10, 15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100))">
<if condition="in_array($bbuserinfo['usergroupid'], array(1, 2, 3, 4,5,6,7,8, 9))">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="thead" align="left">Sponsored Links (<a href=/payments.php>No Ads</a>)</td>
</tr>
<tr>
	<td class="alt1" align="center">

[AD CODE GOES HERE]

	</td>
</tr>
</table>

</div>
$spacer_close

</if></if>
Enjoy!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-13-2009, 05:58 PM
alishahbazi alishahbazi is offline
 
Join Date: Feb 2008
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this code work in vb 3.8.x ?
Reply With Quote
  #13  
Old 07-13-2009, 07:45 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here are some more vBulletin Template Conditions if you wanted to expand on this tut a little
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 06:56 AM.


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.04052 seconds
  • Memory Usage 2,215KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete