账号通
    

账号  

密码  

3052

查看

4

回复
主题:[分享]关键字tags.asp页面调用图片的修改方法 [收藏主题] 转到:  
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2011/5/26 17:09:07   | 显示全部帖子 查看该作者主题 楼主 
科汛智能建站系统

这个页面默认是不支持调用图片的,需要改代码,修改步骤如下:



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>



增加红色的代码,进行图片调用。修改完这个文件后,到后台更新下缓存。前台即可看到效果

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行1.60352秒 powered by KesionCMS 9.0