1. include/image.class.php
$this->animatedgif = strpos($targetfilecontent, 'NETSCAPE2.0') === FALSE ? 0 : 1;
}
if($this->attachinfo['mime'] == 'image/pjpeg' || $this->attachinfo['mime'] == 'image/jpeg') {
if(function_exists("read_exif_data")){
$photodata = @read_exif_data ($targetfile,0,true);
$this->photoexif = $photodata[IFD0][Make] ? 1 : 0;
}
}
if($watermarkstatus && function_exists('imagecopy') && function_exists('imagealphablending') && function_exists('imagecopymerge')
2. 修改 include/attachment.func.php
$attach['payed'] = $attach['payed'] || $forum['ismoderator'] || $attach['uid'] == $discuz_uid ? 1 : 0;
if((function_exists("read_exif_data")) && $attach['attachimg']){
$attach['photourl']= "$attachurl/$attach[attachment]";
$attach['exif'] = @read_exif_data ($attach[photourl],0,true);
if ($attach[exif][IFD0][Make]){
$attach['ISORec'] = $attach['exif']['EXIF']['ISOSpeedRatings'] ? $attach['exif']['EXIF']['ISOSpeedRatings'] : '沒有記錄';
$attach['dateshot'] = substr($attach['exif']['EXIF']['DateTimeOriginal'], 0,16);
$attach['postexif']= "<p>相機:".$attach[exif][IFD0][Make]." 型號: ".$attach[exif][IFD0][Model]." 光圈:".$attach[exif][COMPUTED][ApertureFNumber]." </p><p> 快門:".$attach[exif][EXIF][ExposureTime]." ISO:$attach[ISORec] \n 拍攝日期:$attach[dateshot]</p>";
}
}
3. discuzcode 模板
<!--{if $attach[description]}-->$attach[description]<br /><!--{/if}-->
<!--{if $attach['postexif']}-->$attach['postexif']<!--{/if}-->
<!--{if !$attach['price'] || $attach['payed']}-->
<!--{if $attach['postexif']}-->數碼 Exif 資訊: $attach['postexif']<!--{/if}-->