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

Reply
 
Thread Tools
Google Adsense after first post (or other advertisements) Details »»
Google Adsense after first post (or other advertisements)
Version: 1.00, by Allan Allan is offline
Developer Last Online: Mar 2017 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.0 Rating:
Released: 12-31-2009 Last Update: Never Installs: 148
Template Edits
 
No support by the author.

With this mod, you can add an advertisement as Google Adsence or other advertisements.
  • In the "postbit" or "postbit_legacy", add to the end:
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
  <div class="attachments">
        <div style="width: 100%; text-align: center">
       Your text here
      </div>
</div>
</vb:if>
  • 2nd method, in the "ad_showthread_firstpost" template, add:
Code:
  <div class="attachments">
        <div style="width: 100%; text-align: center"> 
Your text here       
        </div>
  </div>
PS: I use class "attachments", it's just for the fun ^^

Screenshots

File Type: jpg pub1.jpg (80.6 KB, 0 views)
File Type: jpg pub2.jpg (72.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
sodasusu

Comments
  #92  
Old 04-21-2018, 11:09 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have another question:
In PostbitLegacy (is my template) I view on insert my adsense code for appars at end of post (post/text by user) but appears, logicaly, in all posts.
I want appears ever 3 posts, for example:
I add this code:
Code:
<vb:if condition="$post[postcount] % X == 0">
But not work, first post appears ell, other posts of same tjread appears wwong.

Ins opssible made this?

Regards.
Reply With Quote
  #93  
Old 04-21-2018, 11:23 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try changing the "X" to a "3".
Reply With Quote
  #94  
Old 04-21-2018, 11:34 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, yes, I try to change X to 3.

I have the problem indicate above.

I insert my adsense code, with this code indicate above just after this in postbit_legacy template
Code:
<div id="post_message_{vb:raw post.postid}">
						<blockquote class="postcontent restore ">
							{vb:raw post.message}
						</blockquote>
					</div>
Work if not insert
Code:
<vb:if condition="$post[postcount] % 3 == 0">
Work in first post, but the rest of post of some thread appears lie "unbalanced".

If you want I can attach a screenshoot.

Thanks and regards!!
Reply With Quote
  #95  
Old 04-22-2018, 12:42 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Locate this at the very end:

HTML Code:
{vb:raw template_hook.postbit_end}
Directly above that, try adding:

HTML Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 3)">
	<div style="clear: both; margin: 1em 0;" class="attachments">
		<div style="text-align: center">
			Your text here.
		</div>
	</div>
</vb:if>
Reply With Quote
  #96  
Old 04-22-2018, 07:18 AM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks MarkFL,

With your code, I have my text every 3 posts but between posts.
My iddea, if its possible, is, just at end of the text/reply of the post user, inside the post.

Again, thank you!
Reply With Quote
  #97  
Old 04-22-2018, 12:04 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gnrx View Post
Thanks MarkFL,

With your code, I have my text every 3 posts but between posts.
My iddea, if its possible, is, just at end of the text/reply of the post user, inside the post.

Again, thank you!
Try putting the code directly below this block:

HTML Code:
<div id="post_message_{vb:raw post.postid}">
	<blockquote class="postcontent restore ">
		{vb:raw post.message}
	</blockquote>
</div>
Reply With Quote
Благодарность от:
gnrx
  #98  
Old 04-22-2018, 08:08 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks MarkFL,
Works perfect!!
I try in other positions, but in this position, work perfect!!!
Appears the code at end of post inside post
Thanks!!!

In other question, its possible insert the code for, ever 3 or 5 posts but with different content? I'm explain:
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 3)">
My text A here
And:
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 5)">
My text B here
I try this, at end of postbit_legacy, (I try a since days ago) but not fine...

Again, thank you!

Edit: Now I try with your code and yes, works perfect

Thanks master.
Reply With Quote
Благодарность от:
MarkFL
  #99  
Old 08-23-2018, 08:00 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello.
In this lasts weeks I edit this ads in location, but continue with my last doubt, if its is possible, real are fantastic:
My iddea:


We have the code A of adsense (for one add) and also, we have the code B for other/config add.

Mi iddea, if its possible.

In the first post number 3 (for example) appears the code A, in the post 6 de code B, in the post 9 de code A, in the post 12 the code B...etc...
.
If I use this:
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 3)">
Code A
and:

Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 5)">
Code B
In the post number 15 and in the 30, 45...appears the 2 adds (or to codes) and I don't want this, I want only appear one add.

Sorry if I not explained well.

This, is a little important for me

Thanks in advanced!

Regards!
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 04:55 PM.


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.06864 seconds
  • Memory Usage 2,327KB
  • Queries Executed 24 (?)
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
  • (9)bbcode_code
  • (3)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (3)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (2)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete