1、class/cache.asp
找到
找到
找到
找到
2、global.asp
在innerSidebar里加
3、lang/blog.asp
加
修改(不是必须)
4、source/src_article.asp
找到三处
找到
this.calendarHTML;
下面添加 this.Archive;
找到
if(Application(Namespace+"cacheCalendar")!=undefined&&Application(Namespace+"cacheCalendarDay")==(new Date()).getDate()){
this.calendarHTML=Application(Namespace+"cacheCalendar");
}else{
this.loadCalendar();
}
下面添加this.calendarHTML=Application(Namespace+"cacheCalendar");
}else{
this.loadCalendar();
}
if(Application(Namespace+"cacheArchive")!=undefined){
this.Archive=Application(Namespace+"cacheArchive");
}else{
this.loadArchive();
}
this.Archive=Application(Namespace+"cacheArchive");
}else{
this.loadArchive();
}
找到
this.loadCalendar();
下面添加 this.loadArchive();
找到
// Load Calendar
this.loadCalendar = function(){
上面添加this.loadCalendar = function(){
// Load Archive
this.loadArchive = function(){
this.Archive = this.generateArchive();
this.saveToCache(Namespace+"cacheArchive",this.Archive);
}
// Generate Archive ------------------------------
this.generateArchive = function(){
var monArray=[lang["month_1"], lang["month_2"], lang["month_3"], lang["month_4"], lang["month_5"], lang["month_6"], lang["month_7"], lang["month_8"], lang["month_9"], lang["month_10"], lang["month_11"], lang["month_12"]];
var tmpA=connBlog.query("SELECT Count(log_id) AS cnt, Year(log_postTime) AS pstyear, Month(log_postTime) AS pstmonth FROM [blog_Article] GROUP BY Year(log_postTime), Month(log_postTime) ORDER BY Year(log_postTime) Desc, Month(log_postTime) ASC");
if(tmpA){
var crtYear = tmpA[0]["pstyear"];
var Archive="";
var cntBr=0;
for(var i=0;i<tmpA.length;i++){
if (i==0) {Archive +=''+tmpA[i]["pstyear"]+' »<br />\n'}
if (tmpA[i]["pstyear"]==crtYear){
Archive += '<a href="default.asp?date='+tmpA[i]["pstyear"]+'-'+tmpA[i]["pstmonth"]+'" title=" '+tmpA[i]["cnt"]+' ">'+monArray[tmpA[i]["pstmonth"]-1]+'</a> ';
cntBr++;
if(cntBr==5){
cntBr=0;
Archive +="<br />\n";
}
}else{
cntBr=1;
Archive += '\n<br />'+tmpA[i]["pstyear"]+' »<br />\n';
Archive += '<a href="default.asp?date='+tmpA[i]["pstyear"]+'-'+tmpA[i]["pstmonth"]+'" title=" '+tmpA[i]["cnt"]+' ">'+monArray[tmpA[i]["pstmonth"]-1]+'</a> ';
crtYear = tmpA[i]["pstyear"];
}
}
tmpA=/10f1ad1cc06f152380e5a6c39a33d6943fafd7da/;
return Archive;
}
}
this.loadArchive = function(){
this.Archive = this.generateArchive();
this.saveToCache(Namespace+"cacheArchive",this.Archive);
}
// Generate Archive ------------------------------
this.generateArchive = function(){
var monArray=[lang["month_1"], lang["month_2"], lang["month_3"], lang["month_4"], lang["month_5"], lang["month_6"], lang["month_7"], lang["month_8"], lang["month_9"], lang["month_10"], lang["month_11"], lang["month_12"]];
var tmpA=connBlog.query("SELECT Count(log_id) AS cnt, Year(log_postTime) AS pstyear, Month(log_postTime) AS pstmonth FROM [blog_Article] GROUP BY Year(log_postTime), Month(log_postTime) ORDER BY Year(log_postTime) Desc, Month(log_postTime) ASC");
if(tmpA){
var crtYear = tmpA[0]["pstyear"];
var Archive="";
var cntBr=0;
for(var i=0;i<tmpA.length;i++){
if (i==0) {Archive +=''+tmpA[i]["pstyear"]+' »<br />\n'}
if (tmpA[i]["pstyear"]==crtYear){
Archive += '<a href="default.asp?date='+tmpA[i]["pstyear"]+'-'+tmpA[i]["pstmonth"]+'" title=" '+tmpA[i]["cnt"]+' ">'+monArray[tmpA[i]["pstmonth"]-1]+'</a> ';
cntBr++;
if(cntBr==5){
cntBr=0;
Archive +="<br />\n";
}
}else{
cntBr=1;
Archive += '\n<br />'+tmpA[i]["pstyear"]+' »<br />\n';
Archive += '<a href="default.asp?date='+tmpA[i]["pstyear"]+'-'+tmpA[i]["pstmonth"]+'" title=" '+tmpA[i]["cnt"]+' ">'+monArray[tmpA[i]["pstmonth"]-1]+'</a> ';
crtYear = tmpA[i]["pstyear"];
}
}
tmpA=/10f1ad1cc06f152380e5a6c39a33d6943fafd7da/;
return Archive;
}
}
2、global.asp
在innerSidebar里加
<div id="panelArchive" class="panel">
<h5><%=lang["archive"]%></h5>
<div class="panel-content">
<%=theCache.Archive%>
</div>
</div>
<h5><%=lang["archive"]%></h5>
<div class="panel-content">
<%=theCache.Archive%>
</div>
</div>
3、lang/blog.asp
加
t["archive"]="文章归档";
修改(不是必须)
t["month_1"]="1月";
t["month_2"]="2月";
t["month_3"]="3月";
t["month_4"]="4月";
t["month_5"]="5月";
t["month_6"]="6月";
t["month_7"]="7月";
t["month_8"]="8月";
t["month_9"]="9月";
t["month_10"]="10月";
t["month_11"]="11月";
t["month_12"]="12月";
t["month_2"]="2月";
t["month_3"]="3月";
t["month_4"]="4月";
t["month_5"]="5月";
t["month_6"]="6月";
t["month_7"]="7月";
t["month_8"]="8月";
t["month_9"]="9月";
t["month_10"]="10月";
t["month_11"]="11月";
t["month_12"]="12月";
4、source/src_article.asp
找到三处
theCache.loadCalendar();
分别在下面加 theCache.loadArchive();
顶
(0)
0%
踩
(0)
0%
[ 2009-04-02 10:01 ]
这2个愚人节的更新,我转到LBS粉丝网去了~





