Blog

You are browsing the archive for 2009 十一月 17.

2009年度网络词条“推”选 (中文)

十一月 17, 2009

测试 Google Wave 插件,有 Wave 帐号的可直接在这里加入讨论,该推选活动有可能通过 Twiscar 举办,也有可能直接通过 twitter 投票。

看不见的在下面留个邮箱,我发个 Wave 提名邀请给你就能看到了。

(全文 …)

President Obama Holds Town Hall with Chinese Youth

十一月 17, 2009

President Obama takes questions from Chinese youth in Shanghai, China on November 16, 2009. (Public Domain)

美国总统奥巴马2009年11月16日在上海会晤青年学生代表时的演讲及回答提问全程视频,由白宫官方提供。

via

最命大的男子连躲两列动车

十一月 17, 2009

不知道是不是合成的,因为从00’52″到00’53″跳转时右边的列车尾部有明显的跳格,但是第一次播放时没有,第二次重放时才出现,有点诡异

如何在 BuddyPress 中启用 WP 原生的 theme editor

十一月 17, 2009

由于 BuddyPress 是基于 WPMU,因此后台和 WPMU 一样隐藏并禁用了 WP 原生的 theme editor,如果想在 BuddyPress 里使用 WP 原生的 theme editor,只要遵循以下步骤 (基于 BuddyPress 1.1.2/WPMU 2.8.5.2):

  1. 注释掉 /wp-admin/includes/mu.php 第556行:
    1
    unset( $submenu['themes.php'][10] ); // always remove the themes editor

    替换成

    1
    //unset( $submenu['themes.php'][10] ); // always remove the themes editor
  2. 仍然在这个文件中,第1128行:
    1
    if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {

    替换成

    1
    if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_site_admin() ) {

这样可以确保只有在站点管理员 (Site Admin) 的后台界面才显示并激活原生的 theme editor。

另外,如果同时注释掉第555行:

  • 1
    unset( $submenu['plugins.php'][15] ); // always remove the plugin editor

    替换成

    1
    //unset( $submenu['plugins.php'][15] ); // always remove the plugin editor

那么可以同时激活原生的 plugin editor, ooops ;-)

参考: http://mu.wordpress.org/forums/topic/13318

Update: 以上代码位置在 BuddyPress 1.1.2/WPMU 2.8.6 没有变动。