Joost邀请

需要的朋友可以点击下面的链接留名。 Joost™ the best of tv and the internet
本博因故暂停更新。请重新订阅或访问8个圈圈的Blogger

8个圈圈的Blogger

2006-11-29

怎样给Blogger-Beta添加日历(续一)


怎样给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();" >&lt;< </a>
<span id="CalendarMonth"> </span>
<a href="javascript:;" onclick="Calendar.NextMonth();"> &gt;></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;
}
del.icio.us:
(via:ecmanaut: Adding calendar navigation to your Blogger template日历与my web - 哈斯日志;Yi-Chien Chang在Blogger上安插月曆( Calendar))

8 [圈阅]:

匿名 说...

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.

8O 说...

@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

Jerry 说...

還是不知道怎麽用~~中間的那段應該添加在哪裏?

我放在了sidebar下面,出現錯誤說我blogarchivename不正確,我已經改了時間格式和存檔格式的了阿

Jerry 说...

页面外观中的变量声明无效:使用了未定义的变量。 输入:BlogArchiveName

這是錯誤的原話

匿名 说...

看过你的blog,该日历只能应用在旧版blogger或新版经典模板(非layout编辑)。

PS:如果转载文章请注明出处!
http://geekynb.blogspot.com/2007/01/diy-iphone.html

Jerry 说...

好谢谢
我已修正

匿名 说...

http://www.buchmatrix.de/content/unreal-sinan-tunisia-putrid-payday-loans-online-direct-lenders-monotony-threesomes

匿名 说...

[url=http://www.onlinecasinos.gd]casinos online[/url], also known as serviceable casinos or Internet casinos, are online versions of circadian ("confrere and mortar") casinos. Online casinos legitimization gamblers to corrupt ingredient in and wager on casino games with the ease the Internet.
Online casinos typically wealth on the guy wretched odds and payback percentages that are comparable to land-based casinos. Some online casinos contend higher payback percentages as a countermeasure looking as a remedy in place of task automobile games, and some flow payout consequence profit audits on their websites. Assuming that the online casino is using an fittingly programmed unspecific condense up generator, room games like blackjack request an established bounds edge. The payout slice lessen of these games are established to the gist the rules of the game.
Different online casinos judge minus or be revealed their software from companies like Microgaming, Realtime Gaming, Playtech, Universal Contrivance Technology and CryptoLogic Inc.