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

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

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 02-27-2007 Last Update: 03-02-2007 Installs: 171
Template Edits
 
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-04-2007, 03:29 AM
banuchi2 banuchi2 is offline
 
Join Date: Nov 2004
Location: Boca Raton, FL
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For some reason, the ad is only showing in the first post and not the last. I have 2 questions...

1) How can I get this to show in the last post?
Update: Ahhh....Google states: "Please place only one link unit on any content page. This number does not affect the current limit of 3 regular ad units on any page - you may still place up to 3 regular ad units in addition to a single link unit on any content page"
U
2) If I wanted it to show in every post, what changes are necessary.
Answered my own question...there's a limit of 3
Thanks!
Reply With Quote
  #13  
Old 03-04-2007, 10:43 PM
perju perju is offline
 
Join Date: Feb 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works great, but QUOTES and IMGs generate undesirable results. I had to uninstall because of this.

--
Edit: I'm guessing the only way this mod would work would be if it checks to see if the post contains a quote or an img. If neither of those elements are present, then the adsense code would appear.
Reply With Quote
  #14  
Old 03-05-2007, 12:01 AM
soletrader soletrader is offline
 
Join Date: Jul 2006
Posts: 340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to limit the ads to show only if there are greater than X words on that post?
Reply With Quote
  #15  
Old 03-08-2007, 01:59 PM
kontrabass kontrabass is offline
 
Join Date: Feb 2002
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack and just in time - have been talking to a Google Adsense rep about optimizing my site, the rectangle in the first post is their top suggestion. And for guests only, this is perfect.

Stupid question: How do I modify it so that the ad is only displayed in the first post and not the last?

[installed]
Reply With Quote
  #16  
Old 03-08-2007, 02:18 PM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice to see u here unitedpanjab
looks promising modification..
will use it..if the adsense only shown in last post & shown to every one..& without any conflict along with [quote] & [img] tags..seems it will generate more clicks...

clicks install to get future notification/update...
Reply With Quote
  #17  
Old 03-16-2007, 01:14 PM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did anyone check whether this works with Yahoo Publishers Network YPN?
Reply With Quote
  #18  
Old 03-16-2007, 01:39 PM
unitedpunjab unitedpunjab is offline
 
Join Date: Feb 2006
Location: Scotland
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't see why it should not work.
Reply With Quote
  #19  
Old 03-19-2007, 10:32 PM
magnaromagna magnaromagna is offline
 
Join Date: Oct 2005
Location: Solarolo, Italy
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack.
how to put it at the top of the message? The ads is on the middle of the first message, I'd like to put it at the top. Adding vAlign=top ?
Reply With Quote
  #20  
Old 03-20-2007, 04:21 AM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It was a simple install, but it's not working... any ideas? I know that's vauge, but it's just not working?!?

Here is what I have
Code:
<!-- / icon and title -->
		</if>
		
        <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
//2007-03-19: Forum
google_ad_channel = "2290601347";
google_color_border = "F5F7F9";
google_color_bg = "F5F7F9";
google_color_link = "003265";
google_color_text = "000000";
google_color_url = "0066CC";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</span>
</if>

    <div id="post_message_$post[postid]">$post[message]</div>
              <!-- / message -->
Reply With Quote
  #21  
Old 03-21-2007, 11:32 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no news yet ???
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 10:40 AM.


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.05493 seconds
  • Memory Usage 2,301KB
  • 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
  • (5)bbcode_code
  • (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