s9e Media Sites

s9e Media Sites 2.15.6

No permission to download
Media sites and attachments are conceptually different and can't interact with each other. What you need is a way to display attachments differently. I took a quick look at the admin panel and you may be able to edit the attachment_macros template to display .mp3 attachments in a native audio player. I recommend you try the general support forums, someone may know of an add-on that does that.
 
Great add-on @JoshyPHP.

I have a feature request I hope you'll consider. Would it be possible to add support for using a proxy for outbound curl requests?

My site uses a proxy for outbound requests (as configured via the XenForo config). However, this configuration is not taken into account in the Media Sites add-on and so embedding content from sites like Getty Images doesn't work.

I think a fairly simple code change would suffice in Parser::wgetCurl. Something like:

PHP:
protected static function wgetCurl($url, $headers = [])
    {
        static $curl;

        if (!isset($curl))
        {
            $curl = curl_init();
            // begin
            $config = \XF::app()->config();
            if ($config['http']['proxy']) {
                curl_setopt($curl, CURLOPT_PROXY, $config['http']['proxy']);
            }
            // end
            curl_setopt($curl, CURLOPT_ENCODING,       '');
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        }
        curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($curl, CURLOPT_URL,        $url);

        return curl_exec($curl);
    }

I have tested this change in my development environment and it works well.

What do you think?
 
Last edited:
The video works find on my test board, even though I see a couple of warnings/errors related to insecure requests. They might have some issues with their HTTPS setup.
 
Possibly, but I also get another unrelated JavaScript error on Chrome but not on Firefox so there may be other issues at play.
 
@JoshyPHP a member on my site tried to embed a Spotify track with this URL: https:// open.spotify.com/episode/37Tik1kHq7J2WcYcoLiypt

(I've split the URL into two strings so it isn't parsed by the official XenForo 2 Spotify media code).

That URL wasn't recognised by your Spotify media code as it contains /episode/. Looking at the Parser config for Spotify it supports album|artist|playlist|track.

Would it be possible to add episode to this regex?

Thanks.
 
Maybe I missed it. I came across this plugin and installed it. But there are no instructions on how to use it, and I see no changes in my editor when posting. So is there instructions somewhere or some screenshots that I missed to know what I am looking for post-install?

Thanks!
 
This add-on creates entries for new media sites. Media sites are a default XenForo feature that you can use implicitly just by posting a link, or explicitly via the "Media" button in the editor. For example, if you link to a podcast episode on Audioboom it will be replaced with Audioboom's podcast player.

The add-on has a few options that you can access via the "Add-ons" page but most of them are cosmetic.
 
This add-on creates entries for new media sites. Media sites are a default XenForo feature that you can use implicitly just by posting a link, or explicitly via the "Media" button in the editor. For example, if you link to a podcast episode on Audioboom it will be replaced with Audioboom's podcast player.

The add-on has a few options that you can access via the "Add-ons" page but most of them are cosmetic.
Got it! All is working now.
 
Top Bottom