PHP Code, Web

Free Joomla Module – Adsense Revenue Sharing

Create beautiful Joomla websites with a flexible layout from iJoomla.com

After some deliberation, I've decided to release my revenue sharing Joomla module for Google Adsense as Open Source. So yes, you can download it and use it for free on your website. Revenue sharing is a great way to drive fresh content creation for your website, by offering authors the opportunity to receive Adsense impressions on their content.

I extended the popular Adsense Clicksafe module, to enable revenue sharing. By installing this module, you'll get the following features:

  1. Specify defaul Adsense ID
  2. Specify default channel ID
  3. Specify ad impression sharing percentage (50%, 33%, 25%, 20%, 10%)
  4. Block ads for up to 5 IP addresses
  5. Specify alternate code for bloacked ads
  6. Choose ad alignment
  7. Choose ad type
  8. Choose ad layout
  9. Specify framed pages
  10. Specify alternate ad URL
  11. Specify alternate ad color
  12. Specify up to 4 border colors
  13. Specify up to 4 background colors
  14. Specify up to 4 link colors
  15. Specify up to 4 URL colors
  16. Specify up to 4 Text colors

Tracking the Adsense/channel ID of each author is incredibly simple. Just create a contact linked to their user ID, and put the following anywhere in the Miscellaneous field:
[adsenseid]pub-################[/adsenseid]
[channelid]##########[/channelid]

Here's the link to download: Adsense Revenue Sharing Module for Joomla with ClickSafe IP Blocking

Let me know of any concerns or questions in the reply field below!

Create beautiful Joomla websites with a flexible layout from iJoomla.com

Share

