I want to display YouTube videos in regular content posts (e.g. forum topics, stories, etc.).

I think I had this solved. What I did was this:

A) YouTube's cut-and-paste code to stick in a video includes the OBJECT, PARAM, and EMBED HTML tags.

B) I made a new input format called "Filtered HTML Plus". Filtered HTML Plus contains the same settings as Drupal's default "Filtered HTML" input format. The only difference is that "Filtered HTML Plus" input format contains "Allowed HTML tags" including the OBJECT, PARAM, and EMBED tags.

C) I have chosen none of the Roles under the "Filtered HTML Plus" input format's View tab. By my logic, this should restrict it so that only the Admin can use this input format to create content, but everyone should be able to view the "Filtered HTML Plus" content.

This works perfectly -- as long as I read the content as Admin. I see the video's default screenshot with the play arrow. The videos play great.

If I log out and view the content as an anonymous user, I see nothing. No default screenshot, no clue that the video's OBJECT, PARAM, and EMBED code is included at all.

I am using Drupal's caching set on its default settings if that makes a difference.

Two questions:

1) Why doesn't this work for all users?

2) What can be done to fix this?

And assuming that I'm taking a completely wrong approach, what is the easiest and most "standard" way to allow Drupal to display YouTube videos?

Comments

yelvington’s picture

You probably just need to clear the cache. Logic sounds right. My kids post their YouTube videos on their blogs all the time, sometimes to my great distress.

Overall, though CCK + http://drupal.org/project/emfield rocks. Completely foolproof.