PDA

View Full Version : Annoy the free iPod spammers with referral ID replacement


Dean C
01-30-2005, 10:00 PM
[Annoy the free iPod spammers with referral ID replacement]

Information

vBulletin Version: 3.0.6


Author: Dean Clatworthy (http://www.deanclatworthy.com)


Copyright: You may use this modification at your own risk. I cannot and will not be held responsible for any damage you may cause to your forums during installation or thereafter. You may not distribute this modification in whole or parts and anyone found doing so faces risk of prosecution. All my modifications are released at vBulletin.org and anyone found releasing them elsewhere also faces risk of prosecution. You may not translate this modification without my prior permission.


Donations: I release my modifications for free. If you wish to donate please contact me and I will give you my details. All donations are graciously appreciated.


Credits: I would like to thank the following people who contributed to the making of this modification.

ManagerJosh - his idead



What does this modification do?
Getting annoyed by those pesky free iPod spammers? You're not the only one. Get a free iPod in the process by replacing their ID with yours ;)

Installation

1/

Find in includes/functions_showthread.php:

// hide edit button if they can't use it

Above it add:

$refid['freeipods'] = 0;
$post['message'] = preg_replace('/www\.freeiPods\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['message']);
$post['signature'] = preg_replace('/www\.freeiPods\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['signature']);

Be sure to change the value of $refid['freeipods'] to your referralid otherwise this won't work!

Please Click Install!
If you installed this modifcation please click the install button. It'll help you keep up to date with future releases and important bugfixes, security updates.

nexialys
01-31-2005, 03:39 PM
coming from Dean C, i'm questionning his affection to the Mac world.. lol

this "hack" is not a single way related to vBulletin, and btw, i think Dean will have to learn why there is a Replacement system in the board... ;)

ManagerJosh
01-31-2005, 03:47 PM
coming from Dean C, i'm questionning his affection to the Mac world.. lol

this "hack" is not a single way related to vBulletin, and btw, i think Dean will have to learn why there is a Replacement system in the board... ;)
http://www.vbulletin.com/forum/showthread.php?t=128426

*clicks install*

Dean C
01-31-2005, 03:56 PM
coming from Dean C, i'm questionning his affection to the Mac world.. lol

this "hack" is not a single way related to vBulletin, and btw, i think Dean will have to learn why there is a Replacement system in the board... ;)

The replacement system does not support parameters last time I checked :smoke:

nexialys
01-31-2005, 04:05 PM
hum... yeah... maybe it's time to edit it, add some regex to it...

yoyoyoyo
01-31-2005, 04:29 PM
very cool! and this could also be very easily adapted to other services that use referral ID's, such as amazon, etc.! nice one!

Dean C
01-31-2005, 04:34 PM
Give me the URL and i'll write the replacement for it :)

ManagerJosh
01-31-2005, 06:11 PM
Give me the URL and i'll write the replacement for it :)
Hey Dean..does this work if they omit the "www" ?

Dean C
01-31-2005, 07:06 PM
Nope - fixed :D Also it's now case-insensitive. Gotta love these regexp's

Link14716
01-31-2005, 08:39 PM
Make spammers work for you, eh Dean? ;)

yoyoyoyo
01-31-2005, 08:51 PM
The amazon URL's are a bit tricker, since there are so many variations, but this is the basic structure:
http://rcm.amazon.com/e/cm?t=ZZZZZZZZZZ&o=1&p=8&l=as1&asins=XXXXXXXXXX&fc1=000000&lc1=0000ff&bc1=&lt1=_blank&IS2=1&bg1=ffffff&f=ifr
ZZZZZZZZZZ is the referral and XXXXXXXXXX is the ASIN/ISBM number for the product, and the rest of the stuff after the ASIN often changes, depending on the category, and how the link was setup, but the first part up to the referral ID is always the same. It will be cool to see what you come up with :)

Dean C
01-31-2005, 08:52 PM
Arrghh page is expanded, put that in a quote box ;) I'll sort this out tomorrow, is t=ZZZZZZZZZZ always the referralID? I.e. is the referral ID always prefixed by t= ?

Edit: damn you did that fast :D

yoyoyoyo
01-31-2005, 08:54 PM
Arrghh page is expanded, put that in a quote box ;) I'll sort this out tomorrow, is t=ZZZZZZZZZZ always the referralID? I.e. is the referral ID always prefixed by t= ?

