Jun 26

之前的忙碌與壓力,讓我一直沒空管 Blog,就連個人板也很少貼文章。

近來比較閒了,就把這裡進行大整頓,順便把使用已久,不支援 widget 的 theme 換掉。

因為 sidebar 掛了一堆東西,所以我還蠻喜歡之前那個 theme,可以把不想看到的區塊折疊收起來。
現在這個 theme,右邊 sidebar 的框框不僅支援 widget,右邊的 sidebar 也能收放,更可以拖拉,排列順序。 :cool:

Technorati Tags:

Tags:
(Visited 6409 times)
Dec 31

上週五到桃園參加好朋友的婚禮。
因為上頭有交待,所以我得帶著筆電上去參加婚禮。 :oops:

星期六跑到新竹找 susu
(在此特別感謝 ziwaysusu 的熱情招待啊~ 不然我得露宿街頭了~ XD

我在新竹就看到 大神 貼出來的 WordPress 2.3.2 (安全性更新) ,決定回高雄再處理這種事。

我在剛才幫這裡進行更新,也順便幫 susu 的 Blog 進行更新。
更新完後,隨著 這個 comment 的指示,裝上 Smiley JS Button

comment 區域的表情列語法可以按照網頁上的指示予以加入。
不過,在 WordPress 2.3.2 中,admin form 的部份必須更改 wp-includes/general-template.php ,在 <script type="text/javascript">edToolbar()</script> 下面加進這段 code:

        <br />
        <?php if (function_exists("SJB_outputSmilies")) {
                echo "<small><strong>Smilies:</strong>";
                SJB_outputSmilies("content");
                echo "</small><br />";
        } ?>

看起來是這樣:

        <div id="quicktags">
        <?php wp_print_scripts("quicktags"); ?>
        <script type="text/javascript">edToolbar()</script>
        <br />
        <?php if (function_exists("SJB_outputSmilies")) {
                echo "<small><strong>Smilies:</strong>";
                SJB_outputSmilies("content");
                echo "</small><br />";
        } ?>
        </div>

對了,裝了 Smiley JS Button 之後就可以把我在 拔掉 More Smilies … 裡面提到,我自己弄的那個爛爛的小 plugin 拔掉了~ XD

Technorati Tags:

Tags:
(Visited 5043 times)
Dec 07

WordPress 2.3.1 配 More Smilies 會打架。

這邊升級一陣子了,可是我今天早上才發現這件事。 :???:
發現的起由是觀察 Apache 的 error log 時,看到裡面出現一堆這種訊息:

PHP Warning: preg_replace() [<a href="function.preg-replace">function.preg-replace</a>]: No ending delimiter ":" found in [WP_ROOT_DIR]/wp-includes/formatting.php on line 668

雖只是 warning ,不是 error ,可是 Get Recent Comments 的確是受到影響了。

連到 More Smiles 的官方頁面 一看才發現 More Smilies 已經停止開發與維護了,只能自力救濟... orz

有用過的人都知道,More Smiles 這個 plugin 主要有以下三個功能:

  1. 允許自行定義表情圖示。
  2. 在 comment 的文字輸入區上方提供快速加入表情圖示的列表。
  3. 在非所見即所得的 Blog post 編輯/撰寫介面提供快速加入表情圖示的列表。

我稍微翻了一下 More Smilies 的原始檔,覺得頗複雜。
而且我在網路上嘗試找尋支援以上三個功能的 plugin,結果是一無所獲... orz
所以我用以下的方式解決。

下面這兩個步驟可以達到 More Smiles 的第一個主要功能(允許自行定義表情圖示):

  1. 把自己要用的表情圖試圖檔放在 [WP_ROOT_DIR]/wp-includes/images/smilies/joehorn 這個目錄下面。
  2. 在 [WP_ROOT_DIR]/wp-config.php 加入我自己的表情圖示陣列定義,類似這樣:
    $wpsmiliestrans = array(
    ":D" => "joehorn/my_laugh.png",
    ":-D" => "joehorn/my_laugh.png",
    .....
    );

為了達到 More Smiles 的第二個主要功能(在 comment 的文字輸入區上方提供快速加入表情圖示的列表),我自己弄了一個小 plugin,原始碼在 這裡
下載後放到 plugin 目錄中,啟用!
接下來的步驟就跟 More Smiles 一樣,在 WordPress 佈景主題下的 comments.php 內,textarea 上面加上這行:
<p><?php do_action("comment_toolbar", "comment"); ?></p>

我嘗試要讓這個小 plugin 一併支援 More Smiles 的第三個功能(在非所見即所得的 Blog post 編輯/撰寫介面提供快速加入表情圖示的列表)。
不過,目前還沒啥頭緒,所以我先把這個部份暫時擱著了... :(

如果有哪位大德知道何方有 WordPress plugin 可以支援以上三個功能的話,請來信或留言告知,謝謝。

如果有能人異士要拿去改寫,讓它支援第三個功能的話,請便!
不過,請留個回應,因為我也想用... :oops:

Technorati Tags: ,

Tags: ,
(Visited 2357 times)
Dec 02

還是很多人轉載網路文章不看授權的?
我剛剛又看到一個。

阿銘的記事本 (rel="nofollow")
blog_post_pirate.gif
仔細一看,裡面的文字跟之前 這篇 一模一樣。

以前大家只有 BBS 可以用的時候,這種情況僅偶爾會發生。
自從網路上 Blog 愈來愈多後,這種情況似乎也履見不鮮了? :roll:
難道現有的書籤網站不好用嗎? :roll:

Technorati Tags:

Tags:
(Visited 1089 times)
Jan 25

我應該算是比較懶惰的人吧,因為我用覆蓋法。 :oops:

因為有 ssh login 的權限,所以我這邊步驟是這樣( 舊版的放置目錄是 ~/blog ):

  1. 官方網站的下載頁面 抓新版檔案,放在家目錄( ~/latest.tar.gz )。
  2. 新版(2.1)解壓縮( cd ~ && tar xvfz latest.tar.gz )。
  3. 看看有啥檔案是新版拿掉的( diff -rc ~/blog ~/wordpress | grep "Only in blog" )。
  4. 除了自己放的檔案、theme、plugin、設定檔以外的檔案都砍了。
  5. 砍掉 ~/wordpress ( rm -rf ~/wordpress )。
  6. 用新版蓋掉舊版 ( cd ~ && mv blog wordpress && tar xvfz latest.tar.gz && mv wordpress blog )。
  7. 用瀏覽器開 wp-admin/upgrade.php 。

改過 wp-includes/wp-db.php 就收工了。 XD

原本我這邊跑的是 2.0.6 ,在 2.1 裡面應該殺掉的檔案有這些:

  • wp-admin/edit-form-ajax-cat.php
  • wp-admin/execute-pings.php
  • wp-admin/inline-uploading.php
  • wp-admin/link-categories.php
  • wp-admin/list-manipulation.js
  • wp-admin/list-manipulation.php
  • wp-includes/comment-functions.php
  • wp-includes/feed-functions.php
  • wp-includes/functions-compat.php
  • wp-includes/functions-formatting.php
  • wp-includes/functions-post.php
  • wp-includes/js/dbx-key.js
  • wp-includes/js/tinymce/plugins/autosave/langs/cs.js
  • wp-includes/js/tinymce/plugins/autosave/langs/sv.js
  • wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
  • wp-includes/js/tinymce/plugins/inlinepopups/readme.txt
  • wp-includes/js/tinymce/themes/advanced/editor_template_src.js
  • wp-includes/links.php
  • wp-includes/pluggable-functions.php
  • wp-includes/template-functions-author.php
  • wp-includes/template-functions-category.php
  • wp-includes/template-functions-general.php
  • wp-includes/template-functions-links.php
  • wp-includes/template-functions-post.php
  • wp-includes/wp-l10n.php

給大家參考看看。:cool:

另外,之前 的 Twilight AutoSave 可以關掉並刪除了。 ;-)

Technorati Tags:

Tags:
(Visited 2655 times)
Sep 04

好久沒寫 Blog 了。

7 月底結束了 寶碩 那邊的工作,回到高雄。
現在則是去 跨越 ,幫老闆整理些東西。

這一兩天花了點時間轉移 Wiki 上的資料。
把原本使用 Wikka Wakka Wiki 架設的文件蒐集平台轉用 MediaWiki 架設。

名稱不變,新的網址 在這

Technorati Tags: , ,

Tags: , ,
(Visited 3202 times)
Feb 11

剛剛把這邊升級了, 也順手幫 Solaris 叔叔的 Blog 做升級.

步驟不麻煩, 直接抓新的檔案蓋掉原本的就好了. XD
R 董 別說我沒通知啊...

Technorati Tags:

Tags:
(Visited 3508 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 6592 times)
Dec 28

前幾天就看到 WordPress 2.0 釋出的消息.

不過怕我這裡用的一堆 plugins 跟 theme 不能用, 所以還沒打算升級.

剛剛聽 priv 前輩說升級沒啥大問題, 所以跟進, 把這邊升級成 2.0 了.

另外, 在升級後我也用了 WordPress Yahoo/MSN Messenger Style Smileysakismet 這兩個 plugin .

目前看來還不錯, 不過我覺得有些小缺憾 :

  • 新的文章編輯介面沒有 code 跟 blockquote 可以用了.
  • 新的文章編輯介面會把空白行吃掉, 不會填入空行用的 br .
  • 文章編輯頁面右邊的類別框變小了, 選擇上不是那麼方便.

其他部分在大致上還不錯. :D

Technorati Tags:

Tags:
(Visited 13921 times)
Aug 17

剛剛在 Dashboard 看到 這個消息 , 所以把我這邊從 1.5.1.3 升到 1.5.2 .
( 當然, Solaris 叔叔R 董 的也被我順手升級了... :cool: )

因為我很懶, 所以都是抓最新版的整個覆蓋上去.
而某些 plugin 會修改到原始檔, 我都有變動過的都會留一份 diff file , 所以只要覆蓋完後 patch 一下就好了.

在做 diff 檔 patch 時, 我發現之前在 這篇 講到的那個修正還是得再作一次.
另外, 在 這篇 提到的問題可能也還是存在.
( 因為這兩個問題的 diff file 都 patch success )

目前看來好像都沒問題, 有問題再說吧. XD

Technorati Tags:

Tags:
(Visited 6358 times)