vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Adsense Integration as last post - StarBuG optimized blending (https://vborg.vbsupport.ru/showthread.php?t=249053)

StarBuG 08-20-2010 10:00 PM

Adsense Integration as last post - StarBuG optimized blending
 
1 Attachment(s)
Introduction:
I am StarBuG, a clinical Physician for Children, and I am running several health Forums to support patients with medical questions. During the many years I am running my Forums I constantly worked on optimizing my Advertising integrations to maximize my earnings and the user experience using my forums. The click through rates for my Adsense integrations are good to very good for forums and may increase due to further optimizations so mark this mod as installed if you use it to make sure you always use the best optimized version of my adsense integration.

What this mod does:
This mod adds a Google Adsense large rectangle after the last post of each thread if the thread has at least one reply.
It is blended to look like a regular post in your thread without violating google adsense TOS. Make sure you use the same colors you use on your forum to optimize blending!

Installation instructions:

in the template SHOWTHREAD find:

Code:

<div class="separator"></div>
and add below:

Code:

<vb:if condition="$show['guest'] AND !$thread[replycount] == 0">
<ul>
<li class="postbitlegacy postbitim postcontainer" id="post_{vb:raw post.postid}">
<!-- see bottom of postbit.css for .userinfo .popupmenu styles -->

    <div class="posthead">&nbsp;&nbsp;<img title="Alt" src="./images/statusicon/post_old.png" alt="Alt" border="0" /><span class="date">&nbsp;<a href="http://www.DOMAIN.COM/register.php" style="color:#FFFFFF; text-decoration:underline;">(No Advertising after the last post? Register now for free!)</a></span></div>
    <div class="postdetails">
        <div class="userinfo">
            <div class="username_container">
              <br />
                <span style="font-weight:bold;font-size:14px;margin-left:0px;color:#000000;">Advertising</span><br /><br />
                <img src="http://www.DOMAIN.COM/images/logo_ads.png" width="90px" height="90px" alt="advertising" title="advertising" />
                <dl class="userinfo_extra">
        <dd>Forumname.com</dd>
        <dd>has no influence</dd>
        <dd>on advertisings</dd>
        <dd>that are displayed by</dd>
        <dd>Google Adsense</dd>
        </dl>
            </div>
        </div>
        <div class="postbody">
          <br />
          &nbsp;&nbsp;<!- Your Google Adsense Code for a 336x280px large rectangle -->
        <div class="cleardiv"></div>
        </div>
    </div>
        <div class="postfoot">
            <div class="textcontrols floatcontainer">
                <span class="postcontrols">&nbsp;</span>
            </div>
        </div>
    <hr />
</li>
</ul>
</vb:if>

Additional Comments:
Make sure you change all lines marked RED to fit your forum.
For better blending I use my Websites Logo as "Avatar" to make it look more like a post. For the same reason I added the "we have no influence..." part below the "Avatar". You can remove the whole "userinfo_extra" part if you don't like the text.

This Advertising will only be shown if a thread has at least 1 reply because I display 2 large rectangles in each thread to guests. One after the first post and this one after the last. If a thread has 0 replies both advertisings would show below each other and that would be to much. If you don't use "Adsense Integration as second post - StarBuG optimized blending" simply remove the condition:

Code:

AND !$thread[replycount] == 0
Screenshot:
https://vborg.vbsupport.ru/external/2010/08/26.png

More of my Adsense Integrations:
Demo:
Patientenfragen.net - we have the answers

Of course feedback is welcome and if you have suggestions to further improve CTR please let me know!

StarBuG

https://vborg.vbsupport.ru/

Google isn't paying you enough money! Discover WHY!

StarBuG 08-21-2010 11:54 AM

First post reserved

krustyx 08-21-2010 01:19 PM

For me, banner is not showing

StarBuG 08-21-2010 01:23 PM

There are several possible reasons for that:

1. You are logged in. Currenty the advertising is shown to guests only. If you don't want that remove the condition "$show['guest']"
2. You just created your adsense code. It takes up to 15 Minutes after creating a new adsense code for the advertising to show
3. You forgot to replace the "<!- Your Google Adsense Code for a 336x280px large rectangle -->" part with your adsense code

Hope this helps

krustyx 08-21-2010 01:44 PM

Working, it was the 15 minutes thing ;) Thank you!

YankForum 09-12-2010 06:13 PM

tnx so much

mauro269 09-17-2010 02:48 PM

Hi my friend,
you have made a great mod to integrate adsense. However I've a question. I'm using both "Adsense Integration as second post" and "Adsense Integration as last post" but when I'm on the 2nd page (or 3rd, 4th, etc...) and there's only one message on the new page, I see both Adsense Messages one near the other.

Click on this link to see what I say: http://img10.imageshack.us/img10/104...0917a17465.png

Is there a way to tell the script to not show the Adsense banner after the last post in these situations?
Thanks for your attention.

StarBuG 09-19-2010 05:56 PM

Not an elegant solution as far as I know.

What you can try is if you have e.g. 15 posts per page then add as condition(s):

Code:

AND !$thread[replycount] == 16 AND !$thread[replycount] == 31 AND !$thread[replycount] == 46
(page number * post per page +1) but maybe someone has a more elegant solution for this

adeel80 09-26-2010 06:02 PM

This is just great!

Your websites are excellent examples of how to display ads on forums.

baghdad4ever 02-02-2011 08:08 AM

thanks

installed

but doesnt appear?


All times are GMT. The time now is 11:03 PM.

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.02955 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete