Mybloglog 最近訪客 Widget 使用中文

Posted by tjwei on 星期一, 3月 05, 2007 with 1 comment
裝了 Mybloglog,因為順便可以看一下流量。能夠掌握資料,會感覺比較自在一點。
但是 Mybloglog 的 Widget 無法正確的使用中文。
搜尋了一下網路,沒有看到解法。我相信一定有人已經找到辦法用中文了,比方餵給 javascript 一些特定的編碼之類的,不過我找了一下就放棄了。
還是直接使用 DHTML 大法。

<script>
r=document.getElementById('MBL_COMM').rows;
r[0].cells[0].innerHTML="最近的訪客";
r[r.length-2].cells[0].innerHTML=
"<a href=http://www.mybloglog.com/buzz/community/weijr/>參訪我的社群</a>";
</script>

這樣就行了。
當然其實也可以把標題 text 設成空,改用 blogger 中的 sidebar 標題也行。
不過下面那個「參訪我的社群」還是得用這個方式。


**更新:
方法更新
把 mybloglog 的 c_heading_text= 設成空字串(所以標題要另外用 html 寫),然後在mybloglog 的 script 後面加上這段 script

<script>
r=(tbl=document.getElementById('MBL_COMM')).rows;
r[r.length-2].cells[0].firstChild.innerHTML='參訪我的社群';
/*因為標題那一列設成空了,所以不會出現,把第一行陰影人 You! 改成中文*/
if((ce1=r[0].cells[1]).firstChild.innerHTML=="You!"){
ce1.firstChild.innerHTML="你!";
ce1.lastChild.innerHTML="加入我的社群";
}
tbl.deleteRow(r.length-1); /*刪除最後的 mybloglog.com 資訊,也可以選擇不刪除*/
</script>



Categories: