ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Quicktime Pluggin If Statement Help

December 20, 2007 1:55am

Subscribe [2]
  • #1 / Dec 20, 2007 1:55am

    Mr. Erdman

    1 posts

    Hi,

    I’m new to EE and am trying to build my site in the most effective manner. Trying not to do work-arounds. I’m familiar with HTML, but work in team environs where I am an interactive designer, not an interface programmer.

    My issue is video. I want to display videos located on my server that are either .mov or .swf.

    I’ve downloaded and installed the Quicktime plugin, but would like to know how to put a tag in my template that displays the movie file entered into a custom field used on the Publish page.

    For instance, here is the code example from the plugin description page:

    {exp:quicktimeplugin file="/movies/p5_small.mov" width="240" height="180"}

    I want to create an “if” statement similar to this:

    {if media_hosted_motion}<object><embed src=”{media_hosted_motion}” /></object>{/if}

    When I do the later tag, I get the QT logo w/ a question mark, which indicates it’s not using the QT plugin. Obviously my custom field is called “media_hosted_motion”. I seem to recall from the user guide that I cannot do this:

    {if media_hosted_motion}{exp:quicktimeplugin file="{media_hosted_motion}” width=“240” height=“180”}>{/if}

    You get the idea of what I’m trying to do, so I’ll stop there. The goal is to simply enter the movie file location into a field as I’m writing a post to my weblog.

    Any suggestions welcome and appreciated. Also, in a response, please don’t assume I understand much. For instance, looking at the QT plugin tag description, I would assume that a closing tag is required, but the author either assumes I would know that, or I’m assuming too much… 😉

    thx.

  • #2 / Dec 20, 2007 6:35pm

    Dane Thomas

    139 posts

    Are you included the weblog:entries tag before the quicktime code?

    This is the template code I use for one of my sites:

    {exp:weblog:entries weblog="videos" dynamic="off" orderby="date" sort="desc" limit="8"}
    {exp:quicktimeplugin file="{videoFile}" width="{videoWidth}" height="{videoHeight}" controller="true" autoplay="false" graphic="{root}themes/site_themes/quicktimePlay.gif" target="myself" bgcolor="fbfbfb" version="6"}
    
    
    {videoSummary}
    {line}
    {paginate}
    Page {current_page} of {total_pages} pages {pagination_links}
    {/paginate}
    {/exp:weblog:entries}

    Breakdown:
    Weblog is called videos
    I am displaying a maximum of 8 video’s
    My custom_field for the actual quicktime file is {videoFile}.
    I also have the width and height as custom fields so it dsplays correctly as different sized video’s are uploaded.
    There is also a video summary custom file that is displayed below the video.

    I’ve got some extra code in the quicktime section:

    controller="true" autoplay="false" graphic="{root}themes/site_themes/quicktimePlay.gif" target="myself" bgcolor="fbfbfb" version="6"

    That isn’t required but it just makes it looks nice.

  • #3 / Dec 20, 2007 6:42pm

    Dane Thomas

    139 posts

    Oh and in terms of the if component I guess

    {exp:weblog:entries weblog="videos" dynamic="off" orderby="date" sort="desc" limit="8"}
    {if videoFile}
    
    {exp:quicktimeplugin file="{videoFile}" width="{videoWidth}" height="{videoHeight}" controller="true" autoplay="false" graphic="{root}themes/site_themes/quicktimePlay.gif" target="myself" bgcolor="fbfbfb" version="6"}
    
    {/if}
    {/exp:weblog:entries}

    should work fine.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases