close


眼尖的人或許已經發現,這排的收入書籤按鈕,位置並不在本文可編輯的範圍中,這代表什麼意思呢?
是的,這不是自己手工貼上的,也就是可以「自動產生」,大家不用再一篇一篇的貼收入書籤按鈕的語法了,只要在 sidebar(任何一個自訂資料夾的連結管理) 或 banner(網誌描述) 上,貼上文末所附的語法,就可以「畢其功於一役」!

如果你還搞不清楚這在說什麼,請先看第一集第二集...:P

話說在「第一集」裡徵求看有沒有高手可以搞個一勞永逸的辦法,或最好是 BSP 直接把這個小東西納入為標準功能;後半段在 Pixnet 已經實現多日,而前半段,昨日終於有高手現身...

這位高手就是 Ressol,他除了提供無名可用的語法,也提供了天空可用的語法,至於其他的 BSP,歡迎大家一起來試試~^^

Ressol 提供給無名的語法,加入書籤按鈕會出現在文章上方的日期列上,我個人是比較不習慣這個位置,所以我又修改了一下,讓這排按鈕出現在如上圖所示的位置,也就是在文末「同分類閱讀」之下,看大家習慣哪一種,就用哪一種囉,或是你想要它出現在其他位置,也可以自行改寫語法。

根據我今日使用的心得,這排按鈕出現的速度是稍微慢了一點,不過絕對是比你看完一篇文章快得多啦,所以影響應該是不大,這一點點的小缺點,比起要每一篇貼語法,應該是可以接受的。

不過和之前一樣,這個語法,在無名小站中,仍僅有付費會員可以使用;之前一篇一篇貼的方法,一般會員還可以用設定共同作者的方式來達成貼上按鈕的目標,不過這回輸入語法的地方在 sidebar 或 banner 上,就不是共同作者能夠編輯的區域了,所以只能跟一般會員說聲抱歉,沒能想出其他可行的辦法。

在複製語法前,讓我再重貼一次迴紋針老師說的話:「大家都掛了書籤貼紙,等了別人來自己家摘文章,可是有多少人因為喜歡別人的好文,而主動去摘它呢?……如果大家都只是裝了這個工具,孤芳自賞地希望別人來摘,自己卻吝於給別人掌聲與鼓勵,我想這也就沒什麼意義了。」好,語法如下:

