s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
@JoshyPHP

When i post a youtube video with a timestamp, it does not seem to generate a media thumbnail but an image with three dots... i even tried to manually upload a thumbnail but it only shows the dotted image... any ideas?
 
@JoshyPHP You're talking about XenForo Media Gallery. XenForo's default YouTube embed doesn't support timestamps so I guess XFMG doesn't either. You'd need a different thumbnail generator. If you post in XFMG's support thread there's a chance that a XenForo developer will add support for it, most likely @Chris D.
 
@Neutral Singh

Please find attached a file, that may help.

Please upload this file to the following location:
library/XenGallery/Thumbnail/YouTubeS9e.php

Then go to Admin CP > Applications > Gallery Options > Media Sites Options

Under the "Media Site Thumbnails" section, next to "YouTube" type in the following:

"XenGallery_Thumbnail_YouTubeS9e"

Click Save Changes.

Rebuild thumbnails on the Gallery Rebuilds page. Any YouTube videos that have a timestamp will be rebuilt correctly.
 

Attachments

@Chris D

Thank you so much for taking time out to look into this puzzle... :)

Well, it works as desired but in a weird way... please let me explain...

After implementing above instructions, when i enter the following url to add media:
HTML:
https://www.youtube.com/watch?v=wbCU6kRIDKg&t=13m05s

It does nothing as desired... i.e. the video still starts from the beginning and no thumbnail is generated...

However, in a stroke of genius! :whistle:, when I tweaked the url as follows:
HTML:
https://www.youtube.com/watch?v=wbCU6kRIDKg&t=780m or t=780s
(where 780 seconds roughly convert to 13m05s)

I have no idea how but the above tweaked timestamp url works as desired with thumbnail is also generated as desired!

So, it does the trick but i have to manually calculate the seconds every time i have to use the timestamps...
not a biggie but any ideas on automating this process would complete the puzzle for me! :cool:

Thank you so much!

And all the best for xF 2.0! (y)
 
The thumbnail generation not working is expected with the code I wrote so I am happy to tweak that.

The video still starting at the beginning may well be something for @JoshyPHP to look into. It may essentially require the same fix I need to add to the thumbnail class.
 
@Neutral Singh Both URLs start at the correct time for me.

@Chris D The YouTube BBCode can have a bunch of different parameters. The best approach for your thumbnail class is to only match /\bid=([^;]+)/ regardless of what precedes or follows it. I'm attaching the patched thumbnail class.

For reference, those are the BBCodes generated by the URLs mentioned above.
Code:
[MEDIA=youtube]id=wbCU6kRIDKg;m=13;s=05[/MEDIA]
[MEDIA=youtube]id=wbCU6kRIDKg;t=780[/MEDIA]
 

Attachments

Any video services that don't ship with XF require custom development to implement the necessary code to download the thumbnails in most cases.
 
The "Watch on Twitch" button for the twitch BBCode doesn't open anything.
Is there anything you can do on your side or is that from twitch?
BAU1HlX.jpg
 
Greetings!

I certainly love this add-on but seems like it likes to mess around with XenGallery. On XenGallery, there's a huge unused padding at the bottom of the media. I'm not really too sure on how to go about this as I've tried lots of things that's within my reach:
upload_2016-5-1_22-48-35.webp

Cheers and nice work!~
 
Top Bottom