Subscribe to
NSLog(); Header Image

vBulletin AdSense Revenue Sharing

There have been several "hacks" for vBulletin that allowed revenue sharing of ads shown through Google's AdSense program. First there was a hack from AlexanderT, then one from a fellow named "cinq" who has since fallen off the planet, and just today I found one from "webmastershome". There's also a $150 option from Steve Fleming, but I have several professional issues with Mr. Fleming's approach (not the least of which is his apparent lack of knowledge of the several free albeit outdated options available).

I PMed AlexanderT and was told that, when he upgraded to vBulletin 3.6.0 (he's still using 3.1.x), he'd likely update his hack and make it available to all. That still put me in a bind.

vBulletin disallows use of PHP in templates, making this whole thing a total pain. phpinclude_start and phpinclude_end seemed like valid solutions, but I wasn't sure how they'd work, and setting the variables before I even knew who had posted seemed silly.

I came up with a simple JavaScript solution I hope works. It's below.

<if condition="$post[postcount]%9 == 1">

<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <td class="thead" align="left">Google Ad (Find out how <a href="" title="You too can participate" style="color: #000;">you can participate</a>, too!)</td>
    <td class="alt1" align="center">
    <div class="smallfont" align="center">    
        <script type="text/javascript"><!--
        if('$post[field5]' == '' || $post[posts] <= 100 || $post[reputation] < 10)
            google_ad_client = "pub-my_adsense_id_here";
            google_ad_channel = "";
            google_ad_client = "$post[field5]";
            google_ad_channel = "$post[field6]";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_color_border = "F6F6F6";
        google_color_bg = "F6F6F6";
        google_color_link = "000";
        google_color_url = "666";
        google_color_text = "333";
        <script type="text/javascript" src=""></script>



3 Responses to "vBulletin AdSense Revenue Sharing"

  1. I don't get you have done here with that code :).
    What's that for?
    Do you know any adsense revenue sharing script for vb 3.6?
    Thanks in advance!

  2. The code does revenue sharing for vB 3.6. If you aren't sure what it does, I'm not sure what to tell you. It works.

  3. Erik -
    I like what you've done there. Two questions:

    1) How would this work for the vb header ad?


    2) Is this really sharing revenue because it looks like it will always credit the account of the post author?