Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by

I'm trying to embed a youtube video in an answer on v1.3.1.

I extracted the URL from the code generated by youtube (bolded):

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/W8r-tXRLazs?rel=0" frameborder="0" allowfullscreen></iframe>


And pasted it as Flash in WYSIWYG editor.

Still, video isn't shown.

Any ideas as for what I must be missing here? Thanks :)

3 Answers

+2 votes

Test test adawdawdawd

You need to post only "http://www.youtube.com/v/GWGFh5S4RfQ" part (link with /v/)

So i gues it work only using old youtube embed code.

Test using new youtube embed code:

Thanks a lot! Works like charm :) What was it with that format of the link (the "/v/")?  How can I instruct my visitors as for how can THEY embed links in THEIR answers? Cheers!
You need say that you need to replace "/watch?v=" with "/v/" in youtube link and post in flash section. I think for now it's the only solution.
+1 vote
edited by
The new YouTube code doesn't work because HTMLawed won't allow iframes.  Line 157 in qa-include/qa-base.php has to be changed to:

                        'elements' => '*+iframe+embed+object',

and then it works :)

EDIT: or just use this plugin:


0 votes

If possible do the cleanup without URL parameters:


Hm.  Okay, I'll look into it, thanks for the tip.