vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Annoy the free iPod spammers with referral ID replacement (https://vborg.vbsupport.ru/showthread.php?t=75494)

Dean C 01-30-2005 10:00 PM

Annoy the free iPod spammers with referral ID replacement
 
[Annoy the free iPod spammers with referral ID replacement]

Information
  • [high]vBulletin Version:[/high] 3.0.6

  • [high]Author:[/high] Dean Clatworthy

  • [high]Copyright:[/high] 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.

  • [high]Donations:[/high] 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.

  • [high]Credits:[/high] 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:

PHP Code:

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

Above it add:

PHP Code:

$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

Quote:

Originally Posted by nexialys
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

Quote:

Originally Posted by nexialys
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

Quote:

Originally Posted by Dean C
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:
Code:

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

Quote:

Originally Posted by Dean C
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:
Code:

// hide edit button if they can't use it
Add Above:
Code:

//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

Quote:

Originally Posted by imakuni?
For those of you who dont want the link replaced, heres a code that nullifies the links

Installation
Find in includes/functions_showthread.php:
Code:

// hide edit button if they can't use it
Add Above:
Code:

//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

Quote:

Originally Posted by KW802
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

Quote:

Originally Posted by yinyang
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.

Code:

$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

Quote:

Originally Posted by Dean C
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

Quote:

Originally Posted by ludd
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

Quote:

Originally Posted by juanph
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.

Code:

$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

Quote:

Originally Posted by yoyoyoyo
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
Code:

$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

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

Quote:

Originally Posted by EcpHosting
...

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:
PHP Code:

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

Above that add:
PHP Code:

// 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

Quote:

Originally Posted by juanph
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.

Code:

$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

Code:

$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

Quote:

Originally Posted by Dean C
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


All times are GMT. The time now is 09:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01675 seconds
  • Memory Usage 1,884KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete