s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
works perfect :)

another question is there a way to not use the ebay code for other websites?
We're an international forum and that ebay widget doesn't work for other sites like australia and UK so any link from ebay.com.au ect won't work

Or should I just disable the ebay code altogether?
 
@LexiconDevil As a rule of thumb, if you paste a link and it gets replaced with something that doesn't work, I consider it a bug. In this case, it's a false positive between ebay.com and ebay.com.au. The add-on should only replace links that point to the former and dutifully ignore links to the latter. It should be fixed, now.
 
Not sure if this has been asked but would it be possible to rebuild posts so that older posts are embedded as well?
 
If that's possible then I don't know how. Try the general support forum, perhaps someone knows of an add-on that reparses all posts. I'm not sure that would work though, that depends on how XenForo stores unformatted URLs.
 
Yes, exactly as written. You can copy/paste it from the text here.

Code:
/php/xenforo $ cat upload/library/s9e/Custom.php
<?php

class s9e_Custom
{
        public static function youtube($html)
        {
                return str_replace('controls=2', 'controls=1', $html);
        }
}

Is this code broken? I have this code on my server but I am getting the default player that just has the play button and nothing else. :P
 
It still works for me. If it ever worked for you it should still work. Note that the PHP file starts with <?php and the line before in that quote is for illustration. Your PHP file should start with <?php

If it doesn't work for you, try reinstalling the addon. If you edit the media site, the "Embed HTML" field should contain the following code:
Code:
<!-- s9e_Custom::youtube() -->
<!-- s9e_MediaBBCodes::renderYoutube() -->
 
hmm. it now shows the video title. but not the player control. i checked youtube embed code generator and apparently no option turns on the display of the video control. so basically there is no way to check how long the video is until you click on the play button. :(
 
Yes, YouTube hides the video bar completely now. You could force it to be open at all times and adjust the height to keep a 16:9 ratio for the video. Not sure if that's worth it though.

Code:
<?php
class s9e_Custom
{
    public static function youtube($html)
    {
        $html = preg_replace_callback(
            '((?<=height=")\\d+)',
            function ($m)
            {
                return $m[0] + 35;
            },
            $html
        );
        $html = preg_replace_callback(
            '((?<=src=")[^"]*)',
            function ($m)
            {
                return $m[0] . ((strpos($m[0], '?') === false) ? '?' : '&amp;') . 'autohide=0';
            },
            $html
        );
        return $html;
    }
}
 
Last edited:
I'm going to look into it but the documentation about Amazon product links is reserved to Amazon affiliates. Not being one, I don't have access to it and third-party information is scarce and unreliable.
 
You can already embed it with the IMG tag. I don't want to replicate basic XenForo functionality, especially considering it wouldn't support proxying and other XenForo features.
 
Imgur has launched a new image format GIFV for MP4 versions of Animated GIFs. They are not offering any BBCODE for these files. HTML Embed code is available. Though there is no way of finding out if the link is of Animated GIF or a regular image file. Example: https://imgur.com/zvATqgs?tags

https://i.imgur.com/zvATqgs.gifv appears to be a html page with mp4 embed code... You might want to consider adding it! Thanks.
 
Top Bottom