The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||
Adsense Revenue Sharing for 3.5.x and 3.6.x
![]() Developer Last Online: Jul 2016 ![]() ![]()
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
|
Comments |
#212
|
|||
|
|||
![]()
Hey guys, I just managed to install this in 3.7.3
|
#213
|
|||
|
|||
![]()
Does this work on Version 3.7.3?
How would you be able to test to see if it is working? ![]() |
#214
|
|||
|
|||
![]()
This has been a great mod for me. Any chance of getting a version for the blogs? I would definitely vote it as MOTM if it happens!
Thanks! |
#215
|
|||
|
|||
![]()
I never did get this to work properly, but I would like to give it another whirl.... Any chance there is a version for 3.7 yet?
|
#216
|
|||
|
|||
![]()
Will this work 100% with 3.7 ??
|
#217
|
|||
|
|||
![]()
I can't get this to work on my site. Its not populating the
$post[ad_channel] and $post[ad_client_id] and just leaving them as that text |
#218
|
|||
|
|||
![]() Quote:
This mod works great for me. I just want to use it on other locations other than the second spot on threads. Thanks, ![]() |
#219
|
|||
|
|||
![]() Quote:
This one puts one after the 1st post and 9th post. It also checks to make sure the member has at least 50 posts. Code:
<!-- post $post[postid] popup menu --> <!-- / 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"> </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-xxxxxxxxxxxxxx"; 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 --> |
#220
|
|||
|
|||
![]()
nice hack.
i want to put the adsense on the top of my forum near to logo but i cant edit the code for top of the code adsense place. does anyone has the code to put it on near of the logo thanks |
#221
|
|||
|
|||
![]()
how do you confirm if this is working after the installation???
i just placed the entire script in the locations i want my google ads to be and changed the part where the pub is found example: Quote:
Quote:
is this ok?????? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|