三月 26 2007

Profile Image of evenrain
evenrain

Twitter in WordPress

Posted at 16:21:50 under blog, frisch

喃喃自語的 Twitter 最近有許多新的應用加入,這次轉換到 Wordpress 後,我亦嘗試裝上幾個相關的 Plugin,底下是近期的一些心得。

Alex 撰寫的 Twitter Tools 目前進展到 1.0b3 版本。這個 plugin 的功能滿多的,可以在 sidebar 顯示你的 twitter 內容,透過 twitter 發佈新文章的連結,甚至可以把 twitter 集結成 blog 的文章。不過要使用這個 plugin,你的 Host 必須支援 fopen() 這個 function。很可惜,DreamHost 並不支援,所以這個 plugin 跟我無緣 :(

如果單純想顯示 Twitter 的內容,可以考慮使用 dean.j.robinson 寫的 Twitt-Two,目前的版本是 1.0。這個 plugin 的除了顯示 Twitter 的內容外,只要你有填入你在 Twitter 圖檔的位置,亦會一併顯示,並已與 sidebar module 相容。我個人在使用這個 plugin 時,sidebar 上的版型有點問題,且由於我採用的 Theme 在設計上是先顯示 sidebar 接著才是主文的部份,在目前 twitter 速度不佳的狀況下,會導致頁面卡在 twitter 區塊一段時間,進而影響閱讀,所以這類的 plugin 暫時就不使用了。 (ps. 有人可以推薦先顯示內文區塊的 Theme 嗎?)

Twitter Update 則是在你新增/發佈/修改文章時,讓你自動送出一則 Twitter。這篇文章寫完後,如果順利的話,就會產生這樣的一筆 Twitter。(註:如果你的 Host 不支援 fsockopen(),請參考 James Cridland 的文章做修改。) (3/27 再註:目前發現 published 時似乎沒有作用,但更新時可正常運作,原因不明。請參照「修改 Twitter Update」一文)

接下來要說得就跟 WordPress 沒什麼關係了 :p

TwitterMap 是個結合 Google 的 Mashup 工具。在 twitter 時透過加入 L:地點名稱=座標的方式做定位,用來標示你 twitter 的地點並可用使用者名稱來搜尋。Twittervision 則是動態的在 Google Map 上顯示最近的幾則 Twitter,集結了時間與空間,還滿有趣的點子。

另一個新的 Service 則是 TwitThis

TwitThis is an easy way for people to send Twitter messages about your blog post or website.

他提供了 Javasciprt 讓你可以加入圖形或文字的按鈕到你的 Blog 上;也可以透過將 Bookmarklet 拖曳到瀏覽器的書籤處,讓你方便分享網頁。甚至還有 WordPress 的 Plugin 可以使用。

我稍微看了一下 TwitThis 的 Javascript,把這個功能加到 ShareThis 的選單中。

PHP:
  1. , 'twitthis' => array(
  2. 'name' => 'TwitThis'
  3. , 'url' => 'http://twitthis.com/twit?url={url}&title={title}'
  4. )

將上面這段 code 加到你的 share-this.php 的 $social_sites 陣列中即可,圖示的話,我則是拿前面提到的 Twitt-Two 中的圖示來用 :p

標籤:, ,

相關文章

3 responses so far

3 Responses to “Twitter in WordPress”

  1. VCon 26 三月 2007 at 22:55:17 1

    WordPress 真的什麼外掛都有啊~
    這就去試試

  2. Abendon 29 三月 2007 at 12:24:52 2

    修改 Twitter Update…

    先前有提到 WordPress 的一個 Twitter Plugin — Twitter Update。實際在 2.1.2 使用時,發現了幾個奇怪的地方。首先是如果你勾選了「Update Twitter when the an old post has been edited」,理論上應該在修改舊文章…

  3. [...] Original post by evenrain [...]

Trackback URI | Comments RSS

Leave a Reply