« Previous : 1 : 2 : 3 : 4 : 5 : 6 : 7 : ... 16 : Next »

[TextCube] Wordpress Export to TextCube

使用者插入圖像

Overview


This tool is the revision from dev.tattersite.com. I modified the code and release the beta 0.210 within ZIP-file in the Google Code.

There is way to convert Wordpress database to Textcube TTXML structure and you can import the xml file into your textcube. Cause the plugins are very different in wordpress and textcube, this tool only export entries, categories, tags, comments, trackbacks, attachments and guestbook into TTXML. And you can choose whether replace the original data in your textcube or not. Also the categories are sortable in the tool before you export data.

HOWTO

  1. Download source-code in Google Code.
  2. Un-zip into wp2ttxml/ folder and upload into your server.
  3. Open link in the browser which is http://your.domain.name/wp2ttxml/wp2ttxml.php
  4. Go start and save the TTXML file in your PC.
    1. Input your Wordpress Database Setting.
    2. Check Settings in Step 2. ATTENTION!! here, attach base url and attach base path is NOT correct in default. You MUST be fixed before you start to exoprt.
  5. Login into textcube and import the TTXML file you saved.
If your TTXML file cannot import into Textcube, there may something error in the xml file. Please email the TTXML file to me (hinablue@gmail.com).

Screenshot

  1. Front page.
  2. Second page.
  3. Export TTXML file and save as...
  4. Import into TextCube
  5. There is Sherry who convert Wordpress to Textcube using this tool.

Special thanks

Sherry
Writer profile
author image

Posted by hina

2009/03/16 13:46 2009/03/16 13:46
, , , , , ,
Response
No Trackback , 9 Comments
RSS :
http://textcube.tw/rss/response/44

Trackback URL : http://textcube.tw/trackback/44

Comments List

  1. http://erakuzhe.myopenid.com/  2009/03/21 00:05 # M/D Reply Permalink

    真是不錯的功能,如果能在早點出現
    我就不用直接刪掉原本的WP文章了=_=

  2. sherry 2009/05/29 08:53 # M/D Reply Permalink

    hina老大。。。
    不好意思,我的地址改了一下,现在wp的不更新了,只有tc的在更新咯~~

    http://blog.fairysherry.org

  3. sherry 2009/05/29 08:54 # M/D Reply Permalink

    还有就是。。。
    为啥我的TC博客下,看不到自己的头像,但是在这里留言或者别人那里留言都能看到?
    谢谢~~

    1. hinablue 2009/05/30 15:08 # M/D Permalink

      因為原本的 blogIcon 插件不會顯示自己的頭像。
      我有修改版,改天再寄給你!

    2. 筱嵐 2009/10/17 11:17 # M/D Permalink

      我也要.. 也送我一份吧 ! =D.

  4. 燕子 2009/05/30 20:43 # M/D Reply Permalink

    太好了,谢谢!!!
    期待

  5. http://xtea.openid.org.cn/  2009/11/14 16:16 # M/D Reply Permalink

    还没有汉化1.8系列吗?

  6. peng 2009/12/06 20:41 # M/D Reply Permalink

    能发给我一个1.8的中文简体版的吗
    pengjmh@gmail.com

  7. hina 2010/01/09 23:37 # M/D Reply Permalink

    1.8 正式版推出了,因為結構更動的關係,所以插件要重新改過。中文化速度恐怕就沒那麼快了。

Leave a comment
[登入][OpenID是?]

[TextCube] Photo Studio Skin with tiltviewer

新增了 tiltviewer 樣式,而且 tiltviewer 可以透過 Picasa 軟體產生 xml 檔案,非常方便!

沒圖沒真像:


檔案在這裡,請自行取用(更新,樣版檔案忘記包到圖片了 :P):
檔案結構如下:
HC_TiltViewerPhotoStudio
  • tiltviewer
    • images,照片資料夾。
    • gallery.xml,照片設定檔案。
    • swfobject.js
    • TiltViewer.swf
  • index.xml
  • skin.html
  • style.css
  • style.ie6.css
  • style.ie7.css
  • wysiwyg.css
