Whitelist, allowed iframe


(TeoWNeD) #1

Continuing the discussion from Supporting iframe embeds from different domains?:

Does it mean i can put an iframe on discourse, or it means that i can have discourse on my website in an iframe ?


#2

The former.

Discourse does not work in iframes on other domains and this is not supported I understand.


(TeoWNeD) #3

I installed it on my own server, is there any thing i can modify, to allow the iframe using?

iframes can now be whitelisted through the allowed_iframes Site Setting. It accepts a list of iframe src domain prefixes that discourse can safely allow in posts. The whitelist-iframe plugin is no longer required. So this mean discourse can have an iframe on it but you cant put discourse in an iframe right ?


#4

Correct. I wouldn’t attempt the latter. I’m sure the team could tell how much would break, but I suspect a lot would. There’s all kinds of in browser code running which might be affected.


(TeoWNeD) #5

:’( this is so sad, we needed that feature


#6

There are ways you can have read only outputs of posts and there’s an API to access posts externally (no expert on that but search on API), but if you want access to all Discourse functionality, it has to run full page.


(TeoWNeD) #7

in uthopia world, would have for exemple 10 subjet on discourse, and 10 ‘‘program’’ on my website depending on what program you took on my website there is an iframe of the corresponding subjet from discourse. so it would look like this

so we won’t need all the discourse feature.

Connect and login would’nt be here as we setted up sso.


#8

Take a look at:


(TeoWNeD) #9

Thanks for the usefull links, i’m actually investigating what alternative we got.
The part with embed comment’s is really helping.
https://eviltrout.com/2014/01/22/embedding-discourse.html
The part where you can embed some comments, is making me think, can we instead of emebeding comments, embed for example:??


embed “Objectif standard” ? For example ( the yellow tile ) OR/AND the 2 thread stared in it ?
If i can do the same but instead of embed comments, i would embed a category, ( even if its read only and you have to go fullscreen to answer it’s closer to what we want.


#10

Edit: *I am not familiar about JSON and RSS feeds, I discovered /c/<category_name>/l/latest.json also exists.


I hope you will be able to style your discourse like this… I think it looks beautiful, even if not what you initially intended :sweat_smile: :+1:


(Robert McIntosh) #11

Why don’t you simply style your Discourse header to match your existing site? This requires CSS and theme changes, no need for iframes

you can read more about themes and theme components here:


(TeoWNeD) #12

Thanks for your replies, i’m actually investigating :).

I will start by giving a bit of our context:
we provide specific food planning for specific profile:

  • example a pregnant woman

There is 2 way our user can access the forum. A regular one, where you click on the tab ‘forum’ and it redirect you to our forum. This way is actually working properly. ( see screeshot 1 )

Now the second way ( the reason why we looked for iframe etc )One of our user come on our website as example 1 ( pregnant woman ) under her planning, she will see the pregnant woman category from forum.
Why we wanted iframe first ? to embed category like this

So changing the theme would solve half of our problem and create others. If we could have the corresponding forum category embeded under our planning would be the exact behaviour that we are looking for


Embedding Discourse Category not Topic