IE 使用者點選後端的圖示即可進行複製語法
</a><div id="add2bookmark" style="display:none">
<br>將本文收入書籤:
<!-MyShare->
<a href="javascript:(function(){d=document;w=window;t='';if(d.selection){t=d.selection.createRange().text;}else{if(d.getSelection){t=d.getSelection();}else{if(w.getSelection){t=w.getSelection()}}}void(window.open('http://myshare.url.com.tw/index.php?func=newurl&url='+encodeURIComponent(location.href)+'&desc='+escape(document.title)+'&contents='+escape(t),'newwin'))})();"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/1.jpg" title="MyShare" alt="MyShare" class="bkimg"></a>
<!-HemiDemi->
<a href="javascript:desc='';via='';if(document.referrer)via=document.referrer;if(typeof(_ref)!='undefined')via=_ref;if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://www.hemidemi.com/user_bookmark/new?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(desc)+'&via='+encodeURIComponent(via)));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/2.jpg" title="HemiDemi" alt="HemiDemi" class="bkimg"></a>
<!-Fiigo->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://www.fiigo.com/bookmark/my.php?a=add_web&title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&comment='+encodeURIComponent(desc)+'&ei=UTF-8',0));"><img src="http://www.fiigo.com/bookmark/pic/save_icon/icon-16x16-2.gif" title="Fiigo" alt="Fiigo" class="bkimg"></a>
<!-Baidu->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://cang.baidu.com/do/add?iu='+encodeURIComponent(location.href)+'&it='+encodeURIComponent(document.title)+'&dc='+encodeURIComponent(desc)));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/3.jpg" title="Baidu" alt="Baidu" class="bkimg"></a>
<!-Google Bookmarks->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&annotation='+encodeURIComponent(desc)));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/4.jpg" title="Google Bookmarks" alt="Google Bookmarks" class="bkimg"></a>
<!-Yahoo! My Web->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://tw.myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&u='+encodeURIComponent(window.location.href)+'&d='+encodeURIComponent(desc)));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/5.jpg" title="Yahoo! My Web" alt="Yahoo! My Web" class="bkimg"></a>
<!-PChome->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://search20.portal20.com.tw/x.jsp?t='+encodeURIComponent(document.title)+'&u='+encodeURIComponent(window.location.href)+'&n='+encodeURIComponent(desc)+'&ei=UTF-8'));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/a2940.jpg" title="PChome" alt="PChome" class="bkimg"></a>
<!-Del.icio.us->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://del.icio.us/post?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'¬es='+encodeURIComponent(desc)));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/6.jpg" title="Del.icio.us" alt="Del.icio.us" class="bkimg"></a>
<!-Digg->
<a href="javascript:desc='';if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&bodytext='+encodeURIComponent(desc)));"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/7.jpg" title="Digg" alt="Digg" class="bkimg"></a>
<!-Technorati->
<a href="javascript:void window.open('http://technorati.com/faves?add='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/8.jpg" title="technorati" alt="technorati" class="bkimg"></a>
<!-Furl->
<a href="javascript:(function(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');var%20furlit=window.open('http://www.furl.net/storeIt.jsp?t='+encodeURIComponent(d.title)+'&u='+escape(d.location.href)+'&r='+escape(d.referrer)+'&c='+encodeURIComponent(t)+'&p=1');})();"><img src="http://web.caidiy.com/plate/files/myblog/person/make_template/cgs0102/1037//images/9.jpg" title="furl" alt="furl" class="bkimg"></a>
<!-AddThis->
<a href="javascript:void window.open('http://www.addthis.com/bookmark.php?pub=addthis&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));"><img src="http://s3.addthis.com/button1-bm.gif" title="其他更多書籤" alt="其他更多書籤" class="bkimg"></a></div>
<!-JavaScript->
<script type="text/javascript" src="http://jquery.com/src/jquery-latest.pack.js"></script>
<script type="text/javascript">$(document).ready(function() {var divTrk=$(".total-comments-div");if(divTrk.length>0) {var divCat=$("div.extended");var brk=$("#add2bookmark");brk.find(".bkimg").attr({border:"0", align:"absbottom"});brk.appendTo(divCat);brk.css("display","inline");}});</script>


「第一集」裡,原語法關於圖片的 img="" 敘述中,border="0" 這回改由 JavaScript 控制,所以都拿掉了,因此也多了一個 class="bkimg";但是有「測試用戶」回報他的書籤按鈕還是有邊框,所以如果你也有類似的情形,按鈕的語法部分,你可以自己手動把 border="0" 加回去,或是可以複製「第一集」的語法來使用。

如果你希望貼這語法的地方 (sidebar 或 banner) 也能出現這排按鈕,那就請你把語法第一行中的 style="display:none" 拿掉,按鈕前後的 <br> (換行) 要幾個,你也可以依自己的排版喜好來變更;按鈕要哪些個,要怎麼排,圖要用哪張,也都是隨你高興,反正就都很自由,有興趣的就來試試看吧~

(2007.04.10) 發現很多人的語法是擺在 sidebar 裡,「將本文收入書籤」就會變成超連結,所以在它之前又加上</a>,如果你的語法放 banner上,就不需要這個</a>。

(2007.04.11) 昨天下午之前語法裡少了一個</div>,造成部分使用者版型錯亂,現在應該不會了;另經 timk 提醒國內還有一個大書籤網站-PChome,所以又加上了~

arrow
arrow
    全站熱搜

    CGS 發表在 痞客邦 留言(0) 人氣()