![]() |
|
Well, my search fu may be weak, but I have not been able to find in this thread any info about how to modify the replacement code for amazon links so that they include an affiliate ID. I have the mod installed and it seems to be working fine, taking the link showing in the address bar of any amazon product page and adding the little amazon icon with a link and the product description with a link.
For instance, here is a page I would like to link to, Code:
http://www.amazon.com/RAM-Universal-X-Grip-Holder-1-Inch/dp/B0055PH0XA/ref=pd_bxgy_e_img_y Here is the regular expression given in the definition, Code:
http://[a-z\.]*?amazon\.([a-z\.]*)/([\d\w_\-]*)/?([product|dp|asin]+/[\d\w]+)(?:.*) Code:
<a href="http://www.amazon.$p1/$p2/$p3/" target="_blank" title="$ameinfo[title]"><img src="images/misc/amazon_icon.gif" border="0" alt="$ameinfo[title]" /></a> <a href="http://www.amazon.$p1/$p2/$p3/" target="_blank" title="$ameinfo[title]">$ameinfo[title]</a> The associate id has this format "&tag=XXXXX-20" in links that work with Amazon. I can't figure out how to modify that replacement expression to include the id... I am sure it is something simple, but I don't know how all this RegEx stuff works. I would very much appreciate any help! |
I think I got it.
The id has to be "?tag=XXXXX-20" and that gets stuck right after the $p3/ and still inside the quote for both places where the link shows. I tested it and then took the changed link to the Amazon site to verify that it works with their link checker. |
Last question...
If I understand this correctly, the AME makes the change to the link right when the post is created. It does not occur on the fly every time a post with a link is viewed. If that is correct, is there a way to make this retroactive, meaning that it will change amazon links for old posts/threads on my forum? |
Quote:
Quote:
Any older links you wanted to reflect the new edits to your definition would require them being edited and resaved. |
Quote:
|
Quote:
|
Digital Jedi, you are awesome, thank you for your job.
Are there any way to update rutube? rutube http://rutube.ru/video/daf5fb1a77100...cf86562cde689/ <iframe width="720" height="405" src="//rutube.ru/video/embed/6713345" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe> Also, is Divshare lost forever? Does Justin.tv needs an update? And i would like to see Twitch too. |
I'll look into all of those on the next update. It'll be a little delayed, but I'll get to them. I may be able to safley open back up the request forum. So stay tuned.
I don't, off the top of my head, remember why I removed Divshare. Normally that happens when the site's embed code become too broad for AME to handle. But I'll look at them again and let you know. |
Howdy,
Having problems with Amazon links again... Not sure why. Original link posted on forum, Code:
http://www.amazon.com/dp/B009I2BRUS/ Code:
http://www.amazon.com/dp/B009I2BRUS/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=1EEVRNXUZ4YUI&coliid=IKWF6MS36PJLJ Code:
http://www.amazon.com/dp/B009I2BRUS/?tag=twtwhetex-20 Here is the regular expression Code:
http://[a-z\.]*?amazon\.([a-z\.]*)/([\d\w_\-]*)/?([product|dp|asin]+/[\d\w]+)(?:.*) Code:
<a href="http://www.amazon.$p1/$p2/$p3/?tag=twowhetex-20" target="_blank" title="$ameinfo[title]"><img src="images/misc/amazon_icon.gif" border="0" alt="$ameinfo[title]" /></a> <a href="http://www.amazon.$p1/$p2/$p3/?tag=twowhetex-20" target="_blank" title="$ameinfo[title]">$ameinfo[title]</a> Thanks. |
All times are GMT. The time now is 04:46 AM. |
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:
|