ElkArte Community

Extending Elk => Addons => Topic started by: Frenzie on April 05, 2016, 01:21:42 pm

Title: [ADDON] Video BBCode
Post by: Frenzie on April 05, 2016, 01:21:42 pm
Adds a video bbcode to SMF for directly embedding videos in posts, because automatically changing pasted links into embeds isn't cool.

This is a quick port of my my SMF video BBC (https://github.com/Frenzie/smf-video-bbcode) add-on. But why, if Elk auto-embeds?! Well, I'm actually kind of on the fence about it. When I first learned about Elk a couple of weeks ago, I thought about what exactly it is that I dislike about auto-embedding. I quickly realized that the reason I have always had an immediate DO NOT WANT reaction to auto-embed is because it typically does it even in the middle of sentences. That was very easy to fix (https://github.com/elkarte/Elkarte/pull/2460) and thus this add-on is probably mostly a research project. Oh yes, and it's still missing the button because that seems to require some custom JS.

Anyway, enjoy. Or probably just ignore. :P

https://github.com/Frenzie/elk-video-bbcode/releases
Title: Re: [ADDON] Video BBCode
Post by: meetdilip on April 06, 2016, 12:42:12 am
Thanks for sharing :)
Title: Re: [ADDON] Video BBCode
Post by: Spuds on April 06, 2016, 10:03:48 am
QuoteOh yes, and it's still missing the button because that seems to require some custom JS.
I did quick examples of how to do this in the
move (https://github.com/Spuds/Elk-Move-BBC/blob/master/MoveButton.subs.php) and gist (https://github.com/Spuds/Elk_BBC_Gist/blob/master/GistButton.subs.php) bbc addons.  I'm not saying they are the best examples, just examples :P

Basically its where to display the button (location inside of $bbc_tags array), what to show for the button (style/css), and what to do when the button is pressed, or the editor toggles source<->wizzy (js).