Forums | Mahara Community

Support /
Youtube in forum posts.


anonymous profile picture
Deleted user
Posts: 4

14 March 2012, 8:00 AM

How do you embed a youtube.com video in a forum post? We'er running 1.4 and have HTMLfilers enabled.

Would expect one of these to work:
Direct link http://youtu.be/8Jx7gSueIZg

Or entering embed code in post:

<iframe width="420" height="315" src="http://www.youtube.com/embed/8Jx7gSueIZg" frameborder="0" allowfullscreen></iframe>

Or finally enter embed code in "HTML mode" when writing a post

Am I missing something or? :)

Regards

Carsten

14 March 2012, 10:19 AM

Hello Carsten,

Are you talking about forums or journal? You can't include either media or html code in them but you can add one file as atachement to each forum message.

Although I don't see the point of having media in a journal post (journals are not made for this, but for providing students a place for reflexive activities on their learning [see literature on ePortfolio] for more info), I can see the opportunity to add media in a forum post, but this will introduce a potential hole in the platform security, giving user a chance to embed malware code. The code is then trimmed by the editor of all potentially dangerous html code.

You can always add your media on Pages with the appropriate placeholder or add media plugins such as extresource or embedly.

If you think that adding media and html content is important in forums post, please fill a bug/feature report in the tracker.

-dajan

anonymous profile picture
Deleted user
Posts: 4

14 March 2012, 12:05 PM

I was talking about the forum posts. 

I think it is a very valid request, as I  believe the need for illustrating or showing a point using media often arises. For instance, I'm currently helping a music conservatory implementing Moodle and Mahara, and I think they would often discuss a music video or similar in forums.

I don't quite understand the meaning of this wiki 
https://wiki.mahara.org/index.php/Developer_Area/Mahara_Architecture_Introduction/Core_Subsystems#HTML_Filtering:_HTMLPurifier

As it clearly states "Mahara now ships with filters for allowing embedded code from select websites that most people trust, such as Youtube" - where would this be used, if not at least in forums.? :)

There must be an easy way to use the HTMLPurifier including the youtube HTML filer on forum posts?

Kristina Hoeppner's profile picture
Posts: 3618

14 March 2012, 1:37 PM

Hello Carsten,

I agree with you that media should be included in  posts. I also think they have a valid place in journal posts to illustrate thoughts and reflect upon the actual object. Sure, you could include the video or image on the Mahara page next to the journal entry, but you should also be able to include it in the post directly.

Are you running Mahara 1.4.2? We fixed a bug in relation to the YouTube iFrame code: https://bugs.launchpad.net/mahara/+bug/884438

demo.mahara.org runs on 1.4.2 if you want to give it a try before installing on your server to see if you can embed YouTube in a post.

Cheers

Kristina

anonymous profile picture
Deleted user
Posts: 4

15 March 2012, 1:49 AM

Hmm still can't get it to work, this is from the above mentioned demo.mahara.org, neither inserting the iframe code directly in the post or in the HTML mode.

Screenshot:

Screen

Kristina Hoeppner's profile picture
Posts: 3618

15 March 2012, 7:44 PM

Hello Carsten,

Did you have anything besides the iFrame in this box. It works for me on demo. You cannot only have the iFrame as forum post. I used the iFrame that you provided above and got the following result.

Cheers

Kristina

anonymous profile picture
Deleted user
Posts: 4

16 March 2012, 2:43 AM

Well seeing as you could make it work, I did a little browser shift, and it turns out it's working in Firefox, but not Chrome. This goes for Mac at least.

Chrome:
Firefox:
 

Kristina Hoeppner's profile picture
Posts: 3618

17 March 2012, 8:43 PM

Hello Carsten,

I tried it in Chrome and you are correct that it doesn't show up after you save the forum post. However, when you go away from the page and come back, the video is displayed.

I filed a bug report at https://bugs.launchpad.net/mahara/+bug/958276 so that a developer can have a look at it.

Cheers

Kristina

8 results