Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 May 2002, 16:30
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
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

Last edited by amykhar; 26 May 2002 at 16:43.
Reply With Quote
  #2  
Old 15 Jun 2002, 21:07
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
edited for bug fix.. check below
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System

Last edited by Logician; 22 Jun 2002 at 21:43.
Reply With Quote
  #3  
Old 16 Jun 2002, 15:47
Me2Be's Avatar
Me2Be Me2Be is offline
 
Join Date: Nov 2001
This would be great -- Amy are you using it?

(Thanks Logician!)
Reply With Quote
  #4  
Old 16 Jun 2002, 15:54
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
I haven't had time to try it yet.

Going to try right now

Amy
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #5  
Old 16 Jun 2002, 16:08
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: 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
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #6  
Old 16 Jun 2002, 18:13
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Originally posted by amykhar
The code is throwing errors. Pretty sure it has something to do with the quotes in the urls. Working on ironing out the kinks.
Can you specify the errors? What's the url before parsed and after parsed?

Code seems to work correctly here..
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #7  
Old 16 Jun 2002, 18:29
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
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
Reply With Quote
  #8  
Old 16 Jun 2002, 18:42
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
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.
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #9  
Old 20 Jun 2002, 19:04
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Does it work?
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #10  
Old 21 Jun 2002, 15:22
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
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
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #11  
Old 22 Jun 2002, 21:46
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
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.
Attached Files
File Type: txt amazon.txt (896 Bytes, 159 views)
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
Reply With Quote
  #12  
Old 23 Jun 2002, 05:17
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
Works beautifully now!

Thank you

Amy
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #13  
Old 02 Mar 2003, 23:50
Brain Crusher Brain Crusher is offline
 
Join Date: Feb 2003
great hack works it also with amazon.de?

thx
Reply With Quote
  #14  
Old 19 Jun 2003, 19:57
ryancooper's Avatar
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Awesome And Thank yOu!!
Reply With Quote
  #15  
Old 19 Jun 2003, 21:35
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
This one is already updated for VB3 and being tested. It should be released when VB goes gold.
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Miscellaneous Hacks Dynamic Amazon Links felxi vBulletin 3.6 Add-ons 136 02 Oct 2014 16:11
Dynamically Create Amazon Links to use your associate id amykhar vBulletin 3.5 Add-ons 71 05 Mar 2012 08:33



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 00:07.

Layout Options | Width: Wide Color: