J Solutions 是少數把 SEO 的原則運用在網頁設計上的香港網頁設計公司,也是少數提倡遵照網頁標準的公司。我們不捆綁客戶,系統的擁有權全歸客戶。J Solutions 亦致力把正確訊息宣揚,令消費者選用最合自己需要的網頁設計公司和方案,如果你有興趣和本網站交換連結,請寄電郵提出

WordPress 3.0 全面 CMS 化

WordPress 3.0 發佈了,看點甚多!不過如果閣下只把 WordPress 作個人網誌之用,老實說今次、甚至日後 WordPress 的更新對你的意義未必很大,畢竟 blog 的功能已甚為成熟,難有大變。Wordpress 3.0 的新功能很大程度是適用於製作其他類型的網站。以前很多教學是關於如何將 WordPress 當作 CMS 使用,現在 WordPress 已確實是一個 CMS 了。關於新功能的詳細介紹,可參看官方網站或者 WordPress 3.0: Ultimate Guide to New Features ,筆者分享一下幾個重點新功能對網站製作的用處。

1. 自定義用戶名稱和密碼

個人認為系統安裝時自動創建或一的管理員帳號名稱並非可取,尤其是 WordPress 這類很多非技術用家的系統,不少用戶也很大意地用很簡單的密碼,令系統增加了被入侵的風險。當然有經驗的用戶都知道安裝後應該再建一個管理員帳號及把系統自創帳號的權限降到最低。現在安裝 WordPress 3.0 時用戶需要自行填寫管理員帳號名稱,可省略了這步驟,同時亦保障了不懂得這方法的用戶。

2. Menu 管理

簡單說即是 Menu Maker,用戶可自行設定一個或多個 menu ,這一直是 Joomla 比 WordPress 強的地方,亦可說是一個 CMS 必須具備的功能。Wordpress 原有的 menu 設定是頗為死板的,只用程式根據一些規則創建,而且更改時需要更改 template。現實生活當然是更為複雜,例如想在2個連結中間加入一個外連就極為困難,Wordpress 3.0 終於內建了 menu maker,亦可讓用戶在 dashboard 內設定,方便得多。

3. 自定義文章類型及分類

以往 WordPress 只有 Page 及 Post 兩種文章類型,如果想用 WordPress 建立其他類型的網站,除了要有想像力,把兩個謹有的文章類型改造,用起上來亦較不便。現在用家可自行建立文章類型,例如你想建一個樓盤網站,可自行創建一個「樓盤」類型,以「區域」、「租售方式」、「房間數目」等 (即是可用來作篩選的條件) 作為其分類,方便管理、資料輸入及建立網頁。自定義文章類型是進階的 CMS 必備,就算早在 WordPress 未內建此功能時已有 plugins 實現,成為內置功能後,更多相關功能會陸續開發,令 WordPress 的用途大增。

4. 和 WordPress MU 整合

WordPress 有一個 Multi User (其實是 multisite,因 WordPress 根本就是multiuser的) 的分支,由另一批開發者負責,MU 版本可說是在普通版本上外加一個框框,令其達到安裝一個系統,就可支援多個不同的 blog / 網站。雖然兩者的兼容性已很高,大部分插件都可共用,但畢竟參與維護的人員較少,支援也較少。現在 WordPress 3.0 把 multisite 功能加入成為系統的一部分,完全解決兼容問題,令用戶可更安心使用。Multisite 有什麼用呢?最直接的用法是自己擔當 BSP,讓網友來你的網站申請開 blog,或者加入 Buddypress 使網站變成 SNS。

很多機構的網站由多組人員打理,可用 multisite 功能可把網站分成 minisite 獨立管理,並保留主站統籌管理升級備份等工作,而主站上亦可顯示 mimistie 部分內容。另一方面,如果想製作一個多語言網站、但內容及架構分別頗大,也可用 mutisite 達成。

筆者也想藉此文章解答兩個問題,有客戶問:用 WordPress 是不是會被國內屏蔽?我想很些人混淆了 wordpress.com 和 WordPress 系統。Wordpress.com 是 WordPress 系統原創者的網站,是一個 BSP 讓人申請開 blog。wordpress.com 真的很多時被屏蔽。而我們用 WordPress 系統則是獨立安裝,決不會因為用了 WordPress 就會令國內的網民訪問不到。

另一個問題是,open source 系統是否都不適合建立流量高的大網站呢?不想扯得太遠,就以 WordPress 來說,只使用程式的技巧,可以用 cacheng 技術減少直接使用 database (一般來說是系統的樽頸),還未計其他 server side 技術。

WordPress 3.0 新增幾個 CMS 相關的功能,一定會吸引更多網站採用。

