Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adsense after first post Details »»
Adsense after first post
Version: 1.00, by artonex artonex is offline
Developer Last Online: Jan 2007 Show Printable Version Email this Page

Version: 3.5.0 RC3 Rating:
Released: 09-13-2005 Last Update: Never Installs: 236
Template Edits
 
No support by the author.

Hey guys i think many of you will find this very usefull

With the template edit you can display adsense or banner after every 1st post. i have chosen to use my amazon affilite code.

Add this to the bottom of your postbit template.

Demo

PHP Code:
<if condition="!$GLOBALS['FIRSTPOSTID']">

$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</td>
</
tr>
<
tr>
    <
td class="alt1" align="center">
        <
adsense code here>
</if>
    </
td>
</
tr>
</
table>

</
div>
$spacer_close

</if> 

Show Your Support

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

Comments
  #182  
Old 06-05-2006, 02:43 PM
Aceman's Avatar
Aceman Aceman is offline
 
Join Date: Mar 2002
Location: Virginia, USA
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is my code:

However, firefox users are reporting white pages, and in IE 7 after I post with quick reply I'm seeing a small table header with "Sponsored Links" in it.. but nothing (the ads) under it. The ads should only show up after the first post.. not after you post with quick reply. If you post via the "Post Reply" button it seems to work fine.

This is Vbulletin 3.5.4:

PHP Code:
<!-- Google Ads for NON members -->
<if 
condition="!is_member_of($bbuserinfo, 5,7,9,10,11,14) AND !$GLOBALS['FIRSTPOSTID']">

$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</td
</
tr
<
tr
    <
td class="alt1" align="center"
    <*** 
ADSENSE SCRIPT CODE HERE***>
    </
td
</
tr
</
table
</
div
$spacer_close
</if> 
</if>  
<!-- 
END Google Ads for NON Members --> 
Anyone know how to fix this?
Aceman
Reply With Quote
  #183  
Old 06-14-2006, 03:14 PM
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Didn't read the whole thread yet but I'm having an issue with the code in the first post. It prevents people from being redirected after making a post in the quick reply box. They get redirected to a white screen. They must thne copy and repaste the thread address in the bar to get back to the forum page. Has this happened to anyone else?
Reply With Quote
  #184  
Old 06-17-2006, 07:21 PM
kpr's Avatar
kpr kpr is offline
 
Join Date: Jun 2005
Location: Scotland
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its great that these work with everything adbrite etc

cheers
Reply With Quote
  #185  
Old 06-20-2006, 06:42 AM
SupremeWeapon SupremeWeapon is offline
 
Join Date: Jan 2005
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<!-- Google Ads for NON members -->
<if 
condition="!is_member_of($bbuserinfo, 1,3) AND !$GLOBALS['FIRSTPOSTID']">

$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</td
</
tr
<
tr
    <
td class="alt1" align="center"
    <
script type="text/javascript"><!--
google_ad_client "pub-9097379824476514";
google_ad_width 468;
google_ad_height 60;
google_ad_format "468x60_as";
google_ad_type "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script>
    </
td
</
tr
</
table
</
div
$spacer_close
</if> 
</if>  
<!-- 
END Google Ads for NON Members --> 
can;t seem to get that to show up.

Edit.

mmmmk I ASSUMED the code for having only certain users see it was ment for users who COULD see it. but its for thoser you DONT want to see it. works perfectly now.
Reply With Quote
  #186  
Old 06-20-2006, 11:58 AM
MaK10 MaK10 is offline
 
Join Date: Apr 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so google emailed me claiming im in violation of their policy, but only in one section of the forum, which is a "not work safe" section. So I need to exclude a certain forum id from posting adsense, any ideas? Just a conditional at the top of the code right? any help would be appreciated, thanks

*EDIT*

nevermind, found the answer.
Reply With Quote
  #187  
Old 06-24-2006, 12:23 PM
Truckerwife Truckerwife is offline
 
Join Date: Jun 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, we have this installed and now post 3 and on are wider than the first 2. anythoughts?
Reply With Quote
  #188  
Old 06-28-2006, 09:52 PM
theChronic theChronic is offline
 
Join Date: May 2006
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get this working, even using an unaltered version of what the hack says. Does anyone have the code for the latest working version of this?
Reply With Quote
  #189  
Old 07-02-2006, 10:29 AM
SHalliday's Avatar
SHalliday SHalliday is offline
 
Join Date: Jan 2002
Location: Norwalk, CT
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I now have this working on VB3.54 without any problems. Have tested in IE and Firefox with QuickReply Box on. It displays the Google adsense ad after the last post when there are two or more posts in the thread. It does not display when there is only one post in the thread. Here is the code that I used:

Code:
<!-- Google Ad  -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
$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</td>
</tr>
<tr>
<td class="alt1" align="center">
<*** ADSENSE SCRIPT CODE HERE***> 
</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->
Thank you very much for the great hack and to all of you who participated in this thread. "Clicked Install"

.
Reply With Quote
  #190  
Old 07-02-2006, 10:56 AM
Zowners Zowners is offline
 
Join Date: Dec 2005
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would I get adsense ads to shw up to guests only, after the first post?
Reply With Quote
  #191  
Old 07-02-2006, 11:33 AM
theChronic theChronic is offline
 
Join Date: May 2006
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im about to fall asleep, but its something like this

Code:
<if condition="$post[postcount]!=1 and $post['islastshown'] and $show['guest']">
I will tell you exact code I have that is working and clean when i wake up, sorry but i'm too wiped to login etc right now

peace
john
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: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.04641 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (3)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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