s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
Looked through the thread and didn't see this addressed, so I'm not sure if it's something on our site, but on occasion some Twitter embeds are "cut off" where you can only see the top of the embedded item. Is this something that's known or is it just us?
 
It's been mentioned a couple of times but never with actionable information and I've never been able to reproduce it. It's a JavaScript issue and if you look into your browser's developer console there may be an error. It could be an issue with your site's Content-Security-Policy too. That's all I know about it.
 
Looked through the thread and didn't see this addressed, so I'm not sure if it's something on our site, but on occasion some Twitter embeds are "cut off" where you can only see the top of the embedded item. Is this something that's known or is it just us?
check any browser addons you might be using when viewing the site and try with a clean browser. this sometimes happens with things like ghostery or adblock.
 
I have that happen from time to time but when I refresh it the issue is gone. A lot of my users have said the same thing. I have chalked it up to a javascript issue as well and have seen it in browsers I have set up with zero addons at all that I use to see how a site looks clean.
 
I have that happen from time to time but when I refresh it the issue is gone. A lot of my users have said the same thing. I have chalked it up to a javascript issue as well and have seen it in browsers I have set up with zero addons at all that I use to see how a site looks clean.
yeah happens across all browsers for us and is solved with a refresh. must be some strange script error. it's not a big deal, just wondering if it had been addressed.
 
for some reason amazon now posts this image on links.
When i first tested this it worked awesome with the actual product images.. can this be fixed?
I'll be using a lot of amazon links and can not have this showing up a million times.
120x240.gif
 
for some reason amazon now posts this image on links.
When i first tested this it worked awesome with the actual product images.. can this be fixed?
I'll be using a lot of amazon links and can not have this showing up a million times.
120x240.gif
this has been happening to me more and more often as well, and the banner links are landing me on the amazon homepage and not the product.
 
Do you have an Amazon Affiliate ID? You may ask the Amazon Associate center for support, they may know what's going on.
Yes, why would associate center know what's going on with your plugin. They would literally tell me to talk to you. That's tech 101
 
And how would I know why Amazon servers randomly return different pages for the same URL? Send them the HTML, ask them if there's something wrong with it.
 
To put it into perspective the Xenforo devs are not having an easy time even pulling the web page title from Amazon because they are constantly changing things.

This addon does a great job but there is only so much that can be done when you are working "against" a large company like that. Remember they want their content on your website as an ad and not hosting images for free.
 
This addon does a great job but there is only so much that can be done when you are working "against" a large company like that. Remember they want their content on your website as an ad and not hosting images for free.
I AM trying to serve ads for their products while serving my members by giving them more than a link.

I just spent some time looking at how they're building iframe src links for some of their ads, and for myself, I created the custom callback below, and it seems to work in very limited testing atm. I've lost what the TLD was doing, and I only use a US associates tag, so very simplified functionality. I don't pretend to fully understand the workings of everything and no guarantees it will work for you, but maybe you can do something with it.

PHP:
class s9e_Custom
{
    public static function amzn($html, array $vars)
    {
        $html='<div data-s9e-mediaembed="amazon" style="display:inline-block;width:100%;max-width:120px"><div style="overflow:hidden;position:relative;padding-bottom:200%">
        <iframe allowfullscreen="" scrolling="no" style="border:0;height:100%;left:0;position:absolute;width:100%" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&ad_type=product_link&marketplace=amazon&region=US&asins=';
        $html .= htmlspecialchars($vars['id'],2);
        $html .= '&tracking_id=';
        $html .= htmlspecialchars(XenForo_Application::get('options')->s9e_AMAZON_ASSOCIATE_TAG,2);
        $html .= '"></iframe></div></div>';
        return $html;
    }
}
 
@Xanin Interesting. I'm not in the Amazon Affiliate program so I don't have access to their tools and that's the first time I see that kind of widgets. Would you mind sending me the URL of an iframe from an actual product displayed using your affiliate ID? You can send it in private if you don't want.

Actually, anyone who's an Amazon Associate please go to your control panel, generate a Text+Image link for any product and send me the iframe HTML. Do that for any Amazon Associate program you're part of: US, UK, EU, etc... That will go a long way towards fixing any issues. @jolly @suineg
 
Last edited:
I've just updated the Amazon media site to use their latest code. The add-on supports Amazon links from 8 different countries. Most of them (all but Spain and Italy) have moved their ad servers for the second time in the past year. That means that some of the links use the old kind of embeds and others use the newer one. I had to register for half a dozen associate programs in order to access their latest code, before manually testing each of the dozen reference links I use to ensure that the add-on works. Some of those links have to be replaced periodically as products are discontinued or replaced. This took 3+ hours.

From what I can tell, the new servers work reliably and all embeds work as intended. It should be noted, however, that adblockers and Firefox's Tracking Protection may still interfere with Amazon's embedded products.

If you still have issues with Amazon embeds, make sure you have the latest version of the add-on and if you do, please send me the URL of the Amazon product as well as any info pertaining to your browser.

If this update solved your issue, please consider supporting the add-on's development with a donation using either button below. Every donation is appreciated and helps with future development and maintenance, thanks.

 
If you still have issues with Amazon embeds, make sure you have the latest version of the add-on and if you do, please send me the URL of the Amazon product as well as any info pertaining to your browser.
Updated version seems to work for some links but not others, as exhibited here (and in the post below it).
Links to products in question:
Code:
works: https://www.amazon.com/Ubiquiti-Networks-Enterprise-AP-Unifi/dp/B00HXT8R2O
markup generated: [MEDIA=amazon]B015Q9XCAO[/MEDIA]

broke: https://www.amazon.com/Atora-Shredded-Suet-200G/dp/B015Q9XCAO
markup generated: [MEDIA=amazon]B00HXT8R2O[/MEDIA]
Thanks much for your time.

Edit: hrm, overnight it seems the one that was working has also stopped working :/

Edit edit: Ok, correction - the above code example is the case on chrome... on firefox, neither seem to function correctly.
 
Last edited:
@JoshyPHP

Facebook has now this at: https://developers.facebook.com/docs/plugins/embedded-video-player

Screen Shot 2016-09-20 at 12.23.28.webp

Do you see the "Include full post" check box?

Can we have this in your addon here?

I would like the embedded videos (when you paste a video link on Facebook) to include the "full post", as shown above...

It used to be with your add-on like this, but then it was taken away (supposedly because of a Facebook change, however now it seems they've brought back the feature)
 
Updated version seems to work for some links but not others, as exhibited here (and in the post below it).

I looked into it but I have no idea why Amazon embeds behave so erratically. The same embeds that work on my test forum won't work on another site and I seem to be unable to find why. :(


I'll think about it but I found that many users preferred the standalone player. If you want the whole post to be embedded you can remove the "type=video" part of the BBCode. For instance, here's what the default BBCode looks like for a video post:
Code:
[MEDIA=facebook]id=10150451523596807;type=video[/MEDIA]

Here's what you can use instead: (either form is fine but you may prefer the first one for compatibility with other Facebook-related plugins)
Code:
[MEDIA=facebook]10150451523596807[/MEDIA]
[MEDIA=facebook]id=10150451523596807[/MEDIA]
 
Top Bottom