Edit: damn you did that fast :D :)

yep the t=ZZZZZZZZZZ is always the referral ID, and it is always prefixed by a t=?

edit: and in looking around there are also isbn's (the above is an asin example, so basically everything after the referal ID changes according to the item, etc., but the first part is always the same up to the t=

imakuni?
01-31-2005, 09:07 PM
For those of you who dont want the link replaced, heres a code that nullifies the links

Installation
Find in includes/functions_showthread.php:
// hide edit button if they can't use it
Add Above:

//censor ipod refferal links
$post['message'] = preg_replace('/www\.freeiPods\.com\/default\.aspx\?referer=([0-9]+)/', 'Sorry, no refferal links!', $post['message']);

KW802
01-31-2005, 09:26 PM
For the Amazon links, see here: https://vborg.vbsupport.ru/showthread.php?t=72560

:)

ManagerJosh
01-31-2005, 11:10 PM
For those of you who dont want the link replaced, heres a code that nullifies the links

Installation
Find in includes/functions_showthread.php:
// hide edit button if they can't use it
Add Above:

//censor ipod refferal links
$post['message'] = preg_replace('/www\.freeiPods\.com\/default\.aspx\?referer=([0-9]+)/', 'Sorry, no refferal links!', $post['message']);

I don't see why anyone would want to do that...you might as well make a quick buck or two while using that link :p

yoyoyoyo
01-31-2005, 11:58 PM
For the Amazon links, see here: https://vborg.vbsupport.ru/showthread.php?t=72560

:)well whaddya know :) thanks!

yinyang
02-01-2005, 12:14 AM
sorry for the noobish question, as it seems like i've come to the party after the valets have left. but where do you get this "referralid" for freeipods? (i'll run a google check i the meantime).

djjeffa
02-01-2005, 01:53 AM
sorry for the noobish question, as it seems like i've come to the party after the valets have left. but where do you get this "referralid" for freeipods? (i'll run a google check i the meantime).
http://www.freeipods.com

xmitchx
02-01-2005, 04:56 AM
Oh my gaw he made it. LOL

yoyoyoyo
02-01-2005, 05:17 AM
I guess I am a little confused about this. I made the edit, and then checked a posted ipod referral link and it appeared to be the same and when I clicked on the link it went to the original referrer and not mine. I know I couldn't have messed up the file edits since there is only ONE :) so... maybe I am confused about this hack and what it does ??

Dean C
02-01-2005, 04:05 PM
It replaces their id with yours simple as that. I tested it on my local board and it worked fine :)

Reeve of shinra
02-01-2005, 04:41 PM
roflmao, I <3 j00

jugo
02-01-2005, 05:05 PM
Nice idea, but didn't work fo rme either....He has it linked to an image in his sig...is this the reason??

EDIT:: DUH!!! I just added this underneath the original code and noe it changes it in the signature also.

$post['signature'] = preg_replace('/www\.freeiPods\.com\/default\.aspx\?referer=([0-9]+)/', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['signature']);




Thanks.....

yoyoyoyo
02-01-2005, 05:27 PM
It replaces their id with yours simple as that. I tested it on my local board and it worked fine :)
I thought that is what it was supposed to do, but it doesn't work on my board. Can someone post an example of the code with a fake referral code in it, so I can see where I should be adding my ref ID in (since that must be my problem)?

Kahoona
02-01-2005, 07:17 PM
How about modifing this for those online RPGs people scam you to goto.

ludd
02-01-2005, 09:24 PM
Nice hack idea !

Floris
02-02-2005, 11:57 AM
Nice hack idea !
I think it is still cooler to just remove the spam from your forum, rather then allow it and replace the spam with your own spam info.

Dean C
02-02-2005, 03:57 PM
Nice idea, but didn't work fo rme either....He has it linked to an image in his sig...is this the reason??

EDIT:: DUH!!! I just added this underneath the original code and noe it changes it in the signature also.

$post['signature'] = preg_replace('/www\.freeiPods\.com\/default\.aspx\?referer=([0-9]+)/', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['signature']);




Thanks.....

Nice, want me to add it to first post?

