Hello
A little post to ask for tips from advanced users.
I am using the defaut template and want a simple page which display in this order:
- Menu
- Photo
- Title
- City, Country
Beside that I use Adobe Lightroom in which I fill those information (IPTC), I export my photos and upload them on my server.
I have already edited the defaut page to place the title under the photo by moving the following element under the image:
<?php echo getBareImageTitle(); ?>
I though it would be easy to do the same for city and country information within the documentation.
I placed the elements "<?php echo getImageCity(); ?>" and "<?php echo getImageCountry(); ?>"
But it seems to be a little more complicated. Which file must be modified? And in which way?
Thank you very much from France
Comments
But those are not the meta data fields you want. You get those using this function:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetImageMetaData
It returns an array with those data you can then output. The listing of this actually is enabled via a button on all standard themes if there is such data.
<?php array getImageMetaData( [$image $image = NULL], [string $displayonly = true] )?>
And when I open the page an error occurs:
Parse error: syntax error, unexpected T_STRING, expecting '(' in /homez.150/mylastde/www/gallery/themes/default/image.php on line 80
I still miss something.
Sorry it really exceeds the limits of this forum to teach such things. You should now take the time to learn some PHP basics first before you try to modify a theme.
http://www.w3schools.com/php/default.asp
Also please see here:
http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide
`
<?php
$country = (getImageData("country"));
$state = (getImageData("state"));
$city = (getImageData("city"));
$location = (getImageData("location"));
if ($country) {$country = $country . "\ ";};
if ($state) {$state = $state . "\ ";};
if ($city) {$city = $city . "\ ";};
$place = "<strong>Place: " . $country . $state . $city . $location;
?>
<?php echo $place; ?>
`