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.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

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

%d 位部落客按了讚: