Debt Consolidation - Modded Xbox - Jordans - Gourmet Chocolate Assortments - Flights

PDA

View Full Version : Adsense Revenue Sharing hack


TheWebJunkie
Mar 31st 2005, 2:29 am
Hope you all like this hack for vbulletin :D

My paypal is thewebjunkie@gmail.com if you would like to make a small donation :)

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:

srand();
$random_number = rand(0, 1);
$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, whereever 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".

yfs1
Mar 31st 2005, 2:40 am
Why would we donate to you for cut and pasted code that someone else developed??

TheWebJunkie
Mar 31st 2005, 3:02 am
Why would we donate to you for cut and pasted code that someone else developed??

I paid for this hack to be created along time ago, before all the other boards started to get it!

So dont you accuse me of ripping code mate!

Homer
Mar 31st 2005, 5:17 am
How could someone bearing a badge be stealling :D

schlottke
Mar 31st 2005, 6:05 am
DP wasn't the first forum to develop that code, so TWJ wouldnt be doing anything wrong in my opinion.

TheWebJunkie
Mar 31st 2005, 6:08 am
I just thought id share the hack here, i thought some people might be greatful!

Guess i was wrong :(

anthonycea
Mar 31st 2005, 6:08 am
Which one was the first Snitch Baby :confused:

yfs1
Mar 31st 2005, 6:10 am
DP wasn't the first forum to develop that code, so TWJ wouldnt be doing anything wrong in my opinion.

My original post had nothing to do with DP but I will just leave it at that and walk away from this post.

Enjoy

noppid
Mar 31st 2005, 6:13 am
My original post had nothing to do with DP but I will just leave it at that and walk away from this post.

Enjoy

If we are going to be code police, let's talk non RFC complient RSS readers. :eek: :confused:

Holy can of worms Batman!

TheWebJunkie
Mar 31st 2005, 6:13 am
My original post had nothing to do with DP but I will just leave it at that and walk away from this post.

Enjoy

Tell me what your getting at yfs1!

yfs1
Mar 31st 2005, 6:15 am
Like I said, I'm not getting at anything. I just clarified that DP never had anything to do with my posting. Thats all

digitalpoint
Mar 31st 2005, 7:33 am
DP wasn't the first forum to develop that code.Really? Who was?

anthonycea
Mar 31st 2005, 7:40 am
Yeah, that is what I want to know :confused:

schlottke
Mar 31st 2005, 1:42 pm
Really? Who was?

I'd seen it on vB forums back as far as a 2.0x release (*in a less advanced way than you've done it)- I'll check when I get on my laptop for the URL if you really need to know... lol.

anthonycea
Mar 31st 2005, 1:44 pm
Sure you did............. :p :p :p :p

akeeldin
Apr 22nd 2005, 7:06 am
Seems a 'chicken and egg' situation. Difficult to pin who came up with what first.

Heck, SCO even claims to have 'invented' Linux. :eek:

onestop
Apr 22nd 2005, 8:38 am
Heck, SCO even claims to have 'invented' Linux.
Actually I thought about linux before SCO :)

Dio
Apr 22nd 2005, 9:23 am
I used to get up ten hours before I went to bed, just to think about stuff that wouldn't be thought about for another fifteen years...

And you tell that to the young people of today - and they won't believe you... :D