PDA

View Full Version : Miscellaneous Hacks - Amazon Integration


Icheb
21 Jun 2006, 03:17
This hack turns all links to an article from amazon.de (you can change it to .com or anything else you like) into affiliate links by appending your affiliate ID to the link. All you have to do is install the plug-in, change the amazon site and your ID and you're good to go.

Please test it on your site and report back. :)

Don't forget to hit the install button if you like it!

Paul M
21 Jun 2006, 03:30
Looks interesting, might have to give this a test. It would be better if it was packaged as a product rather than just a plugin. :)

Icheb
21 Jun 2006, 03:35
I never wrote hacks for 3.5 / 3.6 before, so I'm not that versed with the product and plugin system. However, it works on my test forum. ;)

ThorstenA
21 Jun 2006, 08:14
nice one.

version2
21 Jun 2006, 21:38
Oh, crap! I installed this on my 3.5.4 site. I wonder what its going to do. =P

noppid
21 Jun 2006, 21:52
Don't forget to change the associates ID or you are selling for him. :p


Great hack though.

version2
21 Jun 2006, 22:06
Don't forget to change the associates ID or you are selling for him. :p


Great hack though.
Didn't work, I don't think. I posted a link to a product at Amazon...shouldn't it have put my aff-id in there?

I wasn't expecting it to work....like I said. I am not running the beta yet. =]

Icheb
22 Jun 2006, 06:47
Don't forget to change the associates ID or you are selling for him. :p
You can't blame me, I warned you in the initial post. ;)

klaush
22 Jun 2006, 08:34
I installed it under 3.5.4 and it seems to work.

Thanks.

version2
22 Jun 2006, 11:55
I installed it under 3.5.4 and it seems to work.

Thanks.
Huh? Show me an example link? Please!

klaush
22 Jun 2006, 15:13
Huh? Show me an example link? Please!

You have Mail.

noppid
22 Jun 2006, 17:25
Can the rest of us see it?

Thanks

klaush
22 Jun 2006, 19:15
Can the rest of us see it?

Thanks

http://www.nikon-fotografie.de/vbulletin/showpost.php?p=99843&postcount=8

Just click on one or both of the two Amazon-links.

The Free Bird
22 Jun 2006, 19:25
think you

Catsgot9
02 Jul 2006, 15:49
Where do you enter in your associate information? There is nothing in Admin CP.... please offer instructions with this...

Catsgot9

klaush
02 Jul 2006, 17:48
Where do you enter in your associate information? There is nothing in Admin CP.... please offer instructions with this...

Catsgot9

Just edit the plugin after install.

SnitchSeeker
05 Jul 2006, 07:01
Where do you enter in your associate information? There is nothing in Admin CP.... please offer instructions with this...
I believe you edit "atnet-21" in the xml file to whatever your associate id is.

tokenyank
10 Jul 2006, 18:13
This is hit and miss...

If you copy link location from amazon, you get the desired link syntax:
http://www.amazon.co.uk/exec/obidos/ASIN/0761128611/ref=pd_sbs_4/026-6811884-2347654?%5Fencoding=UTF8

The rewrite works after the ASIN to add the affiliate code, so this works.

But, if you click on the link, the sytax in the address bar changes to:
http://www.amazon.co.uk/gp/product/0761128611/026-6811884-2347654?v=glance&n=266239

So, if someone copy&paste a link of a product that they are currently looking at, it won't work due to the /gp/product syntax.

So, let's just hope everyone copies link location and pastes that so that the ASIN stays valid!

Icheb
10 Jul 2006, 18:32
You could have also dropped the smug sarcasm and merely pointed this out. I guess that wasn't good enough for you, now was it?

tokenyank
15 Jul 2006, 11:50
erm, smug sarcasm?

Wow! If that's how you react to criticism, god help you in the real world!

rinkrat
04 Aug 2006, 06:53
Sweet! Can you make an Ebay version too?

soletrader
14 Aug 2006, 13:20
<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
<plugin active="1" product="vbulletin">
<title>Amazon Affiliate URL</title>
<hookname>bbcode_create</hookname>
<phpcode><![CDATA[$this->tag_list['no_option']['url']['callback'] = 'handle_external';
$this->tag_list['no_option']['url']['external_callback'] = 'handle_bbcode_url_amazon';
$this->tag_list['option']['url']['callback'] = 'handle_external';
$this->tag_list['option']['url']['external_callback'] = 'handle_bbcode_url_amazon';

if (!function_exists('handle_bbcode_url_amazon'))
{
function handle_bbcode_url_amazon(&$parser, $text, $link)
{
global $post;
$parsedurl = $parser->handle_bbcode_url($text, $link);
if (stristr($parsedurl, 'http://www.amazon.com')) {
$geturl = explode('"', $parsedurl);
$amazon_url = explode('/', $geturl[1]);
$size_url = count($amazon_url);
$i = 0;
while ($i <= $size_url) {
if ($amazon_url["$i"] == 'ASIN') {
$i++;
$parsedurl = preg_replace('/href="(.*)"/U', 'href="http://www.amazon.com'. $amazon_url["$i"] .'/myID"', $parsedurl);
break;
}
$i++;
}
}
return $parsedurl;
}
}]]></phpcode>
</plugin>
</plugins>


Here is my code. I cant seem to get it to work.

http://www.traderslaboratory.com/forums/showthread.php?p=117#post117

Can anyone help me figure this out? Thank you in advance.

RetroDreams
24 Aug 2006, 04:01
Is this working on 3.6 Gold?

Taco John
29 Aug 2006, 09:30
Sweet! Can you make an Ebay version too?



I was just going to ask that! :)

Pagandream
07 Nov 2006, 14:30
Is this working on 3.6 Gold?

for me not :(

Markith
27 Nov 2006, 12:55
Anyone know if there is a working amazon hack out there????

logastro
05 Jan 2007, 20:23
Yeah, a working version could be interesting (and better with over affiliation possibilities)

amykhar
05 Jan 2007, 21:38
I hate advertising in other people's threads, but mine still works for 3.6.x

logastro
06 Jan 2007, 20:29
Oh thanks a lot!

imranbaig
09 Jan 2007, 08:07
I installed this and changed url to .com and edited my own Affiliate ID, now whats next??

ruhrpottforum
20 May 2007, 13:42
I was just going to ask that! :)
Anybody know if their is something like that for ebay

Smiry Kin's
21 May 2007, 02:21
Anybody know if their is something like that for ebay
ah that would be nice.. problem is ebay work with CJ.. >.<

rinkrat
21 May 2007, 05:41
Anybody know if their is something like that for ebay



http://www.vbulletin.org/forum/showthread.php?t=144214

Didi R.
23 Aug 2007, 06:36
hmm, i've got this thing running 2 weeks ago, but now it doesn't work for me anymore.

I still have vBulletin v3.6.7 PL1 running, so i didn't do any updates since the installation.
:confused:

daFish
23 Aug 2007, 09:33
Great Plugin, but it doesn't change the URL like it should. I'm using vBulletin 3.6.4 at the moment and no link, e.g. this (http://www.amazon.de/Reamonn-Wish-Live/dp/B000PMGPUC/ref=sr_1_1/028-2831116-3053358?ie=UTF8&s=dvd&qid=1187443747&sr=1-1), are being converted.

Bernd Glasstett
16 Sep 2007, 21:14
3.6.7 here, but not working :(

reteep
17 Sep 2007, 05:33
3.6.7 here, but not working :(

Try that one: http://www.vbulletin.org/forum/showthread.php?t=92444&goto=newpost