| Author |
Message |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
Photoblog with Exif info |
|
Hi all,
I'm trying to create a photoblog for my pictures, however, none of the software I tried is what I want exactly. I still really like cutenews.ru, and I think it's possible to create a Photoblog with it, however, there would be one thing missing; Exif-information with things like shuttertime, focal length, ISO and aperture.
Does anyone know how to create such a thing in cutenews.ru?
THNX in advance!
|
|
| Mon Dec 11, 2006 6:46 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1943 Location: US |
|
|
|
What exactly are you trying to get the site to do? How do you need it to react? I have tons of photo blogs running with cutenews and they do just what I need. I've seen them customized many many different ways.
Is it more complicated than I have done on http://www.scottdizzle.com ? Check 'my pictures' and 'funny pictures' to see the different ways I have them laid out.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Mon Dec 11, 2006 7:16 pm |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
That my pictures part is just a part of what I'm trying to do, I think I'll succeed in that part, shouldn't be too hard, but the part I am interested in is this; http://www.exif.org/samples.html
Just click on full info for one of the sample images. Now that's a lot of Exif information, I don't need all of it, just the important parts. To see how it would be displayed on a real photoblog-software, look here; http://www.watchthisspace.ca/pixelpost/index.php?showimage=202
Now suddenly people can see important information about that particular image;
Canon EOS 30D
Exposure: 51 sec
Aperture: f 8
ISO: 100
Focal: 17 mm
Flash: Not Fired
And that's exactly what I want to show for my pictures. Now, I could write all of that by hand, but if the info is already stored in the picture itself, why not use it the way it was intended with some kind of Exif-reader...
I hope I made it more clear what I want to have...
THNX
|
|
| Mon Dec 11, 2006 9:10 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1943 Location: US |
|
|
|
Oh I kinda had a feeling that's how you wanted to do it. Use XFields for that. Create an XField for every extra thing you're going to need in your template.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue Dec 12, 2006 11:40 am |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
That's what I thought of as a secondary possibility (although I've never used xfields, is there some kind of tuorial or help for it?), But still I prefer an automatic Exif-reader if someone knows of a way to accomplish this...
There's even a built in exif reader in php, just don't know if this is any good;
http://nl3.php.net/manual/nl/function.exif-read-data.php
|
|
| Tue Dec 12, 2006 6:41 pm |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
| Tue Dec 12, 2006 8:40 pm |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
Sorry for continuous posting but I just found out even more. On that page I see a newer project of the maker of Exifer called fotopholder. I downloaded it and looked through the php and saw he uses the PHP function exif_read_data (http://nl3.php.net/manual/nl/function.exif-read-data.php). Now check out a sample of that gallery, exactly the piece of information I'm looking for, though exif_read_data. The problem still is, I have absolutely no idea how to implement this PHP code into cutenews.ru, can anyone help?
|
|
| Tue Dec 12, 2006 8:52 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
The instructions refer to the latest image module.
1. Open images.mdu and find this:
 |  | if(in_array(strtolower(end(explode('.', $file))), $allowed_extensions)){ |
add above:
 |  | $insert .= '<br />'.get_exif_info($config_path_image_upload.'/'.$file); |
2. Add this at the end of the file above the last ?>:
 |  | function get_exif_info($image){
$info = exif_read_data($image);
$time = explode(" ", $info['COMPUTED']['ExposureTime']);
$time = $time[0];
$focal = explode("/", $info['FocalLength']);
$focal = round(($focal[0] / $focal[1]), 1);
$output = '<table>';
$output .= '<tr><td colspan="2">'.$info['Model'].'</td></tr>';
$output .= '<tr><td>Exposure</td><td>'.$time.' sec</td></tr>';
$output .= '<tr><td>Aperture</td><td>'.$info['COMPUTED']['ApertureFNumber'].'</td></tr>';
$output .= '<tr><td>Focal</td><td>'.$focal.' mm</td></tr>';
$output .= '</table>';
return $output;
} |
Last edited by FI-DD on Thu Dec 14, 2006 11:46 pm; edited 1 time in total |
|
| Tue Dec 12, 2006 9:57 pm |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
Thank you very much, will try this when I come home from work this afternoon!
|
|
| Wed Dec 13, 2006 6:06 am |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
It doesn't seem to work, I did what you told me, but this is the result in the add images dialog;
 |  | Warning: exif_read_data(.): file not supported in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 699
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 702
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 705
Warning: exif_read_data(..): file not supported in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 699
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 702
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 705
Warning: exif_read_data(): HTTP request failed! HTTP/1.1 403 Forbidden in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 699
Warning: exif_read_data(): unable to open file in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 699
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 702
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 705
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 702
Warning: exif_read_data(thumbs): file not supported in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 699
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 702
Warning: Division by zero in c:\appserv\www\cutenews_ru\cnr\inc\mod\images.mdu on line 705
|
And when viewing the added image in the post it shows the thumbnail like I wanted, but no Exif info...
Do you have any idea? THNX!
|
|
| Wed Dec 13, 2006 7:19 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Maybe exif support is disabled.
To test it put the following code in a file and run it in your browser:
 |  | <?php
function checkExifversion() {
$capabilities = get_extension_funcs("exif");
if(!$capabilities) return 0;
if(in_array ("exif_read_data",$capabilities)) return 1;
return 0;
}
if(checkExifversion() == 0) echo 'No exif-support.';
if(checkExifversion() == 1) echo 'Exif support enabled.';
?> |
|
|
| Wed Dec 13, 2006 8:23 pm |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
No, that's not it;
Exif support enabled.
|
|
| Wed Dec 13, 2006 8:41 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Maybe the picture is the problem.
I successfully tested it with the image below.
| Description: |
|
 Download |
| Filename: |
exif.jpg |
| Filesize: |
194.62 KB |
| Downloaded: |
153 Time(s) |
|
|
| Wed Dec 13, 2006 8:53 pm |
|
 |
superjari
Joined: 07 Oct 2006 Posts: 35 Location: Netherlands |
|
|
|
No, that image has Exif, already tested it with other applications, however, perhaps I shopuld add that I already see those errors when I enter the insert image dialog, so before even uploading the image...
|
|
| Wed Dec 13, 2006 9:13 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
I guess, your other images are the problem then. Test it using just the image from above.
|
|
| Thu Dec 14, 2006 8:31 pm |
|
 |
|