Add a picture as custom field

odiseo

Joined: 2005-08-12
Posts: 3
Posted: Fri, 2005-08-12 06:31

Hi there,
I'm trying to load a picture (or photo) as a custom field. Does anybody knows how to do this.

Because I'm trying to set up a Gallery that show photos of available items in an Art Gallery, but some times the customers are interested in some details of the art work, like the signature of the painter (in the case of a paiting), etc. And instead of uploading a very high resolution photo (that will slow down the browsing) I want to put a photo with the highlight or detail of the piece.

Without having to end with albums containing only 2 photos.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Fri, 2005-08-12 06:40

You could create a custom field that maybe contains the html for a <img src="url here" /> type thing?

You could also add a link in the description, or maybe put that html in the description too and see what happens.

By "load a picture" do you mean actually upload it to gallery and have it store it? Or is a link / image src enough?

 
odiseo

Joined: 2005-08-12
Posts: 3
Posted: Fri, 2005-08-12 09:48

thanks fryfrog, i will try the <img src="url here" /> thing.

By the way you know how to display the custom fields in the album view (the one with the thumbnails)?

I have Gallery 1.5

Thanks again.

 
odiseo

Joined: 2005-08-12
Posts: 3
Posted: Fri, 2005-08-12 10:49

I have it
By adding the following lines

$extra_fields=$gallery->album->getExtraFields(false);
displayPhotoFields($i, $extra_fields, true, in_array('EXIF', $extra_fields), $full);

after this line
echo $gallery->album->getCaptionName($i) . ' ';
in view_album.php I got the fuction I was looking for.