View Full Version : EXIF date
Anonymous
04-13-2005, 11:39 AM
Hello
new version is good working!
and I just want a new function for ' Date and Time for the entry'
can I use a EXIF information use Date and Time for the entry?
please add a check box
thanks
Connie
04-13-2005, 11:49 AM
Hello!
So when uploading the EXIF-Date should be taken as the publishing-date?
Thanks for the suggestion, we should it take it on our list of possible new features! 8)
mgb123
04-13-2005, 01:08 PM
Connie,
It does sound like a cool feature. It's not that it should take the place of the published date, but rather that it might be a good addition?
Connie
04-13-2005, 01:11 PM
I think so too, it could be the 4th option for uploading:
. post now
. post one day later
. post at special date
. use exif date
it's on the whishlist :lol:
mgb123
04-13-2005, 01:13 PM
Wow, i wouldn't have thought of doing it that way...that's a great idea.
It would be cool if in the admin options, you could set a default, and that would be checked off automatically, but you could still see the other options there as well...
Anonymous
04-14-2005, 02:11 AM
thanks
I hope a new admin page :D
the way Connie describes it i had in mind too.
i had a poke around in the code last night, but could not get the exif data at the moment the admin page is loaded.
the exif data only gets read out at the time the image is dipslayed in the front-end.
the feature would be very usefull for keeping a slower pace in uploading the images. now all the images get the same upload date, but i would like to 'post' them to the day (moment) they where taken.
i used to do the main part of my job coding php, so i could maybe write an addon for this.
i have very few spare time, so if somebody can explain how i get the exif functions started in admin/index.php ...
one could implement this in around line 390 in admin/index.php :
} else if( $_POST['autodate'] == 2 ) {
$datetime = gmdate("Y-m-d H:i:s",time()+(3600 * $tz));
}
// ADD ANOTHER OPTION
} else if( $_POST['autodate'] == 3 ) {
// $datetime = NEED EXIF VAR HERE
}
hope i can soon use pixelpost this way !
Incidentally, this was JUST the feature I was missing when I first tried pixelpost 1.4.2. So I hacked my own. It's probably not the most neat solution, but it works. Don't know how I can submit it as an add-on, however, so if anyone can point me in the right direction...
Still, I can post the updated parts of admin/index.php here:
Somewhere in the top, near other "require"s, add:
require("../includes/exifer1_5/exif.php");
After
} else if( $_POST['autodate'] == 2 ) {
$datetime = gmdate("Y-m-d H:i:s",time()+(3600 * $tz));
add
} else if( $_POST['autodate'] == 3 ) { // New, JFK: post date from EXIF
// delay action to later point. We don't know the filename yet...
// just set a flag so we know what to do later on
$postdatefromexif = 1;
And finally, after
if(move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
chmod($uploadfile, 0644);
$result = check_upload($_FILES['userfile']['error']);
$filnamn =strtolower($_FILES['userfile']['name']);
$filnamn = $time_stamp_r .$filnamn;
$filtyp = $_FILES['userfile']['type'];
$filstorlek = $_FILES['userfile']['size'];
$status = "ok";
Add
// JFK: date from exif. We now know the path + filename.
if($postdatefromexif == 1) {
$exif_result = read_exif_data_raw($uploadfile,"0");
$exposuredatetime = $exif_result['SubIFD']['DateTimeOriginal'];
list($exifyear,$exifmonth,$exifday,$exifhour,$exif min, $exifsec
) = split('[: ]', $exposuredatetime);
$datetime = date("Y-m-d H:i:s", mktime($exifhour, $exifmin, $ex
ifsec, $exifmonth, $exifday, $exifyear));
}
It works for me, but YMMV. :eek:
And still, it would be easier if I could just submit the entire admin/index.php file as an add-on. Let me know how I can do that.
Additionally, if someone can come up with a "post date == exif date" function for the copy_folder add-on, so that I can convert my current photo(b)log to pixelpost, that would be much appreciated. ;-)
Incidentally, this was JUST the feature I was missing when I first tried pixelpost 1.4.2. So I hacked my own. It's probably not the most neat solution, but it works. Don't know how I can submit it as an add-on, however, so if anyone can point me in the right direction...
Come to think of it, it's not a (neat and clean) add-on, it's more a modification. Anyway...
Still, I can post the updated parts of admin/index.php here:
Better yet, I've put the modification ready-to-download with some HOWTO on my site:
http://cco.xs4all.nl/~jfk/pixelpost-addon/
raminia
09-08-2005, 07:30 PM
I'll try that.
raminia
09-08-2005, 07:53 PM
I'll add this to 1.5.
btw, if some photo does not contain the EXIF data and mistakely, user set the date as for exif date what would happend?
babyben
09-09-2005, 11:18 AM
Perhaps it could just post on the time it was submitted to PP?
raminia
09-09-2005, 12:02 PM
yeah, babyben is right. But this mod does not do that.
it needs slight addition. BTW, I've added this to 1.5 and its copy folder addon. :)
I'll add this to 1.5.
btw, if some photo does not contain the EXIF data and mistakely, user set the date as for exif date what would happend?
So far, it was just a quick hack. If there's no EXIF data, things might go terribly wrong.
Yes, it needs to be made (a bit more) fool-proof...
raminia
09-10-2005, 04:21 AM
fool-proof? or full proof?;)
fool-proof? or full proof?;)
Preferrably both :-)
Anyway, using my new function, when I try to upload a picture that has no EXIF data, it ends up being posted with date 1970-01-01 00:59:59. So, in the new EXIF code, we could just add a check after attempting to extract EXIF date and time: if date is 1970-01-01, then use current date and time instead.
Sounds fool- and full proof to me ;-)
(Except when someone wants to post his/her digital pictures from New Year's day 1970... :rolleyes: )
babyben
09-10-2005, 01:58 PM
yeah, babyben is right. :)
Words I don't hear often enough :lol:
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.