2008年1月26日 星期六

範本修改紀錄08126

我在我的 blogger 範本裡頭進行了一些修改動作,像是添加了「文章評分」功能,以及手動搬移顯示的位置等等。

而新添加的「文章評分」功能,則是在 haloscan 網站上發現的,原本只是想把凌亂的範本中把 halosacn 引用的功能移除掉,不過我還是靠自己一個一個仔細看才移除掉。話說現在 haloscan 可以讓你自己把範本上傳,然後系統便會自動幫你加料,省去自己手動查找、修改的困擾。

雖然有上傳給它修改過,但實際上卻無法顯示文章內容,最後還是自己手動修改阿!

總覺得文章引用功能使用的機率非常非常非常小,礙於網頁開啟速度的關係,還是考慮把它移除,不過我卻添加新功能「文章評分」XD。

關於「文章評分」及「引用功能」其實都需要javascript的開啟,也許比較不適合大部分的使用者,不過礙於互動及需求多多少少還是需要javascript的。


添加「文章評分」功能注意:請記得下載完整範本在進行下面動作。
以下是blogger添加「文章評分」的方法:
首先打開自己的範本>修改程式碼>記得展開小裝置範本
然後尋找找到 post-footer 於是在
<div class="post-footer">
它後面加料
<div style="float: left; margin-right: 3px;">
<div class="js-kit-rating" path="data:post.url" permalink="data:post.url" title="data:post.title" starcolor="Green">
</div>
</div>

以上是第一步,這步的意思是什麼呢?是文章評分的位置要顯示在哪?

再來就是需要第三方的javascript腳本,使文章評分的功能能夠運作。
於是我們在往下尋找找到
</body>
這裡就是文章評分的javascript腳本位置,我們在 body 前面,放入它的評分腳本
<script src="http://js-kit.com/ratings.js"></script>
於是這樣就完成了添加「文章評分」的功能囉!

當然,先別急著儲存範本,可以先進行預覽,預覽到你喜歡為止在儲存範本,否則一個不小心就....後果自負阿!

而我另一個修改範本的重點還是在「快速編輯」,我還是搞不懂是哪裡出了問題,因為email post既然可以顯示,而快速編輯鈕的位置及語法看似沒錯,但為何就是無法顯示呢?有時,文章有快速編輯鈕,可是sidebar又沒有,真奇怪。

就算讓它位置調換、貼上圖示網址也還是不行,搞了半天很累人,還是先休息一下好了。

我參考了 sam 部落格的這篇教學,我還是搞不懂其中一段程式碼在哪?
<b:includable id="postQuickEdit" var="post">
<b:if cond="data:post.editUrl">
<span class=""item-control " + data:post.adminClass">
<a href="data:post.editUrl" title="data:top.editPostMsg">
<span class="quick-edit-icon"> </span>
</a>
</span>
</b:if>
</b:includable>


而我下面這段程式碼是在 post-footer 其中一列
<!-- quickedit pencil -->
<b:include data="post" name="postQuickEdit">


這段程式碼後接的像是文章標籤、文章連結網址之類的,而另一段較長的程式碼則在 Post feed links 與張貼的回應訊息之間,具體地說就是在
<b:includable id="comments" var="post">
上,但是還是無法顯示快速編輯鈕,真煩惱呢!

2008年1月25日 星期五

豐富的資源網站

幾個內容豐富的資源網站
Manpages
http://www.fifi.org/cgi-bin/man2html

About Debian
http://www.aboutdebian.com/index.htm

LinuxCommand.org
http://linuxcommand.org/index.php

The Linux Kernel Module Programming Guide
http://linux.die.net/lkmpg/

KernelHacking
http://kernelnewbies.org/KernelHacking

The Ethical Hacker Network
http://www.ethicalhacker.net/

Internet RFC/STD/FYI/BCP Archives
http://www.faqs.org/rfcs/

Home Computer Security
http://www.cert.org/homeusers/HomeComputerSecurity/

Home Network Security
http://www.cert.org/tech_tips/home_networks.html

Linux Shell Scripting Tutorial
http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/lsst/

LinuxHQ
http://www.linuxhq.com/

SANS
http://www.sans.org/?portal=7e7dbb3926f4185d9e519ceb54dde14b

Tuxfinder
http://www.tuxfinder.com/

幾個好玩的open source games
http://apcmag.com/7890/best_open_source_games

Linux Detecting / Checking Rootkits with Chkrootkit and rkhunter Software
http://www.cyberciti.biz/faq/howto-check-linux-rootkist-with-detectors-software/

Linux Trace Toolkit
http://ltt.openrapids.net/

kerneloops.org
http://kerneloops.org/

Typosquatting
http://en.wikipedia.org/wiki/Typosquatting

DjVuLibre Documentation
http://djvu.sourceforge.net/doc/index.html

FreeWRL
http://freewrl.sourceforge.net/index.html

Mozilla Security Review and Best Practices Guide
http://www.mozilla.org/projects/security/components/reviewguide.html

Layout Engine Technical Documentation
http://www.mozilla.org/newlayout/doc/

About:config entries
http://kb.mozillazine.org/About:config_entries

2008年1月24日 星期四

The Linux Kernel Module Programming Guide
http://linux.die.net/lkmpg/

BackTrack操作系統
http://www.offensive-security.com/index.php
and
remote-exploit.org
http://www.remote-exploit.org/index.html
via The Ethical Hacker Network

2008年1月23日 星期三

Bastille初步了解

雖然linux有許多內定好用的工具或命令,像是syslog、sudo(不同的發行版有不同的工具)等等,在工具及套件有這麼多的選擇之下,我們應該如何更快速的使linux強化安全性呢?

bastille 是一個整體的linux系統硬化工具,透過問題和回答來一步一步強化你的系統。

與bastille相關的套件需求:
perl-tk
psad
acct
詳情可參考套件管理程式

ToDo
未完成的安裝:
psad log配置,啟動bastille的過程依需求可安裝建議的套件,啟動bastille後,首先顯示的是軟體說明於5分鐘內確定接受該條款聲明,之後即可透過問答方式來強化系統,於此之後該如何操作?

畢竟軟體設定牽涉到防火牆、開機管理、日誌等。