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
  #92  
Old 04-25-2008, 09:09 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am sorry, is it the tumbnail break TOS or not??

isnt we need border so not break TOS??

Reply With Quote
  #93  
Old 04-26-2008, 09:18 PM
hnjco hnjco is offline
 
Join Date: Jul 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?
Reply With Quote
  #94  
Old 05-28-2008, 03:50 PM
saka saka is offline
 
Join Date: May 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hnjco View Post
installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?
same as me. it didnt work.
Reply With Quote
  #95  
Old 05-31-2008, 10:10 PM
newguy's Avatar
newguy newguy is offline
 
Join Date: Nov 2007
Location: USA
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you have to do to keep your edit, quote, multi quote ect images under the adsence unit? Also I noted that the content moves around based on the post. Like if the member has a signature or if the post has a quoted post in it.
Reply With Quote
  #96  
Old 06-04-2008, 10:31 PM
da_judge's Avatar
da_judge da_judge is offline
 
Join Date: Jan 2006
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works very well if thread is a long one or you have big signiture...

If short post dont look good at all

Any ideas on best way round it

Attached pic

Cheers
Reply With Quote
  #97  
Old 06-05-2008, 07:15 PM
da_judge's Avatar
da_judge da_judge is offline
 
Join Date: Jan 2006
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I worked this out

If you want it under post slightly

Search for
Code:
<!-- controls -->
in postbit

After add

Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 201px; height: 201px;">
<script type="text/javascript"><!--
google_ad_client = "pub-3894247933641517";
/* 200x200, created 04/06/08 */
google_ad_slot = "9908865295";
google_ad_width = 200;
google_ad_height = 200;
google_cpa_choice = ""; // on file//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</span>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</if>
This will correct the button thing...

Depending on what skin you may need to add or remove some of the <br>

Attached what it does

Cheers
Reply With Quote
  #98  
Old 06-14-2008, 11:21 PM
Mike Vollmer Mike Vollmer is offline
 
Join Date: May 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been trying to incorporate this into my 3.7.0 vB today, two problems become apparent:

1. A lot of experienced users set their profiles to show the newest posts first. Basing your condition on ($post[postcount] % $vboptions[maxposts] == 1) is selecting the first post ever made in the thread, not the first post viewed. If you're trying to max ad revenue by putting that 300x250 rectangle in the first ad viewed, this has the opposite effect -- it's buried at bottom of the page for user who have chosen to view newest first.

2. 3.7.0 allows threaded & hybrid views, with a preset # of cached posts. Selecting based on ($post[postcount] % $vboptions[maxposts] == 1) seems to work for the posts that are displayed initially, but if that post is later retrieved from the cache & shown again, the ad is missing, although the post is still formatted as if it were there -- with 300x250 pixels of white space on the right side.

I doubt most of my potential users are sophisticated enough to care (or even notice) if the threaded/hybrid views are missing, so I've simply disabled them. However, a workaround for the first problem would be nice.

Later (and yes, I did sleep): This code addresses the first problem above:
<if condition="(

(($bbuserinfo[postorder] == '') and
($post[postcount] % ($bbuserinfo[maxposts] == -1 ? $vboptions[maxposts] : $bbuserinfo[maxposts]) == 1))

or

(($bbuserinfo[postorder] != '') and
($GLOBALS[qrfirstpostid] == $post[postid]))

)">
Evaluating $bbuserinfo[postorder] tells me whether the user is displaying newest or oldest first. Total post count seems not to be available, but the first post that is displayed on the screen is flagged by $GLOBALS[qrfirstpostid] == $post[postid].

Another potential problem is the use of $vboptions[maxposts] in the original mod. If user has elected to display more than the default # of posts per page, the condition potentially could be satisfied as many as 3 times & push the page over one of AdSense's max-ads-allowed limits. Using $bbuserinfo[maxposts] is preferable, but because it has a default value of -1, the conditional evaluation above is needed.
Reply With Quote
  #99  
Old 07-16-2008, 12:31 AM
balance12 balance12 is offline
 
Join Date: Sep 2007
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using Version 3.7.1. I do this and it dont shows me nothing.. i use postbit_legacy... i algo return to the original and re code the mod.... nothingg.. what it might be?
Reply With Quote
  #100  
Old 09-05-2008, 07:44 PM
zerokarma zerokarma is offline
 
Join Date: Oct 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to restrict this by a certain style rather then usergroup?
Reply With Quote
  #101  
Old 11-28-2008, 08:13 PM
Desi-Home Desi-Home is offline
 
Join Date: May 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It moves up the buttons of reply, quotes etc. Is there a way i keep them down even if the post is not too long?
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:16 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.05320 seconds
  • Memory Usage 2,312KB
  • 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
  • (1)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