分享:
發表回應

Migrating from Blinklist to Delicious using PHP

I’m done with Blinklist.  Before this I want to get back the bookmarks so that I can use them in my browser or other social bookmarking website.  There is no one-step solution.  I hope this article can help people who has this need too.

Preparing the CSV file

The first step is to export your bookmarks from Blinklist.  Although the website seems to allow you to choose from 3 export formats, you can only get a CSV file (in fact it is a TSV file).  Unfortunately you cannot import this file to your browser directly because the format is incompatible.  We need to convert the file to a normal bookmark file.  In this case, IE bookmark format is a desirable choice because it is recgonized by most browsers (Firefox, Chrome, etc.) and other social bookmarking website such as Delicious and it can be easily created.

The following step is not necessary unless your bookmarks have Asian characters.  Why?  Because the PHP script that we will use later has a command – fgetcsv.  This command is not 100% safe for Asian characters.  There are some solutions but I think the easiest way in this situation is to use a spreadsheet software to add dobule quotation mark as text delimiter for every field.

I use Open Office Calc as demonstration:

First we import the bookmark file, note that we need to set the character set to UTF-8,  and the field delimiter as Tab instead of Comma.  Every bookmark is a row in the sheet.  You can easily delete bookmarks that you don’t want to keep/import. (Sorry, OO does not allow changing back the user interface to English)

After that, we save the file as another CSV file, OO will prompt you to choose the field delimiter and text delimiter.  Select Tab and double quotation mark respectively.

Creating a browser bookmark file

The next step is to create the bookmark file.  Ruben Laguna has written an excellent script in Ruby to convert the CSV file to an IE bookmark file.  I think many people are more comfortable with PHP so I re-create the script in PHP.

  1.  
  2. <?php
  3. <!– This is an automatically generated file. It will be read and overwritten. Do Not Edit! –>
  4. Bookmarks
  5.  
  6. <h1>Bookmarks</h1>
  7.  
  8. <dl>
  9.  
  10. EOH;
  11. fwrite($f, $header);
  12.  
  13. $row = 0;
  14. // replace the filename if needed, remember to put it under the same folder of this script
  15. if (($handle = fopen("bookmarkall.csv", "r")) !== FALSE) {
  16.     while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) {
  17.                 if ($row==0) {$row++; continue;} // skip the first line
  18.         $url = $data[0];
  19.                 $title = $data[1];
  20.                 $description = $data[2];
  21.                 $tags = $data[3];
  22.                 fwrite($f, "
  23. <dt><a href="\">$title</a>
  24. </dt>
  25. <dd>$description\n");
  26.         }
  27.     fclose($handle);
  28. }
  29. fwrite($f, "</dd>
  30. </dl>
  31.  
  32. ");
  33. fclose($f);
  34.  
  35. Success!
  36.  
  37. ";
  38.  
  39. Please right-click to save the <a href="\">Bookmarks file</a>
  40.  
  41. ";
  42. ?>

The bookmark file is created  and ready  to be imported  to your favorite browser.  Of course, we can use another social marketing service like Delicious.  Luckily, the tags can be preserved too.  The only limitation is that the date of bookmark creation cannot be kept.  You can see that the date is set manually in the conversion script because it is not available in the CSV file.

分享:
發表回應

Yahoo! 對政府網站的特別照顧

很多人都認為搜尋引擎對政府網站特別重視,因此相關的搜尋結果中,政府網站的網頁總是排得比較前。政府的資料可信性不容置疑,能提供準確的訊息給用家,排得較前也無可厚非。

最近完成了一個新網站,由於內容和政府網站的資料有相同之處,筆者也預計到一定會有上述情況發生,不過沒想到原來Yahoo!對政府網站真的有特別照顧,大家可看看以下的搜尋結果:

2009-11-13_094156

圖中可見搜尋結果的條目,是以文娛活動的名稱為標題,然而當你點撃這個連結,就會發現康文署網頁上的標題是「文 化 節 目 節 目 詳 情」。要知道在一般情況下,搜尋引擎只會使用網頁上 Title Tag 上的文字作為搜尋結果標題,因為要抽取內文作為標題,顯然要先理解內文的資訊,才能給予一個比原網頁更貼切的標題。

其實以上康文署網頁資料是來自其站上的活動搜尋工具 (雖說是搜尋,但也有提供列表顯示各項活動,因此搜尋引擎可以收錄個別活動資料),可能這網頁的框架用了不少時間,而且更新的頻率也很高,因此Yahoo!會嘗試給一個更貼切的標題給用家。但Yahoo!也不是每個活動都會自行更改標題,究竟在什麼情況之下才會進行,則只有Yahoo!才知道。

分享:
發表回應