TT Classic OR에서 EXIF출력하기 :: 2006. 2. 22. 10:42
http://www.jayschronicles.net/blog/index.php?pl=8 참고
본인 계정이 exif_read_data() 함수를 지원하지 않는다면
조금 어려운 작업을 수행하여야 합니다.(제 계정 ㅜ.ㅜ)
jhead-latest.tar.gz 파일을 계정의 루트에 업로드 후
tar xzvf jhead-latest.tar.gz 명령어로 압축해제 후
make 실행하여 컴파일합니다.
get_exif.zip 압축해제 후 테터가 설치된 폴더에 올리시면 됩니다.
조금 어려운 작업을 수행하여야 합니다.(제 계정 ㅜ.ㅜ)
jhead-latest.tar.gz 파일을 계정의 루트에 업로드 후
tar xzvf jhead-latest.tar.gz 명령어로 압축해제 후
make 실행하여 컴파일합니다.
get_exif.zip 압축해제 후 테터가 설치된 폴더에 올리시면 됩니다.
inc_function.php를 수정합니다.
// EXIF 정보 활용. 2005. 9. 26.
include("get_exif.php");
function attach_image($mode, $body, $spath, $rpath, $apath){
...
switch (count($cval)) {
case "4" :
$type = analyze_file($rpath.$cval[1]);
// EXIF 정보 넣기: 2005. 9. 26
if ($type == "1")
$get_exif1 = "<tr><td class=cap1>".set_exif(get_exif(substr($apath, 7, strlen($apath)-1).$cval[1]))."</td></tr>";
...
$buf = $prefix."<center>".set_file($type, $cval[1], $cval[2], $spath, $rpath, $apath)."</center></td></tr>".$get_exif1."<tr><td class=cap1>$cval[3]</td></tr></table>".$postfix;
// switch문의 각 case 별로 위의 파란색 EXIF 정보넣기 및 빨간색 부분을 추가합니다.
// case 4에서는 파란색 하나, 빨간색 하나, 7에서는 파란색 둘, 빨간색 둘, 10에서는 파란색 셋, 빨간색 셋을 찾을 수 있습니다.
// EXIF 정보 활용. 2005. 9. 26.
include("get_exif.php");
function attach_image($mode, $body, $spath, $rpath, $apath){
...
switch (count($cval)) {
case "4" :
$type = analyze_file($rpath.$cval[1]);
// EXIF 정보 넣기: 2005. 9. 26
if ($type == "1")
$get_exif1 = "<tr><td class=cap1>".set_exif(get_exif(substr($apath, 7, strlen($apath)-1).$cval[1]))."</td></tr>";
...
$buf = $prefix."<center>".set_file($type, $cval[1], $cval[2], $spath, $rpath, $apath)."</center></td></tr>".$get_exif1."<tr><td class=cap1>$cval[3]</td></tr></table>".$postfix;
// switch문의 각 case 별로 위의 파란색 EXIF 정보넣기 및 빨간색 부분을 추가합니다.
// case 4에서는 파란색 하나, 빨간색 하나, 7에서는 파란색 둘, 빨간색 둘, 10에서는 파란색 셋, 빨간색 셋을 찾을 수 있습니다.
get_exif.php를 수정합니다.
// ---------- 환경 설정 ---------- //
// 홈페이지 루트 디렉토리의 절대경로를 설정합니다.
// 반드시 "/"로 시작해야 하고 "/" 없이 끝나야 합니다.
//$abs_path = "/your/absolute/path";
if ($_SERVER["HTTP_HOST"] == "localhost") $abs_path = "/your/pc/document";
else $abs_path = "/your/absolute/path";
// jhead 프로그램의 위치를 절대경로로 설정합니다.
// 반드시 "/"로 시작해서 "jhead"로 끝나야 합니다.
//$jhead_path = "/your/jhead/program/path";
if ($_SERVER["HTTP_HOST"] == "localhost") $jhead_path = $abs_path."/jhead.exe";
else $jhead_path = $abs_path."/jhead";
// 첨부파일이 위치하는 디렉토리를 절대경로로 설정합니다.
// 반드시 "/"로 시작해서 "/"로 끝나야 합니다.
//$jhead_file_dir = "/your/image/files/directory/blog/attach/";
$jhead_file_dir = $abs_path."/attach/files/path/";
// ---------- 환경 설정 ---------- //
// 홈페이지 루트 디렉토리의 절대경로를 설정합니다.
// 반드시 "/"로 시작해야 하고 "/" 없이 끝나야 합니다.
//$abs_path = "/your/absolute/path";
if ($_SERVER["HTTP_HOST"] == "localhost") $abs_path = "/your/pc/document";
else $abs_path = "/your/absolute/path";
// jhead 프로그램의 위치를 절대경로로 설정합니다.
// 반드시 "/"로 시작해서 "jhead"로 끝나야 합니다.
//$jhead_path = "/your/jhead/program/path";
if ($_SERVER["HTTP_HOST"] == "localhost") $jhead_path = $abs_path."/jhead.exe";
else $jhead_path = $abs_path."/jhead";
// 첨부파일이 위치하는 디렉토리를 절대경로로 설정합니다.
// 반드시 "/"로 시작해서 "/"로 끝나야 합니다.
//$jhead_file_dir = "/your/image/files/directory/blog/attach/";
$jhead_file_dir = $abs_path."/attach/files/path/";
'테터&TISTORY' 카테고리의 다른 글
태터툴즈 글보관함 5개월 제한 없애기 (0) | 2006.03.03 |
---|---|
태터 Classic에서 EXIF사용하기 (12) | 2006.03.01 |
테터1.0 Classic OR 썸네일 앨범 적용 (2) | 2006.02.18 |
브라우저 제목표시줄에 포스트제목 넣기.. (2) | 2006.02.15 |
로그인과 로그아웃 시 다른 버튼 나타내기 (0) | 2006.02.04 |