生物导航网博客欢迎您......


<<  < 2008 - 11 >  >>
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30


公告
生物导航网博客欢迎您......

我的分类(专题)
生物导航网博客欢迎您......

日志更新
生物导航网博客欢迎您......

最新评论
生物导航网博客欢迎您......

留言板
生物导航网博客欢迎您......

链接

Blog信息
生物导航网博客欢迎您......







如何去掉首页最新文章后的更新日期?
thinker 发表于 2005-11-11 11:32:41
在inc/syscode_Article.asp 这个文件中,找到如下函数名:
'=================================================
'过程名:ShowNewArticle
'作  用:显示最新文章
'参  数:ArticleNum  ----最多显示多少篇文章
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
function ShowNewArticle(ArticleNum,TitleLen)
 dim sqlNew,rsNew,strrow,strcol,i,tmpdata
 nt2003.Name="NewArticle"
 If nt2003.ObjIsEmpty() Then
  sqlNew="select top 20 A.ArticleID,A.Title,A.Author,A.UpdateTime,A.Hits,A.ReadLevel,L.LayoutFileName from article A inner join Layout L on L.LayoutID=A.LayoutID where A.Deleted=False and A.Passed=True order by A.articleid desc"
  Set rsNew = nt2003.execute(sqlNew)
  if rsNew.bof and rsNew.eof then
   nt2003.value=""
  else
   nt2003.value = rsNew.GetString(,,"|||","@@@","")
  end if
  rsNew.close
  set rsNew=nothing
 end if
 if TitleLen<0 or TitleLen>255 then TitleLen=50
 if nt2003.value="" then
  tmpdata = "<font color=#ff9900>·&nbsp;</font>没有任何文章"
 else
  strrow=Split(nt2003.value,"@@@")
  dim loopnum
  if ArticleNum<UBound(strrow) then
   loopnum=ArticleNum-1
  else
   loopnum=UBound(strrow)-1
  end if
  for i = 0 to loopnum 
   strcol=Split(strrow(i),"|||")
   if strcol(5)=>Userlevel then
   tmpdata = tmpdata & "<table width=100%  border=0 cellpadding=0 cellspacing=0><tr><td><font color=#ff9900>·&nbsp;</font><a href='" & strcol(6) & "?ArticleID=" & strcol(0) &"' title='文章标题:" & strcol(1) & vbcrlf & "文章作者:" & strcol(2) & vbcrlf & "更新时间:" & strcol(3) & vbcrlf & "点击次数:" & strcol(4) & "' target='_blank'>" & gotTopic(strcol(1),TitleLen) & "</a></td><td width=50 align=right>"
   if datediff("d",strcol(3),date())<2 then  'By一枝梅
   tmpdata = tmpdata & "<img src="/images/news.gif" border='0' attle='两天内更新文章'>"
            end if 'By一枝梅
   if datediff("d",strcol(3),date())<2 then 'By一枝梅
   tmpdata = tmpdata & "</td><td width=50 align=right>[<font color=red>"
   else
   tmpdata = tmpdata & "</td><td width=50 align=right>[<font color=#999999>"
   end if 'By一枝梅
   if month(strcol(3))<10 then
   tmpdata = tmpdata & "0"
   end if
   tmpdata = tmpdata & month(strcol(3)) & "-"
   if day(strcol(3))<10 then
   tmpdata = tmpdata & "0"
   end if
   tmpdata = tmpdata & day(strcol(3)) & "</font>]</td></tr></table>"
                 end if
                next
 end if
 ShowNewArticle=tmpdata
end function

改成下面一段就可以了:

'=================================================
'过程名:ShowNewArticle
'作  用:显示最新文章
'参  数:ArticleNum  ----最多显示多少篇文章
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
function ShowNewArticle(ArticleNum,TitleLen)
 dim sqlNew,rsNew,strrow,strcol,i,tmpdata
 nt2003.Name="NewArticle"
 If nt2003.ObjIsEmpty() Then
  sqlNew="select top 20 A.ArticleID,A.Title,A.Author,A.UpdateTime,A.Hits,A.ReadLevel,L.LayoutFileName from article A inner join Layout L on L.LayoutID=A.LayoutID where A.Deleted=False and A.Passed=True order by A.articleid desc"
  Set rsNew = nt2003.execute(sqlNew)
  if rsNew.bof and rsNew.eof then
   nt2003.value=""
  else
   nt2003.value = rsNew.GetString(,,"|||","@@@","")
  end if
  rsNew.close
  set rsNew=nothing
 end if
 if TitleLen<0 or TitleLen>255 then TitleLen=50
 if nt2003.value="" then
  tmpdata = "<font color=#ff9900>·&nbsp;</font>没有任何文章"
 else
  strrow=Split(nt2003.value,"@@@")
  dim loopnum
  if ArticleNum<UBound(strrow) then
   loopnum=ArticleNum-1
  else
   loopnum=UBound(strrow)-1
  end if
  for i = 0 to loopnum 
   strcol=Split(strrow(i),"|||")
   tmpdata = tmpdata & "<table width=100%  border=0 cellpadding=0 cellspacing=0><tr><td><font color=#ff9900>·&nbsp;</font><a href='" & strcol(6) & "?ArticleID=" & strcol(0) &"' title='文章标题:" & strcol(1) & vbcrlf & "文章作者:" & strcol(2) & vbcrlf & "更新时间:" & strcol(3) & vbcrlf & "点击次数:" & strcol(4) & "' target='_blank'>" & gotTopic(strcol(1),TitleLen) & "</a></td><td align=right></td></tr></table>"   
 end if
 ShowNewArticle=tmpdata
end function


阅读全文 | 回复(0) | 引用通告 | 编辑
 


  • 标签:动易 3.62 
  • 发表评论:
    生物导航网博客欢迎您......



    Powered by Oblog.