Has anybody developed a theme that allows enclosures to be displayed in situ (embedded) on the webpage. I would like to have users be able to see videos and audio on variou people's blogs rather than showcasing the videos under the video node but I can't find a module that has done so. Boris Mann suggested the possibility of inserting code into my theme: http://drupal.org/node/43637 . Has anybody had any luck doing so?

Comments

thehazard’s picture

Well, it depends exactly what you want to, and where do you want those videos to be shown... can you explain better what you need ? You can take a screenshot of your current drupal instance and show where you want your video to be shown (and where it does come from). I didn't understand exactly what you need, but you can create a module and try to hook nodeapi() and catch everytime a blog node is shown ( and then you can append your content, in this case, the video box ) to the output.

--
got pwned today ?
http://www.gotpwned.com/

rubenk’s picture

Thank You so much for a quick response. This has to be one of the BEST development communities I've ever seen. If you would, take a look at the following:

I have attached an example video that I would like to be embedded. The blog within the drupal cms is as shown below
http://tabletpcpeople.org/blog/1

This or another person's blog can be syndicated as per below
http://tabletpcpeople.org/blog/1/feed
The video is enclosed. Excellent! However, can it be viewed on the blog similar to how a movie is viewable on
http://www.rocketboom.com or even like http://tabletpcpeople.org/node/5/play ?

The objective is to allow the user to view it in the browser. It looks like the video module and the blog node can't "talk to each other" well. I'd like to make it easy for users to attach content as they create posts and let the CMS make it look pretty without them putting in too many attributes, searching for the file on the site, etc. It would be nice to do everything in one fell swoop at the time of posting in the blog.

thehazard’s picture

ok, here's the thing: when you open the path node/5/play, there is a callback that will be called and will echo the necessary stuff to show the video (basically the html call to wmp object). How are you associating a video with a blog entry ? I don't know the module that you are using to manage the videos, but let's suppose that you have a separated table like that:

table: blog_video
bv_id - primary key of the table, synched with table "sequences"
bv_video_nid - nid of the video node
bv_blog_nid - nid of the blog entry

So, there is a clean way to do that and the fast way. The clean way is to use hook_nodeapi() to detect when your blog node is being displayed (you can add this code on the video blog).

If the guy is loading ($op = 'load') a node, we test if the node type is a blog node, and look at the blog_video table to see if the node in question has any video associated with it. If true, you append the video node info to the node. At this point, whenever somebody ask to see a blog page like
http://tabletpcpeople.org/blog/1, the video information will be already loaded on the $node object, so you just need to hack the view callback to get that video information and prepend the wmp object html code that will render the video _with_ the blog entry... in fact, you don't even need to create a global hook to do that, since you just want this feature on blog pages. Just hack the blog_load callback to also retrieve any video information and append it to the $node object, and hack the blog_view callback to render the video and you're all set. In fact I think that you don't even need to output the media player call by yourself, since it's already implemented on your video module, you just call the "video_view" function passing your video node as argument =)

--
got pwned today ?
http://www.gotpwned.com/

thejerk’s picture

Your explanation is deep and thick, but for me its too hard to apply because I don't know what it all means.

I'm in the same boat as ruben, can you explain exactly how to have the video start right as the post is clicked?

Thanks!