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
  #42  
Old 04-15-2007, 12:34 AM
popowich popowich is offline
 
Join Date: Jun 2004
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kpascal View Post
I changed the placement of this mod when I applied it. (link to example) With the ad placed under the post, instead of beside it, I have not experienced an [img] or [quote] problem.
Hello,

Where do you insert the code for this mod to look like your version?

-Raymond
Reply With Quote
  #43  
Old 04-15-2007, 09:12 AM
kpascal kpascal is offline
 
Join Date: Mar 2007
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by popowich View Post
Hello,

Where do you insert the code for this mod to look like your version?

-Raymond

Hi Raymond, instead of using the suggested code below:
Quote:
<!-- 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 -->

I used his instead:
Quote:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>

<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,10,11,12,14)"><br />
<center><span style="margin: 5px; width: 470px; height: 62px;">

ADSENSE CODE HERE

</span></center>
</if>
<!-- / message -->

The !is_member_of($bbuserinfo,10,11,12,14) part of the <if> statement specifies which usergroups do not see the ads.
Reply With Quote
  #44  
Old 04-15-2007, 05:40 PM
abakus abakus is offline
 
Join Date: Dec 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice thanks man
Reply With Quote
  #45  
Old 04-16-2007, 08:27 AM
Digital Girl Digital Girl is offline
 
Join Date: Apr 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod but it does not seem to be working for me?
Reply With Quote
  #46  
Old 04-18-2007, 12:45 AM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anybody?
Reply With Quote
  #47  
Old 04-18-2007, 08:59 AM
Smitty's Avatar
Smitty Smitty is offline
 
Join Date: Sep 2002
Location: Southern Ohio
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Girl View Post
Great Mod but it does not seem to be working for me?
It is working for me, but only shows in the first post.

How do I get it to show in the last post on the page as well as the first post?

Edit Add:

In my postbit I've put
Code:
<!-- Start AdSense Google within post message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) or ($post[islastshown]))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
GOOGLE ADSENSE CODE HERE
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
		<!-- End AdSense Google within post message -->
to work, but if someone uses the 'quick edit' on a post with adsense in it (first or last post in a thread), the ajax of Quick Edit kicks in but the google ad that is there is superimposed over part of the editing box....
Reply With Quote
  #48  
Old 06-01-2007, 08:05 AM
smestas smestas is offline
 
Join Date: Nov 2002
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the great MOD!

I just installed it and it seems to be working for the most part but I did remove the code to show to all users and now I'm getting more then one add per page. Usuall this wouldnt be so bad but I already have 2 other Adsense adds running. Is there a way to keep it only on the first post of every page?

here is and example: http://www.alfabb.com/bb/forums/showthread.php?t=7645


Code:
		 <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
        
<script type="text/javascript"><!--
google_ad_client = "pub-8924331979110227";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text";
//2007-06-01: AlfaBB postbit
google_ad_channel = "3930652802";
google_color_border = "F6F6F6";
google_color_bg = "F6F6F6";
google_color_link = "CC0000";
google_color_text = "333333";
google_color_url = "CC0000";
//-->
</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
  #49  
Old 06-01-2007, 08:18 AM
smestas smestas is offline
 
Join Date: Nov 2002
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmmmmmmmmm....

I just noticed that the adds overlap image attachements. depending on how much text is in the post before the attachments. See my screenshot below.
Reply With Quote
  #50  
Old 06-01-2007, 11:26 AM
Smitty's Avatar
Smitty Smitty is offline
 
Join Date: Sep 2002
Location: Southern Ohio
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to remove the mod. My forum regulars went ballistic. The complaints started rolling in within minutes. Some even complained that when ads showed up in their posts they felt it may appear to some people that they personally 'approved' the advertisement(s). There were also many justification issues (such as overlap noted above) in many posts.

Nice idea, though.
Reply With Quote
  #51  
Old 06-01-2007, 09:39 PM
smestas smestas is offline
 
Join Date: Nov 2002
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone figure out how to fix this so it doesn't show multiple times on a single page?

I can live with the justification problems for now but I would like to control how many times it shows on a single page. Since its showing more then once my other Adsense adds aren't loading.
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:38 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.04947 seconds
  • Memory Usage 2,310KB
  • 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
  • (6)bbcode_code
  • (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
  • (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