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

Reply
 
Thread Tools
Adsense Inside the Post Details »»
Adsense Inside the Post
Version: 1.00, by unitedpunjab unitedpunjab is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.0 Beta 6 Rating:
Released: 03-04-2008 Last Update: Never Installs: 41
Template Edits
Re-useable Code  
No support by the author.

This little template modification allows you to put an Ad inside the post with Text wrapped around the Ad.

See Screenshot.

In postbit template replace
Code:
 <!-- message -->
  <div id="post_message_$post[postid]">$post[message]</div>
   <!-- / message -->
With
Code:
        <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
        ADSENSE CODE HERE
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
              <!-- / message -->
  • you will have to replace ADSENSE CODE HERE with the actual code.
  • The code is for 300 * 250 Medium Rectangle Format,Edit width & height parameters if you want to use any other format.
  • Ad is shown on the first and last post (modify if you want)
  • Ad is shown to guests Only ( remove "and ($show['guest'])" to show to all)
Version History:
v 1.0.1 :Ads displayed after the first post on every page (instead of just the first page)

Tip: To remove quote button for guests.
Replace
Code:
<if condition="$post['replylink']
with
Code:
<if condition="$post['replylink'] AND $show['member']">

Show Your Support

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

Comments
  #12  
Old 03-27-2008, 04:47 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just read their guidelines and didn't see any mention of it.

I'm sure, if they do indeed prohibit the use of ads in this manner that we could simply substitute the code for another code from another ad agency. (as long as the ads look different from those from google's)
Reply With Quote
  #13  
Old 03-28-2008, 02:25 PM
pcoskat pcoskat is offline
 
Join Date: Apr 2002
Location: atlanta
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by abroad View Post
Dont use this script. It is not allowed to use float elements and Iframesfor your Google Ads. I got an email from Google concerning this.
Specifically what were you doing, and what did Google say to you?
Reply With Quote
  #14  
Old 03-28-2008, 02:41 PM
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Location: USA
Posts: 1,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He is correct. You are not allowed to use Iframes -- but the ad can go there.

Here is the correct way:

FIND:
Code:
<!-- message -->
  <div id="post_message_$post[postid]">$post[message]</div>
   <!-- / message -->
Replace with:

Code:
<!-- message -->
        <div id="post_message_$post[postid]">
<if condition="($post[postcount]==1) and ($show['guest'])">
<div style="float: right; margin: 0 0 5px 5px;">
        <script type="text/javascript"><!--
google_ad_client = "pub-0574157151562455";
/* 250x250, created 28/03/08 */
google_ad_slot = "5276949639";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
</if>
$post[message]
</div>
        <!-- / message -->
Change to match your set-up!

Anyway, where would I edit to get my ads to down the right hand side of a thread? Am I right in thinking somewhere in the 'showthread' template?

Regards Jason
Reply With Quote
  #15  
Old 03-29-2008, 02:20 AM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jase2 View Post
He is correct. You are not allowed to use Iframes -- but the ad can go there.

Here is the correct way:

FIND:
Code:
<!-- message -->
  <div id="post_message_$post[postid]">$post[message]</div>
   <!-- / message -->
Replace with:

Code:
<!-- message -->
        <div id="post_message_$post[postid]">
<if condition="($post[postcount]==1) and ($show['guest'])">
<div style="float: right; margin: 0 0 5px 5px;">
        <script type="text/javascript"><!--
google_ad_client = "pub-0574157151562455";
/* 250x250, created 28/03/08 */
google_ad_slot = "5276949639";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
<a href="http://www.techsupportteam.org/register.php" target="_parent"></a>
</div>
</if>
$post[message]
</div>
        <!-- / message -->
Change to match your set-up!

Anyway, where would I edit to get my ads to down the right hand side of a thread? Am I right in thinking somewhere in the 'showthread' template?

Regards Jason

Thanks!

Now why do you have this there for?
Code:
<a href="http://www.techsupportteam.org/register.php" target="_parent"></a>
Reply With Quote
  #16  
Old 03-29-2008, 11:48 AM
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Location: USA
Posts: 1,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't, remove it if you want.

Regards Jason
Reply With Quote
  #17  
Old 04-11-2008, 12:26 PM
Liquid1ce's Avatar
Liquid1ce Liquid1ce is offline
 
Join Date: Feb 2004
Location: /root
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its same for postbit legacy?
Reply With Quote
  #18  
Old 04-12-2008, 03:33 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using mine on postbit legacy. Works fine. Just be sure to use Jase's version (post 13 in this thread) if you are using google for ads.
Reply With Quote
  #19  
Old 04-13-2008, 09:36 PM
netsavy006's Avatar
netsavy006 netsavy006 is offline
 
Join Date: Jan 2008
Location: NY, USA
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not working for me. I was trying it out with Bidvertiser code and it doesn't work:

Code:
        <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=84584&bid=241167" type="text/javascript"></SCRIPT>
<noscript><a href="http://www.bidvertiser.com">affiliate program</a></noscript>
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
              <!-- / message -->
Reply With Quote
  #20  
Old 04-29-2008, 02:41 AM
koolfire koolfire is offline
 
Join Date: Apr 2008
Location: vBulletin
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this kind of add placing is really annoying and makes you think how greedy the admin is..

But hey, thats just me
Reply With Quote
  #21  
Old 04-29-2008, 01:27 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by koolfire View Post
I think this kind of add placing is really annoying and makes you think how greedy the admin is..

But hey, thats just me
I disagree. If it's kept on just the first post of every thread it isn't as annoying. Hey, we've got to try and make our money somehow...
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 03:40 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.04867 seconds
  • Memory Usage 2,315KB
  • 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
  • (10)bbcode_code
  • (3)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
  • (3)pagenav_pagelink
  • (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