NFSAddons => Site Suggestions/Feedback => Topic started by: MADMAN_nfs on Feb 25, 2016, 4:47 AM
Title: Embedding videos from YouTube
Post by: MADMAN_nfs on Feb 25, 2016, 4:47 AM
Hey guys,
i wondered why its not possible to embed youtube videos in the forums (or is there a way i dont know of?). I understand HTML code is disabled for security reasons, but there are always ways to make stuff, like embedded videos, work via BBcode. Since the embed-code is always the same, you could realize some "youtube" button, where users only have to enter the unique video code (which can be found in youtube-links after "..watch?v=") ...for example:
Thats really something i already missed here, when it would have been much easier showing something instead of long explainings. Embedded videos do not automatically start playing - so its not really a bandwith problem either; especially by today's standards. ;)
Greetings
Title: Re: Embedding videos from YouTube
Post by: Remko on Feb 28, 2016, 8:23 AM
Actually, there is a way to embed Youtube videos into forum posts here, I found this out myself only a few years ago and posted it in the screenshots thread, but I suppose I could have posted it in a location where it's more visible: http://www.nfsaddons.com/forums//index.php?topic=311.msg32063#msg32063
What you do is, you click the 'share' link on a YT video, then go to the 'embed' tag, copy the link and put it between [ html] tags like this:
Title: Re: Embedding videos from YouTube
Post by: Remko on Mar 01, 2016, 2:20 PM
Oh, I did not know that, sorry. I will check the settings and see why that is.
Title: Re: Embedding videos from YouTube
Post by: MADMAN_nfs on Mar 08, 2016, 2:39 PM
Any news regarding this matter?
Title: Re: Embedding videos from YouTube
Post by: Remko on Mar 14, 2016, 3:29 PM
Sorry for the wait, took a while before I found something. The html permission apparently cannot officially be changed, so after a while I found out that there's an alternative way. I needed to enable the 'Flash' button to the post options though, which is disabled in SMF by default. Enabling flash in forum posts supposedly poses a small security risk, but I don't think those risks are too great in a small community like ours. ;)
It works like this: you take a standard Youtube page link like this one: https://www.youtube.com/watch?v=nn6QoVb5s7U
No need to go to the embedding options or anything this time, but what you need to do is: Take the part that goes /watch?v= and change it to /v/
So now the link becomes: https://www.youtube.com/v/nn6QoVb5s7U
Then look for the new Flash button in the options: (http://nfsaddons.com/forums/Themes/ds-natural_20rc3/images/bbc/flash.gif) and place that link between Flash tags. By default is set at 200 x 200 pixels, but you can manually change that to, for example, '480,360' and you get this:
Title: Re: Embedding videos from YouTube
Post by: XJ220 on Mar 15, 2016, 9:10 AM
Quote from: Remko on Mar 14, 2016, 3:29 PM Sorry for the wait, took a while before I found something. The html permission apparently cannot officially be changed, so after a while I found out that there's an alternative way. I needed to enable the 'Flash' button to the post options though, which is disabled in SMF by default. Enabling flash in forum posts supposedly poses a small security risk, but I don't think those risks are too great in a small community like ours. ;)[...]
Unless abused by a spambot or something... can the SWF functionality be limited to members with at least, say, 10 forum posts or so? Also, I am wondering whether HTML5 embedding is possible. Flash is obsolete and its player has seen SO many security issues the past months I removed it completely.
Title: Re: Embedding videos from YouTube
Post by: Remko on Mar 15, 2016, 3:11 PM
Quote from: Remko on Mar 14, 2016, 3:29 PM Sorry for the wait, took a while before I found something. The html permission apparently cannot officially be changed, so after a while I found out that there's an alternative way. I needed to enable the 'Flash' button to the post options though, which is disabled in SMF by default. Enabling flash in forum posts supposedly poses a small security risk, but I don't think those risks are too great in a small community like ours. ;)[...]
Unless abused by a spambot or something... can the SWF functionality be limited to members with at least, say, 10 forum posts or so? Also, I am wondering whether HTML5 embedding is possible. Flash is obsolete and its player has seen SO many security issues the past months I removed it completely.
Hm, good point I guess... I don't know if this isp possible without installing mods, but I'll look into it. Thanks for the feedback.
Title: Re: Embedding videos from YouTube
Post by: MADMAN_nfs on Mar 16, 2016, 4:54 AM
Hey, thanks Remko for looking into this. I guess XJ220 is right there, enabling flash completely is probably a security risk.
Maybe think about what i tried to explain in the first post: Instead of the flash button, enable a youtube-button where you can only enter the video ID (11 characters). So the site automatically interpretes the characters written within, some brakets for example - and adds https://www.youtube.com/v/ in front of it. Example:
[/color] or [yt]7aTT7hcVpN8[/yt] etc... converts to: https://www.youtube.com/v/7aTT7hcVpN8 If you can implement a check for this maximum of 11 characters and deny longer ID's, i can't see any security risks. You get the idea i hope :)