vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Adsense Revenue Sharing for 3.5.x and 3.6.x (https://vborg.vbsupport.ru/showthread.php?t=135079)

kenji4861 12-29-2006 10:00 PM

Adsense Revenue Sharing for 3.5.x and 3.6.x
 
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 :p


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!

kenji4861 12-29-2006 10:47 PM

First post reserved for some reason.. everyone does it.. I suppose I should too :p

Distance 12-29-2006 11:53 PM

Lol the reserve post is for you to include what updates you have made and/or bugs known

lovelypk 12-30-2006 01:57 AM

nice.

jerrygad 12-30-2006 02:32 AM

Awesome!
Thanks for sharing :)
*installed*

vietfancy 12-30-2006 03:37 AM

if this work... i'll sure use it.

Could anyone tells me how do i import "cpnav_adsensesharing.xml"?

Thanks

soletrader 12-30-2006 04:51 AM

Is this only for the postbit? Thanks

kenji4861 12-30-2006 05:38 AM

Quote:

Originally Posted by soletrader (Post 1147358)
Is this only for the postbit? Thanks

Yes, this is only for the postbit/postbit legacy, but you can slightly modify the copy/paste code anywhere on your style and it'll work.

kenji4861 12-30-2006 06:04 AM

Quote:

Originally Posted by vietfancy (Post 1147342)
if this work... i'll sure use it.

Could anyone tells me how do i import "cpnav_adsensesharing.xml"?

Thanks

Sorry, I made a little booboo in the instruction. Please do the steps 6-8 now.

Brandon Sheley 12-30-2006 06:06 AM

very nice
looks nicer then the other hack that was just released

thanks, if I use this I'll give a link back to this post and will more then likely get several more admins to use it :)

thanks

projectego 12-30-2006 08:49 AM

[high]* projectego clicks install! ;)[/high]

vietfancy 12-31-2006 01:34 AM

Quote:

8. Configure
- Go to admincp, now you will see "Adsense Share Settings" where you can configure how much revenue you want to share!
I dont see "Adsense Share Settings" anywhere in Admincp.

a screenshoot would be appreciated.

kenji4861 12-31-2006 05:50 AM

Quote:

Originally Posted by vietfancy (Post 1147822)
I dont see "Adsense Share Settings" anywhere in Admincp.

a screenshoot would be appreciated.

Hmm.. I attached image.

Brandon Sheley 12-31-2006 07:15 AM

is this working fine for everyone ? I want to wait just a min b4 adding..

if this works well, I'd love to give you a strong backlink to your site :)

vietfancy 12-31-2006 10:43 AM

confirmation:

This is NOT working with v3.6.4.

dougeetx 12-31-2006 10:17 PM

Quote:

Originally Posted by vietfancy (Post 1147997)
confirmation:

This is NOT working with v3.6.4.

The other one definitely doesn't work! :hurt:

RealRnB 01-01-2007 12:48 AM

thanks ,will give it a try

Qwest 01-02-2007 04:33 AM

NOT working In 3.6.4

Once installed, if a user tries to update their profile settings it REQUIRES them to enter a pub ID and channel no matter what you set the settings to in user profile fields section in AdminCP.

I set it at first to Not required but show on registration then I said it to just plain NO for not required and it still says I enetered an invalid pub-id every time I update my profile.

kenji4861 01-02-2007 07:27 AM

Quote:

Originally Posted by Qwest (Post 1148952)
NOT working In 3.6.4

Once installed, if a user tries to update their profile settings it REQUIRES them to enter a pub ID and channel no matter what you set the settings to in user profile fields section in AdminCP.

I set it at first to Not required but show on registration then I said it to just plain NO for not required and it still says I enetered an invalid pub-id every time I update my profile.

Make sure the "Regular Expression" box is empty.

Is everything else working for you like the menu in admincp?

Qwest 01-04-2007 12:37 PM

That fixed it, thanks.

extreme-mobile 01-04-2007 05:40 PM

