« [日劇]2007冬季日劇開始了 | Home | [轉貼] 貓小八請您參與流浪街貓守護行動 »
有可能是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的佈景主題。這真是一看就讓人手癢,很想裝上去玩玩看的佈景主題啊!XD
CLI theme不但把整個不露格變成需要以鍵盤輸入指令來操作(如ls、cat、login等),連圖片都轉換成單(綠)色調的色盤,完全是matrix的風格啊。不過要顯示單色調圖片,需要用到ImageMagick套件裡的convert指令,在OSX上可以透過fink來安裝。安裝後有一個設定檔cli-config.inc.php要修改:
/*
WordPress CLI theme
R. McFarland 2006
Configuration. Watch for more...
*/
/* url of GUI version of blog (false if none), no trailing slash.
*/
//define(GUI_URL,"/myguiblog");
//define(GUI_URL,"http://moonsoap.info/gui");
define(GUI_URL,false);
/* For rasterized images, you need ImageMagick. On Linux, try `which convert` to find it.
This should look like "/usr/bin/convert" on most systems. */
define(CONVERT_PATH,"/sw/bin/convert");
//define(CONVERT_PATH,false);
其中「CONVERT_PATH」就是「convert」這個指令的路徑。另一個「GUI_URL」則是用來切換另一個非CLI theme用的,設定後可以在不露格下「gui」或更geek的「startx」切換過去。至於剛進入不露格時的歡迎文字,則是可以在header.php裡找到並修改。
玩了一個鐘頭之後,發現切換到gui的功能卻怎麼都試不出來。根據作者的作法,應該是這樣子的:
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.
看來需要原本就把不露格安裝在domain根目錄下的子目錄才行得通。
另外還有能人異士寫出了另一個外掛,攔截並改寫所有連到 [site_url]/cli的url到CLI模式。這可省了不少功夫哇。可惜這跟我心目中「預設是cli模式,輸入gui指令後才切換到其他theme」的「you-really-hate-your-readers」狀態有點差距。期待進一步改版囉。XD
貼標籤:OSX與blog




No comments
Jump to comment form | comments rss | trackback uri