Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

New plugin request - Adsense Revenue Sharing

Quote Reply
New plugin request - Adsense Revenue Sharing
Hello!

Is it possible to make a plugin like Adsense Revenue Sharing ?

If yes, how much will it cost, but please no fancy prices - in fact the hack for vBulletin is free.

Best regards.

<edited>
Another one: http://www.vbulletin.org/...wthread.php?t=135079
</edited>

Last edited by:

katakombe: Sep 17, 2007, 10:38 AM
Quote Reply
Re: [katakombe] New plugin request - Adsense Revenue Sharing In reply to
digital point does this as well.... and it helps their boards out.

http://forums.digitalpoint.com/...?faq=revenue_sharing

How many people would be interested in this type of mod?

Last edited by:

carminejg3: Oct 4, 2007, 4:35 PM
Quote Reply
Re: [Carmine] New plug in request - Adsense Revenue Sharing In reply to
thinking about this a little, couldn't i just grab the id from the person who posted a message on our boards?

first create a new field for their profile to accept the adsense or yahoo pub id.

then in the post see who posted the message grab that new field if they are that person, and display their ad code 50% of the time, the other 50% would be my code.

so we could do a little

random thing on the page?
Quote Reply
Re: [carminejg3] New plug in request - Adsense Revenue Sharing In reply to
Yes, it would be pretty easy to do. If you add a column for the adsense id (or revenue generating system). Then on the post templates, you should have the tag, root_user_<column_name> (eg. root_user_adsense). So with that, you can add the advertisement to the include_post_display.html template. Say you only want the add to only show up below the first post, something like the following should work:
Code:
<%if first%>
<%set code = "my adsense code here"%>
<%if root_user_posts > 50 and root_user_adsense and rand(10) >= 5%>
<%set code = $root_user_adsense%>
<%endif%>
<%-- add code here, and user $code tag --%>
<%endif%>
Of course, replace "my adsense code here" with your own code, and replace 50 with whatever you want as well as adding any other conditions you want. The rand(10) >= 5 handles using the user's code 50% of the time.

Note that rand() wasn't added to GT::Template until gforum 1.2.4, so you'll need to upgrade to at least that version for rand (or write a rand global). You'll also have to update the preferences to allow the user to set their adsense code.

One other thing to note: so you don't get any wasted impressions, you should probably make sure you put a regex on the column that only permits valid adsense id's. I'm not sure what a valid id is, so I can't give you a regex.

Adrian
Quote Reply
Re: [brewt] New plug in request - Adsense Revenue Sharing In reply to
Hi Adrian,

Thanks... Here is a sample adsense code section:

Code:

|script type="text/javascript"|
!--
google_ad_client = "pub-1234567891234567";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "000000";
//--|
|/script|


The field I would collect is:
google_ad_client = "pub-1234567891234567";

Since this determines the payee... which is a 16 digit number and only numeric values, so it should be pretty straight forward to add the regex right?


Quote:
PS: On a Gforum Note, when I was typing this message I checked the spelling and when i resumed to finish the message, I noticed the CODE tag was removed. and The BOLD Tags around the adsense code where changed to closing BOLD TAGS.

Last edited by:

carminejg3: Oct 31, 2007, 7:21 AM
Quote Reply
Re: [carminejg3] New plug in request - Adsense Revenue Sharing In reply to
A simple ^\d{16}$ should do the trick.

Adrian
Quote Reply
Re: [brewt] New plug in request - Adsense Revenue Sharing In reply to
This seems very cool. I'm also interested.

UnReal Network
Quote Reply
Re: [brewt] New plug in request - Adsense Revenue Sharing In reply to
According to Google's TOS, you aren't allowed to show on the same page ads from more than only one publisher, which means that if you have ads (as I have) on the top of pages (include_header.html) you will violate AdSense rules in 50% of cases if you include such system after the first post.

For more info about this issue, take a look on:

http://forums.digitalpoint.com/...?faq=revenue_sharing
http://forums.digitalpoint.com/showthread.php?t=1758
https://www.google.com/...48182&topic=8423
https://www.google.com/...LocalizedTerms2.html


Quote:
If you add a column for the adsense id

Tools > User > Add Column > Column Name: adsense

Right?

Quote:
<%if first%>
<%set code = "my adsense code here"%>
<%if root_user_posts > 50 and root_user_adsense and rand(10) >= 5%>
<%set code = $root_user_adsense%>
<%endif%>
<%-- add code here, and user $code tag --%>
<%endif%>

Quote:
Of course, replace "my adsense code here" with your own code,

Replace with the whole code from start to end, or just with publisher ID?

Quote:
<%-- add code here, and user $code tag --%>

Can you be so kind to explain this part?

Thanks, this thing looks promising Cool ..
Quote Reply
Re: [brewt] New plug in request - Adsense Revenue Sharing In reply to
Hi,

Any new info about this? Is there any step by step instructions how to do this?

Thank you in advance.

Best regards.

UnReal Network
Quote Reply
Re: [katakombe] New plug in request - Adsense Revenue Sharing In reply to
Hi,

For anyone interested, I've now released AdSenseShareForum: http://www.gossamer-threads.com/...?post=300763#p300763

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!