Getting GUI/CLI themes together

CLI is the most nerdy and geeky WordPress theme I’ve ever met. Although there are only some commands to be implemented, it is still a great skin. I hope more keys will be implemented such as up/down (history), tab (auto-completed), and even “logout”.

The file_get_contents($url) is not supported on some web hostings, such as DreamHost . I made a patch to use curl() instead. Apply the patch by:

patch interpret.php cli_theme_on_dreamhost.diff

To get the GUI and CLI theme with the same blog, mcfarland said:

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.

But it’s too tedious for me. Because I don’t want to install ThemeSwitcher either, I wrote a plugin to let the visitors auto-switched to CLI mode when they visit http://[site_url]/cli .

Here’s the demo: GUI, and CLI. All you have to do is download the plugin and activate it. 🙂

Changelog:
2007/01/18 (ver.1.0): first release.

在〈Getting GUI/CLI themes together〉中有 4 則留言

  1. 我下載這個插件也啟用了,可是沒有作用耶。怎麼會這樣?

    p.s. 我的 WP 版本是 2.1.4

    回覆

發表迴響

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料