3.2sp1友情连接错误的终结解决方案----[菜鸟版]_风讯Cms教程
俺是基本不懂什么程序的。只是通过版本的对比发现解决方法。使用之前请做好备份!高手跳过,菜鸟跟俺一起继续。。。。
用风讯默认的生成文字友情连接后发现有半截表格都没有填满就自动换行了。有好几个版本的友情连接都有问题要么挤到与堆了。
查找:/foosun/admin/ RefreshFunction.asp 这个文件
FriendLink = FriendLink & "<tr><td " & RowHeightStr & " >"
修改成
不过生成一看,有点像不规则列表了。也不受标签的控制显示多少列。自动换行。有点高档!不过在DW可视化编辑模式下发现根本看不到,估计是多生成了多余的tb 啊 tr之类的标签导致的。不过不会影响浏览。(缺点:假如你还做有图片友情连接的话,就生成的比较怪了。只排成一列啦,呵呵)
继续修改:于是用3.1正确的关于生成友情链接的那段代码,拷过来。不过要修改两个地方不然会出错误的
Select Case RefreshType 修改为 Select Case Fun_RefreshType
Temp_Str = AvailableDoMain & TTTemp 修改为 Temp_Str = GetConfig(0) & TTTemp
假如你懒得改就直接用:
'友情链接
Function FriendLink(LinkTypeStr,TitleNumberStr,PicWidthStr,PicHeightStr,LinkNumberStr,RowNumberStr,RowHeightStr,NewWindowTF)
Dim FriendLinkSql,RsFriendLinkObj,i
If TitleNumberStr <> "" then
TitleNumberStr = Cint(TitleNumberStr)
Else
TitleNumberStr = 10
End If
IF NewWindowTF = "1" Then
NewWindowTF = "target=""_blank"""
Else
NewWindowTF = ""
End IF
Select Case Fun_Refresh_Type
Case "Index"
FriendLinkSql = "Select Top " & LinkNumberStr & " * from FS_FriendLink where Address like '%1%' and Type=" & LinkTypeStr
Case "Class"
FriendLinkSql = "Select Top " & LinkNumberStr & " * from FS_FriendLink where Address like '%2%' and Type=" & LinkTypeStr
Case "News"
FriendLinkSql = "Select Top " & LinkNumberStr & " * from FS_FriendLink where Address like '%3%' and Type=" & LinkTypeStr
Case "Special"
FriendLinkSql = "Select Top " & LinkNumberStr & " * from FS_FriendLink where Address like '%4%' and Type=" & LinkTypeStr
Case Else
FriendLinkSql = ""
End Select
if FriendLinkSql <> "" then
Dim TTTemp,Temp_Str
Set RsFriendLinkObj = Conn.Execute(FriendLinkSql)
if Not RsFriendLinkObj.Eof then
if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
FriendLink = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">"
do while Not RsFriendLinkObj.Eof
FriendLink = FriendLink & "</tr>"
for i = 1 to RowNumberStr
if LinkTypeStr = "0" then
FriendLink = FriendLink & "<td " & RowHeightStr & " ><a href=""" & RsFriendLinkObj("Url") & """ "& NewWindowTF &">" & GotTopic(RsFriendLinkObj("Name"),TitleNumberStr) & "</a>"
else
TTTemp = RsFriendLinkObj("Content")
If Instr(1,LCase(TTTemp),"0/' target=_blank>http://",1)<>0 then
Temp_Str = TTTemp
Else
Temp_Str = GetConfig(0) & TTTemp
- 相关链接:
- 教程说明:
风讯Cms教程-3.2sp1友情连接错误的终结解决方案----[菜鸟版]。