The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
edited for bug fix.. check below
|
#3
|
||||
|
||||
This would be great -- Amy are you using it?
(Thanks Logician!) |
#4
|
||||
|
||||
I haven't had time to try it yet.
Going to try right now Amy |
#5
|
||||
|
||||
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 |
#6
|
||||
|
||||
Quote:
Code seems to work correctly here.. |
#7
|
||||
|
||||
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 |
#8
|
||||
|
||||
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. |
#9
|
||||
|
||||
Does it work?
|
#10
|
||||
|
||||
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 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|