-Blitzmodus wird nun richtig genannt
-Anzeige "nicht verfügbar" wenn kein wert vorhanden
functions_content.php - Erweiterung (wie oben genannt)
Code: Alles auswählen
// Versuch exif auszulesen -START-
$exif_na="nicht verfügbar";
$image = $filename;
if ($image != '') {
$exif = exif_read_data($image, 0 , true);
/* Aufnahmezeitpunkt */
if(isset($exif["EXIF"]["DateTimeOriginal"])) {
$exif_date = str_replace(":","-",substr($exif["EXIF"]["DateTimeOriginal"], 0, 10));
$exif_time = substr($exif["EXIF"]["DateTimeOriginal"], 10);
}
else
{
$exif_date = $exif_na;
$exif_time = $exif_na;
}
/* Blende */
if(isset($exif["EXIF"]["FNumber"])) {
list($num,$den) = explode("/",$exif["EXIF"]["FNumber"]);
$exif_aperture = "F/" . ($num/$den);
}
else
{
$exif_aperture = $exif_na;
}
/* Belichtungszeit */
if(isset($exif["EXIF"]["ExposureTime"])) {
list($num, $den) = explode("/", $exif["EXIF"]["ExposureTime"]);
if ($num!=1) {
$exif_exposure = "{$num}s";
} else {
$den = $den/$num;
$exif_exposure = "1/{$den}s";
}
}
else
{
$exif_exposure = $exif_na;
}
/* Brennweite */
if(isset($exif["EXIF"]["FocalLength"])) {
list($num, $den) = explode("/", $exif["EXIF"]["FocalLength"]);
$exif_focallength = ($num/$den) . "mm";
}
else
{
$exif_focallength = $exif_na;
}
/* ISO */
if(isset($exif["EXIF"]["ISOSpeedRatings"])) {
$exif_iso = $exif["EXIF"]["ISOSpeedRatings"];
}
else
{
$exif_iso = $exif_na;
}
/* Weißabgleich */
if(isset($exif["EXIF"]["WhiteBalance"])) {
switch($exif["EXIF"]["WhiteBalance"]) {
case 0:
$exif_whitebalance = "Auto";
break;
case 1:
$exif_whitebalance = "Daylight";
break;
case 2:
$exif_whitebalance = "Fluorescent";
break;
case 3:
$exif_whitebalance = "Incandescent";
break;
case 4:
$exif_whitebalance = "Flash";
break;
case 9:
$exif_whitebalance = "Fine Weather";
break;
case 10:
$exif_whitebalance = "Cloudy";
break;
case 11:
$exif_whitebalance = "Shade";
break;
default:
$exif_whitebalance = "";
break;
}
}
else
{
$exif_whitebalance = $exif_na;
}
/* Blitzmodus */
if(isset($exif["EXIF"]["Flash"])) {
switch($exif["EXIF"]["Flash"]) {
case 0:
$exif_flash = "Flash did not fire";
break;
case 1:
$exif_flash = "Flash fired";
break;
case 5:
$exif_flash = "Strobe return light not detected";
break;
case 7:
$exif_flash = "Strobe return light detected";
break;
case 9:
$exif_flash = "Flash fired, compulsory flash mode ";
break;
case 13:
$exif_flash = "Flash fired, compulsory flash mode, return light not detected ";
break;
case 15:
$exif_flash = "Flash fired, compulsory flash mode, return light detected ";
break;
case 16:
$exif_flash = "Flash did not fire, compulsory flash mode ";
break;
case 24:
$exif_flash = "Flash did not fire, auto mode";
break;
case 25:
$exif_flash = "Flash fired, auto mode ";
break;
case 29:
$exif_flash = "Flash fired, auto mode, return light not detected ";
break;
case 31:
$exif_flash = "Flash fired, auto mode, return light detected ";
break;
case 32:
$exif_flash = "No flash function ";
break;
case 65:
$exif_flash = "Flash fired, red-eye reduction mode ";
break;
case 69:
$exif_flash = "Flash fired, red-eye reduction mode, return light not detected ";
break;
case 71:
$exif_flash = "Flash fired, red-eye reduction mode, return light detected ";
break;
case 73:
$exif_flash = "Flash fired, compulsory flash mode, red-eye reduction mode ";
break;
case 77:
$exif_flash = "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected ";
break;
case 79:
$exif_flash = "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected ";
break;
case 89:
$exif_flash = "Flash fired, auto mode, red-eye reduction mode ";
break;
case 93:
$exif_flash = "Flash fired, auto mode, return light not detected, red-eye reduction mode ";
break;
case 95:
$exif_flash = "Flash fired, auto mode, return light detected, red-eye reduction mode ";
break;
default:
$exif_flash = "";
break;
}
}
else
{
$exif_flash = $exif_na;
}
if(isset($exif["IFD0"]["Make"]) && isset($exif["IFD0"]["Model"])) {
$exif_make = ucwords(strtolower($exif["IFD0"]["Make"]));
$exif_model = ucwords($exif["IFD0"]["Model"]);
}
else
{
$exif_model = $exif_na;
}
}
$block_array += array(
'FOCAL' => $exif_focallength,
'ISO' => $exif_iso,
'APERTURE' => $exif_aperture,
'EXPOSURE' => $exif_exposure,
'WHITEB' => $exif_whitebalance,
'FLASH' => $exif_flash,
'BUILT' => $exif_make,
'MODEL' => $exif_model,
);
// Versuch exif auszulesen -ENDE-
Änderung der attachment.html (wie oben genannt)
<!-- IF _file.S_IMAGE -->
<dl class="file">
<table border="1" bordercolor="#AAAAAA" bgcolor="#ebebeb" cellspacing="0" width="100%">
<tr>
<td colspan="4" height="20"><center><strong>{_file.DOWNLOAD_NAME}</strong> ({_file.FILESIZE} {_file.SIZE_LANG})</center></td>
</tr>
<tr>
<td width="100px" height="20" valign="center">Bemerkung</td>
<td colspan="3" valign="center">{_file.COMMENT}</td>
</tr>
<tr>
<td colspan="4" align="center" valign="center" bgcolor="#808080"><br /><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}"><br /><br /></td>
</tr>
<tr>
<td colspan="4" height="20"><center><strong>EXIF-Daten</strong></center></td>
</tr>
<tr>
<td height="20" width="100">ISO</td>
<td height="20">{_file.ISO}</td>
<td height="20" width="100">Brennweite</td>
<td height="20">{_file.FOCAL}</td>
</tr>
<tr>
<td height="20" width="100">Blende</td>
<td height="20">{_file.APERTURE}</td>
<td height="20" width="100">Verschlusszeit</td>
<td height="20">{_file.EXPOSURE}</td>
</tr>
<tr>
<td height="20" width="100">Blitz</td>
<td height="20">{_file.FLASH}</td>
<td height="20" width="100">Weißabgleich</td>
<td height="20">{_file.WHITEB}</td>
</tr>
<tr>
<td height="20" width="100">Angesehen</td>
<td height="20">{_file.L_DOWNLOAD_COUNT}</td>
<td height="20" width="100">Kameramodell</td>
<td height="20">{_file.MODEL}</td>
</tr>
</table>
<hr>
</dl>
<!-- ENDIF -->