Dean C
02-02-2005, 03:58 PM
I guess I am a little confused about this. I made the edit, and then checked a posted ipod referral link and it appeared to be the same and when I clicked on the link it went to the original referrer and not mine. I know I couldn't have messed up the file edits since there is only ONE :) so... maybe I am confused about this hack and what it does ??

In a code box give me the URL you were testing and I'll post it on my local test board to see if we have a bug :)

djjeffa
02-06-2005, 01:30 AM
its not working for me here is my code http://www.freeiPods.com/?r=14713038
and here is what i added
$refid['freeipods'] = 14713038;
$post['message'] = preg_replace('/www\.freeiPods\.com\/default\.aspx\?referer=([0-9]+)/', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['message']);
i guess i messed up?

Dean C
02-06-2005, 10:58 AM
Hmm, since when did they have so many different url formats ;) I'll work on it now

Dean C
02-06-2005, 03:09 PM
Ok updated the first post with the fix :)

EcpHosting
02-08-2005, 01:58 PM
Ok, I have an interesting question...

The unique question involves 3 things you should know in advance:

1) We just launched a site in favor of this: myfreeipodguide.com (http://www.myfreeipodguide.com)

2) We need referral links showing in the header, however these links are not static... they are dynamic as they change depending on who referred who to our site. For example, if Bob refers you to our site, then all the links in the header will be Bob's.

3) We are currently using vbAdvanced Portal (in which the entire guide works from the Forum Style)

The Question: Is this set to only work in posts and sigs (this is where we only want it to work, as we do not allow referral links in our boards) or do you think it could override our system? I'm not asking if our system is compatable, I'm just asking where the limitations are for this hack (if it also looks outside of posts and sigs).

A side question: If the above is limited to only those areas, is it possible to expand this for all the other links as well (freeipodshuffle.com, freeminimac.com, notebooks4free.com, etc...)?

Your kind valuable input would be appreciated. :D

EcpHosting
02-08-2005, 03:54 PM
...

The Question: Is this set to only work in posts and sigs (this is where we only want it to work, as we do not allow referral links in our boards) or do you think it could override our system? I'm not asking if our system is compatable, I'm just asking where the limitations are for this hack (if it also looks outside of posts and sigs).

A side question: If the above is limited to only those areas, is it possible to expand this for all the other links as well (freeipodshuffle.com, freeminimac.com, notebooks4free.com, etc...)?

Your kind valuable input would be appreciated. :D

Ok, I answered my own questions... it all seems to be working very well without any problems. I have added all the gratis links, as well as all the offer centric links, PLUS all the links to our sites (all being nullified) and all is working beautifully even for links already posted.

If you would like to add the ULTIMATE nullification to your boards (nullifing 17 known links, including the free ipods site), you can use the following code:

includes/functions_showthread.php

Find:
// hide edit button if they can't use it

Above that add:
// nullify links on boards

// gratis links

$refid['freedesktoppc'] = 0;
$post['message'] = preg_replace('/www\.freeDesktopPc\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeDesktopPc.com', $post['message']);

$refid['freeflatscreens'] = 0;
$post['message'] = preg_replace('/www\.freeFlatScreens\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeFlatScreens.com', $post['message']);

$refid['freegamingsystems'] = 0;
$post['message'] = preg_replace('/www\.freeGamingSystems\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeGamingSystems.com', $post['message']);

$refid['freeipodshuffle'] = 0;
$post['message'] = preg_replace('/www\.freeiPodShuffle\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeiPodShuffle.com', $post['message']);

$refid['freeipods'] = 0;
$post['message'] = preg_replace('/www\.freeiPods\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeiPods.com', $post['message']);

$refid['freephotoipods'] = 0;
$post['message'] = preg_replace('/www\.freePhotoiPods\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freePhotoiPods.com', $post['message']);

$refid['freeminimacs'] = 0;
$post['message'] = preg_replace('/www\.freeMiniMacs\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeMiniMacs.com', $post['message']);

// offer centric links

$refid['cameras4free'] = 0;
$post['message'] = preg_replace('/www\.cameras4free\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.cameras4free.com', $post['message']);

$refid['notebooks4free'] = 0;
$post['message'] = preg_replace('/www\.notebooks4free\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.notebooks4free.com', $post['message']);

$refid['mp3players4free'] = 0;
$post['message'] = preg_replace('/www\.mp3players4free\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.mp3players4free.com', $post['message']);

