The changes to zenPHOTO/StopK2 included altering image.php in the theme to call exif.php functions and print data. To do this, I unpacked the exifer zip in the /zen directory, added an include to zenPHOTO’s template-functions.php, reset the links in exif.php to add /zen to get to the includes, and changed the PHP short codes in the beginning of the exif.php and /maker files.
The lines I inserted in image.php--borrowing code from others on the forum--to show the data are below. The new code went right after the div commentblock...
`<?php
$exif_image=substr(getFullImageURL(), 10);
$exif_result = read_exif_data_raw($exif_image,0);
$longdate = $exif_result[SubIFD][DateTimeOriginal];
if($longdate !=NULL) {
list($fulldate, $fulltime) = explode(' ', $longdate, 2);
list($year, $monthnum, $day) = explode(':', $fulldate, 3);
list($hour, $minute, $second) = explode(':', $fulltime, 3);
$num[0] = "/01/";
$num[1] = "/02/";
$num[2] = "/03/";
$num[3] = "/04/";
$num[4] = "/05/";
$num[5] = "/06/";
$num[6] = "/07/";
$num[7] = "/08/";
$num[8] = "/09/";
$num[9] = "/10/";
$num[10] = "/11/";
$num[11] = "/12/";
$alpha[0] = "January";
$alpha[1] = "February";
$alpha[2] = "March";
$alpha[3] = "April";
$alpha[4] = "May";
$alpha[5] = "June";
$alpha[6] = "July";
$alpha[7] = "August";
$alpha[8] = "September";
$alpha[9] = "October";
$alpha[10] = "November";
$alpha[11] = "December";
$month = preg_replace($num, $alpha, $monthnum);
if ($hour >=13) $cleanhour = $hour -12; else $cleanhour = $hour;
}
if ($exif_result[IFD0][Artist] != NULL) {
echo "Shot by ".rtrim($exif_result[IFD0][Artist]);
if ($longdate !=NULL) {
echo " on $month $day, $year at $cleanhour:$minute ";
if ($hour >=13) echo "PM"; else echo "AM";
}
echo "";
}
if ($exif_result[IFD0][Model] != NULL) {
echo "Set Up: ".rtrim($exif_result[IFD0][Model]);
if ($exif_result[SubIFD][FocalLength]!=NULL) echo " (".$exif_result[SubIFD][FocalLength].")";
if ($exif_result[SubIFD][ExposureProgram] !=NULL) echo " on ".$exif_result[SubIFD][ExposureProgram];
echo "";
}
if ($exif_result[SubIFD][FNumber] !=NULL) {
echo "Exposure: ";
list($expL, $junk)=explode(" ", $exif_result[SubIFD][ExposureTime], 2);
list($expN, $expD)=explode("/", $expL, 2);
$d=intval($expD);
$n=intval($expN);
if(($n/$d)>=1) $exposure=strval($n/$d)." seconds"; else {
if($n==1) $exposure=$expN."/".$expD; else $exposure="1/".$d/$n."th of a second";
}
echo $exposure." at ".$exif_result[SubIFD][FNumber];
if ($exif_result[SubIFD][ISOSpeedRatings] !=NULL) echo " (ISO ".$exif_result[SubIFD][ISOSpeedRatings].")";
echo "";
}
echo "".rtrim($exif_result[IFD0][Copyright])."";
?>'