may sound like a stupid question but can some explain what this actually does in simple terms lol

vietfancy 01-04-2007 05:59 PM

when i tried to update in admincp... the page went "page can't be found"

extreme-mobile 01-04-2007 06:16 PM

when i try to update it says there is no admin_adsense.php found????

there was no file called that in the zip

only adsense_admin.php

dd4w2000 01-05-2007 11:01 AM

Quote:

Originally Posted by vietfancy (Post 1150760)
when i tried to update in admincp... the page went "page can't be found"


am also getting the above message when i attempt to save settings in admincp.

otherwise adsense is diplayed well under the first post. could be a really useful hack if you could get this to work on 3.6.2

any suggestions very welcome

trickfly 01-06-2007 10:07 PM

how do import a plugin, under which product I mean, vbulletin ?

trickfly 01-06-2007 10:15 PM

I'm using 3.6.2 and got the same page can not be found after hitting update in admin cp > adsense share settings.

Does this work on 3.6.2 ?

jessc 01-11-2007 12:30 PM

This seems to be working for me with 3.6.4. Well it's displaying ads. I don't know if it's sharing the ad revenue yet or not. (I need members first)

I got page not found when I saved the settings and had to rename the adsense_admin.php file to admin_adsense.php and it worked.

trickfly 01-11-2007 05:46 PM

Try visiting:

www.TrickFly.com

to see a demo of the site

kenji4861 01-11-2007 08:26 PM

ISSUE FIXED

Aww got it guys. I'm sorry about the mistake I fixed the issue in adsense_admin.php. Please upload the new file.

To fix the 404 "Page Not Found"

1. Download https://vborg.vbsupport.ru/attachmen...chmentid=58862
2. Unzip
3. 8. Upload adsense_admin.php to forums/admincp/

qbonoguy 01-12-2007 11:38 AM

I'd like the phrase "Sponsored Link" to contain the members username IF that member has placed their Client ID in their profile.

ie... If a member creates a thread and if they have not placed an Adsense Client ID in their profile, I want the phrase "Sponosored Link" to appear... BUT, if a member creates a thread and if they have placed an Adsense Client ID in their profile I want the phrase "Links Sponosored by UserName" to appear...

How can I do this? I tried adding a condition to just look for the existence of a $post[ad_client_id] but that doesn't work because it always contains at least the default value...

Thanks for your help!

stormy_ 01-12-2007 01:14 PM

just installed and working fine...

may i know how to add adsense on many different places like on top or in bottom?

do i need to use the same code or just the adsense code?

dprundle 01-12-2007 07:48 PM

Thx m8, just downloaded and will try installing now to let you know how it goes.

Update:

Just FYI for everyone, I have it working on Vbulletin 3.6.4 at http://www.oksportsfan.com .

Thanks for the great mod!

joeychgo 01-12-2007 09:39 PM

Can this be usergroup controlled -- so I can only allow a particular usergroup(s) to participate?

popowich 01-14-2007 10:17 PM

Hello,

Will this hack be compatible with the deep integration tutorial?

-Raymond

qbonoguy 01-15-2007 12:00 AM

How can I get this to work within my header and footer ad also? Is it even possible?

Rian 01-15-2007 06:29 AM

I got this working on 3.6.4. Same here, ads are showing, but I do not know if it will share or not.

klmklm 01-22-2007 07:44 PM

I have installed this, I think I've installed it as described. Now how do AdSense adds get to be displayed on the forums...

Thanks,

jamsiejay 01-25-2007 07:54 PM

Hi,

Can someone offer me some assistance i am trying to get this to work on my header alongside my logo but i cannot get it right i have tried editing code as much as i can.

If you know how to achieve what i need please od post or pm me.

jamsiejay 01-25-2007 08:03 PM

I want it to be placed on the header or home page.

jamsiejay 01-25-2007 08:23 PM

I want it like www.webmaster-talk.com in the top right hand of the header.


All times are GMT. The time now is 05:38 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.01437 seconds
  • Memory Usage 1,828KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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