PDA

View Full Version : Miscellaneous Hacks - Amazon Integration


Icheb
06-20-2006, 10:00 PM
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
06-21-2006, 02:30 AM
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
06-21-2006, 02:35 AM
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
06-21-2006, 07:14 AM
nice one.

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

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


Great hack though.

version2
06-21-2006, 09:06 PM
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
06-22-2006, 05:47 AM
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
06-22-2006, 07:34 AM
I installed it under 3.5.4 and it seems to work.

Thanks.

version2
06-22-2006, 10:55 AM
I installed it under 3.5.4 and it seems to work.

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

klaush
06-22-2006, 02:13 PM
Huh? Show me an example link? Please!

You have Mail.

noppid
06-22-2006, 04:25 PM
Can the rest of us see it?

Thanks

klaush
06-22-2006, 06:15 PM
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
06-22-2006, 06:25 PM
think you

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

Catsgot9

klaush
07-02-2006, 04:48 PM
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
07-05-2006, 06:01 AM
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
07-10-2006, 05:13 PM
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
07-10-2006, 05:32 PM
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
07-15-2006, 10:50 AM
erm, smug sarcasm?

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

rinkrat
08-04-2006, 05:53 AM
Sweet! Can you make an Ebay version too?

soletrader
08-14-2006, 12:20 PM
<?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
08-24-2006, 03:01 AM
Is this working on 3.6 Gold?

Taco John
08-29-2006, 08:30 AM
Sweet! Can you make an Ebay version too?



I was just going to ask that! :)

Pagandream
11-07-2006, 01:30 PM
Is this working on 3.6 Gold?

for me not :(

Markith
11-27-2006, 11:55 AM
Anyone know if there is a working amazon hack out there????

logastro
01-05-2007, 07:23 PM
Yeah, a working version could be interesting (and better with over affiliation possibilities)

amykhar
01-05-2007, 08:38 PM
I hate advertising in other people's threads, but mine still works for 3.6.x

logastro
01-06-2007, 07:29 PM
Oh thanks a lot!

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

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

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

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



https://vborg.vbsupport.ru/showthread.php?t=144214

Didi R.
08-23-2007, 05:36 AM
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
08-23-2007, 08:33 AM
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
09-16-2007, 08:14 PM
3.6.7 here, but not working :(

reteep
09-17-2007, 04:33 AM
3.6.7 here, but not working :(

Try that one: https://vborg.vbsupport.ru/showthread.php?t=92444&goto=newpost