vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Amazon Integration (https://vborg.vbsupport.ru/showthread.php?t=119220)

Icheb 06-20-2006 10:00 PM

Amazon Integration
 
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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

Originally Posted by noppid
Can the rest of us see it?

Thanks

http://www.nikon-fotografie.de/vbull...43&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

Quote:

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

Quote:

Originally Posted by Catsgot9
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/...Fencoding=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/0...lance&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

Code:

<?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/for...?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

Quote:

Originally Posted by rinkrat
Sweet! Can you make an Ebay version too?



I was just going to ask that! :)

Pagandream 11-07-2006 01:30 PM

Quote:

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

Quote:

Originally Posted by Taco John (Post 1063261)
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

Quote:

Originally Posted by ruhrpottforum (Post 1251387)
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

Quote:

Originally Posted by ruhrpottforum (Post 1251387)
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, 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

Quote:

Originally Posted by Bernd Glasstett (Post 1340365)
3.6.7 here, but not working :(

Try that one: https://vborg.vbsupport.ru/showthrea...4&goto=newpost


All times are GMT. The time now is 05:23 PM.

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.01358 seconds
  • Memory Usage 1,792KB
  • 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
  • (1)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (37)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete