딸 홈페이지를 워드프레스로 변경.장기적으로 보건데 텍스트큐브를 갈고 닦을 개발자들이 없어질것으로 예상되어 그나마 갈아탈 수 있을때 갈아타려고 작정중. 몇년간 잘 써왔는데 안타깝지만 어쩔수 없네. ttxml.php를 잘 받아서 썼다. 아래는 post_author 보존을 위한 hack.
# diff -urN ttxml-author.php ttxml.php
--- ttxml-author.php 2011-10-03 21:58:51.000000000 -0600
+++ ttxml.php 2011-04-23 12:38:20.000000000 -0600
@@ -181,13 +181,13 @@
return true;
}
- function import_attachments($post_id, $post_author, &$attachments) {
+ function import_attachments($post_id, &$attachments) {
foreach ( $attachments as $data ) {
// image only
if ( strpos($data['post_mime_type'], 'image/') !== 0 )
continue;
- $data['post_author'] = $post_author;
+ $data['post_author'] = 1;
$data['post_content'] = '';
$data['post_status'] = 'inherit';
$data['post_type'] = 'attachment';
@@ -298,8 +298,7 @@
'private'=>'private', 'protected'=>'publish'
);
- preg_match('|<userid>([^<]+)</userid>|s', $data, $post_author);
- $post_author = $post_author[1];
+ $post_author = 1;
$post_type = (strpos($data, '<post') === 0) ? 'post' : 'page';
@@ -551,7 +550,7 @@
if ( $post_id > 0 ) {
$this->import_comments($post_id, $comments);
$this->import_comments($post_id, $trackbacks);
- $this->import_attachments($post_id, $post['post_author'], $attachments);
+ $this->import_attachments($post_id, $attachments);
// count info
if ( $post['tags_input'] !== '' ) {
@@ -693,4 +692,4 @@
$ttxml_import = new TTXML_Import();
register_importer('ttxml', __('TTXML'), __('Import posts from TTXML.'), array ($ttxml_import, 'dispatch'));
-?>
+?>
\ No newline at end of file
2 Comments
나도 워드프레스 계정은 있는데.. 다 퍼다 옮길려니.. 좀 귀찮기도하고..
구글에서도 블로깅 서비스 하잖어?
워드프레스 사이트 말고 호스팅 서버에 설치한 워드프레스로 옮기려고.. 데이터를 내 손안에 두고 싶어서 그러는거지. 남한테 안 맡기고.