我最近突然覺得向下相容是一件錯誤的事。就因為網頁設計師總是向下相容到 IE 6 ,使用者才不願升級為 IE 7 —— 反正都可以用,當然選擇已經用得順手的舊版瀏覽器。所以本站下次的改版將無視 IE 6 使用者,版面爛掉就爛掉,我不要為 IE 6 作任何 Fix! XD (但 IE 7 使用者我還是會照顧一下)
為了心安,我還是參考了一下本站的流量統計,結果令我相當驚喜——本站近一個月來的 IE 使用者只佔了 51% ,其中大約只有一半為 IE 6 ,而 Firefox 使用者竟然高達 40% 。不過近一個月可能太近,我又看了近半年的資料,其實沒差多少, IE 使用者只佔了 58% ,其中同樣大約一半為 IE 6 ,計算得精確一點的話,本站近半年來只有 32.35% 的訪客使用 IE 6 。雖然 IE 的數字仍然過半,但這比例與一般網站相較,差異已經相當懸殊。綜合以上資料,我認為本站主要客群並不是使用 IE 6 ,我可以安心地寫新時代的網頁 >ω<
剛開始的消息是說伴和亮要出席 a-nation ,當時還不敢太期待 XD 現在則是確定於 9/29 復出,間隔剛好三年。不過… 新的成員中看來沒有大…… orz
簡介
Breezy Archives 是一個模仿 Live Archives 的彙整 Plugin 。當瀏覽器關閉 JavaScript 功能時,它會變成 Clean Archives ,而不會留下一個空白的頁面。
安裝
- 解壓縮檔案。
- 將 breezyarchives 資料夾放到 /user/plugins 資料夾中,然後到 Habari 管理介面中啟用它。
將下面這行貼到你的 Theme 中。
<?php if ( Plugins::is_loaded('BreezyArchives') ) $theme->breezyarchives(); ?>
設定 / 自訂
啟用後,請按下 Configure 來設定此 Plugin ,有這些項目可以設定:
- Chronology – 依月份彙整的設定
- Title for Chronology Archives – 月份彙整的標題。
- Month Format – 設定月份的格式,共有四個選項可選擇。
- Full name – 全稱 (January – December)
- Abbreviation – 縮寫 (Jan – Dec)
- Number with leading zero – 前方補零的數字 (01 – 12)
- Number without leading zero – 前方不補零的數字 (1 – 12)
- Show Monthly Posts Count – 顯示每個月份的文章數量。
- Taxonomy – 依標籤彙整的設定
- Title for Taxonomy Archives – 標籤彙整的標題。
- Show Tagged Posts Count – 顯示每個標籤的文章數量。
- Excluded Tags – 此為選填欄位。在此輸入你不要顯示於標籤彙整的 tag slugs 。
- Pagination – 分頁設定
- № of Posts per Page – 每頁顯示幾篇文章。
- Next Page Link Text – 下一頁的連結文字。
- Previous Page Link Text – 上一頁的連結文字。
- General – 一般設定
- Show Newest First – 將新的文章放在前面。
- Show № of Comments – 顯示每篇文章的迴響數量。
如果你要修改 CSS 呈現的結果,可以將 breezyarchives.css 複製到你的 Theme 資料夾中並修改這個檔案。
下載
更新紀錄
Introduction
Breezy Archives is an archives plugin which mimics ‘Live Archives’ on WordPress. When JavaScript is not available, it will graceful degrade to a ‘Clean Archives’.
Installation
- Extract the file.
- Put the folder ‘breezyarchives’ to /user/plugins and activate it.
Copy and paste the following line to your theme.
<?php if ( Plugins::is_loaded('BreezyArchives') ) $theme->breezyarchives(); ?>
Configuration & Customization
After activated it, click Configure button to setup the plugin. Most of following options are required and have to be set properly.
- Chronology – Configurations about Monthly Archives
- Title for Chronology Archives
- Month Format – There are 4 options: ‘Full name’, ‘Abbreviation’, ‘Number with leading zero’, ‘Number without leading zero’
- Show Monthly Posts Count – Check this to show the number of posts of each month.
- Taxonomy – Configurations about Tag Archives
- Title for Taxonomy Archives
- Show Tagged Posts Count – Check this to show the number of posts of each tag.
- Excluded Tags – This field is optional. Put tag slugs here which you want it to be excluded from tag archives.
- Pagination – Configurations about Pagination
- № of Posts per Page
- Next Page Link Text
- Previous Page Link Text
- General – General Configurations
- Show Newest First – Check this to show latest posts first.
- Show № of Comments – Check this to show the number of comments of each post.
You can copy ‘breezyarchives.css’ to your theme directory and modify the CSS style.
Download
Changelog
- 0.1 (2008-08-27) – Initial release.
YUI 3.0 Preview Release 1 推出了,並且是砍掉重練式的大更新,所以我當然要來測一下它的 Selector 速度囉!由於取用方式與其他 Library 有很大的不同,我花了一點時間才成功將它放進 SlickSpeed。
目前 YUI 官方給的範例、文件中都是採用這樣的方式
YUI().use('node', function(Y) {
Y.get('#demo').addClass('enabled');
});
yui-min.js 是一個 Loader ,使用時必須先用 YUI.use() 來建立 instance 並載入所需功能,然後才能使用 Y.get() 這種寫法。經過我研究原始碼後發現,如果只要用 Selector 的部份,則僅需載入 yui-base-min.js, dom-base-min.js 和 selector-min.js 三個檔案,然後使用 YUI().use("selector").Selector.query() ,就能選擇 HTML 物件。不過如果是載入 yui-min.js ,就不能用這種方法了。
測試結果:YUI 2 終於不再是最慢的 Selector ,因為現在多了 YUI 3 來當它的墊背… 囧rz
完全是無聊而寫了這個,我自己也用不到 XD
這個 PHP Class 的功能是將 Big5 中文及 Unicode-At-On 新增字轉換為 UTF-8 或 NCR。本程式移植自 PCMan 2007 ,所以採用 GNU GPL 授權。
下載
使用方法
<?php
// 輸出 UTF-8
echo UAODecode::big5_to_utf8('Unicode-At-On 文字');
// 輸出 NCR
echo UAODecode::big5_to_ncr('Unicode-At-On 文字');
?>
警告
使用此 Plugin 必須有 HTML 、 PHP 基礎知識。
簡介
此 Plugin 取代了分頁,使用者只要將頁面向下捲動,新的內容便會自動載入。
安裝
- 解壓縮檔案。
- 將 pageless 資料夾放到 /user/plugins 資料夾中,然後到 Habari 管理介面中啟用它。
- 將 pageless 資料夾中的 pageless.php 複製到你使用中的 Theme 資料夾,並根據你所使用的 Theme 來修改。(通常只要參考 multiple.php ,刪除 foreach 以外的部份即可。)
設定
啟用後,請按下 Configure 來設定此 Plugin ,你必須設定這些項目:
- How many posts to load each time? – 你一次想載入幾篇文章?
- Class name of posts – 每篇文章共同的 CSS class
- ID of page selector – 頁碼選擇器的 ID
設定範例
正確的 HTML 架構如下:
<div id="entry-post_1" class="hentry">
<!-- Post 1 -->
</div>
<div id="entry-post_2" class="hentry">
<!-- Post 2 -->
</div>
<div id="entry-post_3" class="hentry">
<!-- Post 3 -->
</div>
<div id="page-selector">
<!-- Page: 1, 2, 3, ... -->
</div>
- 每篇文章各有一個 ID ,格式為 entry-post_slug
- 每篇文章都有一個共同的 CSS class ,範例中為 hentry
- 頁碼選擇器有一個 ID ,範例中為 page-selector
如果你的 HTML 架構不符合以上條件,請修改你的 Theme 。
下載
更新紀錄
Caution
You must have basic HTML and PHP knowledge to use this plugin.
Introduction
This plugin give your blog the ability of Infinite scrolling, instead of breaking content into ‘pages.’
Installation
- Extract the file.
- Put the folder ‘pageless’ to /user/plugins and activate it.
- Copy ‘pageless.php’ from ‘pageless’ folder the activated theme folder and modify it base on the theme (Mostly you can simply copy ‘mutiple.php’ in the activated theme folder and remove all lines before or after the foreach block).
Configuration
After activated it, click Configure button to setup the plugin. All of following options are required and have to be set properly.
- How many posts to load each time?
- Class name of posts
- ID of page selector
Example
There is an example of correct HTML structure.
<div id="entry-post_1" class="hentry">
<!-- Post 1 -->
</div>
<div id="entry-post_2" class="hentry">
<!-- Post 2 -->
</div>
<div id="entry-post_3" class="hentry">
<!-- Post 3 -->
</div>
<div id="page-selector">
<!-- Page: 1, 2, 3, ... -->
</div>
- Each post’s container must have an ID named ‘entry-post_slug’. If you are sure you won’t write any post which slug is begin with ‘entry-’ or ‘page-‘, then you can simply named it ‘post_slug’.
- Every post must have an identical CSS class, e.g. ‘hentry’, and this CSS class must not appear elsewhere. You have to put this in Class name of posts.
- The page selector’s container must have an ID, e.g. ‘page-selector’. You have to put this in ID of page selector.
If your HTML structure does not conform these rules, you have to modify the theme.
Download
Changelog
- 0.1 (2008-07-31) – Initial release.
簡介
此 Plugin 讓你在 blog 上顯示你的 Flickr 最新照片。我覺得 unserialize() 應該會比解析 XML 快得多,所以我寫了這個 plugin.
安裝
- 解壓縮檔案。
- 將 flickrfeed 資料夾放到 /user/plugins 資料夾中,然後到 Habari 管理介面中啟用它。
將下面這行貼到你的 Theme 中。
<?php if ( Plugins::is_loaded('FlickrFeed') ) $theme->flickrfeed(); ?>
設定 / 自訂
啟用後,請按下 Configure 來設定此 Plugin ,有這些項目可以設定:
- Photostream type
- Flickr ID – 你的 Flickr ID ,你可以使用 idGettr 取得。
- № of photos – 設定要顯示幾張照片。
- Photo size – 設定照片大小。
- Tags – 限制只顯示某些標籤的照片,以逗號分隔,不可空白。(可不填)
- Cache expiry – 設定暫存檔保存多久,單位是秒。
如果你要修改 HTML 呈現的結果,可以將 flickrfeed.php 複製到你的 Theme 資料夾中並修改這個檔案。
下載
更新紀錄
Introduction
This plugin show your latest photos on your blog. I write this plugin because I think unserialize() should be much faster than parsing XML.
Installation
- Extract the file.
- Put the folder ‘flickrfeed’ to /user/plugins and activate it.
Copy and paste the following line to your theme.
<?php if ( Plugins::is_loaded('FlickrFeed') ) $theme->flickrfeed(); ?>
Configuration & Customization
After activated it, click Configure button to setup the plugin.
- Photostream type
- Flickr ID – Place your Flickr ID here, you can get your Flickr ID from idGettr.
- № of photos – Number of photos to be shown.
- Photo size
- Tags – A comma delimited list of tags to filter the photos by.
- Cache expiry – Number of second after the call that the cache will expire.
You can copy ‘flickrfeed.php’ to your theme directory and modify the HTML output.
Download
Changelog
- 0.2 (2008-07-26) – Initial release.