給 WP-Notable 外掛添加HEMiDEMi圖標
WordPress 有一個很好的外掛 WP-Notable。這外掛能夠經由一個對 Template 很簡單的修改,就能在 Blog 的首頁或個別文章中,給掛上一串各種 “共享書籤” (Social Bookmark) 的圖標及連結。

其中,比較知名的有 Furl, Delcicous, Digg, spurl, blogmarks, Yahoo ……. 也有些國內使用的人可能不多。但是,國人使用率較高的 HEMiDEMi 卻不在其中。
如果,想要把 HEMiDEMi 添加上去,並想去除掉一些不常用的圖標,要如何處理。
1. 在原作者站上下載zip檔
2. 解開後在 /plugins/blogbling/images/ 目錄內,添加 hemidemi.png 圖檔 ![]()
3. 修改 wp-notable.php 檔:找檔內 $output_array 便會看到如下,每四個一組的 array 的定義。
$output_array['furl'] = array();
$output_array['furl']['header']=’furl’;
$output_array['furl']['show']=’yes’;
$output_array['furl']['post_url']=’<a href=” …..
對於想要添加的 HEMiDEMi 的寫法如下:
$output_array['hemidemi'] = array();
$output_array['hemidemi']['header'] = ‘hemidemi’;
$output_array['hemidemi']['show'] = ‘yes’;
$output_array['hemidemi']['post_url'] = ‘<a href=”http://www.hemidemi.com/user_bookmark/new?title={{url_encoded_title}}&url={{url}}&description=&via=sticker” title=”{{prepend}}:{{title}}”>{{image}}</a>’;
5. 改好之後,與一般的 Plugin 處理方法一樣。上傳到 Plugins 目錄,之後啟用。
6. 不想使用的圖標,可在 “選項” 中選擇停用。
7. 然後,在 index.php 與 single.php 檔中,圖標要出現的位置加上以下的編碼:
<?php if (function_exists(’wp_notable’)) wp_notable(); ?>
這樣就完成了。參考 http://blog.hi3b.com/ 及本 Blog 的使用情形。
文章資訊
2007-02-26 02:55 貼出, 並編屬 : WordPress.
前一篇文 : WordPress文章Loop間插入廣告的作法 »
次一篇文 : 來來來, 來賺錢. 去去去, 被停權-使用 Google Adsense 的最大禁忌 »












