跳至主要内容

blogger hacks

blogger hacks

the blog*再度装修,加入了几个hacks:
1. 显示/隐藏评论
2. 可扩展的帖子摘要blogger help给出了两种实现方法, 另一个比较类似于上面显示/隐藏评论,两者各有利弊,采用可扩展的帖子摘要貌似灵活性比较大,其显著的缺点是在无更多正文的情况下用于展开的链接仍然会被显示,而更晕的是在这篇帮助居然以"我们将修改此功能作为一个练习留给读者来完成"结尾,幸好,我们有google

click for more
不费吹灰之力就找到了 解决方案,在这里简单说明一下其实现方式(注:为帖出代码用"《""》"":"代替了"<"">"":")
首先在CSS中定义两个类
《MainOrArchivePage》
span.fullpost {display:none;}
span.shortpost {display:inline;}
《/MainOrArchivePage》
《ItemPage》
span.fullpost {display:inline;}
span.shortpost {display:none;}
《/ItemPage》

在创建blog post时加入以下代码:
第一部分正文正文正文正文正文
《span class="shortpost"》《a href="$BlogItemPermalinkUrl$#fp"》继续阅读《/a》《/span》
《span class="fullpost"》《a name="fp" id="fp"》《/a》第二部分正文正文正文正文正文《/span》

发布post,然后复制这篇blog post的链接地址,形如http://xxx/2005/11/xxx.html,而后编辑这篇,粘贴取代$BlogItemPermalinkUrl$,重新发布就可以了,唯一的弊端就是RSS会有多余的一处"继续阅读"的链接,只好随它去了

3.至于页内评论,还不知道是否有必要引入,webleon我爱妞妞分别给出了各自的hack

4.调整了模板中title标签的位置(汗,很少用IE,要不是我爱妞妞的这篇,我还真是从没注意到这个问题:中文标题的post在IE下无法正常显示

5.新建了一个del.icio.us用户 yesiam来引入tag以弥补blogger不具备分类功能的缺憾,目前11月份的blog都已加入tag,剩下的慢慢来

评论

此博客中的热门博文

How to Design a Store Front Sign

In this Article we will talk about designing a store front for a business. What color or size should your Letters & designs be? What to put on your sign and why?, then be ready to Get in touch with sign people and get your best deal. Large lettering with out a front sign could save you time and money Do your products have a special shape or color to emulate on your sign? Kodak is always in yellow and black, Coca-Cola white on red, Etc. Muffler places, have a sign in the shape of a muffler. your phone number on the store front some place, but not on the identification sign, (door, or window) Your Product & logos can be arranged on the front sign, or window. Not on the Pole sign, Store hours & phone number could fit in your design and by using the product color, it could add product recognition & enhance your design. Suppliers may provide plenty of advert...

Can Microsoft and Yahoo Co-Create New Businesses?

Negotiating The Future of Management Podcast Current Interactive Case Study Respectfully there's a parallel in modern history here. China-HongKong merger. It started as Two System One China. Controversial at that time. Now, many don't mind which system is better (respectfully just an opinion). Both are getting the best of each other under one country. Families are reunited regularly. Corporate identities sometimes focuses too much on what's different as a strategy. It may provide superiority, but does it always guarantee sustainability? Nature advocates the flourishing of various species; pursues diversity not for purposes of destruction but for better adaptability. Of the whole system. Being different doesn't mean one must separate oneself from the "whole" system. "Different" here is to provide a unique contribution to pserve the "whole". Task / role distribution , not identity separation. Preserving the whole system by b...

MP3 firmware upgrade --- switch

1: The most simple if the host machine using Sigma firmware and upgrade program is one! MP3 can be connected to the computer as long as the firmware installed on the computer, and then click on the face of that to upgrade the line of MP3! three antelope 7530 master points in several ways is to first get the firmware is sent to the machine within the sub-sub-folder off the machine DVR will automatically upgrade! Detailed steps have been described in general firmware! Shenzhen City Qing Wei Digital Appliance Co., Ltd.-KINGWAY http://www.kingwon.com.cn/ Technology Co., Ltd. Shenzhen, Pu-chih http://www.poozi.com/down.asp?le ...% D4% D8 & offset = 5 Section Crystal: http://www.fangke-model.com/ Chuanqi (ONKI): http://www.onki.cn/download.asp brother extremely grateful! CDT CDT http://xinvo.com/web/ ExcelStor MP3 http://www.hua-sun.com/xiazai.htm Bester http://www.szbaisite.com Beto www.beto.cn Butterfly www.it8.com.cn Acorp www.acorp.net.cn BES www.bes-chi...