folderblog
What is folderblog?
Folderblog is a free PHP script that automatically displays the images placed in a given directory, no database needed. It can be used as a blog or gallery — and anything in between.

» demo blog   » learn more   » download now

Discussion
Exif Data - doesnt display.(back to index)
I was curious if I am doing something wrong. Using the latest Folderblog 3b05. The files are jpeg with exif 2.2 and i can see the summary information. I have PHP 4.3.10 installed. The data doesnt get shown. Do I have to install something in PHP for it to work?
posted by WDuluoz on 22 Jun 05 at 3:36 AM
PHP has to be compiled with exif enabled (--enable-exif). See here for more info.
posted by donald on 22 Jun 05 at 4:02 AM
This got me thinking about a way to make the default template to check if exif is there, now that Folderblog allows PHP commands in templates. Here's a neat solution.

In your template files, replace this:

<div class="exif">
<b>Camera:</b> <#fbcamera#><br />
<b>Flash:</b> <#fbflash#><br />
<b>Focal Length:</b> <#fbfocallength#><br />
<b>Exposure:</b> <#fbexposure#><br />
<b>Aperture:</b> <#fbaperture#><br />
<b>White Balance:</b> <#fbwhitebalance#><br />
<b>Exposure Compensation:</b> <#fbexposurecomp#><br />
<b>Taken:</b> <#fbtaken#><br />
</div>

With this:

<?php if (extension_loaded('exif')) {?>
<div class="exif">
<strong>Camera:</strong> <#fbcamera#><br />
<strong>Flash:</strong> <#fbflash#><br />
<strong>Focal Length:</strong> <#fbfocallength#><br />
<strong>Exposure:</strong> <#fbexposure#><br />
<strong>Aperture:</strong> <#fbaperture#><br />
<strong>ISO:</strong> <#fbiso#><br />
<strong>White Balance:</strong> <#fbwhitebalance#><br />
<strong>Exposure Compensation:</strong> <#fbexposurecomp#><br />
<strong>Taken:</strong> <#fbtaken#><br />
</div>
<?php }?>

Now, if exif isn't there, the template won't show all these details, and you don't need the fb_exif.php in your 'extensions' folder. This update also includes the ISO data, now that the new fb_exif.php includes this.
posted by Elwing on 23 Jun 05 at 11:01 AM
Thinking about it more, you could make that 'if' statement:

if (extension_loaded('exif') && file_exists('extensions/fb_exif.php')) {?>

This would make sure that you had exif compiled in PHP and ensure you had fb_exif.php installed before displaying the EXIF details.
posted by Elwing on 23 Jun 05 at 12:01 PM
I’m not sure, if this is related to folderblog or a generell problem of the exif implementation in php, but at my new fb3-gallery the exif-values of my Canon EOS 300d are correct, the ones of my Canon Powershot A510 are not. There is no ISO-Value from the Powershot and the FocalLength is wrong. I know, this isn’t a big issue for the moment. But maybe someone has an idea?

And another thing. Elwing has shown an if-construct which checks if php is compiled with exif enabled and if the fb_exif.php exists. Both is working for me, but how can I test if there are some exif-data anyway in the image file? And if there are no data (e.g. for older, scanned images and such), how can I disable the whole exif-div? I’ve tried something like:

if ( <#fbcamera#> ) { ... }

but that results in an error. I’m not the php-crack, so any ideas?
posted by jowra on 24 Jun 05 at 3:53 AM
Try something like this:

if ("<#fbcamera#>" != "") {
echo "<strong>Camera:</strong> <#fbcamera#><br />";
}

Don't forget all those quotes and things, and do this for each of the EXIF attributes. Only if the attribute isn't blank, it should display the data.
posted by Elwing on 24 Jun 05 at 5:00 AM
Again, thanks Elwing. Works great. :)
posted by jowra on 24 Jun 05 at 5:37 AM
ok...I used both the fixes given by Elwing above on my folderblog and it works fine when there is no exif data (scanned images etc)...but it doesnt display anything even when exif data is present for pics from my Canon Powershot A75...can anyone think of a solution for this? I use the latest beta build of folderblog and the exif extention is installed too...
posted by Anil on 28 Aug 05 at 6:15 PM
This might be useful:

http://www.jakeo.com/software/exif/index.php
posted by pallih on 31 Aug 05 at 11:53 AM
My EXIF data don't apear, i have a fb htt://www.fafaelcedano.com/ as you can see my EXIF data is in blank, i have installed the jhead (on the server) and the php have all the request (htt://www.fafaelcedano.com/info.php) so please let me know what more i need to do, is very important to me show the EXIF info.

I have a Nikon D70, a Canon G1 and a Canon S50, the EXIF don't appear with any of those images types.

I'm waiting for your help,

Thanks
posted by Rafa on 4 Feb 06 at 3:03 AM
#########
My EXIF data don't appear, i have a fb htt://www.rafaelcedano.com/ as you can see my EXIF data is in blank, i have installed the jhead (on the server) and the php have all the request (htt://www.rafaelcedano.com/info.php) so please let me know what more i need to do, is very important to me show the EXIF info.

I have a Nikon D70, a Canon G1 and a Canon S50, the EXIF don't appear with any of those images types.

I'm waiting for your help,

Thanks
posted by Rafa on 4 Feb 06 at 3:05 AM
Have you tried whether your server supports EXIF by default?
posted by ikue on 4 Feb 06 at 6:05 AM
i don't know to much of this, but can you let me know how can i try? or before i install the jhead i need to do something else more?

Thanks
posted by Rafa on 4 Feb 06 at 12:56 PM
Post a Reply:

Name:    Remember me
URL:    
(include http:// or mailto:)
(back to index)