$refid['ipodshuffles4free'] = 0;
$post['message'] = preg_replace('/www\.ipodshuffles4free\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.ipodshuffles4free.com', $post['message']);

$refid['macminis4free'] = 0;
$post['message'] = preg_replace('/www\.macminis4free\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.macminis4free.com', $post['message']);

$refid['pvps4free'] = 0;
$post['message'] = preg_replace('/www\.pvps4free\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.pvps4free.com', $post['message']);

// myfreeipodguide links

$refid['myfreeipodguide'] = 0;
$post['message'] = preg_replace('/www\.myfreeipodguide\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.myfreeipodguide.com', $post['message']);

$refid['howigotmyipod'] = 0;
$post['message'] = preg_replace('/www\.howigotmyipod\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.howigotmyipod.com', $post['message']);

$refid['myipodguide'] = 0;
$post['message'] = preg_replace('/www\.myipodguide\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.myipodguide.com', $post['message']);

This will nullify ALL links from both Gratis and Offer Centric.

djjeffa
02-10-2005, 08:13 PM
ok here is my referall link http://www.freeiPods.com/?r=14713038
could some one show me how the codes would look? I want to do it to my signs as well as my posts.
thank you

TheComputerGuy
02-10-2005, 11:00 PM
I have a user that posts a simple site to his personal site. I would like for it to be changed to something I want. How can this be done?

its like www.dot.msn.com/community

or something do I need to do anything special to it?

djjeffa
02-11-2005, 01:00 AM
Nice idea, but didn't work fo rme either....He has it linked to an image in his sig...is this the reason??

EDIT:: DUH!!! I just added this underneath the original code and noe it changes it in the signature also.

$post['signature'] = preg_replace('/www\.freeiPods\.com\/default\.aspx\?referer=([0-9]+)/', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['signature']);




Thanks.....that didnt work for me but this did

$post['signature'] = preg_replace('/www\.freeiPods\.com\/(?:default\.aspx)?\?(r|referer)=([0-9]+)/i', 'www.freeiPods.com/default.aspx?referer=' . $refid['freeipods'], $post['signature']);

dwh
02-11-2005, 01:56 AM
Give me the URL and i'll write the replacement for it :)

Are you saying replacements could work for any affiliate program? Canyou do this instead of the long hack by amyhkhar for amazon and ebay?

Dean C
02-12-2005, 11:44 AM
There is no one line I could write which would work for every site. Amazon uses a completely different URL to freeipods.com for example. Btw ECPhosting, all those lines can be combined into one, and it is of no benefit to anyone who wants to put their own ID in there. However, you have a nice list of sites in there so I'll write a regexp for all gratis sites tonight :) The main idea of this is not to censor them, as you can do this with replacement, but to replace their ID with yours.

Cheers,
- Dean

Dean C
02-13-2005, 10:15 PM
I have a user that posts a simple site to his personal site. I would like for it to be changed to something I want. How can this be done?

its like www.dot.msn.com/community

or something do I need to do anything special to it?

You can do this with replacements, refer to the vBulletin manual on how to use these :)

UK Jimbo
02-16-2005, 10:36 PM
I really like this hack and (stupidly) hadn't thought about identifying the posts by their content. I've had loads of thoughts along the lines of email addresses, preventing posts in some forums till users have built up a decent post count, etc, etc.

I'm going to set about writing a hack that traps posts that are:

contain set regular expressions (dotdeals.com, ekmas.com) etc
are made by users that have posted less than n (probably 10) posts


I'm thinking out loud here but the posts should then probably be dropped into a moderation queue or in some way flagged to moderators. An easier solution might just be to display them a "no permission" page when they try to post such content.

There doesn't seem like a whole lot of point in banning the users there & then as their posts won't make it to the site anyway.

Either way this should prevent the spam getting onto the site in the first place.

edit: I've just written something that I'll try out on visordown.com for a week or so. If all goes to plan I'll post up the hack here

ImportPassion
04-20-2005, 09:22 AM
i just added the freepsp one to this :)

sonicdriven
05-03-2005, 01:46 PM
For usefull than you'll ever know. Some spend time cleanin up their forums, others make money from dirt... lol GREAT HACK! :)

ManagerJosh
07-20-2005, 01:20 AM
Dean...time to update hack :p