TiltViewerPicasa.zip 這個檔案是給 Picasa 用的網頁輸出樣版,解壓縮之後,會產生 TiltViewerPicasa 資料夾,請將這個資料夾複製到 Picasa 的 templage 資料夾底下。以 Picasa 3 為例子,資料夾應該在:C:\Program Files\Google\Picasa3\web\templates,請將 TiltViewerPicasa 資料夾複製到這裡,並重新啟動 Picasa。

開啟 Picasa 之後,先挑好你要輸出的照片,把那些照片設定到新的相簿裡。然後,在新的相簿按下滑鼠右鍵,選擇"匯出為 HTML 頁面(X)"。


接著請選擇尺寸,你要選擇小張的也可以,樣版最寬是 800px 所以這邊以 800 像素為一個基準。相簿標題隨便你打,反正這不是重點。最後請記得他輸出的資料夾,不然輸出完成後會找不到檔案喔。


網頁範本,請選擇"Tiltviewer",如果你沒有這個項目可以選,請回到最上面,確定你的樣板資料夾是否已經拷貝過去,而且也重新啟動 Picasa 了。


按下"完成"之後就開始等待漫長的輸出,如果你的照片數量越多、照片尺寸越大,輸出的時間就會比較久。


最後,找到輸出的資料夾,把 image 資料夾與 gallery.xml 拷貝起來,回到樣板資料夾,貼到 titlviewer 資料夾裡面,全部蓋掉。這樣,就可以隨意更換你的照片了,而,也不用花時間去處理 XML 檔案。


以上,完畢。

附帶一提,tiltviewer 可支援 Flickr 的串接,詳情請到官方網站看說明。至於怎麼改,請自行參照說明,修改 skin.html 檔案中的 script 囉(無責)。

Writer profile
author image

Posted by hina

2009/03/13 12:57 2009/03/13 12:57
, , Keyword Textcube, , ,
Response
No Trackback , 13 Comments
RSS :
http://textcube.tw/rss/response/43

Trackback URL : 無法向此文章發送引用

