![]() |
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 |
1 Attachment(s)
ok I edited the code and fixed the bug.. It now seems to parse all amazon related [URL] and [URL] tags correctly. However since I dont use it, I dont know if there are any further bugs. So please check this code and let me know how it is doing.
|
Works beautifully now!
Thank you :) Amy |
great hack works it also with amazon.de?
thx |
Awesome And Thank yOu!!
|
This one is already updated for VB3 and being tested. It should be released when VB goes gold.
|
I made a few changes to the link structure because I learned from Amazon that not all of my sales were tracking the old way. In my new, improved version of this, my orders have more than DOUBLED. This isn't so much that orders are up. It's more that not all sales were tracked before.
Given that I only fixed the problem in early June, and sales are up this much, I have to wonder how many I was losing before. |
Can you add on to this? I have another affiliate that uses a ? and then the afilliate ID. I tried copying the code and putting hte correct data and I get:
Warning: REG_BADRPT |
The changes that you made, are they available in the code in the previous page, or you never posted them here?
I know this is an old thread. Thanks Quote:
|
All times are GMT. The time now is 06:52 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:
|