Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adsense Revenue Sharing for 3.5.x and 3.6.x Details »»
Adsense Revenue Sharing for 3.5.x and 3.6.x
Version: 1.00, by kenji4861 kenji4861 is offline
Developer Last Online: Jul 2016 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.4 Rating:
Released: 12-29-2006 Last Update: Never Installs: 197
 
No support by the author.

Overview
This hack will allow you to offer Google Adsense revenue sharing to your vBulletin board users. Basic idea generated by AlexanderT, who developed the hack for previous version.

* Revenue is split between board administrator and thread starters.

* User needs to enter their Adsense Publisher ID and Channel ID (optional) in the edit profile.

* The percentage of probability is customizable by the administrator

* Number of min. post in order to show the ads is customizable by administrator.

* Works on 3.5.x and 3.6.x



Demo
http://www.spoofee.com/forums/



Background
Thanks to webmastershome for creating this and rob30uk for making it easier by creating a plugin and I suppose myself for small tweak


Instructions ( literally takes 5 minutes to install )

1. Download zip file and extract ( 3 files : adsense_admin.php, adsense_revenue_sharing.xml, cpnav_adsensesharing.xml )


2. Add Adsense Client ID and Channel ID to your user profile fields
1. Add the following following new user profile field in AdminCP:
Type: Single-Line Text Box
Title: Google AdSense Client ID
Description: If you have an AdSense account, you can enter your client ID here. You then have a 50% chance that the AdSense ads displayed are credited to your account on threads you participate in. It should be in the form of <b>pub-xxxxxxxxxxxxxxxx</b>
Max length of allowed user input: 20
Display Size: 25
Field Required: No
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No

2. Add the following following new user profile field in AdminCP:
Type: Single-Line Text Box
Title: Google AdSense Channel ID
Description: If you choose to enter your AdSense client ID, you can specify a channel ID as well.<br /><br />It would be a good idea to have a unique channel ID for this forum (then you can track stats specifically for the forum).<br />
Max length of allowed user input: 10
Display Size: 25
Field Required: No
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No


3. Go back to userfield manager and get the field# of the two new fields you created. (ex : field5, field6)


4. Open adsense_revenue_sharing.xml and change the field5 to whatever your adsense field# is and field6 to whatever your channel field# is