Comments List

  1. Chieh™ 2009/03/14 17:16 # M/D Reply Permalink

    Cool~ :)

  2. angela 2009/05/04 11:24 # M/D Reply Permalink

    抱歉打擾,這問題時在困擾我太久,我使用Textcube要備份資料,按下管理介面裡的「備份資料>下載」後出現「網站無法顯示該網頁 HTTP 500 最有可能的原因:網站維護中。 該網站發生程式設計錯誤 」,這個畫面的網址顯示為:http://我部落格網址/owner/data/export?includeFileContents=false
    請教您是否知道是哪裡出問題呢?謝謝!

    1. hinablue 2009/05/05 18:45 # M/D Permalink

      有可能是 /cache/backup 權限不對
      檢查一下 /cache 與 /cache/backup 的權限都是 777

  3. angela 2009/05/05 23:20 # M/D Reply Permalink

    原權限真的不對,你好厲害!但將權限從755改為777後仍是一樣的結果。我猜想可能textcube153的問題,所以另外安裝Textcube176,並將舊資料從phpmyadmin輸出再匯入176,匯入舊資料前的textcube176可正常備份資料,但匯入後就出現一樣的問題了。還有什麼可能呢?或是如何匯入舊資料可避免此問題?謝謝你的幫忙!

    1. hinablue 2009/05/06 09:54 # M/D Permalink

      你的匯出動作有包含附件嗎?
      如果有,檢查 /attach 以及其下的資料夾是否為 777
      另外,檢查 /owner/data 資料夾是否為 755

      另,如果要升級的話,建議使用重新設定的方式。

      假設你的原有 blog 安裝在 blogA 資料夾下
      把新的 blog 解壓縮到 blogB 下
      將 blogA 的 attach 拷貝到 blogB 底下
      把 blogA 改為 blog_old,blogB 改為 blogA
      然後用瀏覽器開啟 blogA 的網址,進行 Setup
      安裝時,選擇"重新設定"
      這樣可以比較安全的將 TC 升級到新的版本

      若有任何問題,可以到 google group 討論
      http://groups.google.com.tw/group/textcubefans

      我所建立的 TC 中文化,你可以在此找到
      http://code.google.com/p/tczh/

  4. angela 2009/05/06 18:19 # M/D Reply Permalink

    我依照你教方法的升級後問題已經解決了^_^!實在非常感謝,因為此問題快把我搞瘋。真的非常謝謝你抽空協助!再次深深感謝!

  5. pyoungwon 2009/05/11 02:17 # M/D Reply Permalink

    좋은데 어떻게 적용 시키나요?

    1. hinablue 2009/05/11 15:15 # M/D Permalink

      Could you speak English ??

  6. angela 2009/05/12 08:30 # M/D Reply Permalink

    不好意思,我又來了!沒辦法,Textcube的問題第一個想到你。Textcube更新後,有辦法讓計數器維持原來人數嗎?因為幾年下來好不容易有個上得了檯面的數字,一夕之間從零開始有點難過。希望不會太打擾你,謝謝!

    1. hinablue 2009/05/19 09:37 # M/D Permalink

      若有任何問題,可以到 google group 討論
      http://groups.google.com.tw/group/textcubefans

      人數喔,你可以進入 phpmyadmin 打開 TC 的資料庫
      找到 blogStatistics 資料表,裡面的 visits 就是瀏覽人數
      你要改多少就改多少囉 :P

  7. vêtements 2009/12/24 14:49 # M/D Reply Permalink

    谢谢了

  8. jordan shoes 2009/12/24 14:50 # M/D Reply Permalink

    不错,收藏了

  9. sieunsation 2010/01/02 13:11 # M/D Reply Permalink

    hi, first, thanks for sharing this cool app. :) I just saw your app on textcube korea.
    I tried but somehow the format of 'tiltviewer', which is step 3, didn't appear. :(
    so I doublechecked that I put the folders into right position and I guess I did... (I mean here. C:\Program Files\Google\Picasa3\web\templates)
    what's wrong with mine? is there any wrong step? if it's available and don't mind, please drop a line. thanks a lot! :)

Leave a comment
[登入][OpenID是?]
相信很多人都遇到了這件事情,從 TC 把資料匯出之後,再匯入其他(或是原來)的 TC 的時候,鏈結全部都不見了,只剩下一個鏈結而已。這件事情,從 TC 1.7 推出之後就已經存在,而,這個錯誤並不單純只是程序上的錯誤,而是整個資料結構上的錯誤,老實說,我覺得 TC 團隊會出這樣的錯誤實在是該打屁股了。

我們先來看看 tc_Links 這個資料表:
[code]
/// setup.php Line 1319

CREATE TABLE {$_POST['dbPrefix']}Links (
  pid int(11) NOT NULL default '0',
  blogid int(11) NOT NULL default '0',
  id int(11) NOT NULL default '0',
  category int(11) NOT NULL default '0',
  name varchar(255) NOT NULL default '',
  url varchar(255) NOT NULL default '',
  rss varchar(255) NOT NULL default '',
  written int(11) NOT NULL default '0',
  visibility tinyint(4) NOT NULL default '2',
  xfn varchar(128) NOT NULL default '',
  PRIMARY KEY (pid),
  UNIQUE KEY blogid (blogid,url)
) $charset;
[/code]
眼尖的人可以看到,有兩個關鍵欄位,pid 與 id,而這兩組關鍵欄位,pid 是主鍵,兩欄位都沒有設定 auto_increment,至於為什麼不設定,這一點我也不知道。既然他沒有設定 auto_increment 這個附加條件,那麼,我們再來看看當資料轉出(匯出)時,他的格式:
[code]
/// 僅節錄 Links 匯出的部分

