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
  #252  
Old 11-26-2006, 04:19 PM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[COLOR="Black"]
Quote:
Originally Posted by Greek76 View Post
This does not work for me period. any ideas? I did the code exactly as it was shown and added my google code inbetween no luck though. IM using 3.6.2
This the the code I use to place the ad after the last post. I don't like it after the first post. I feel it aggravates my members.

Place this code at the very end of your Postbit_legacy template.

This works in all versions of 3.6

Code:
 
<!-- Adsense After LAST Post -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
<!-- GOOGLE AD -->
<br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">        
        Sponsored Links
    </td>
</tr>
<tr>
    <td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>


Paste you Google Adsense Code Here


</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->
Reply With Quote
  #253  
Old 11-26-2006, 06:14 PM
Greek76's Avatar
Greek76 Greek76 is offline
 
Join Date: Aug 2006
Location: Planet Earth
Posts: 440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great thanks alot. The problem was is that Im using postbit legacy as opposed to postbit template. Thanks for the code as well for keeping it in the bottom of the posts...
Reply With Quote
  #254  
Old 11-26-2006, 09:53 PM
burntire burntire is offline
 
Join Date: Jun 2006
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Greek76 View Post
Great thanks alot. The problem was is that Im using postbit legacy as opposed to postbit template. Thanks for the code as well for keeping it in the bottom of the posts...

Glad it works
Reply With Quote
  #255  
Old 12-07-2006, 01:21 AM
tansu's Avatar
tansu tansu is offline
 
Join Date: Apr 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar View Post
What's more fun and challenging - because of ajax issues, is adsense in the last post. That really gets the ad right where the reader's eyes are.

http://www.eaforums.com/forums/364919-post1.html

Find:
Code:
<!-- message -->
		<div id="post_message_$post[postid]">$post[message]</div>
		<!-- / message -->
Add above:
Code:
		<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">


<span id="google" style="float:left;margin:2px;" width="340" height="290" align="center" valign="top">
put banner code here
</span></if>
This worked for me.. Thanks.
I tried to make it only visible to guests.. But couldn't
The starting is like this: What should I add to make it only visible to guests.
Code:
<if condition="(($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
Reply With Quote
  #256  
Old 12-13-2006, 09:05 PM
Nuguru Nuguru is offline
 
Join Date: Jun 2006
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Everyone,

I know this has been asked before, but no one has seemed to answer it, so I am going to ask it again. Besides, I am sure that are still several people including myself that is experiencing this issue.

This is a really good hack other than the fact that after it's installed, it also shows up in the personal message due to it being in the postbit_legacy file. It's not that it shows up in the personal message that is the problem, the problem is, is that it does not fit properly in the personal message page (below the message box itself).

However, if I change the formatting code to make it fit in the personal message page, then it does not show up properly after the 1st post in a thread. A catch 22 situation.

Therefore, I either need to find a way to fix the formatting so that it fits in both sitiuations or make it so that it does not show up in the personal message.

I do want to use the code and not want to have to delete it because it won't show up properly in the personal message, so I need some help.

Anyone know how to fix the code for either situations?


Thank You,

Nuguru
Reply With Quote
  #257  
Old 12-30-2006, 07:47 PM
Kesmai Kesmai is offline
 
Join Date: Dec 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code for adsense within the first and last post is not working. I added it below <!-- / message -->

Quote:
<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al";
google_ad_channel = "5534775962";
google_color_border = "E2ECEF";
google_color_bg = "E2ECEF";
google_color_link = "E1771E";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</if>

I'm using 3.6.4
Reply With Quote
  #258  
Old 12-30-2006, 07:50 PM
Kesmai Kesmai is offline
 
Join Date: Dec 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, it worked perfect in postbit but it is DOA when you put it in postbit_legacy
Reply With Quote
  #259  
Old 01-02-2007, 10:49 PM
Nuguru Nuguru is offline
 
Join Date: Jun 2006
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nuguru View Post
Hello Everyone,

I know this has been asked before, but no one has seemed to answer it, so I am going to ask it again. Besides, I am sure that are still several people including myself that is experiencing this issue.

This is a really good hack other than the fact that after it's installed, it also shows up in the personal message due to it being in the postbit_legacy file. It's not that it shows up in the personal message that is the problem, the problem is, is that it does not fit properly in the personal message page (below the message box itself).

However, if I change the formatting code to make it fit in the personal message page, then it does not show up properly after the 1st post in a thread. A catch 22 situation.

Therefore, I either need to find a way to fix the formatting so that it fits in both sitiuations or make it so that it does not show up in the personal message.

I do want to use the code and not want to have to delete it because it won't show up properly in the personal message, so I need some help.

Anyone know how to fix the code for either situations?


Thank You,

Nuguru


Hello and Happy New Year from WebbinZine.com,

Again, does anyone know how to fix this sizing and spacing issue between the PM and after the 1st post?


Thank You,

Nuguru
Reply With Quote
  #260  
Old 01-05-2007, 12:33 AM
BigJimTheLug BigJimTheLug is offline
 
Join Date: Nov 2006
Posts: 354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
I'm having a slight problem with the Adsense displayed in the first post. I'm using this code to display the ads:
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

But then it gives me an alignment problem when the post is short. How can I fix this problem? Thanks.

Reply With Quote
  #261  
Old 01-05-2007, 07:29 AM
Webs007 Webs007 is offline
 
Join Date: Feb 2006
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I am using the code as specified on Page 1 - Works fine - only problem is it puts the code under every post when you click to read a pm - and because of this - pushs he design out, is there a way not to show it when reading messages in the pm center?

Hope someone can help.

Webs
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 09:02 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.05541 seconds
  • Memory Usage 2,331KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (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