RpNation / bbcode

RpNation's Official BBCode Implementation for Discourse
GNU General Public License v3.0
1 stars 3 forks source link

What do we want to do with BBCodes that could become iframes #69

Open Mondrethos opened 8 months ago

Mondrethos commented 8 months ago

Hey,

So I was looking at the two BBCode that are not actually BBCode. PDF (using Google Drive links) Challenge while they have tags like BBCode, are actually a part of xenForo's media system which I have no idea why they did that way, I guess to try to make it all look like BBCode and leverage their engine, but whatever.

On Discourse, we can just do this:

image

In the above picture you can see all the default iframe source domains that discourse allows, and I've gone ahead and added drive.google.com

This means that

[gdoc]0B-8p7J_eRZNScUVXUzZNRFBnVEk[/gdoc] 

becomes

<iframe src="https://drive.google.com/file/d/0B-8p7J_eRZNScUVXUzZNRFBnVEk/preview?resourcekey=0-BbPZmK-7LK8LaCJnz7vvCA" width="640" height="480" allow="autoplay"></iframe>

This also means that users no longer have to hunt down for the ID in the URL or anything else. They can use the Google provided code for their posts and, in fact, the iframe code provided by any site we choose to allow in the future, like https://kumu.io

See it in action here: https://t.rpnation.com/t/testing-google-pdf/133

MShultz commented 8 months ago

I may just need a refresher on this since it's been a while, but is this similarly the route we're going with the [media] tag? I am assuming it is also under the hood using xenForo's media system since there are just so many content locations supported. Or are most media sites we want to support already supported by Discourse out of the box? Youtube obviously is, but are things like SoundCloud and Spotify? (Two big ones for Rp'ers who like audio in their replies) Currently getting an error on t so cannot test the functionality

image

Mondrethos commented 8 months ago

I may just need a refresher on this since it's been a while, but is this similarly the route we're going with the [media] tag? I am assuming it is also under the hood using xenForo's media system since there are just so many content locations supported. Or are most media sites we want to support already supported by Discourse out of the box? Youtube obviously is, but are things like SoundCloud and Spotify? (Two big ones for Rp'ers who like audio in their replies) Currently getting an error on t so cannot test the functionality

image

Those are a plugin that add hundreds of them to xenforo. I believe most of those are supported out of the box for discourse or its a matter of just adding the approved domain to the list (like in this case, kumu, gdocs, etc). No plugin or extra BBCode require.