97 Comments

  1. Thank you very much for this excellent additional feature that you have added to our popular Google AdSense Module. To enable the Joomla Community to get all the versions and editions of this module in one central place, we have added this to our download center also at http://www.joomlaspan.com. You can see the details here: http://www.joomlaspan.com/news/latest/google-adsense-revenue-sharing-module-for-joomla.html.

    We have also ensured that you get due credit for having developed this module. Your name and website are credited to in the readme.txt file, as well as in many other places prominently.

    We welcome more Joomla community members to develop this module further,

    Thank you
    Yours ever
    Joomlaspan (http://www.joomlaspan.com)

  2. I'm using Community Builder and would like each user to be able to enter their pubID into a field in their profile and it would automatically be linked, rather than the admin having to manually create a new contact for each user and manually entering in the pubID. Is this possible?

  3. Yes, all you would need to do is change the SQL statement in the code to retrieve the adsense ID from the respective table. Then just change the start and end markers to parse the id

  4. Awesome module, I love the idea of content based revenue sharing.
    I have modified the module to integrate with Community Builder.
    You can find it here under Revenue Sharing related downloads.
    http://userwrittenresources.com/index.php?option=com_content&task=view&id=3&Itemid=7

  5. We're about to go live with an all new website in a few days… I am setting up this same module for our new site and was wondering if I edit the xml file to say:

    100% of impressions
    50% of impressions
    33% of impressions
    25% of impressions
    20% of impressions
    10% of impressions

    if selecting 100% from the drop down menu that it lists will really give the users 100% of the impressions? I want my writers who write the reviews on our site to get them all, I dont' want any of the impressions myself.

    Thanks!

  6. Doh, it doesn't let me paste XML code, it took out the changes i made… 🙁

    Anyways, is there a way to make it do 100% by editing the XML file? if so, can you please email it to me? Thanks man.

    Brad

  7. How is the revenue shared if three authors have intros to their articles on the frontpage?

  8. # cMoo92 Says:
    April 19th, 2006 at 5:14 pm

    I'm using Community Builder and would like each user to be able to enter their pubID into a field in their profile and it would automatically be linked, rather than the admin having to manually create a new contact for each user and manually entering in the pubID. Is this possible?

    # Justin Cook Says:
    April 19th, 2006 at 6:44 pm

    Yes, all you would need to do is change the SQL statement in the code to retrieve the adsense ID from the respective table. Then just change the start and end markers to parse the id

    Can you be more specific on how to do this with an example? Thanks.

  9. Nice site… Cool guestbook…

  10. How does this work? Is the adsense shared for the author's own work on their pages or is it divided amonsgst all authors across the site? The former seems to be most fair and likely but I have to make sure since the method doesn't go into detail.

  11. The adsense is shared for the author's own work alone

  12. How does this work? Is the adsense shared for the author's own work on their pages or is it divided amonsgst all authors across the site? The former seems to be most fair and likely but I have to make sure since the method doesn't go into detail.

  13. Kent - from make money online

    Wow, I come back to this site to ask another question to see that someone copied my question before likely just to spam your site…

    Anyway, I have another question. IS there a way to alter the script so that a greater percentage is given to the content contributor? maybe 60% or more?

  14. chief supreme ruler

    you just need to edit the XML file, and add a 60% option

  15. Hi there,

    Really excited about deploying this module on my site and sharing some of the revenue with our authors. Thanks for making this available.

    Just wanted to clarify; if the module is copied to two or three locations on a page, will the ads appearing in each location only be for the author for, say, the specified rate of 33% of the time, or could one module show ads for the author, and the other locations show my ads at the same time? Just worried this could put me in violation of Google's terms of use.

  16. No, that shouldn't be a problem. The percentage is based on the number of hits the Joomla content has received, so all module copies would use the same math, and therefore display it at the same time.

  17. Thanks Justin, good to know. And thanks again for the great work on the module.

  18. Hi,
    Thanks for the great module.
    However, I cannot make more copies of this module. When I publish two instances of this, I get error in the second position:
    Fatal error: Cannot redeclare get_string_between() (previously declared in /home/account/public_html/modules/mod_revshare.php:88) in /home/account/public_html/modules/mod_revshare.php on line 95

    Any reasons/ workarounds for this?
    Thanks in advance
    Winston Tan

  19. Hmm, hadn't thought of that. The only workaround would be to move the object into a common include file, so it doesn't get re-declared

  20. Thank u for the immediate response.
    Please tell me how to do that? I am a PHP illiterate person!
    What changes to do in the mod_revshare.php file?

  21. > Hmm, hadn't thought of that. The only workaround would be to move the
    > object into a common include file, so it doesn't get re-declared

    Or just att a if function/class exists-statement.

    Looking forwrad to try this compoonent out!

  22. I'm encountering the same problem…can only place one add on my page or I get "Fatal error: Cannot redeclare get_string_between() (previously declared in /blah/blah/mod_revshare.php:88".

    Seems like a great module but unfortunately is useless to many if we can't add more than one ad block.

  23. Hiya! Not much activity on here in a while but I was just wondering if antthing has been done (or planned to be)to this potentially awesome module regarding it only being able to appear once on a page, and to integrate it with CB as previously dicussed by making it look at CB fields for the adsense+channel Id?

    I hope so as this has so much potential adn have no coding skills whatsoever!

  24. Hi there, I've figured out an easy fix, you just need to add these two lines of code to mod_revshare.php:

    On line #87 add:
    if(!function_exists('get_string_between')) {

    And then change line #95 from } to }}

  25. Thanks Justin works like a charm!!! Thats step 1, now all I have to do is to work out how to make it use the asense Id numbers from the Community builder fields…

  26. For the fix, is this something that can be fixed and the the module can be rereleased?

    As for the Community Builder questions, there is one out there but honestly I have never been able to get it to work. I have tried so many times. I would be great to see one that work.

    I'll try to work on it this weekend.

  27. Yes, it could fixed and re-released. But that would take a little bit of time, and I'm busy with paid projects right now. They take priority of course.

  28. It was quick and fixed. I can send it to you if you want. I will try to get the CB version down this weekend. If you ever have time for some small Joomla projects let me know.

  29. Excellent. I may have some time starting mid February for small projects.

  30. false alarm.

    thought i had it working with the fix above but after logging in as a new user i get the following error

    Fatal error: Call to undefined function: get_string_between() in /home/username/public_html/sitename/modules/mod_revshare.php on line 50

  31. Are you sure you copied it correctly? There's no reason why it shouldn't work

  32. I am sure. The get_string_between() appears in several other locations. It is hard for me to test but it only seems to occur on a site that i was a new user on. it only happened when i initially logged in. After I logged in and surfed around it was ok. But on initial login I got error above. I will try again. Almost done with the CB stuff. If you want, email me and I can email you the site but the error shows my folders etc

  33. OK did some testing today.

    The fix above allows numberous adsense revenue modules to be shown on the page. Works great.

    I have found the following error. I appears to occur randomly. After login, the following error sometimes appears.

    Fatal error: Call to undefined function: get_string_between() in /home/username/public_html/sitename/modules/mod_revshare.php on line 50

    It error will block the loading of the rest of the page. If you use our back button or click on a menu link the site will funtion normally and the rev share multi module will work normally.

    I have tested it with both CB login and regular login. Sometimes I can log in 5 times in a row with out the error and sometimes i get the error a few times in a row with either log in. It seems to occur more frequently with the CB login module.

    It is a dangerous error even if it occurs 1 out of 100 times as it give your server username and filename.

  34. Is anyone else experiencing this?

  35. Justin, is there a way to contact you?

  36. my email address should be listed in the module, but it's justincook [ @ ] gmail [ . ] com

  37. I made it work with Community Builder in multiple positions!!!!! You can see it demonstrated at http://www.simplyjoomla.com (dont worry I am not spamming , it is just a test site) It is 4am so I will post it somewhere tomorrow with instructions!!! I will send Justin a copy to post also.

  38. OK you can download the CB Integrated version at http://www.simplyjoomla.com.

  39. Butler, thats excellent news 🙂 Working till 4am, thats dedication to the cause lol! I will test it and let you know if I can see any problems but initially it looks spot on, well done!

  40. It doesn't works on my website. It is always the ads with my adsenseID who are displayed, and not the adsenseid of my authors. I use the CB revenue sharing.
    Someone could explain me how to do with this module?
    I have created the adsense cb fields, i choosed 50%, i display the ads in a sidebar in each article. The displaying is ok, but only with my adsenseid.

  41. syl20, I have spoken with you and will post the fix. Please note the instructions are different than Joomlaspans. My fields are named differently.

    Justin, sy120 had a good question. if you are using the caching is here a way to still make the module rotate?

  42. If you are using caching, then I believe all output would be cached, including modules. This would place a damper on the rotation. Of course, the only way to verify that would be to test it!

  43. yeah that is what syl90 said. that is too bad with some joomla sites that need caching. But I am not sure how caching and original hits work. Dorry I haven't hit you back yet. Just been really busy.

  44. seo tool and webmaster tool

    i will put this one the test now.. hope this one use full for my Seo tools site
    and i realy love if this have feature of decrease share revenue depend on time ..
    eg: the author will have 100% share in fist week then 70% one next .. go on ..
    just the idea.. for help making money with poster

  45. Hiya

    gread module, but I do not understadn how do users add their adsense code, I am running joomla 1.0.12 nor how to rotate adsense codes.

    thanks for clues

  46. As explained in the instructions:
    Just create a contact linked to their user ID, and put the following anywhere in the Miscellaneous field:
    [adsenseid]pub-################[/adsenseid]
    [channelid]##########[/channelid]

  47. hello thanks for fast answering

    Could users enter their own adsense code at registration time ?

  48. I don't believe so, they'll need to contact you. The community builder version may allow that.

  49. OK, and for future versions maybe ?

  50. That's not really in the scope of this component, that's a feature of Joomla – to allow your users to edit their own misc. field

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image