5. Add Adsense snippet in your style
- Go to Admincp->Styles & Templates->Style Manager->Edit Templates->Post Bit (if you are using legacy style, choose to edit "Post Bit Legacy"

Add the following to the bottom of your postbit.
Code:
<if condition="$post[postcount] == 1">
<if condition="THIS_SCRIPT == 'showthread' AND ($post[postid] == $GLOBALS['qrfirstpostid'])">
<if condition="$show['spacer']">$spacer_open<div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if>

<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" bordercolor=white width="100%" align="center">
<tr><td class="alt1" style="padding:0px">
<div class="smallfont" align="center">
                <script type="text/javascript"><!--
                google_ad_client = "$post[ad_client_id]";
                google_ad_width = 728;
                google_ad_height = 90;
                google_ad_format = "728x90_as";
                google_ad_channel ="$post[ad_channel]";
                google_color_border = "FFFFFF";
                google_color_bg = "FFFFFF";
                google_color_link = "000000";
                google_color_url = "666666";
                google_color_text = "333333";
                //--></script>
                <script type="text/javascript"
               src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script>
</div></td></tr></table>

<if condition="$show['spacer']"></div>$spacer_close</if>
</if>
</if>

6. Import adsense_revenue_sharing.xml plugin


7. Upload cpnav_adsensesharing.xml to forums/includes/xml/


8. Upload adsense_admin.php to forums/admincp/


9. Configure
- Go to admincp, now you will see "Adsense Share Settings" where you can configure how much revenue you want to share!

10. Click here to mark it as INSTALLED!

Show Your Support

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

Comments
  #72  
Old 02-10-2007, 05:24 AM
Profusehost Profusehost is offline
 
Join Date: Sep 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tsptom View Post
Question - will a member see his own ads when he is logged into the board, or has this been programmed to use the site's owner's Client-ID in that case?
that's what i am worried about. I am not sure if this script prevents users from seeing their own ads when they are logged in and also its important to prevent people from unknowingly click on their own ads. I guess once can warn all forum members to never click on any google ads.
Reply With Quote
  #73  
Old 02-10-2007, 12:46 PM
jamsiejay jamsiejay is offline
 
Join Date: Sep 2006
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have tried some reccomendation i got vie pm but they did not work.

I just cannot see what it is in the mod that only allows it to be used with postbit if i knew this i could change it to work forum wide.

I find it strange nobody knows how to do this i mean there must be dozens of mod programmers here that know how to fix it please i need some help.
Reply With Quote
  #74  
Old 02-18-2007, 11:49 AM
milsirhc's Avatar
milsirhc milsirhc is offline
 
Join Date: Jan 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know if I implement this script, 3 times on a single thread page (ie: the header, the 1st and last post), will all 3 advertisement be showing the same adsense account (ie: goes by the 50% rule, will all 3 show the same adsense account or will 1 show the admin, the other ones showing the post starter account)

This is a huge concern as we all know Google does not allow 2 different accounts to be shown on the same page.

Does anyone know?

Thanks!
Reply With Quote
  #75  
Old 02-18-2007, 03:28 PM
tsptom tsptom is offline
 
Join Date: Jan 2006
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
will all 3 advertisement be showing the same adsense account
I could be wrong, but I think the answer is no. It seems Google is OK with multiple ads from different accounts. But I will contact a Google rep and find out for sure.

If you do add the code you are talking about 'as is' into the header or last post, you may not see an Adsense ID at all in those 2 ads. That's what happened to me.

Since no one seemed to be able to help, I went ahead and kept the header ad as my own, then I used code that will give credit to whomever made the post prior to any ad shown. If they don't have an adsense account, it will use my number.

The code below will put an ad after the 1st post in a thread and after every 9th post thereafter. It will only kick in after the member has 50 or more posts. If the author of the post has not set up an Adsense account, it will use your ID.

If I can find the link to where I got most of this code I'll add it. I didn't write it myself.
(here it is - http://nslog.com/2006/08/18/vbulleti...evenue_sharing)

Code:
 <!-- / Google AdSense in Posts begin -->

<if condition="$post[postcount] == 1 OR $post[postcount] % 9 == 0"> 
<if condition="THIS_SCRIPT == 'showthread' AND  $post[postid] == $GLOBALS['qrfirstpostid']">   </if>

<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>

<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']">
   <!-- this is not the last post shown on the page -->
    </if>    
</if>

<table class="tborder" id="post$post[postid]" align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tbody><tr>
   <td class="thead" id="td_post_$post[postid]">  
   <div class="normal">
        &nbsp;
     </div>
    </td>
</tr>
<tr>
    <td class="alt1" align="center">
        <div>
    <!-- Adsense standard banner start -->
       <center>
<script type="text/javascript"><!--
if('$post[field6]' == '' || $post[posts] <= 50)
        {
            google_ad_client = "pub-xxxxxxxxxxxxxxxx";  <-- Your ID
            google_ad_channel = "";
        }
        else
        {
            google_ad_client = "$post[field6]";
            google_ad_channel = "$post[field7]";
        }
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = ["f5f5ff"];
google_color_bg = ["f5f5ff"];
google_color_link = "0000FF";
google_color_url = ["000000","008000","008000","008000"];
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>     <!-- Adsense standard banner End -->
        </div>
    </td>
</tr>
</tbody>
</table>
</if>
</if>

<!-- / Google AdSense in Posts end-->
Reply With Quote
  #76  
Old 02-19-2007, 08:54 AM
milsirhc's Avatar
milsirhc milsirhc is offline
 
Join Date: Jan 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the help tsptom but I don't think I will like to implement as such..

Hmm.. seems like no one can come up with something solid like what digitalpoint has done and also kinda dissapointing to see this plugin not fully supported by the author.. (but it's free, so I'm not complaining!). Let's hope how this plugin will go on develop after few weeks.
Reply With Quote
  #77  
Old 02-19-2007, 12:09 PM
milsirhc's Avatar
milsirhc milsirhc is offline
 
Join Date: Jan 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I read thru the codes.. and I think having the variables as global variable will prevent the adsense id to dissapear.

I'm still playing around with it.. but hmm.. it's tricky.
Reply With Quote
  #78  
Old 03-04-2007, 01:41 AM
michaelsilvia michaelsilvia is offline
 
Join Date: Jul 2005
Location: South Korea
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you set this by usergroup? I would like only my moderators and admins to get the revenue sharing.

Mike
Reply With Quote
  #79  
Old 03-20-2007, 01:54 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by joeychgo View Post
Can this be usergroup controlled -- so I can only allow a particular usergroup(s) to participate?
I would like to see this to.
Quote:
Originally Posted by TeamDevotion View Post
Is this not against google's TOS for adsense, since you are not allowed to modify their coding, you must directly copy and paste their premade markup
I was wondering the same thing.
Quote:
Originally Posted by michaelsilvia View Post
Can you set this by usergroup? I would like only my moderators and admins to get the revenue sharing.

Mike
Mike my best idea would be to edit memberinfo template and the userfield_textarea ot userfield_textbox(in profile field templates) field templates. Then insert an if condition to show these fields to certain user groups.


Is any one else noticing this add one query per post?
Reply With Quote
  #80  
Old 03-20-2007, 02:03 PM
RedTyger's Avatar
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Location: UK
Posts: 1,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xplorer4x4 View Post
I was wondering the same thing.
I can't speak for anyone else, but I wrote to Google and asked them for permission to implement Ad-Sharing on my forum and they had no problem with it. There isn't really any other practical way to implement ad-sharing and besides, only the publisher ID is shared. The markup is still exactly as Google specify.
Reply With Quote
  #81  
Old 03-23-2007, 07:27 AM
clasione clasione is offline
 
Join Date: Aug 2004
Location: NY
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This doesn't seem to be working on my forum... I just implemented it... I am running the lastest version of vb(vBulletin 3.6.5)

I installed this mod and have been testing it with a user who has entered his info..... I had him post a thread for testing:

I would assume since I have the Percentage Share set to: 50%

I should see his pub codes half of the time or 50% of the page loads and I do not see this happening at all on his thread:
http://www.searchen.com/forum/showthread.php?p=12526
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 05:10 AM.


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.04819 seconds
  • Memory Usage 2,331KB
  • 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
  • (2)bbcode_code
  • (6)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
  • (1)pagenav_pagelinkrel
  • (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