Dieser MOD erweitert die in den Versionen 1.7.6 - 7 enthaltene EXIF funktion um folgende Werte:
Belichtungsabweichung,
Blendenöffnungswert,
Maximaler Blendenöffnungswert,
Belichtungsmessung,
Blitz,
Belichtungsprogramm,
Belichtungsmodus,
Weißabgleich,
GPS Breitengrad, //aus dem MOD von @Erik
GPS Längengrad, //aus dem Mod von @Erik
GPS Track,
zusätzlich werden alle exif informationen in die datenbank geschrieben, und von dort ausgelesen.
somit werden auch dann die exif infos auf der detailseite dargestellt,
wenn mit "checkimages" die bilder verkleinert werden und die originalbilder in den ordner "big" verschoben werden.
DEMO: exif modneue Dateien: install_exif.php
member_install_exif.php
(new 25.10.2009 ) checkimages.php
(code update 25.10.2009 ) update_exif_index.php
(code update 25.10.2009 )modifizierte Dateien: includes/db_field_definitions.php
lang/deutsch/main.php
includes/funktions.php
(code update 25.10.2009 ) admin/checkimages.php
(code update 25.10.2009 ) includes/member.php
(new 25.10.2009 )1.) sucht in derincludes/functions.php:
function get_exif_info($exif) {
$exif_match = array();
$exif_match['Make'] = "make";
$exif_match['Model'] = "model";
$exif_match['DateTimeOriginal'] = "datetime";
$exif_match['ISOSpeedRatings'] = "isospeed";
$exif_match['ExposureTime'] = "exposure";
$exif_match['FNumber'] = "aperture";
$exif_match['FocalLength'] = "focallen";
$exif_array = array();
if (is_array($exif)) {
foreach ($exif as $key => $val) {
if (isset($exif_match[$key])) {
$exif_info = $val;
if ($key == "DateTimeOriginal") {
$exif_array[$exif_match[$key]] = preg_replace("/([0-9]{4}):([0-9]{2}):([0-9]{2})/", "\\3.\\2.\\1", $exif_info);
}
elseif ($key == "ExposureTime") {
$ExposureTime = explode("/", $exif_info);
if ( $ExposureTime[0] == 1 && $ExposureTime[1] == 1 ){
$exif_array[$exif_match[$key]] = $ExposureTime[1]." sec(s)";
}
elseif ( $ExposureTime[0] == 1 ) {
$exif_array[$exif_match[$key]] = "1/".($ExposureTime[1] * $ExposureTime[0])." sec(s)";
}
elseif(($ExposureTime[0] > 1)){
$exif_array[$exif_match[$key]] = "1/".round($ExposureTime[1]/$ExposureTime[0])." sec(s)";
}
elseif ( $ExposureTime[1] > 1 ) {
$exif_array[$exif_match[$key]] = ($ExposureTime[0]/$ExposureTime[1])." sec(s)";
}
elseif( $ExposureTime[1] == 1 ) {
$exif_array[$exif_match[$key]] = ($ExposureTime[0] * $ExposureTime[1])." sec(s)";
}
}
elseif ($key == "FNumber") {
$aperture = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = "F/" . ($aperture[0] / $aperture[1]);
}
elseif ($key == "FocalLength") {
$focalLen = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = ($focalLen[0] / $focalLen[1]) . "mm";
}
else {
$exif_array[$exif_match[$key]] = $exif_info;
}
}
}
}
return $exif_array;
}
und ersetzt es mit diesem:
function get_exif_info($exif) {
$exif_match = array();
$exif_match['Make'] = "Make";
$exif_match['Model'] = "Model";
$exif_match['DateTimeOriginal'] = "DateTimeOriginal";
$exif_match['ISOSpeedRatings'] = "ISOSpeedRatings";
$exif_match['ExposureTime'] = "ExposureTime";
$exif_match['FNumber'] = "FNumber";
$exif_match['FocalLength'] = "FocalLength";
$exif_match['ExposureBiasValue'] = "ExposureBiasValue";
$exif_match['ApertureValue'] = "ApertureValue";
$exif_match['MaxApertureValue'] = "MaxApertureValue";
$exif_match['MeteringMode'] = "MeteringMode";
$exif_match['Flash'] = "Flash";
$exif_match['ExposureProgram'] = "ExposureProgram";
$exif_match['ExposureMode'] = "ExposureMode";
$exif_match['WhiteBalance'] = "WhiteBalance";
$exif_match['GPSLatitude'] = "GPSLatitude";
$exif_match['GPSLatitudeRef'] = "GPSLatitudeRef";
$exif_match['GPSLongitude'] = "GPSLongitude";
$exif_match['GPSLongitudeRef'] = "GPSLongitudeRef";
$exif_match['GPSAltitude'] = "GPSAltitude";
$exif_match['GPSTrack'] = "GPSTrack";
$exif_array = array();
if (is_array($exif)) {
foreach ($exif as $key => $val) {
if (isset($exif_match[$key])) {
$exif_info = $val;
if ($key == "DateTimeOriginal") {
$exif_array[$exif_match[$key]] = preg_replace("/([0-9]{4}):([0-9]{2}):([0-9]{2})/", "\\3.\\2.\\1", $exif_info);
}
elseif ($key == "ExposureTime") {
$ExposureTime = explode("/", $exif_info);
if ((float)$ExposureTime[1] == 0) {
$exif_array[$exif_match[$key]] = "0 sec(s)";
}
elseif (($ExposureTime[0]/$ExposureTime[1]) >= 0.3) {
$exif_array[$exif_match[$key]] = round(($ExposureTime[0]/$ExposureTime[1]),1)." sec(s)";
}
else {
$exif_array[$exif_match[$key]] = "1/".round((1/($ExposureTime[0]/$ExposureTime[1])),0)." sec(s)";
}
}
elseif ($key == "FNumber") {
$FNumber = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = "F/" . ($FNumber[0] / $FNumber[1]);
}
elseif ($key == "FocalLength") {
$FocalLength = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = round(($FocalLength[0] / $FocalLength[1])) . " mm";
}
elseif ($key == "ExposureBiasValue") {
$ExposureBiasValue = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = round(($ExposureBiasValue[0] / $ExposureBiasValue[1]), 1) . " EV";
}
elseif ($key == "ApertureValue") {
$ApertureValue = explode("/", $exif_info);
$exif_array[$exif_match[$key]] ="F/" . round(($ApertureValue[0] / $ApertureValue[1]), 1);
}
elseif ($key == "MaxApertureValue") {
$MaxApertureValue = explode("/", $exif_info);
$exif_array[$exif_match[$key]] ="F/" . round((pow(sqrt(2),$MaxApertureValue[0] / $MaxApertureValue[1])), 1);
}
elseif ($key == "MeteringMode") {
if($exif_info == 0) {$MeteringMode = "Unbekannt";}
if($exif_info == 1) {$MeteringMode = "Durchschnitt";}
if($exif_info == 2) {$MeteringMode = "Mittenbetont";}
if($exif_info == 3) {$MeteringMode = "Spot";}
if($exif_info == 4) {$MeteringMode = "Multi-Spot";}
if($exif_info == 5) {$MeteringMode = "Multi-Segment";}
if($exif_info == 6) {$MeteringMode = "Selektiv";}
if($exif_info == 255) {$MeteringMode = "Anders";}
$exif_array[$exif_match[$key]] = ($MeteringMode);
}
elseif ($key == "Flash") {
if($exif_info == 0) {$Flash = "Kein Blitz";}
if($exif_info == 1) {$Flash = "Blitz ausgelöst";}
if($exif_info == 5) {$Flash = "Blitz ausgelöst but strobe return light not detected";}
if($exif_info == 7) {$Flash = "Blitz ausgelöst and strobe return light detected";}
if($exif_info == 9) {$Flash = "Blitz ausgelöst, erzwungener Blitz";}
if($exif_info == 13) {$Flash = "Blitz ausgelöst, erzwungener Blitz, return light not detected";}
if($exif_info == 15) {$Flash = "Blitz ausgelöst, erzwungener Blitz, return light detected";}
if($exif_info == 16) {$Flash = "Blitz nicht ausgelöst";}
if($exif_info == 24) {$Flash = "Flash did not fire, auto mode";}
if($exif_info == 25) {$Flash = "Blitz ausgelöst, auto mode";}
if($exif_info == 29) {$Flash = "Blitz ausgelöst, auto mode, return light not detected";}
if($exif_info == 31) {$Flash = "Blitz ausgelöst, auto mode, return light detected";}
if($exif_info == 32) {$Flash = "keine Blitzfunktion";}
if($exif_info == 65) {$Flash = "Blitz ausgelöst, Rote Augen Reduktion";}
if($exif_info == 69) {$Flash = "Blitz ausgelöst, Rote Augen Reduktion, return light not detected";}
if($exif_info == 71) {$Flash = "Blitz ausgelöst, Rote Augen Reduktion, return light detected";}
if($exif_info == 73) {$Flash = "Blitz ausgelöst, erzwungener Blitz, Rote Augen Reduktion";}
if($exif_info == 77) {$Flash = "Blitz ausgelöst, erzwungener Blitz, Rote Augen Reduktion, return light not detected";}
if($exif_info == 79) {$Flash = "Blitz ausgelöst, erzwungener Blitz, Rote Augen Reduktion, red-eye reduction mode, return light detected";}
if($exif_info == 89) {$Flash = "Blitz ausgelöst, auto mode, Rote Augen Reduktion";}
if($exif_info == 93) {$Flash = "Blitz ausgelöst, auto mode, return light not detected, Rote Augen Reduktion";}
if($exif_info == 95) {$Flash = "Blitz ausgelöst, auto mode, return light detected, Rote Augen Reduktion";}
$exif_array[$exif_match[$key]] = ($Flash);
}
elseif ($key == "ExposureProgram") {
if($exif_info == 1) {$ExposureProgram = "Manuell";}
if($exif_info == 2) {$ExposureProgram = "Programmautomatik";}
if($exif_info == 3) {$ExposureProgram = "Zeitautomatik";}
if($exif_info == 4) {$ExposureProgram = "Blendenautomatik";}
if($exif_info == 5) {$ExposureProgram = "Stilleben";}
if($exif_info == 6) {$ExposureProgram = "Sport";}
if($exif_info == 7) {$ExposureProgram = "Portrait";}
if($exif_info == 8) {$ExposureProgram = "Landschaft";}
$exif_array[$exif_match[$key]] = ($ExposureProgram);
}
elseif ($key == "ExposureMode") {
if($exif_info == 0) {$ExposureMode = "Automatisch";}
if($exif_info == 1) {$ExposureMode = "Manuell";}
if($exif_info == 2) {$ExposureMode = "Auto Bracket";}
if($exif_info == 255) {$ExposureMode = "Unbekannt";}
$exif_array[$exif_match[$key]] = ($ExposureMode);
}
elseif ($key == "WhiteBalance") {
if($exif_info == 0) {$WhiteBalance = "Automatisch";}
if($exif_info == 1) {$WhiteBalance = "Manuell";}
$exif_array[$exif_match[$key]] = ($WhiteBalance);
}
elseif ($key == "GPSLatitudeRef") {
if ($exif_info == N) {$GPSLatitudeRef = "Nord";$GPSLatfaktor = 1;}
if ($exif_info == S) {$GPSLatitudeRef = "Süd"; $GPSLatfaktor = -1;}
$exif_array[$exif_match[$key]] = ($GPSLatitudeRef);
}
elseif ($key == "GPSLongitudeRef") {
if ($exif_info == E) {$GPSLongitudeRef = "Ost";$GPSLongfaktor = 1;}
if ($exif_info == W) {$GPSLongitudeRef = "West";$GPSLongfaktor = -1;}
$exif_array[$exif_match[$key]] = ($GPSLongitudeRef);
}
elseif ($key == "GPSLatitude") {
$GPSLatitude_h = explode("/", $exif_info[0]);
$GPSLatitude_m = explode("/", $exif_info[1]);
$GPSLatitude_s = explode("/", $exif_info[2]);
$GPSLat_h = $GPSLatitude_h[0] / $GPSLatitude_h[1];
$GPSLat_m = $GPSLatitude_m[0] / $GPSLatitude_m[1];
$GPSLat_s = $GPSLatitude_s[0] / $GPSLatitude_s[1];
$GPSLatGrad = $GPSLatfaktor * ($GPSLat_h + ($GPSLat_m + ($GPSLat_s / 60))/60);
$exif_array[$exif_match[$key]] = $GPSLatitudeRef . " " .$GPSLat_h . "° ". $GPSLat_m . "' " . $GPSLat_s . "'' ($GPSLatGrad)";
}
elseif ($key == "GPSLongitude") {
$GPSLongitude_h = explode("/", $exif_info[0]);
$GPSLongitude_m = explode("/", $exif_info[1]);
$GPSLongitude_s = explode("/", $exif_info[2]);
$GPSLong_h = $GPSLongitude_h[0] / $GPSLongitude_h[1];
$GPSLong_m = $GPSLongitude_m[0] / $GPSLongitude_m[1];
$GPSLong_s = $GPSLongitude_s[0] / $GPSLongitude_s[1];
$GPSLongGrad = $GPSLongfaktor * ($GPSLong_h + ($GPSLong_m + ($GPSLong_s / 60))/60);
$exif_array[$exif_match[$key]] = $GPSLongitudeRef . " " . $GPSLong_h . "° ". $GPSLong_m . "' " . $GPSLong_s . "'' ($GPSLongGrad)";
}
elseif ($key == "GPSAltitude") {
$GPSAltitude = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = ($GPSAltitude[0] / $GPSAltitude[1]) . " Meter über NN";
}
elseif ($key == "GPSTrack") {
$GPSTrack = explode("/", $exif_info);
$exif_array[$exif_match[$key]] = ($GPSTrack[0] / $GPSTrack[1]) . "°";
}
else {
$exif_array[$exif_match[$key]] = $exif_info;
}
}
}
}
return $exif_array;
}
3.) sucht in der includes/funktions.php:
if ($detailed_view && $image_info[2] == 2 && function_exists('exif_read_data') && $exif_data = @exif_read_data($src, 'EXIF')) {
$exif_array = get_exif_info($exif_data);
$bgcounter = 0;
foreach ($exif_array as $key => $val) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$site_template->register_vars(array(
"exif_value" => format_text($val),
"exif_name" => $lang['exif_'.$key],
"row_bg_number" => $row_bg_number
));
$exif_info .= $site_template->parse_template("exif_bit");
}
}
}
}
und ersetzt es mit:
if ($detailed_view && $image_info[2] == 2){
global $site_db,$lang;
$sql = "SELECT image_Make, image_Model, image_DateTimeOriginal, image_ISOSpeedRatings, image_ExposureTime, image_FNumber, image_FocalLength, image_ExposureBiasValue, image_ApertureValue, image_MaxApertureValue,
image_MeteringMode, image_Flash, image_ExposureProgram, image_ExposureMode, image_WhiteBalance, image_GPSLatitude, image_GPSLatitudeRef, image_GPSLongitude, image_GPSLongitudeRef, image_GPSAltitude,
image_GPSTrack
FROM ".IMAGES_TABLE."
WHERE image_id = '$image_id'";
$result = $site_db->query($sql);
$row = mysql_fetch_object($result);
$bgcounter = 0;
foreach ($row as $lang['exif_'.$key] => $val) {
if ($val != "") {
$key = str_replace('image_','',($lang['exif_'.$key]));
if (($key != "GPSLongitudeRef") && ($key != "GPSLatitudeRef")) {
if ($key == "GPSLongitude") {
$GPSLongtude = substr (strrchr($val, "("), 1);
$GPSLongtude = substr ($GPSLongtude,0, strlen($GPSLongtude)-1);
}
if ($key == "GPSLatitude") {
$GPSLatitude = substr (strrchr($val, "("), 1);
$GPSLatitude = substr ($GPSLatitude,0, strlen($GPSLatitude)-1);
}
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$site_template->register_vars(array(
"exif_value" => format_text($val, 1),
"exif_name" => $lang['exif_'.$key],
"row_bg_number" => $row_bg_number
));
$exif_info .= $site_template->parse_template("exif_bit");
} // GPS
} //end val
} // end foreach
} // Exif aus DB
}
}
//################################# End Exif aus DB #################################################################
3.) in der includes/db_field_definitions.php vor ?>
//>>>>>>>>>>>>>>>>>>>>>>>>>>Exif-Info-Start<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$additional_image_fields['image_Make'] = array($lang['exif_Make'], "text", 0);
$additional_image_fields['image_Model'] = array($lang['exif_Model'], "text", 0);
$additional_image_fields['image_DateTimeOriginal'] = array($lang['exif_DateTimeOriginal'], "text", 0);
$additional_image_fields['image_ISOSpeedRatings'] = array($lang['exif_ISOSpeedRatings'], "text", 0);
$additional_image_fields['image_ExposureTime'] = array($lang['exif_ExposureTime'], "text", 0);
$additional_image_fields['image_FNumber'] = array($lang['exif_FNumber'], "text", 0);
$additional_image_fields['image_FocalLength'] = array($lang['exif_FocalLength'], "text", 0);
$additional_image_fields['image_ExposureBiasValue'] = array($lang['exif_ExposureBiasValue'], "text", 0);
$additional_image_fields['image_ApertureValue'] = array($lang['exif_ApertureValue'], "text", 0);
$additional_image_fields['image_MaxApertureValue'] = array($lang['exif_MaxApertureValue'], "text", 0);
$additional_image_fields['image_MeteringMode'] = array($lang['exif_MeteringMode'], "text", 0);
$additional_image_fields['image_Flash'] = array($lang['exif_Flash'], "text", 0);
$additional_image_fields['image_ExposureProgram'] = array($lang['exif_ExposureProgram'], "text", 0);
$additional_image_fields['image_ExposureMode'] = array($lang['exif_ExposureMode'], "text", 0);
$additional_image_fields['image_WhiteBalance'] = array($lang['exif_WhiteBalance'], "text", 0);
$additional_image_fields['image_GPSLatitude'] = array($lang['exif_GPSLatitude'], "text", 0);
$additional_image_fields['image_GPSLatitudeRef'] = array($lang['exif_GPSLatitudeRef'], "text", 0);
$additional_image_fields['image_GPSLongitude'] = array($lang['exif_GPSLongitude'], "text", 0);
$additional_image_fields['image_GPSLongitudeRef'] = array($lang['exif_GPSLongitudeRef'], "text", 0);
$additional_image_fields['image_GPSAltitude'] = array($lang['exif_GPSAltitude'], "text", 0);
$additional_image_fields['image_GPSTrack'] = array($lang['exif_GPSTrack'], "text", 0);
//<<<<<<<<<<<<<<<<<<<<<<<<<<<Exif-Info-Stop<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
4.) sucht in lang/deutsch/main.php:
// EXIF Tags
$lang['exif_make'] = "Hersteller:";
$lang['exif_model'] = "Modell:";
$lang['exif_datetime'] = "Aufnahmedatum:";
$lang['exif_isospeed'] = "ISO-Zahl:";
$lang['exif_exposure'] = "Belichtungszeit:";
$lang['exif_aperture'] = "Blende:";
$lang['exif_focallen'] = "Brennweite:";
und ersetzt es mit:
// EXIF Tags
$lang['exif_Make'] = "Hersteller:";
$lang['exif_Model'] = "Modell:";
$lang['exif_DateTimeOriginal'] = "Aufnahme,Datum und Zeit:";
$lang['exif_ISOSpeedRatings'] = "ISO Wert:";
$lang['exif_ExposureTime'] = "Belichtungszeit:";
$lang['exif_FNumber'] = "Blende:";
$lang['exif_FocalLength'] = "Brennweite (Objektiv):";
$lang['exif_ExposureBiasValue'] = "Belichtungsabweichung:";
$lang['exif_ApertureValue'] = "Blendenöffnungswert:";
$lang['exif_MaxApertureValue'] = "Maximaler Blendenöffnungswert:";
$lang['exif_MeteringMode'] = "Belichtungsmessung:";
$lang['exif_Flash'] = "Blitz:";
$lang['exif_ExposureProgram'] = "Belichtungsprogramm:";
$lang['exif_ExposureMode'] = "Belichtungsmodus:";
$lang['exif_WhiteBalance'] = "Weißabgleich:";
$lang['exif_GPSLatitudeRef'] = "GPS Breitengrad Referenz:";
$lang['exif_GPSLatitude'] = "GPS Breitengrad:";
$lang['exif_GPSLongitudeRef'] = "GPS Längengrad Referenz";
$lang['exif_GPSLongitude'] = "GPS Längengrad:";
$lang['exif_GPSAltitude'] = "GPS Höhe:";
$lang['exif_GPSTrack'] = "GPS Blickrichtung:";
5.) sucht in der member.php (dieser schritt ist nur notwendig wenn ihr auch bei einen member upload die exif infos auslesen wollt) :
$current_time = time();
if ($direct_upload) {
$sql = "INSERT INTO ".IMAGES_TABLE."
(cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.")
VALUES
($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";
$result = $site_db->query($sql);
$image_id = $site_db->get_insert_id();
if ($result) {
include(ROOT_PATH.'includes/search_utils.php');
$search_words = array();
foreach ($search_match_fields as $image_column => $match_column) {
if (isset($HTTP_POST_VARS[$image_column])) {
$search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);
}
}
add_searchwords($image_id, $search_words);
}
}
else {
$sql = "INSERT INTO ".IMAGES_TEMP_TABLE."
(cat_id, user_id, image_name, image_description, image_keywords, image_date, image_media_file, image_thumb_file, image_download_url".$additional_field_sql.")
VALUES
($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, '$new_name', '$new_thumb_name', '$image_download_url'".$additional_value_sql.")";
$result = $site_db->query($sql);
}
und ersetzt es mit:
//#################################### Exif Mod Start #################################################
if (function_exists('exif_read_data') && $exif_data = @exif_read_data($src, 'EXIF')) {
$exif_array = get_exif_info($exif_data);
foreach ($exif_array as $key => $val) {
if ($key == "Make") {$Make = $val;}
if ($key == "Model") {$Model = $val;}
if ($key == "DateTimeOriginal") {$DateTimeOriginal = $val;}
if ($key == "ISOSpeedRatings") {$ISOSpeedRatings = $val;}
if ($key == "ExposureTime") {$ExposureTime = $val;}
if ($key == "FNumber") {$FNumber = $val;}
if ($key == "FocalLength") {$FocalLength = $val;}
if ($key == "ExposureBiasValue") {$ExposureBiasValue = $val;}
if ($key == "ApertureValue") {$ApertureValue = $val;}
if ($key == "MaxApertureValue") {$MaxApertureValue = $val;}
if ($key == "MeteringMode") {$MeteringMode = $val;}
if ($key == "Flash") {$Flash = $val;}
if ($key == "ExposureProgram") {$ExposureProgram = $val;}
if ($key == "ExposureMode") {$ExposureMode = $val;}
if ($key == "WhiteBalance") {$WhiteBalance = $val;}
if ($key == "GPSLongitudeRef") {$GPSLongitudeRef = $val;}
if ($key == "GPSLatitudeRef") {$GPSLatitudeRef = $val;}
if ($key == "GPSLongitude") {
$GPSLongitude = substr (strrchr($val, "("), 1);
$GPSLongitude = substr ($GPSLongitude,0, strlen($GPSLonigtude)-1);
}
if ($key == "GPSLatitude") {
$GPSLatitude = substr (strrchr($val, "("), 1);
$GPSLatitude = substr ($GPSLatitude,0, strlen($GPSLatitude)-1);
}
if ($key == "GPSAltitude") {$GPSAltitude = $val;}
if ($key == "GPSTrack") {$GPSTrack = $val;}
}
}
$current_time = time();
if ($direct_upload) {
$sql = "INSERT INTO ".IMAGES_TABLE."
(cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments, image_Make, image_Model, image_DateTimeOriginal, image_ISOSpeedRatings, image_ExposureTime, image_FNumber, image_FocalLength, image_ExposureBiasValue, image_ApertureValue, image_MaxApertureValue, image_MeteringMode, image_Flash, image_ExposureProgram, image_ExposureMode, image_WhiteBalance, image_GPSLatitude, image_GPSLatitudeRef, image_GPSLongitude, image_GPSLongitudeRef, image_GPSAltitude, image_GPSTrack".$additional_field_sql.")
VALUES
($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments, '$Make', '$Model', '$DateTimeOriginal', '$ISOSpeedRatings', '$ExposureTime', '$FNumber', '$FocalLength','$ExposureBiasValue', '$ApertureValue', '$MaxApertureValue', '$MeteringMode', '$Flash', '$ExposureProgram', '$ExposureMode', '$WhiteBalance', '$GPSLatitude', '$GPSLatitudeRef', '$GPSLongitude', '$GPSLongitudeRef', '$GPSAltitude', '$GPSTrack'".$additional_value_sql.")";
$result = $site_db->query($sql);
$image_id = $site_db->get_insert_id();
if ($result) {
include(ROOT_PATH.'includes/search_utils.php');
$search_words = array();
foreach ($search_match_fields as $image_column => $match_column) {
if (isset($HTTP_POST_VARS[$image_column])) {
$search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);
}
}
add_searchwords($image_id, $search_words);
}
}
else {
$sql = "INSERT INTO ".IMAGES_TEMP_TABLE."
(cat_id, user_id, image_name, image_description, image_keywords, image_date, image_media_file, image_thumb_file, image_download_url, image_Make, image_Model, image_DateTimeOriginal, image_ISOSpeedRatings, image_ExposureTime, image_FNumber, image_FocalLength, image_ExposureBiasValue, image_ApertureValue, image_MaxApertureValue, image_MeteringMode, image_Flash, image_ExposureProgram, image_ExposureMode, image_WhiteBalance, image_GPSLatitude, image_GPSLatitudeRef, image_GPSLongitude, image_GPSLongitudeRef, image_GPSAltitude, image_GPSTrack".$additional_field_sql.")
VALUES
($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, '$new_name', '$new_thumb_name', '$image_download_url', '$Make', '$Model', '$DateTimeOriginal', '$ISOSpeedRatings', '$ExposureTime', '$FNumber', '$FocalLength','$ExposureBiasValue', '$ApertureValue', '$MaxApertureValue', '$MeteringMode', '$Flash', '$ExposureProgram', '$ExposureMode', '$WhiteBalance', '$GPSLatitude', '$GPSLatitudeRef', '$GPSLongitude', '$GPSLongitudeRef', '$GPSAltitude', '$GPSTrack'".$additional_value_sql.")";
$result = $site_db->query($sql);
}
//#################################### Exif Mod End #################################################
ersetzt bitte eure "admin/checkimages.php" mit der version hier im anhang.
kopiert die datei "update_exif_index.php" nach "admin/plugin".
mit dieser datei werden die vorhanden bilder der galerie nach exifdaten durchsucht und in die datenbank geschrieben.
kopiert die dateien install_exif.php und falls notwendig, die "member_install_exif.php" in euren root ordner und führt sie aus.
wenn ihr diese suchfeld erweiterung installiert habt
http://www.4homepages.de/forum/index.php?topic=21053.0könnt ihr allle bilder der galerie nach exifdaten durchsuchen!
mfg Andi