蓝雨 发表于 2008-6-27 09:54:15

摄影、图片、艺术、设计类论坛需求:图片帖子列表

下面的修改比较负责,建议修改之前备份

1、首先打开Index.asp文件:
在约31行处找到“Dim i,j,n,ii”,在后面增加

\'功能介绍:定义 topic_first_pic 所需变量
Dim KN_rs , KN_AnnounceID , KN_F_AnnounceID , KN_F_Filename , KN_F_FileType , KN_F_Viewname , KN_Img_Url

然后找到“Case \"boardid\": TPL_Echo TopTopic(1,i)”在后面增加:

\'功能介绍:读取固顶帖子中的第一张图片
Case \"topic_first_pic\"\'这里定义了“topic_first_pic”一个系统变量
   Set KN_rs=Dvbbs.Execute(\"select AnnounceID,RootID from where RootID=\"&TopTopic(0,i)&\" and BoardID=\"&TopTopic(1,i)&\" and ParentID=0 order by AnnounceID desc\")
   if KN_rs.eof and KN_rs.bof then
    KN_Img_Url=\"images/Topic_NoFirstPic.gif\"
   else
    KN_AnnounceID=KN_rs(\"AnnounceID\")
   end if
   KN_rs.close
   KN_F_AnnounceID=TopTopic(0,i)&\"|\"&KN_AnnounceID
   Set KN_rs=Dvbbs.Execute(\"Select top 1 F_ID,F_AnnounceID,F_BoardID,F_Filename,F_FileType,F_Viewname,F_OldName From where F_AnnounceID=\'\"&KN_F_AnnounceID&\"\' and F_BoardID=\"&TopTopic(1,i)&\" order by F_ID asc\")
   if KN_rs.eof and KN_rs.bof then
    KN_Img_Url=\"images/Topic_NoFirstPic.gif\"
   else
    KN_F_Filename=KN_rs(\"F_Filename\")
    KN_F_FileType=KN_rs(\"F_FileType\")
    KN_F_Viewname=KN_rs(\"F_Viewname\")
   end if
   KN_rs.close:set KN_rs=nothing
   if KN_F_FileType=\"jpg\" or KN_F_FileType=\"jpeg\" or KN_F_FileType=\"tif\" or KN_F_FileType=\"tiff\" or KN_F_FileType=\"png\" or KN_F_FileType=\"bmp\" then
    if KN_F_Viewname<>\"\" then
   KN_Img_Url=KN_F_Viewname
    else
   if KN_F_Filename<>\"\" then
      KN_Img_Url=KN_F_Filename
   else
      KN_Img_Url=\"images/Topic_NoFirstPic.gif\"
   end if
    end if
   else
    KN_Img_Url=\"images/Topic_NoFirstPic.gif\"
   end if
   TPL_Echo KN_Img_Url

然后找到“Case \"boardid\": TPL_Echo Topic(1,i)”,在后面增加:

**** Hidden Message *****
页: 1 2 [3]
查看完整版本: 摄影、图片、艺术、设计类论坛需求:图片帖子列表