Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #12  
Old 04-24-2005, 12:59 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheWebJunkie
Where can i find that hack ?
Click on his profile and select random ads in thread per usergroup. That is Nexialys few posts above.

It does not share revenue, but conveniently places it in thread. You can put googles script in it if you wish.
Reply With Quote
  #13  
Old 04-24-2005, 01:26 PM
artonex artonex is offline
 
Join Date: Mar 2005
Location: UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using his hack and mine together would be very good
Reply With Quote
  #14  
Old 04-24-2005, 01:27 PM
Gastongr Gastongr is offline
 
Join Date: Aug 2004
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for Sharing TheWebJunkie.
Is there an additional section in the user cp so they can view their ads and manage when they want them displayed?.
ALso is there any kind of control over users who register and never post, like points for posting or something.?
Reply With Quote
  #15  
Old 04-24-2005, 02:55 PM
nexialys
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by TheWebJunkie
Using his hack and mine together would be very good
you can build a merge if you like... as you're not a coder, just ask someone to do it... but refuse to pay for such a hack next time... most coders here will do it for free if they see a good advertising power in it!
Reply With Quote
  #16  
Old 04-24-2005, 03:37 PM
Geographic2 Geographic2 is offline
 
Join Date: Apr 2003
Location: On the map
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using adsense makes your forums look like crap and lines the pockets of Googles shareholders more than it will ever benifit your members. In other words you're being exploited but... Proceed, Carry on, Pretend I never said nuthin...
Reply With Quote
  #17  
Old 04-25-2005, 01:21 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@nexialis... this hack can be a good one for webmaster forums

@geographic2... if you know how to place them adsense can be a great tool to maintain your site... you can always have them display for guests only... and like I said, you go to know how and where to place them... google adsense is the best thing that could happen to many webmasters

@thewebjunkie... thanks for sharing this with the community... is greatly appreciated specially since you had to pay for it... I dont know if I would use it, with google TOS I'm still not really sure if they agree with this type of hacks..... anyways, thank you
Reply With Quote
  #18  
Old 04-25-2005, 08:43 PM
artonex artonex is offline
 
Join Date: Mar 2005
Location: UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Polo
@thewebjunkie... thanks for sharing this with the community... is greatly appreciated specially since you had to pay for it... I dont know if I would use it, with google TOS I'm still not really sure if they agree with this type of hacks..... anyways, thank you
Google do allow this hack, a few ppl emailed google about it, there email reply can be found on http://forums.digitalpoint.com
Reply With Quote
  #19  
Old 04-25-2005, 08:45 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you post the link to that specific thread? I tried searching but couldnt find anything...
Reply With Quote
  #20  
Old 04-25-2005, 09:37 PM
artonex artonex is offline
 
Join Date: Mar 2005
Location: UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm they must have cleaned up some old threads as its not there anymore
Reply With Quote
  #21  
Old 04-25-2005, 09:42 PM
Acido Acido is offline
 
Join Date: Apr 2003
Location: Argentina
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheWebJunkie
Field Editable By User: Yes
Sorry, but How can the user edit his self ID?
Can you provide some screens ?

Thanx !
Reply With Quote
Reply

Thread Tools

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 03:08 AM.


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.04620 seconds
  • Memory Usage 2,309KB
  • Queries Executed 25 (?)
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_php
  • (4)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)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