Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Dynamic Amazon Links Details »»
Dynamic Amazon Links
Version: 1.05, by felxi felxi is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 11-21-2007 Last Update: 11-24-2007 Installs: 92
Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.

Description
This Hack will easily rewrite all amazon links whitin the posts to your associate id. You can add your amazon.de and amazon.com associate id, links to both amazon stores will be replaced with the right id, it works fine with multilanguage boards.

vBulletin
vB 3.6.x working
vB 3.5.x working

updating
just upload the functions_amazon_links.php from the zip and don't forget to insert your amazon ids.

Change Log
25/11/2007 v1.05
- support for [ url=xxx]yyy[ /url]
- replacement for tag=xxx and ref=xxx in non asin links
- small fix for /preview/ links

24/11/2007 v1.04
- [url]amazon-link[ /url] long amazon links will be shorten vb like

23/11/2007 v1.03
- [url] and [url="xxx"] will be repleaced

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
markoroots

Comments
  #102  
Old 08-16-2010, 03:57 PM
ShackMaster ShackMaster is offline
 
Join Date: Apr 2006
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This appears to be working good for us thus far on version 3.8.5... with the co.uk modification.

New links to Amazon.com, Amazon.ca and Amazon.co.uk are rewriting with our associate ID, but old links are not. In order for old links to work, we are having to edit and save with no actual edit being made.

Of course this is our initial findings... and we will have to verify that there are no other conflicts.
Reply With Quote
  #103  
Old 09-23-2010, 04:44 PM
twistedsymphony twistedsymphony is offline
 
Join Date: Nov 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just got this installed and running on 3.8.x and it seems to work great

one concern though... I'm new to the whole affiliate linking thing and I noticed it's adding "ref=nosim" to some of the links.

I didn't know what this was so I looked it up, people used to add it because it would take users directly to the desired products as opposed to a similar product's page.

Amazon has depreciated this tag a few years ago (hence why I'd never seen it) and they state that link that include it should still work but they don't recommend anyone use it anymore.

there is concern among some that the "ref=nosim" tag will at some point stop working and invalidate existing links.

it'd be nice if there were an updated version of this plugin that takes newer link protocol into account... or if someone with a good knowledge of amazon affiliate links could point out what needs to be changed in the code to get rid of that tag.

it looks like it's used in 2 places with the following line:

Code:
$out[1][$i] = 'http://www.amazon.'.$out[2][$i].'/exec/obidos/ASIN'.$asin[0].'ref=nosim/'.$associate_id;
I'm curious if it should be modified to this:

Code:
$out[1][$i] = 'http://www.amazon.'.$out[2][$i].'/exec/obidos/ASIN'.$asin[0].'ref='.$associate_id;
or to this:

Code:
$out[1][$i] = 'http://www.amazon.'.$out[2][$i].'/exec/obidos/ASIN'.$asin[0].'/'.$associate_id;
Reply With Quote
  #104  
Old 10-22-2010, 11:36 AM
hqarrse hqarrse is offline
 
Join Date: Mar 2010
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Version 4.0.8 has caused me some problems (this is my first try so I don't know if it worked in previous versions of VB4).

Firstly I had to manually create the plugin - the XML upload throws an error. This was no problem - just look at the XML file and it is very obvious what to enter when you do 'Add new plugin'. However....

The function only worked for a new post. I believe this is to do with cache. Therefore after this initial posting is made, this line in the plugin no longer does anything:

Code:
$post['pagetext'] = amazon_links($post['pagetext']);
My solution - I'm sure not the ideal one, is to scrap the plugin and edit the file showthread.php as follows:

after line 113 add the include
Code:
require_once(DIR . '/includes/functions_amazon_links.php');
after line 980, in the loop for the large query that reads the post table:

Code:
$post['pagetext'] = amazon_links($post['pagetext']);
and then after 1469 when the post cache is being read

Code:
$post['pagetext'] = amazon_links($post['pagetext']);
Secondly the regex seems to be case sensitive when searching for URL, despite the /i at the end. Therefore as given it will not find
Code:
URL=
and (sod's law) the post I was testing on had it in upper case. I assume the user typed it in manually. I haven't been able to fix that yet, hence this post. Can a regex expert please help and make the function search for both URL and url?
Reply With Quote
  #105  
Old 11-21-2010, 03:12 PM
Claygp's Avatar
Claygp Claygp is offline
 
Join Date: Mar 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we please get an updated version of this for 4.0.8? Mine stopped working with the upgrade.
Reply With Quote
  #106  
Old 11-30-2010, 01:30 PM
raaowdot raaowdot is offline
 
Join Date: Mar 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know how to adapt it for amazon.co.uk?

I've tried to amended the codes from com to co.uk however I'm not able to do this with the variable. Any ideas?
Reply With Quote
  #107  
Old 12-07-2010, 06:55 PM
mulesnx mulesnx is offline
 
Join Date: Mar 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I add a link, it truncates the amazon link but does not add affiliate code. I am using 3.6.7
Reply With Quote
  #108  
Old 02-02-2011, 02:28 PM
wraggster wraggster is offline
 
Join Date: Mar 2005
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance of a vb4 version ?
Reply With Quote
  #109  
Old 03-09-2011, 04:50 PM
lubbie lubbie is offline
 
Join Date: May 2010
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same here. Appreciate an update to vb4
Reply With Quote
  #110  
Old 03-22-2011, 01:53 PM
wraggster wraggster is offline
 
Join Date: Mar 2005
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ShackMaster View Post
This appears to be working good for us thus far on version 3.8.5... with the co.uk modification.

New links to Amazon.com, Amazon.ca and Amazon.co.uk are rewriting with our associate ID, but old links are not. In order for old links to work, we are having to edit and save with no actual edit being made.

Of course this is our initial findings... and we will have to verify that there are no other conflicts.
do you have the full code of this working, i still cantget .com and .co.uk to work together
Reply With Quote
  #111  
Old 05-13-2011, 07:47 PM
hiker's Avatar
hiker hiker is offline
 
Join Date: Sep 2009
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lubbie View Post
Same here. Appreciate an update to vb4
ditto
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12343 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete