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

Reply
 
Thread Tools
Put - Embed Google AdSense inside - beside - in first post [Just template edit] Details »»
Put - Embed Google AdSense inside - beside - in first post [Just template edit]
Version: 1.00, by abdobasha2004 abdobasha2004 is offline
Developer Last Online: Sep 2019 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 09-02-2009 Last Update: Never Installs: 29
Template Edits
Re-useable Code Translations  
No support by the author.

This template edit will make any adsense code or even any advertisement code run beside and embedded in the first post of showthread

as seen on : http://www.nmisr.com/vb/ - e.g : http://www.nmisr.com/vb/showthread.php?t=34327

screen shot :

Value :
1- Markedly increases CTR
2- better look than other places
3- Any code can be implemented
4- Other Ad networks also can be used, you can put any thing beside every first post

Steps :
Find template : postbit
Find :
Code:
<!-- message -->
After it put :
Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
       <div class="postbit_adcode">
<span style="float: right; width: 340px; height: 285px;">
			Your Code Goes Here
</span>
</div>
</if>
you should notice that you can edit values in Green to suit your ad.
float : right or left ... as you like
width : ad width in pixels (usually give some extra 3 or 5 pixles for better look)
height : ad height in pixels (usually give some extra 3 or 5 pixles for better look)

Show Your Support

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

Comments
  #22  
Old 11-22-2009, 08:57 PM
isatice's Avatar
isatice isatice is offline
 
Join Date: Mar 2008
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by maxie View Post
works only in ( (Vertical) Postbit Template )


any idea how to works in postbit Template not in ( (Vertical) Postbit Template)
add those codes to postbit_legacy instead of postbit
Reply With Quote
  #23  
Old 11-22-2009, 08:59 PM
isatice's Avatar
isatice isatice is offline
 
Join Date: Mar 2008
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyway this is a great mod but it would be greater if it could add adsense to first post of each page instead of first post of each thread
Reply With Quote
  #24  
Old 11-28-2009, 10:42 PM
4ums 4ums is offline
 
Join Date: Oct 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot seem to do this do i just copy paste into the bit under message i know how to do it but not what to put in can you help thank you.
Reply With Quote
  #25  
Old 11-29-2009, 12:03 AM
4ums 4ums is offline
 
Join Date: Oct 2009
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can do it but it just blanks out all posts can you help a stressed person lol
been trying for hours
Reply With Quote
  #26  
Old 12-05-2009, 04:04 PM
AshMagic AshMagic is offline
 
Join Date: Nov 2008
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I edit this so the ad shows on the 2nd or 3rd post?

Thanks.
Reply With Quote
  #27  
Old 12-08-2009, 07:53 PM
Mum Mum is offline
 
Join Date: Jun 2006
Location: New Zealand
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've added this code when you've stated - but can't get anything to show at all, it just doesn't seem to affect my site at all. can you please help me?

Code:
        <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
       <div class="postbit_adcode">
<span style="float: right; width: 478px; height: 70px;">
<!--/* OpenX Javascript Tag v2.8.1 */-->

<script type='text/javascript'><!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'https://mummybrain.com/openx/www/delivery/ajs.php':'http://mummybrain.com/openx/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=1&amp;target=_blank");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://mummybrain.com/openx/www/delivery/ck.php?n=a63c7b09&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://mummybrain.com/openx/www/delivery/avw.php?zoneid=1&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a63c7b09' border='0' alt='' /></a></noscript>

</span>
</div>
</if>
        <div id="post_message_$post[postid]">$post[message]</div>
        <!-- / message -->
Reply With Quote
  #28  
Old 12-08-2009, 09:11 PM
GTX2 GTX2 is offline
 
Join Date: May 2006
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm looking to install this, but display ads in the middle of the post.
check attached image please

Any way of doing this?
Attached Images
File Type: jpg img1.jpg (57.6 KB, 0 views)
Reply With Quote
  #29  
Old 12-08-2009, 11:16 PM
ahmedeldeep's Avatar
ahmedeldeep ahmedeldeep is offline
 
Join Date: Jun 2007
Location: Egypt
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

تسلم يا غالى
Reply With Quote
  #30  
Old 03-04-2010, 05:05 PM
wacnstac wacnstac is offline
 
Join Date: Nov 2001
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is an awesome placement for an ad, but it will get screwed up on my fixed width forum is someone puts a large picture in the first post. Is there anyway a conditional could scan to see if an image is present in the post and to not display the ad if there is an image?
Reply With Quote
  #31  
Old 03-27-2010, 08:20 PM
Levi75 Levi75 is offline
 
Join Date: Aug 2007
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When the first post contains a quote answer, ads show above the quote block. Is it possible to display beside the quote block?
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 11:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07781 seconds
  • Memory Usage 2,333KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete