自由切換 WordPress CLI theme

在 ijliao 那邊 看到CLI” 這個 WordPress theme,第一個感覺也是有個衝動想馬上換上去。

WP-CLI-Snap_P

這個模仿 Command line interface所製作的主題還有很多要改善的地方,例如我會很自然地按「上下鍵」想要叫出之前所下過的指令,按「Tab」鍵想要 auto-completed,還會打 「logout」…..

- priv 說,在 DreamHost 上因為關掉了 URL access ,所以沒辦法顯示那畫龍點睛的綠色灰階圖。沒關係,DreamHost 有提供 curl,用這個 patch 可以達到同樣的效果:

patch interpret.php cli_theme_on_dreamhost.diff

至於要如何在GUI及CLI之間切換,作者的作法

To get two themes with the same blog, I did this:

* Copy the blog directory, i.e. cp -R rod rodcli
* Edit rodcli/wp-settings.php like so:

//define(‘TEMPLATEPATH’, get_template_directory());
define(‘TEMPLATEPATH’, ‘wp-content/themes/cli’);

Note that this isn’t perfect: your /rodcli/wp-admin/ won’t work. Luckily, you still have the original blog for making posts with. With some cleverness, one could probably use symlinks to minimize the amount of code duplication.

這太麻煩了,我又不想要裝 ThemeSwitcher,所以乾脆寫了個plugin,攔截所有連到 [site_url]/cli的人,切換到 CLI mode。

舉例來說,這是 GUI 模式這是 CLI模式,多美好啊!!

這個plugin 可以在 這裡下載,解開後放到 WordPress 的plugin 目錄下啟動即可。

 

延伸閱讀

更多閱讀選擇

文章資訊

 

目前有 9 個迴響 »

  1. [...] Update: 感謝PipperL…設定成功囉! 引用時請使用此URL [...]

  2. 有可能是2007年最酷的WordPress theme – CLI…

    So all in all, it’s a groovy retro WordPress theme that you can use if you really hate your readers.
    – by Rod McFarland

    「苦牢的最後一年」介紹了CLI這個WordPress的佈景主題。這真是一看就讓人手癢,很想裝上去玩…

  3. [...] PL-alternative_theme 是專門為 Command Line Interface 的 佈景-cli 所做的, 用過 cli 的人無庸置疑的—不會拿來當主要佈景, 可是 cli 實在太好玩了, 總不成想玩就換一下佈景, 這樣讀者應該會很幹吧, cli 作者的作法就是直接把原先的 Wordpress 複製一份, 這作法還挺麻煩的, 再不然就是用 Theme switcher 列在側邊欄, 這樣又有點小題大作, 於是偉哉 PipperL 寫了個 Plugin 共用 cli 與原先的佈景 [...]

  4. [...] 自從前兩天看到這個 CLI Theme 之後, 就一直想要把他裝起來, 不過我自己也知道, 真的拿來做預設首頁, 大概會嚇跑人吧. 不過昨天在終極邊疆Blog 看到了這個 plugin, 這個不錯, 比 theme switcher 好多了. [...]

  5. [...]     使用了Pipperl的plugin进行两个theme之间切换,先在这里谢谢了! [...]

  6. kukukuan says:

    按照你的介绍,我写了一个新的插件,呵呵!
    能够自动查找CLI目录,添加配置菜单,且支持最新的CLI 2.3

    http://wordpress.org/extend/plugins/cli-switch/
    http://blog.gmap2.net/2007/04/09/wordpress-plugin-cli-switch/
    都可以找到

    谢谢你介绍这个有趣的皮肤

  7. [...] 終極邊疆BLOG » 自由切換 WordPress CLI theme Let us keep on dreaming of a better world [...]

  8. [...] PipperL’s alternative theme plugin is convenient when people want to try one of the most geekish WordPress theme, CLI theme, by Rod McFarland. Other than setting it as default theme (most people wouldn’t want that), or using ThemeSwitcher, PipperL’s plugin is the 3rd method — appending ‘/cli’ to the end of site URL automatically changes to CLI theme. [...]

  9. [...] 玩了一天的 CLI theme,真是捨不得放手,但 usability 又不及原本的 theme,所以要想辦法共存。Theme Switcher 太重手了,又不想如原作者所說抄一份到另一個地方,所以在別處找了一下解決辦法,果然皇天不負有心人,在終極邊疆 BLOG 找到 plugin 令兩者共存在不同的 virtual URL。 [...]

發表迴響