首页 > 网站 > 建站经验 > 正文

最新新闻标签调用新闻标题后显示 是否图片新闻、点击次数等

2024-08-30 19:06:13
字体:
来源:转载
供稿:网友

打开/Foosun/Admin/Refresh/RefreshFunction.asp

找到 最新新闻标签函数 : Function LastNews(ClassEName

Set RsLastNewsObj = Conn.Execute(LastNewsSql)

LastNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
do while Not RsLastNewsObj.Eof
LastNews = LastNews & "<tr>" & Chr(13) & Chr(10)
for i = 1 to RowNumberStr

下面加

dim newshitsnums,ynpicnews,ispicnews,newsaddate,newshitsnum
newshitsnums = RsLastNewsObj("ClickNum")
newsaddate = FormatDateTime(RsLastNewsObj("AddDate"),2)
ispicnews = RsLastNewsObj("PicNewsTF")
newshitsnum = "<font color=""red"">"& newshitsnums &"</font>"
if ispicnews <> "1" then
ynpicnews = ""
else
ynpicnews = "<font color=""red"">"& "[" & "图" & "]" &"</font>"
end if

然后再修改下面的代码:(红色部分为添加)

LastNews = LastNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & GetCSSStyleStr(CSSStyleStr) & OpenTypeStr & " href=""" & GetOneNewsLinkURL(RsLastNewsObj("NewsID")) & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a>"& Chr(13) & Chr(13) & "(" &ynpicnews & Chr(13) & "[" & newshitsnum & "]" & Chr(13) & newsaddate & ")" & "</td>" & Chr(13) & Chr(10)

很抱歉,我不会写函数做整体调用,所以,其他标签要做修改的话,照着这个也可以,呵呵~ ^_^

效果如下:
按此在新窗口浏览图片

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表