vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - DJ's AMEs :: Media Definitions for AME 2.5 :: More Video, Twitter, Pinterest... (https://vborg.vbsupport.ru/showthread.php?t=195884)

lowlight 11-23-2013 03:48 AM

Thanks! Also Vine would be great too

https://vine.co/v/bjHh0zHdgZT/embed

Tourmeister 11-27-2013 08:10 PM

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]+)(?:.*)
and here is the replacement expression,

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!

Tourmeister 11-27-2013 08:46 PM

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.

Tourmeister 11-27-2013 08:48 PM

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?

Digital Jedi 11-28-2013 11:44 PM

Quote:

Originally Posted by Tourmeister (Post 2464183)
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.

Yes, you got it. You just append your ID string to the URLs in the Replacement HTML as you would a regular link.

Quote:

Originally Posted by Tourmeister (Post 2464184)
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?

Not in the case of regular links. With videos, you can rebuild old BBCode that was specially set aside for that purpose. For instance [YOUTUBE] BBCode can be rebuilt to use [AME] BBCode instead. But it's likely you didn't have a specialized BBCode tag set aside for Amazon links. You likely just posted links as normal. And you certainly wouldn't want AME replacing all your [URL] tags. :)

Any older links you wanted to reflect the new edits to your definition would require them being edited and resaved.

Tourmeister 11-29-2013 06:41 PM

Quote:

Originally Posted by Digital Jedi (Post 2464441)
Yes, you got it. You just append your ID string to the URLs in the Replacement HTML as you would a regular link.


Not in the case of regular links. With videos, you can rebuild old BBCode that was specially set aside for that purpose. For instance [YOUTUBE] BBCode can be rebuilt to use [AME] BBCode instead. But it's likely you didn't have a specialized BBCode tag set aside for Amazon links. You likely just posted links as normal. And you certainly wouldn't want AME replacing all your [URL] tags. :)

Any older links you wanted to reflect the new edits to your definition would require them being edited and resaved.

Well, I dug up some old threads that I knew had posts with Amazon links in them. The links now have my ID appended to them. I have no clue how this works, but it appears that even old links are being changed. I even copied a few of them and used the "link checker" that Amazon provides to make sure they were valid links.

Digital Jedi 12-01-2013 06:15 AM

Quote:

Originally Posted by Tourmeister (Post 2464640)
Well, I dug up some old threads that I knew had posts with Amazon links in them. The links now have my ID appended to them. I have no clue how this works, but it appears that even old links are being changed. I even copied a few of them and used the "link checker" that Amazon provides to make sure they were valid links.

I've run into this before, too. It seems like it doesn't consistently do that. But my testing has not been done extensively with the AME cache off, so that may be where my random experiences come from. I'm glad it appears to be working, though.

Nook_Neformat 12-17-2013 08:10 PM

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.

Digital Jedi 12-17-2013 09:24 PM

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.

Tourmeister 12-18-2013 06:07 PM

Howdy,

Having problems with Amazon links again... Not sure why.

Original link posted on forum,
Code:

http://www.amazon.com/dp/B009I2BRUS/
Or this one,
Code:

http://www.amazon.com/dp/B009I2BRUS/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=1EEVRNXUZ4YUI&coliid=IKWF6MS36PJLJ
SHOULD get changed to

Code:

http://www.amazon.com/dp/B009I2BRUS/?tag=twtwhetex-20
But it is messing up. The "/dp/" part of the original link is getting an extra / stuck in it so that it becomes "/d/p/", and that screws up the link. I have NO CLUE how the replacement stuff works :giveup:

Here is the regular expression
Code:

http://[a-z\.]*?amazon\.([a-z\.]*)/([\d\w_\-]*)/?([product|dp|asin]+/[\d\w]+)(?:.*)
and here is the replacement code
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>
Any chance you know what is inserting that extra "/"?

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
  • Page Generation 0.02453 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete