I want to put the image url in my photo.header. But I donno how to, is there a variable for the image url? I only know of this variable <?= $gallery->album->fields["title"] .
I need to know the variable for image url, please help me thanks
I think there are a couple other examples there that may fit what you want.
jonday
Joined: 2002-07-24
Posts: 20
Posted: Fri, 2002-11-08 16:47
I am trying to add a photo ordering option (using photobox). I need to work out what variables Gallery uses for the short filename (ie img_1234), the full filename (ie img_1234.jpg), and the path to the relevant thumbnail and full size photos.
Is there a list of the variables anywhere that I can use for reference - I have already looked at the exmaples in the comments in the html_wrap files and could not find the relevant ones.
Thanks
Quote:
look at html_wrap/inline_photo.header.default
I think there are a couple other examples there that may fit what you want.
beckett
Joined: 2002-08-16
Posts: 3474
Posted: Tue, 2002-11-12 04:11
Well, supposing you have your specific album item stored in $photo: $photo = $gallery->album->getPhoto($index);
(where $index is the number of the photo you want)
Then $photo->image->name gives the filename and $photo->image->type gives the file type ("jpg", "gif", etc.) $gallery->album->getPhotoPath($index, $full) should get you the path for that image ($full=0 gives you the ".sized" name, $full=1 gives you the full sized name). $gallery->album->getThumbnailTag($index) should work for the thumbnail.
You might have to play around a bit to get exactly what you want... but look into the files in the classes directory to see how these work. :smile:
-Beckett (beck@beckettmw.com)
kunwarbs
Joined: 2006-11-27
Posts: 10
Posted: Wed, 2006-11-29 05:15
I put my gallery under a subdomain- http://subdomain.mydomain.com and the images stopped rendering due to change in relative image path. Where can i find and edit the image path to photos in the album??
superkev
Joined: 2005-11-03
Posts: 7
Posted: Mon, 2010-06-28 18:16
Anyone who found this years later, like I did, here's what I did to include the photo URL in the og:image tag for Facebook. I added the following code to view_photo.php under the <title> tag:
Posts: 487
look at html_wrap/inline_photo.header.default
I think there are a couple other examples there that may fit what you want.
Posts: 20
I am trying to add a photo ordering option (using photobox). I need to work out what variables Gallery uses for the short filename (ie img_1234), the full filename (ie img_1234.jpg), and the path to the relevant thumbnail and full size photos.
Is there a list of the variables anywhere that I can use for reference - I have already looked at the exmaples in the comments in the html_wrap files and could not find the relevant ones.
Thanks
Posts: 3474
Well, supposing you have your specific album item stored in $photo:
$photo = $gallery->album->getPhoto($index);
(where $index is the number of the photo you want)
Then $photo->image->name gives the filename and $photo->image->type gives the file type ("jpg", "gif", etc.)
$gallery->album->getPhotoPath($index, $full) should get you the path for that image ($full=0 gives you the ".sized" name, $full=1 gives you the full sized name).
$gallery->album->getThumbnailTag($index) should work for the thumbnail.
You might have to play around a bit to get exactly what you want... but look into the files in the classes directory to see how these work. :smile:
-Beckett (beck@beckettmw.com)
Posts: 10
I put my gallery under a subdomain- http://subdomain.mydomain.com and the images stopped rendering due to change in relative image path. Where can i find and edit the image path to photos in the album??
Posts: 7
Anyone who found this years later, like I did, here's what I did to include the photo URL in the og:image tag for Facebook. I added the following code to view_photo.php under the <title> tag: