![]() |
Links to Amazon
I have a shopping forum, and quite often people post links to sales items at Amazon. My board is an affilliate of Amazon, ergo I would like to transform any Amazon links to point to my affilliate account.
All it takes is appending a slash and the affilliate name at the end of the link. So, basically, as URLs are entered in a message, the hack needs to see if it points to amazon.com. If it does, it needs to modify the link to the affilliate link. This would probably be a useful hack for others besides myself. Anyone have any thoughts on how to do it? Amy |
edited for bug fix.. check below
|
This would be great -- Amy are you using it?
(Thanks Logician!) |
I haven't had time to try it yet.
Going to try right now :D Amy |
The code is throwing errors. Pretty sure it has something to do with the quotes in the urls. Working on ironing out the kinks.
Amy |
Quote:
Code seems to work correctly here.. |
Parse error: parse error in /home/eaforums/public_html/admin/functions.php on line 644
Fatal error: Call to undefined function: vbdate() in /home/eaforums/public_html/admin/sessions.php on line 356 |
Vbulletin changed the code while it's parsed here. ;)
I attached the code into a text file, please apply from there and you'll be fine.. Please notice: The code is 2 lines, not 4! So do not break the lines in between! There are only 2 linebreaks inside, both after the $bbcode); lines. |
Does it work?
|
Sorry, I had to be away for a few days. It doesn't quite work. If I give it a link to a specific product, say
http://www.amazon.com/exec/obidos/AS...878268-1024166 It truncates all the product information and gives me http://www.amazon.com/affiliatesite instead of http://www.amazon.com/exec/obidos/AS.../affiliatesite Amy |
All times are GMT. The time now is 10:41 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|