
怎样给Blogger-Beta添加日历并没有解决Zakaram的问题。于是花了一天时间上网,终于找到了一个可以实现通过日历浏览blogger的方法(实例参考)。这个方法目前只能应用于blogger classic模板中,而不能应用在blogger beta layout模板中。不管怎样,也算是向前推进了一步,有兴趣的朋友接着往下瞧吧。
老规矩,先介绍准备工作:
将blogger的存档设成“每日”,再将存档的日期格式设为“yyyy-mm-dd”。保存原来的模板!!!1.在</head>标签前添加以下代码:
<script type="text/javascript" src="http://8opages.googlepages.com/calendarclassiccn.js"></script>
你也可以下载该js代码,然后上传到你认为合适的地方。
2.然后将下面的代码放在你认为合适的地方:
<table border="0" cellpadding="0" cellspacing="0" id="Calendar">
<caption>
<a href="javascript:;" class="today" onclick="Calendar.GoToday();">回到今天 </a>
<a href="javascript:;" onclick="Calendar.PrevMonth();" ><< </a>
<span id="CalendarMonth"> </span>
<a href="javascript:;" onclick="Calendar.NextMonth();"> >></a>
</caption>
<tr>
<td class="act" id="CalendarTable"> </td>
</tr>
</table>
<script type="text/javascript">
Calendar=new ArchiveCalendar();
<BloggerArchives>
Calendar.blogarchivename.push('<$BlogArchiveName$>'.slice(0,4) + '<$BlogArchiveName$>'.slice(5,7)
+ '<$BlogArchiveName$>'.slice(8));
</BloggerArchives>
Calendar.base='http://yourname.blogspot.com/';
Calendar.refreshTable();
</script>
最重要的就是别忘了把上面红字部分换成你自己的blogger名。
3. 上面两部下来基本已经完成了99%的工作,如果你还希望美化一下你的日历,比如突出“今天”的日期,可以添加类似的CSS代码:
#CalendarTable .Today {
color: #fff;
background: #999;
}
2006-11-29
怎样给Blogger-Beta添加日历(续一)
[拟稿]
8O
@
09:07
| del.icio.us
| yahoo
[ TOP ]
[标签]: beta技巧
订阅:
帖子评论 (Atom)








7 [圈阅]:
This comment has been removed because it linked to malicious content. Learn more.
You should change the Archive file name. For instance, if your URL is xxx.com, you should change your file name to xxx_archive.html. That's it, hope helpful.
@kyle,
i've done the change of the url format to comply with the rules of new blogger template in that js already.
my problem is, in layout template i can't find a variable like <$BlogArchiveName$> in the classic template.any idea?
anyway, it works perfectly fine in classic blogger template even if you're using the new version of blogger. like here
還是不知道怎麽用~~中間的那段應該添加在哪裏?
我放在了sidebar下面,出現錯誤說我blogarchivename不正確,我已經改了時間格式和存檔格式的了阿
页面外观中的变量声明无效:使用了未定义的变量。 输入:BlogArchiveName
這是錯誤的原話
看过你的blog,该日历只能应用在旧版blogger或新版经典模板(非layout编辑)。
PS:如果转载文章请注明出处!
http://geekynb.blogspot.com/2007/01/diy-iphone.html
好谢谢
我已修正
发表评论