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 Details »» | |||||||||||||||||||||||||||
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 |
#132
|
|||
|
|||
no matter rewrote the code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1 OR THIS_SCRIPT == 'showthread' AND ($post[postid] == $GLOBALS['qrfirstpostid'])"> Peace |
#133
|
|||
|
|||
I have installed this but i cant see in members CP where users can put their pub id
does some body tell me what should i do ? |
#134
|
|||
|
|||
does this work I have it installed had some moderators set up a google blog and sign up to adsence but it shows no impressions or clicks!
also if there id starts with ca-pub-blablabla should the ca-pub- be put in or just pub-blablabla? thanks |
#135
|
|||
|
|||
Im having the same problem as Barry, I have this conditional set up...can someone verify if its right:
<if condition="(($post[postcount] % $vboptions[maxposts] == 0) OR ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax'])) OR THIS_SCRIPT == 'showthread' AND ($post[postid] == $GLOBALS['qrfirstposid'])"> Thanks. |
#136
|
||||
|
||||
<font size="3">Guys i still dont get this answer:
How to place adsense sharing not only in first thread page but in all thread page? because people usually want to visit last page</font> |
#137
|
|||
|
|||
Does anyone know how to change the look of the google ad itself? When I enter in the: "$post[ad_client_id]" and "$post[ad_channel]" fields into the ad itself, the ad starts to actually look visually different. See below what I mean:
The bottom one is the original correct way my ad should look and the top one is the modified version of the ad. I want my ad to look like the bottom one, how do I fix this? |
#138
|
||||
|
||||
does this work on 3.6.8? Thanks.
|
#139
|
||||
|
||||
bump
|
#140
|
|||
|
|||
Yep, works with 3.6.8
@ Wickland: If you mean the part that says 'Ads by Google', that happens sometimes and has nothing to do with your layout Quote:
Code:
<if condition="THIS_SCRIPT == 'showthread' AND ($post[postid] == $GLOBALS['qrfirstpostid']) AND (!in_array($forum[forumid], array(X))) AND (!$show[member])"> Use it in forums closed for members. This part: Code:
AND (!$show[member]) It should be pub-XXXXXXXXX |
#141
|
|||
|
|||
Did you upload the files?
Full instructions are in the first post of this topic Same as above, add 2 new profile fields as described in first post |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|