Differentiate between movies and images in album

deezNutz
deezNutz's picture

Joined: 2005-07-06
Posts: 26
Posted: Mon, 2005-08-29 13:49

I have jpg images and quicktime movies in my albums.
Since I have ffmpeg installed the movies also get a thumbnail (first frame of movie)

Because of this a user can't distinguish between a movie and an image. They all look the same. (right now I have them named so they sort to end of each album)

I'd like to be able to add the words "Quicktime movie" below .mov items to indicate they are movies. How could I check each items type and identify .mov items?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-08-29 14:46

find where it shows Album: in album.tpl.. between that line and the {else} below it add:
{elseif $child._classname=="gallerymovieitem"}
{g->text text="Quicktime movie: %s" arg1=$child.title|markup}

or maybe =="GalleryMovieItem".. i don't remember if that gets lowercased.

 
deezNutz
deezNutz's picture

Joined: 2005-07-06
Posts: 26
Posted: Mon, 2005-08-29 14:57

Thanks Mindless,

Actually both _classNames & GalleryMovieItem are camel cased:

{if $child._className=="GalleryMovieItem"}
{g->text text="Quicktime movie: %s" arg1=$child.title|markup}
{/if}

Also, I found $child.mimeType that returns movie/quicktime
so there's a couple different ways to handle this.

Thanks again!