Can u link directly to photo/movie/other file from album page?

deepermotive

Joined: 2005-09-22
Posts: 3
Posted: Thu, 2005-09-22 15:42

I'd like to let users directly download an image or file from the album page, rather than clicking the thumbnail or other link to view the photo, and *then* be able to save it to their PC.

Something like:

NameOfPhotoOrFile (Download This)
---------------------------------
Owner: John Doe
Views: 5

I'm knee-deep in the templates now, making my own theme and found the code in the photo.tpl file that makes this happen. Is it possible to do this in the album.tpl?

Thanks in advance,
-t

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-22 16:04

themes/matrix/templates/album.tpl

you want to replace the whole of the case canContainChildren = false (only replace non -album thumbnails)

<a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}"
class="giMissingThumbnail">
{g->text text="Download %s" arg1=$child.title}
</a>

 
deepermotive

Joined: 2005-09-22
Posts: 3
Posted: Thu, 2005-09-22 16:34

Thanks! I had tried that in my template with no success, but trying now using the Matrix album.tpl, it works fine. I'll have to take a closer look at my own template now. Cheers.