<link><url>http://nzma.ushiisland.net/</url><title>NZMA::STUDIO VOICE R&amp;W</title><feed></feed><registered>1212398140</registered></link>
<link><url>http://fusionism.blogspot.com/</url><title>Fusionism Art</title><feed>http://fusionism.blogspot.com/feeds/posts/default</feed><registered>1212398085</registered></link>
<link><url>http://blog.xuite.net/nzma/diary</url><title>在草原的中心‧不存在的騎士</title><feed>http://blog.xuite.net/nzma/diary/rss.xml</feed><registered>1212560707</registered></link>

/// 後略...
[/code]
由這樣的匯出資料,我們可以猜到 id 與 pid 並沒有在他的匯出清單中,也就是說,這兩項值將來可以在匯入的時候,依照 migrational 的設定(true or false)來決定是否覆寫原來的資料。這種情況在分類的部分也可以看出端倪,分類匯出時,也沒有帶入 id 這項設定:
[code]
/// 僅節錄 Category 匯出的部分

<category><name>Chats</name><priority>1</priority>
    <category><name>Moblog</name><priority>39</priority></category>
    <category><name>blahblah</name><priority>40</priority></category>
    <category><name>nothing else</name><priority>41</priority></category>
    <category><name>funny</name><priority>42</priority></category>
    <category><name>note note note</name><priority>43</priority></category>
    <category><name>dark cooking</name><priority>44</priority></category>
</category>
<category><name>Life</name><priority>2</priority></category>
<category><name>Photography</name><priority>3</priority></category>

/// 後略...
[/code]
所以,在匯入與匯出這個部分,其實在程序上並沒有太大的問題。接著我們轉向 TC 的核心原件(Components)來看看。當 TC 在做匯入與匯出時,使用的原件是以 Data 為命名規則的所有原件庫,所以,在調用資料庫的動作時,全部都是以個別的原件庫去完成。那,我們就來看看 Textcube.Data.Link.php 到底做了甚麼事:

展開 Textcube.Data.Link.php 原始碼...

我在這裡簡單的說明一下,當使用者匯出資料時,會使用到 Link->open()、Link->shift() 與 Link->close() 把每一筆資料都寫成 TTXML 格式並寫入匯出檔案裡。這裡有一個問題:

早在 TC 1.7 就有鏈結分類功能,匯出時並未將分類匯出。

再來,第二個就是匯入。我剛剛已經說過,他應該會仿造 Category 的模式,將鏈結匯入,但是,仔細拆解 Link 類別之後,發現了兩個嚴重問題:

整個類別功能沒有因為資料結構修改而做修正,缺了 pid、id 以及 category 檢查。
在 add() 時,因為結構與匯出資料結構不符,導致匯入資料的 pid 以及 id 永遠為 0。

這也就是為什麼,鏈結匯入時,永遠只有一個鏈結的主因。我目前依照這個狀況修改了這個類別檔案,這個檔案可以用在 TC 1.7.x 版本上,請直接覆蓋掉原來的檔案。檔案請到 Google Code 下載。


http://code.google.com/p/tczh/downloads/list
Writer profile
author image

Posted by hina

2009/03/05 16:40 2009/03/05 16:40
, , Keyword Textcube, , , , ,
Response
No Trackback , 2 Comments
RSS :
http://textcube.tw/rss/response/42

Trackback URL : 無法向此文章發送引用

Comments List

  1. SODA 2009/03/11 18:10 # M/D Reply Permalink

    谢谢 已经用到.

  2. 台南網頁設計 2010/09/04 00:13 # M/D Reply Permalink

    謝囉~很有幫助

Leave a comment
[登入][OpenID是?]
« Previous : 1 : 2 : 3 : 4 : 5 : 6 : 7 : ... 16 : Next »

블로그 이미지

Textcube 非官方 正體中文部落格 2009年!社群大改造! 「本站所有正體中文化之相關程式,歡迎大家使用或重製,但請註明來源處,Thanks !」

- Chieh™

使用者插入圖像

Calendar

«   2010/09   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Site Stats

Total hits:
223757
Today:
174
Yesterday:
411

ジャンパチ会館 パチンコ パチスロ オンラインカジノ
BlackBet.Jp 日本語オンラインスポーツブック 日本野球 NBA バスケットボール MLB メジャーリーグプロ野球