태터툴즈 절대 주소 패치


절대주소 패치

얼마 전 태터툴즈들 1.1.2로 판올림하면서 블로그의 환경 설정대로 모든 주소가 숫자가 아닌 제목으로 표시될 수 있도록 blog/entry/index.php 파일을 패치했다. 이렇게 패치한 이유는 블로그 설정에서 숫자 대신 문자를 사용하도록 설정하면 모든 주소가 제목으로 표시되어야 하는데 접근하는 주소만 제목으로 표시되고 내부 주소는 여전히 숫자로 표시되기 때문이었다. 숫자로 표시한 주소가 문자로 표시한 주소보다는 간단하며, URL 인코딩에 의해 글자가 깨지는 것처럼 보이지 않기 때문에 더 유리할 것 같지만 검색 엔진으로 검색할 때는 의미없는 숫자 보다는 문자가 더 잘 검색되기 때문이다.

목차

절대주소 패치

얼마 전

이렇게 패치하는 방법은 간단하다. 일단 FTP를 지원하는 편집기(예: [EditPlus])로 /blog/index.php 파일을 열고 가장 마지막의 print $view를 주석으로 처리한 뒤 다음처럼 세 줄을 추가하면된다.

//print $view; if(ereg('MSIE 6',$_SERVER['HTTP_USER_AGENT'])) $slogan=iconv('UTF-8', 'EUC-KR', $entries[0]['slogan']); else $slogan=$entries[0]['slogan']; header("Location:".불blogURL."/entry/".불slogan); ?> 

절대 주소

나는 얼마 전부터 절대 주소를 표시하는 방법을 숫자가 아닌 문자로 하고 있다.

공통 패치

블로그의 환경 설정에 따라 모든 링크를 숫자 또는 문자로 표시하려면 상당히 많은 파일을 패치해야 한다. 그러나 패치하는 방법은 모두 같으며 패치해야 하는 파일은 다음과 같다.

**패치할 파일** blog/archive/index.php blog/archive/item.php blog/category/index.php blog/entry/index.php blog/guestbook/index.php blog/location/index.php blog/notice/index.php blog/notice/item.php blog/page/index.php blog/page/item.php blog/search/index.php blog/tag/index.php 

blog/search/index.php

blog/search/index.php 파일은 검색한 결과를 보여주는 파일로서 글을 검색한 글 목록와 댓글 목록을 표시해준다. 문제는 글 목록은 정상적으로 문자로 표시되는데 댓글 목록은 문자가 아니라 숫자로 표시된다. 따라서 댓글 목록 역시 블로그 설정에 따라 숫자 또는 문자로 표시하고 싶다면 다음처럼 패치하면 된다.

변경전 dress('rplist_rep_regdate',fireEvent('ViewCommentListDate', Timestamp::format3($item['written'])),$itemView); dress('rplist_rep_link',"$blogURL/{$item['entry']}#comment{$item['id']}",$itemView); 변경후 $subURL=$blog['useSlogan']?"entry/{$item['slogan']}":"{$item['entry']}"; dress('rplist_rep_regdate',fireEvent('ViewCommentListDate', Timestamp::format3($item['written'])),$itemView); dress('rplist_rep_link',"$blogURL/$subURL#comment{$item['id']}",$itemView); 

지난 번과 마찬가지로 프로그램에 대한 지식이 전혀 없어 소스를 패치할 수 없는 사람은 다음 링크에서 내려받아 사용하기 바란다.

TT1.1.2.1PatchEntry.zip

한 가지 주의할 것은 이 패치는 태터툴즈 1.1.2.1에만 사용할 수 있다.

관련 글타래


Powered by Textcube