| Revenue Sharing Hack? |
| by JMorris on 2006/12/27 0:15:25 I'm a member of a few community sites (non-XOOPS) that have a nice feature that financially rewards it's contributing members through Google Adsense revenue sharing. The basic gest of the system is that every user with >n posts will have their Google Adsense google_ad_client # randomly inserted into the site's advertisements. In addition, the system automatically detects when the user is logged in and does not display a user's own google_ad_client # to the user. That way they are not clicking on their own ads, thus preventing the dreaded Google cancelation. From the template for system_userinfo.html, I see that there is a SMARTY variable for $user_posts, therefore <{if $user_posts > n}> would solve the first part of my scenerio. Now, the trick is assigning a variable for the google_ad_client #, storing it in the database, presenting it in edituser.php and checking to ensure that the user is not seeing their own ads. This is where I need help. Would anyone like to tackle this challenge? Thanks! James P.S. I've already figured out an alternate method using the built-in banner system and a third-party banner rotator script, but they require manual tracking of user posts and editing of the code. |