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
  #22  
Old 01-16-2010, 05:41 PM
utahraves's Avatar
utahraves utahraves is offline
 
Join Date: May 2007
Location: Utah
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like mine to display every 5 posts... so I use this line.

Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND (($post[postcount] % 5) == 0)">
Reply With Quote
  #23  
Old 01-17-2010, 03:48 AM
barcena's Avatar
barcena barcena is offline
 
Join Date: Sep 2006
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I do so it will display on every page of every thread?

Right now is only showing on the first page of a given thread.

Bear w/ me since i'm not coder.

Thanks.
Reply With Quote
  #24  
Old 01-20-2010, 02:30 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your code:

PHP 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> 
places the ad ONLY after Post#1.

How to modify it so that if the thread spans multiple pages the ad appears after the first post on each page?
Reply With Quote
  #25  
Old 01-20-2010, 04:18 PM
ninjashoes's Avatar
ninjashoes ninjashoes is offline
 
Join Date: Jul 2006
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know theres an if conditional to get this to appear in the subforums you want. I just don't know exactly what I need to put in there.

I need one of the smart coders on here to give me what I need for this to work. This is just the first part. It worked before version 4.0

Code:
<vb:if condition="$foruminfo['forumid'] == 9 OR $foruminfo['forumid'] == 20 OR $foruminfo['forumid'] == 11 OR $foruminfo['forumid'] == 21 OR $foruminfo['forumid'] == 48 OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'editpost' OR THIS_SCRIPT == 'register' OR THIS_SCRIPT == 'search' OR THIS_SCRIPT == 'usercp' OR THIS_SCRIPT == 'inlinemod' OR THIS_SCRIPT == 'member' OR THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'newreply' OR THIS_SCRIPT == 'login' OR THIS_SCRIPT == 'private'">
Reply With Quote
  #26  
Old 01-24-2010, 01:49 PM
nomoreturn's Avatar
nomoreturn nomoreturn is offline
 
Join Date: Apr 2009
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed but gor this error
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected '[' in /home/****/public_html/includes/adminfunctions_template.php(4597) : eval()'d code on line 12
Reply With Quote
  #27  
Old 01-26-2010, 03:07 PM
993ti 993ti is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
Your code:

PHP 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> 
places the ad ONLY after Post#1.

How to modify it so that if the thread spans multiple pages the ad appears after the first post on each page?
Instead of
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
Use
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !$GLOBALS['FIRSTPOSTID']">
Works for me
Reply With Quote
  #28  
Old 01-26-2010, 03:22 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 993ti View Post
Instead of
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
Use
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !$GLOBALS['FIRSTPOSTID']">
Works for me
That's perfect. Thank you!
Reply With Quote
  #29  
Old 01-27-2010, 06:37 AM
haluk haluk is offline
 
Join Date: Jan 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 993ti View Post
Instead of
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
Use
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND !$GLOBALS['FIRSTPOSTID']">
Works for me
Thank you. But how can I add ads after second or third (or fourth) post on every page?
Reply With Quote
  #30  
Old 01-27-2010, 07:51 PM
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Posts: 878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont show anything and if put second method show ads inside first post...
Reply With Quote
  #31  
Old 01-28-2010, 05:36 PM
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Posts: 878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have 16:9 1920*1080....
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 05:23 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.09398 seconds
  • Memory Usage 2,352KB
  • Queries Executed 26 (?)
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
  • (10)bbcode_code
  • (2)bbcode_php
  • (3)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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