Dec 30

升級 2.0 以後, 我發現 Twilight AutoSave 沒辦法用了.
( ychsiao 前輩也有在 這篇 說他的也不能用. XD )

目前在 plugin 的網頁是貼出了這段:

Please note: I offer no support for this plugin with WP 2.0 as of yet. The software is still beta, and works completely differently. I will see how I can upgrade this to work with 2.0 when I can (if it is possible).

於是我自己 trace 了一下 code , 發現問題出在這幾行 :

add_action("save_post", "twAutoSaveDelete");
add_action("publish_post", "twAutoSaveDelete");

save_post 跟 publish_post 僅存在於 1.5 版的 wp-admin/post.php 中, 2.0 版被拿掉了.
所以必須把上面那兩行改成 :

add_action("simple_edit_form", "twAutoSaveDelete");
add_action("edit_form_advanced", "twAutoSaveDelete");
add_action("edit_page_form", "twAutoSaveDelete");

另外, 我還看到一個小瑕疵, 在 tw-autosave.php 裡面有這段:

                        if (cookietemp.length > 100){
                                var endstring = "[...]";
                        }

可是 endstring 這個變數也沒有事先被定義, 而且這段 code 並沒有做例外處理, 所以當文章內容小於 100 字時, 我們會在文章回復框看到 undefined 的字串.
解法很簡單, 在 if (cookietemp.length > 100){ 上面加入這行就搞定了 :

                        var endstring = "";

目前改完以後看來都正常.
晚點把這些回報給作者, 跟他討論看看好了. :cool:

Technorati Tags: ,

Tags: ,
(Visited 7718 times)
Dec 30

升級 2.0 以後, 我發現 Recent Comments 的選項頁面出不來. :???:

於是, 拜 估狗大神 所賜, 我找到了 這頁 .

我按照文章裡面的說明修改 wp-content/plugins/get-recent-comments.php , 在這行:

// WordPress 1.5 includes this file again on the options page. Avoid duplicate declaration:

下面有段:

if ( function_exists("is_plugin_page") && is_plugin_page() ) {
        kjgrc_options_page();
        return;
}

然後把整段整個換成 :

add_action("options_page_get-recent-comments", "kjgrc_options_page" );

就好了. :cool:

Technorati Tags: ,

Tags: ,
(Visited 7688 times)
Dec 30

我在 上一篇 提到文章編輯器的一些問題.

trace 過 code 以後發現在後台的 Users 頁面最下方有個 "Use the visual rich editor when writing" 的選項, 把這個選項取消勾選後就可以不使用所見即所得的編輯器了. :grin:

另外, 關於原本升級完用的 WordPress Yahoo/MSN Messenger Style Smileys , 也被我拿掉了.
改用的是在 這邊 列出來的 WP-Grins , 然後把 WordPress 內附的表情圖示都換成 MSN 種類的.

更換的步驟大概是這樣:

  • 先到 這邊 下載 WP Grins , 解壓縮後依照裡面的說明進行安裝 .
  • 如果是用 WordPress 2.0 的話, 請修改 wp-content/plugins/wp-grins.php , 把裡面的 /wp-images/smilies/ 換成 /wp-includes/images/smilies/ .
  • 接下來到 這裡smilies2.tar.gz 抓下來進行解壓縮 .
  • 把你想用的表情圖示放到 wp-includes/images/smilies/ 底下.
  • 修改 wp-includes/vars.php , 在 $wpsmiliestrans = array( 這行下面就是輸入字串與表情圖示檔的對應.

這樣就完成了. :cool:

趁著改東改西的時候, 我也順便把我這邊的 theme 換掉了. :razz:

Technorati Tags: ,

Tags: ,
(Visited 6593 times)