Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adsense Reveune Sharing Hack Details »»
Adsense Reveune Sharing Hack
Version: 1.00, by artonex artonex is offline
Developer Last Online: Jan 2007 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-23-2005 Last Update: Never Installs: 3
 
No support by the author.

This hack will allow you to offer Google Adsense revenue sharing to your vbulletin board users. Revenue sharing is a great way to reward your board members for their loyalty and adds a feeling of ownership in the board and it's success.

Add a User Profile Field with these settings:

Profile Field Type: Single-Line Text Box
Title: (your choice)
Description: (your choice)
Field Editable By User: Yes
Private Field: Yes
Field Searchable On Memers List: No
Show On Members List: No
(I have only specified settings for the fields you will need to change from their defaults.)


In the php_include_start template, add this code:


PHP Code:
srand();
$random_number rand(01);
$ga_adsenseid 'ENTER_YOUR_ADSENSE_ID_HERE';
if (
$random_number == 1)
{
    if (
THIS_SCRIPT == 'showthread')
    {
        if (!empty(
$_REQUEST['t']))
        {
            
$ga_threadid $_REQUEST['t'];
        }
        else
        {
            
$ga_threadid $_REQUEST['threadid'];
        }
        
$ga_thread $DB_site->query_first("
            SELECT postuserid
            FROM "
.TABLE_PREFIX."thread
            WHERE threadid = 
$ga_threadid
        "
);
        
$ga_user $DB_site->query_first("
            SELECT field7 AS adsenseid
            FROM userfield
            WHERE userid = 
$ga_thread[postuserid]
        "
);
    }
    elseif (
THIS_SCRIPT == 'showpost')
    {
        if (!empty(
$_REQUEST['p']))
        {
            
$ga_postid $_REQUEST['p'];
        }
        else
        {
            
$ga_postid $_REQUEST['postid'];
        }
        
$ga_post $DB_site->query_first("
            SELECT userid
            FROM "
.TABLE_PREFIX."thread
            WHERE postid = 
$ga_postid
        "
);
        
$ga_user $DB_site->query_first("
            SELECT field7 AS adsenseid
            FROM userfield
            WHERE userid = 
$ga_post[userid]
        "
);
    }
    if (!empty(
$ga_user['adsenseid']))
    {
        
$ga_adsensecode $gauser['adsenseid'];
    }

Then, where ever you have your AdSense display code, find the spot where you specify your AdSense ID and replace it with $ga_adsenseid . Also make sure in the above code that you enter YOUR AdSense ID in the spot above where it says "ENTER_YOUR_ADSENSE_ID_HERE".

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 04-28-2005, 10:42 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Polo
the hack does not display the earnings.... I been waiting for an official answer from Google in wheter this hack is breaking the TOS or not...
It is not. I inquired Google about it the first day they changed to their latest TOS:
Quote:
Hello Alexander,

Thanks for your email.

To clarify, please note that you may continue displaying ads from
different publishers on your site. However, we ask that you not place ads
from two different accounts on the same web page. We appreciate your
cooperation.

Please feel free to reply to this email if you have additional questions
or concerns.
Sincerely,

James
The Google AdSense Team
Reply With Quote
  #33  
Old 04-28-2005, 11:42 AM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for sharing ...
you could reduce the queries to 0 if done right

---------
some people want functionality that is catered to them only .. which is why people hire coders ... also, 99% of vb owners do not 'stick around' vbulletin.org to find hacks ... there is simply no time for that

so, if someone pays for added funtionality and wants to share more power to them ... making the addon public will always make it a better product (in the long run)

cheers
Reply With Quote
  #34  
Old 04-28-2005, 12:17 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uhm have you checked my second last post?
Reply With Quote
  #35  
Old 04-28-2005, 08:05 PM
pelukis pelukis is offline
 
Join Date: Dec 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Then, where ever you have your AdSense display code, find the spot where you specify your AdSense ID and replace it with $ga_adsenseid
where do i go to edit the spot????
sorry i am no coder!
Reply With Quote
  #36  
Old 05-07-2005, 09:23 PM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HMM, so this shows the money you make on adsense? That is against googles TOS if I am not mistaken.
Reply With Quote
  #37  
Old 05-08-2005, 12:14 AM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bigcurt8998
HMM, so this shows the money you make on adsense? That is against googles TOS if I am not mistaken.
No, this hack does not show the money you make on adsense... and even if it did, sharing how much you make on adsense is not against the Google TOS anymore...
Reply With Quote
  #38  
Old 05-08-2005, 02:59 PM
xtreme-mobile xtreme-mobile is offline
 
Join Date: Jul 2004
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i dont quite get this hack

can i set it up so that only i get money from my members clicking banners? so that will help pay my hosting fees then?

sorry if this is thick question
Reply With Quote
  #39  
Old 05-08-2005, 11:14 PM
LEAD_WEIGHT LEAD_WEIGHT is offline
 
Join Date: Feb 2005
Location: Canada
Posts: 369
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xtreme-mobile
i dont quite get this hack

can i set it up so that only i get money from my members clicking banners? so that will help pay my hosting fees then?

sorry if this is thick question
Look @ this
Code:
https://vborg.vbsupport.ru/showthread.php?t=80685
Reply With Quote
  #40  
Old 11-16-2005, 05:03 AM
forumrating forumrating is offline
 
Join Date: Sep 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this work with vb 3.5 latest version !
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04878 seconds
  • Memory Usage 2,315KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete