s9e Media Sites

s9e Media Sites 2.15.0

No permission to download
Added Mastodon
Pretty crazy how you are managing to detect the height on a reload and improve the size of the embed! Love it. I see a lot of complaints from people who are struggling to embed mastodon posts because they seem to offer a fixed height embed code.

Ok. Looks like a refresh of the page is not even needed! Crazy. Love this. Now hoping you can find a nice way to support more instances 😬
 
Last edited:
@JoshyPHP from which version it does requires PHP 7.4?
Based on my log, it would be 2.7.19. In reality the add-on probably works on earlier versions still but I don't have any way to test it, that's what I bumped the requirements.

Would there be anyway to stop autoplay on Imgur?
None that I know. It's not even autoplay actually, they manually start the video in JavaScript.

Pretty crazy how you are managing to detect the height on a reload and improve the size of the embed! Love it. I see a lot of complaints from people who are struggling to embed mastodon posts because they seem to offer a fixed height embed code.

Ok. Looks like a refresh of the page is not even needed! Crazy. Love this. Now hoping you can find a nice way to support more instances 😬
Thanks. Mastodon's embeds can be resized but you just have to ask nicely in JavaScript. People who have issues with the redimensioning Mastodon's embeds into their page may have forgotten to inject Mastodon's JavaScript into the page.
 
  • Sad
Reactions: Xon
I don't think the player from your screenshot was generated by this add-on. The latest update features a similar player, and you can change its size in CSS by editing your extra.less template. Probably something like this:
CSS:
[data-s9e-mediaembed="spotify"]
{
     height: 352px !important;
     width:  523px !important;
}
They have their own padding as part of their layout and there's no way to change that.

2.8.5 fixed the issue. The horizontal player loads now. Thank you!

player.webp
 
I've had reports that Tumblr embeds are failing recent (when using the url unfurl option instead of the embed bits).

https://robotnik-mun.tumblr.com/post/701775547181793280/mmn2-1210-1215

The iframe for this looks like:
Code:
<iframe title="Tumblr post" frameborder="0" allowfullscreen="true" src="https://embed.tumblr.com/embed/post//701775547181793280?width=542&amp;language=en_US&amp;did=null" class="tumblr-embed tumblr-embed-loaded" style="display: block; padding: 0px; margin: 10px 0px; border: none; visibility: visible; width: 542px; min-height: 200px; max-width: 100%;" height="220"></iframe>

I think there is supposed to be some sort of auth code between post//701775547181793280 chunks?

None that I know. It's not even autoplay actually, they manually start the video in JavaScript.
Yuck.
 
Short URLs should already be supported. What URL did you try? TikTok rejects requests from some IPs, it's possible they won't let your server translate it.
 
I checked that link on my local install and it resolved correctly to [MEDIA=tiktok]7174939010261961989[/MEDIA]

If the editor seems stuck, it's probably that TikTok's server froze. I don't know the exact conditions required (it used to be possible by forcing HTTP/1.1 via Goutte) but in some situation, TikTok doesn't respond to a request but keeps it indefinitely open, or at least until PHP gives up. Depending on PHP's configuration, it can take 30 seconds or more. In that case, all you can do is post the long link instead.

If possible, make sure that HTTP/2 is enabled in your server's cURL, which requires nghttp2 to be installed. You can look it up on the phpinfo page under curl, displayed as HTTP2 | Yes
 
Last edited:
The two sites that we seem to have problems with are Amazon and Facebook (usually Marketplace).

For Amazon, S9 will change the code to:
[MEDIA=amazon]B09PYBGVSQ[/MEDIA]
...and many users will see nothing but a blank area in the post.

I just selected the option "Add a link to Amazon product embeds" in settings, so maybe this will fix the problem.

Here's what it looks like in Chrome:

Screenshot 2022-12-13 at 9.59.35 AM.webp

Facebook seems to be inconsistent. Some links don't get touched while others become media links that don't display.

Just wondering if you might add the list of all the media sites and allow admins to toggle them on/off individually.
 
...and many users will see nothing but a blank area in the post.
That's usually the case when users install an ad blocker configured to hide Amazon content. In that case, they won't see the Amazon embedded product unless they whitelist your site.

Facebook seems to be inconsistent. Some links don't get touched while others become media links that don't display.
If you post or send me those URLs I can test them and tell you whether they should be embeddable. This page has a few examples of the kinds of URLs that are supported for each site, but Facebook has so many different types that the list can't be exhaustive.

Just wondering if you might add the list of all the media sites and allow admins to toggle them on/off individually.
If you go to your admin panel and search for media sites it will lead you to the "BB code media sites" page. You can also type the site's name in the search box to access it directly. Those are both default features from XenForo.

If you disable a site, their embedded content will disappear. This add-on adds an option that says "Do not auto-embed links from this site" which allows you to leave a media site disabled while disabling the automatic conversion in future posts.
 
If you post or send me those URLs I can test them and tell you whether they should be embeddable. This page has a few examples of the kinds of URLs that are supported for each site, but Facebook has so many different types that the list can't be exhaustive.

Thanks! I'll look for the Facebook links to share with you if I see them again. It looks like S9 is ignoring all the Facebook Marketplace links now which is great.

If you go to your admin panel and search for media sites it will lead you to the "BB code media sites" page. You can also type the site's name in the search box to access it directly. Those are both default features from XenForo.

OK, cool -- thanks for sharing this info! I turned off Facebook in this massive list.

If you disable a site, their embedded content will disappear. This add-on adds an option that says "Do not auto-embed links from this site" which allows you to leave a media site disabled while disabling the automatic conversion in future posts.

I can't find this -- did you mean to link to another add-on?
 
I can't find this -- did you mean to link to another add-on?
If you go to your admin panel and search for "amazon product" you'll get to the Amazon media site's configuration page. There should be a checkbox that says "Do not auto-embed links from this site". If you check it, it won't convert links but users will still be able to manually (=explicitly) embed product via the "Media" button in the editor. It requires XenForo 2.1 or newer.
 
If you go to your admin panel and search for "amazon product" you'll get to the Amazon media site's configuration page. There should be a checkbox that says "Do not auto-embed links from this site". If you check it, it won't convert links but users will still be able to manually (=explicitly) embed product via the "Media" button in the editor. It requires XenForo 2.1 or newer.
Got it. Thanks for your help and patience!
 
hello, was just wondering if you came up with a workaround to support more mastodon instances. embedding mastodon.social content has been quite nice so far. i understand that this is a complex issue. just wanted to indicate that there is still interest in expanded scope of mastodon whenever you get a chance! thanks 🙏
 
Yes, I have thought about it and I think I know more or less how I want to do it. I haven't been able to spend time actually implementing it though.

So far, here's how it would work from the admin's standpoint. I'd like to add an option on the add-on's configuration page that lists all allowed Mastodon hosts. By default, it would only have mastodon.social and you'd be able to add your own. Adding hosts would enable it for future embeds. Removing hosts would disable it from existing embeds, in case an instance goes rogue. On the user side, the BBCode would look like this [MEDIA=mastodon]host=mastodon.social;id=109262705755044079;name=Gargron[/MEDIA]. In theory I could make it look nice like [MEDIA=mastodon]Gargron@mastodon.social/109262705755044079[/MEDIA] but I try to avoid unnecessary customizations if I can. Mastodon.social would be the default host and could be omitted from the BBCode. I work under the assumption that all Mastodon instances run on the default HTTPS port, please let me know if that's not the case.

I haven't written the backend on the XenForo side yet. From a technical standpoint, I'll need to modify the media site every time the list of hosts is modified, in order to change the regular expression that matches the kind of URLs that should be considered Mastodon instances. I haven't looked up the proper way to do that yet. On the frontend, the code required is already on GitHub, but currently disabled.

I'd love to give an ETA but I've had a hellish end of year so I don't know when I'll be able to work on it. At any rate, this is my top priority for new development.

mastodon_hosts.webp
 
no worries. it's super that you have plans to expand scope of mastodon (and maybe others) instances in future. 👍

i haven't seen any http only instance so far. not sure if it is one of the requirements. they do require https for link verification feature though. i saw that in documentation. but it's safe to assume that https should be there! would check documentation.

documentation does not mention it but a forum posts confirm https is a requirement for non-localhost installs.

 
Last edited:
Top Bottom