News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Simple Audio Video Embedder

Started by SMFHacks.com Team, August 09, 2010, 10:42:47 PM

Previous topic - Next topic

SulevFan

Need a little help/clarification please?

I've installed the mod and links you YouTube works flawlessly (awesome!).

What I also need is to allow folks to upload .mp4 files created by a game, and then somehow link to that upload and create the player window.

I tried linking the the file in the format that it is shown as an attachment, but that did not work. Any advice on how to go about this?

vbgamer45

We do not autolink attachments.

If they put a full link that ends in .mp4 we have setting to embed those I believe.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SulevFan

Quote from: vbgamer45 on December 18, 2020, 01:37:26 PM
We do not autolink attachments.

If they put a full link that ends in .mp4 we have setting to embed those I believe.

I think I figured it out.

If we have .mp4 files "somewhere" on our site, the mod can autolink to those.  This is essentially what you said in your response, I think.

What we were kind-of thinking was to have folks upload very specific, small video  files  (made by in-game software, so we have some degree of control over their size and content) to our site, and then link them from the forum.

But that doesn't seem like it's going to fly, so folks will now have to upload to YouTube and then just manually link to it.  Less than perfect, but that is how life is.

Thanks for your input.

billtidy


vbgamer45

Major new update!

6.0
+Added a setting to show the original link after the embed is added.
+Added a setting to set the maximum number of emdeds to display per page load.
+Redid the entire replacement function with a callback. Allowed more control for the new setting features added and provides a better way to count number of embeds loaded.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

alexetgus

Hi,

Attached is the French translation UTF-8.
UNIX line breaks. (\n)



vbgamer45

Quote from: alexetgus on January 05, 2021, 07:28:36 AM
Hi,

Attached is the French translation UTF-8.
UNIX line breaks. (\n)



Added translation to the package. thanks
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GigaWatt

I'm curious, does the mod automatically detect links and embeds the video/audio or does it work with tags... or both?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

vbgamer45

It auto changes links to emebed code  if it is a supported site.  Does not use any bbc tags.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GigaWatt

Mhm... so, what happens if it encounters the youtube tag from the Yet Another YouTube BBCode Tag mod... because that mod works with and without tags.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

vbgamer45

It only populates if it is a hyperlink. If it is not a link then it won't parse it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GigaWatt

"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

tjbalon

#3372
Support for twitch clips

INSERT INTO `smf_mediapro_sites` (`id`, `title`, `enabled`, `website`, `regexmatch`, `embedcode`, `processregex`, `height`, `width`) VALUES
(124, 'Twitch Clips', 1, 'https://twitch.tv/', 'https://clips.twitch.tv/([A-Za-z0-9]*)', '<iframe src="https://clips.twitch.tv/embed?clip=$1&parent=#parent#" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>', NULL, 378, 620);


Support for github gist

INSERT INTO `smf_mediapro_sites` (`id`, `title`, `enabled`, `website`, `regexmatch`, `embedcode`, `processregex`, `height`, `width`) VALUES
(125, 'GitHub Gist', 1, 'https://github.com', 'https?://gist.github.com/([A-Za-z0-9\\-]*\\/[A-Za-z0-9]*)', '<script src="https://gist.github.com/$1.js"></script>', NULL, 300, 700);

tjbalon

Cannot edit last post.

Anyway to allow a user to post a link without it auto embedding? It is messing with [url] tags for example. Would be great to be able to like [noembed]LINK[/noembed] for protection for example.

Also, here is an updated spotify entry (now supports artist, track, playlists, and albums):
(11, 'Spotify', 1, 'https://spotify.com', 'https?:\\/\\/open.spotify.com\\/([A-Za-z0-9]*)\\/([A-Za-z0-9]*)(\\?)?([A-Za-z0-9\\=\\_\\-]*)', '<iframe src="https://open.spotify.com/embed/$1/$2" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>', NULL, 80, 250),

vbgamer45

I think if you do nobbc code from SMF it might stop it from being embeded.
Thanks for the embeds will get them added.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Update:
6.0.1
+Added support for Reddit posts
+Added support for twitch clips thanks to  tjbalon
+Added support for github gists thanks to  tjbalon
+Updated spotify entry (now supports artist, track, playlists, and albums) hanks to tjbalon
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

tjbalon

Could you point out where in the mod it actually does the processing? Is it in Display.template and Sources/Display? If I can find where it actually processes it, I can just modify to look for certain characters or tags like ! before, or something like that. I suspect nobbc will not work because it embeds in a [url=http://BLAHBLAH]text[/url], the url inside that tag would trigger the embed. Tested today.

I had tried to alter all the regexmatch rows for tags before and after, manually doing it, but it too would auto embed and I've yet to find the logic where you actually search for the embeds. I will take another look later if you do not reply.

Here are a few more embeds we either updated or altered to ensure they work properly:
(5, 'Twitch Channels', 1, 'http://twitch.tv', 'https?://www.twitch.tv/([A-Za-z0-9]*)', '<div id="twitch-embed"></div><script src="https://player.twitch.tv/js/embed/v1.js"></script><script type="text/javascript">  new Twitch.Player("twitch-embed", {    channel: "$1", autoplay: false,  height: "378",    width: "620",    parent: "#parent#"  });</script>', NULL, 378, 620),
(6, 'Twitch Videos', 1, 'https://www.twitch.tv', 'https://go.twitch.tv/videos/([A-Za-z0-9]*)ZSPLITMZhttps://www.twitch.tv/videos/([A-Za-z0-9]*)', '<div id="twitch-embed"></div><script src="https://player.twitch.tv/js/embed/v1.js"></script><script type="text/javascript">  new Twitch.Player("twitch-embed", {    video: "$1",    height: "378",    width: "620",    autoplay: false,    parent: "#parent#"  });</script>', NULL, 378, 620),
(7, 'Twitch Clips', 1, 'https://twitch.tv/', 'https?://clips.twitch.tv/([A-Za-z0-9]*)', '<iframe src="https://clips.twitch.tv/embed?clip=$1&parent=#parent#" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>', NULL, 378, 620),


(Believe the VOD logic had a small error, now fixed.)


Edit: NoBBC works, but it would be nice to look where that is still and hopefully solve [url], as if you want to link something as of right now it will auto embed and mess up the url tags.

Thanks :)

vbgamer45

The mod does it's work in Sources/AutoEmbedMedia2.php in function MediaProProcess($message)
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Update
6.0.2
+Added support MSNBC videos
+Added support NBC News videos
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Cardi


Suppor for hxxp:lbry.tv [nonactive], odysee and gab, please, youtube and vimeo have censored and deleted many videos

hxxp:lbry.tv/ [nonactive]
hxxp:odysee.com [nonactive]
hxxp:gab.com [nonactive]

thank you!

Advertisement: