这个页面默认是不支持调用图片的,需要改代码,修改步骤如下:
plus/tags.asp
找到
Select Case KS.C_S(SQL(0,K),6)
Case 1
SqlStr=SqlStr & "select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular," & SQL(0,K) & " as ChannelID,hits,Inputer As username,photourl From " & SQL(1,K)
case 2
SqlStr=SqlStr & "select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0 as Changes,AddDate,Popular," & SQL(0,K) & " as ChannelID,Hits,Inputer As username,photourl From " & SQL(1,K)
case 3
SqlStr=SqlStr & "select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0 as Changes,AddDate,Popular," & SQL(0,K) & " as ChannelID,Hits,Inputer As username,photourl From " & SQL(1,K)
case 4
SqlStr=SqlStr & "select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0 as Changes,AddDate,Popular," & SQL(0,K) & " as ChannelID,Hits,Inputer As username,photourl From " & SQL(1,K)
Case 5
SqlStr=SqlStr & "select ID,Title,Tid,0 as ReadPoint,0 as InfoPurview,Fname,0 as Changes,AddDate,Popular," & SQL(0,K) & " as ChannelID,Hits,Inputer As username,photourl From " & SQL(1,K)
Case 7
SqlStr=SqlStr & "select ID,Title,Tid,0 as ReadPoint,0 as InfoPurview,Fname,0 as Changes,AddDate,Popular," & SQL(0,K) & " as ChannelID,Hits,Inputer As username,photourl From " & SQL(1,K)
End Select
SqlStr="Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,ChannelID,hits,username,photourl From (" & SQLStr & ") a ORDER BY ADDDATE DESC,ID Asc"
红色为增加的代码。然后继续往下找
Do While Not RS.Eof
LC=LoopContent
Dim PhotoUrl:PhotoUrl=rs(12)
If KS.IsNul(PhotoUrl) Then PhotoUrl="../images/nopic.gif"
LC=Replace(LC,"{$PhotoUrl}",PhotoUrl)
LC=replace(LC,"{$Title}",rs(1))
If IsNull(rs(11)) or rs(11)="" Then
LC=replace(LC,"{$UserName}","-")
Else
LC=replace(LC,"{$UserName}",rs(11))
End If
LC=replace(LC,"{$Hits}",rs(10))
LC=replace(LC,"{$AddDate}",formatdatetime(rs(7),2))
LC=replace(LC,"{$ClassName}",KS.GetClassNP(rs(2)))
同样增加红色的代码。
接下来打开config/tags.xml
[loop]
<tr class="list">
<td>
<img src="{$PhotoUrl}" width="120" height="100"/>
<a href="{$Url}" target="_blank">{$Title}</a></td>
<td align="center">{$ClassName}</td>
<td align="center"><a href="../space/?{$UserName}" target="_blank">{$UserName}</a></td>
<td align="center">{$Hits}</td>
<td align="center">{$AddDate}</td>
</tr>
增加红色的代码,进行图片调用。修改完这个文件后,到后台更新下缓存。前台即可看到效果