Inline video

Author Message

Michael de Vries

Wednesday 11 March 2009 9:30:05 am

Hey all,

I have an eZ Publish site up and running and everything is working, but there is one thing I can't figure out.

When I upload a video (flashvideo format) and I try to add it to an article, then it will display a link to antoher page where the video is showed. This works, but I would rather have the video inline in the article.

I tried changing embed to embed-inline when adding the video, but this doesn't make any difference. What am I doing wrong, I'm sure this must be available, right?

Tnx a lot, Michael

Noicokuna Niemoge

Thursday 12 March 2009 12:40:49 am

Hehe, I think it isn't available by default... (like a lot of other functions)

If it was, an extension like this would not be made:
http://projects.ez.no/all2ejwplayer

Most recommended :)

Shiki soku ze ku...

Michael de Vries

Thursday 12 March 2009 12:59:02 am

That seems weird, because there is video support (my problem is for other types of video as well) and I can see the video in a flash player, but it just won't display it inline.

When I click the link to the video, I do get an eZ Publish site, with the right design and even an eZ Publish video player, so all components are there, but just not inline?

Noicokuna Niemoge

Thursday 12 March 2009 1:05:50 am

Well, if that's so, probably it's a matter of editing the embed template. Take a look at the template you get when you click the movie, and then move the content of that template into embed template.

Hmm, you try to embed swf or flv? As far as I know, there isn't flv content class in eZ.

Shiki soku ze ku...

Michael de Vries

Thursday 12 March 2009 1:14:22 am

It is a flv, so flash video. I create a Video/Flash Player contentObject for it and it works that way, except for inline video.

I will have a look at the template, see what I can do with it.

Tnx for the help!
Michael

Noicokuna Niemoge

Thursday 12 March 2009 5:27:48 am

Yep, if you created a new class for FLV objects, you'd have to make an embed template and an override in override.ini for this template.

place that template in override/templates/embed (have a look at flash embed template to get an idea).

And write in override.ini:

[embed_yourclass]
Source=content/view/embed.tpl
MatchFile=embed/<b>your_template.tpl</b>
Subdir=templates
Match[class_identifier]=<b>your_class_identifier</b>

Should work that way... just in case it doesn't work, try also placing your template in override/templates/content/view/embed/ (create these folders).

Shiki soku ze ku...

Michael de Vries

Thursday 12 March 2009 7:05:54 am

Hey Noicokuna,

I didn't create the class myself, I used the eZ Flow example site, which contained that by itself.
But I think your example is better, because it is more universal and it should be, because it is going to be used on multiple sites, so I am going to try your suggestion.

So, I created a new class, with the identifier flash_player, and now I want to create a template, which will probably something like this (partly copied from eZ Flow file):

{def $siteurl=concat( "http://", ezini( 'SiteSettings', 'SiteURL' ) ) 
     $attribute_file=$node.data_map.file
     $video=concat( "content/download/",$attribute_file.contentobject_id,"/", $attribute_file.content.contentobject_attribute_id )|ezurl(no)
     $flash_var=concat( "moviepath=", $video )}
    
    {* Embed URL, which URL to retrieve the embed code from. *}
    {set $flash_var=$flash_var|append( "&amp;embedurl=", concat( $siteurl, "/flash/embed/", $node.object.id ) )}

    {* Embed Link *}
    {set $flash_var=$flash_var|append( "&amp;embedlink=", concat( $siteurl, $node.url_alias|ezurl(no) ) )}

<object type="application/x-shockwave-flash" data="{'flash/flash_player.swf'|ezdesign(no)}" width="448" height="354">
    <param name="movie" value="{'flash/flash_player.swf'|ezdesign(no)}" />
    <param name="scale" value="exactfit" />
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="true" />
    <param name="flashvars" value="{$flash_var}" />
    <p>No <a href="http://www.macromedia.com/go/getflashplayer">Flash player</a> avaliable!</p>
</object>

Now you tell me to put this in override/templates/embed (shouldn't this be embed-inline?), but which one?

This is my directory structure:


eZ Publish
- design
    - base
        - override
            - templates
                - embed
                - embed-inline
    - ezwebin_site
        - override
            - templates (currently empty)
- extension
    - ezwebin
        - design
            - ezwebin
                - override
                    - templates
                        - embed
                        - embed-inline

And the same goes for the embed.ini, which one should that be? If I search for embed.ini, I find a whole lot of them.

Noicokuna Niemoge

Friday 13 March 2009 1:13:29 am

Hi;

Which embed you use it's up to you. :)
Hmm, I don't use ezflow, and I don't see embed.ini in my installation o_O What are its contents?

Also, place the templates you want to override in extension folder, in the folder "override/etc" - it's the most reliable way for me.

Hmm, I see that the ezflow folder structure is completely different... If you use ezflow, then changing anything in ezwebin PROBABLY won't make any effect since ezwebin probably is not used on your site (I'm not sure here). I give up here, don't want to make any suppositions. Maybe someone else can help?

(but try to reproduce my steps in ezflow folder, maybe it will work...)

Shiki soku ze ku...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.