問題:升級到SiteWeaver6.5版本后,發現文章內容頁的“文章來源”處帶上了鏈接,那么能不能讓{$CopyFrom}(顯示文章來源)這個標簽在解析的時候不要帶網址?
解決:可以的,修改Include/PowerEasy.Common.Content.asp中314行的Private Function GetCopyFromInfo(tmpCopyFrom, iChannelID)的相關代碼
原代碼如下:
Private Function GetAuthorInfo(tmpAuthorName, iChannelID)
Dim i, tempauthor, authorarry, temprs, temparr
If IsNull(tmpAuthorName) Or tmpAuthorName = "未知" Or tmpAuthorName = "佚名" Then
GetAuthorInfo = tmpAuthorName
Else
authorarry = Split(tmpAuthorName, "|")
For i = 0 To UBound(authorarry)
tempauthor = tempauthor & "<a href='" & strInstallDir & "ShowAuthor.asp?ChannelID=" & iChannelID & "&AuthorName=" & authorarry(i) & "' title='" & authorarry(i) & "'>" & GetSubStr(authorarry(i), AuthorInfoLen, True) & "</a>"
If i <> UBound(authorarry) Then tempauthor = tempauthor & "|"
Next
GetAuthorInfo = tempauthor
End If
End Function
Private Function GetCopyFromInfo(tmpCopyFrom, iChannelID)
Dim temprs, temparr
If IsNull(tmpCopyFrom) Or tmpCopyFrom = "本站原創" Then
GetCopyFromInfo = "本站原創"
Else
GetCopyFromInfo = "<a href='" & strInstallDir & "ShowCopyFrom.asp?ChannelID=" & iChannelID & "&SourceName=" & tmpCopyFrom & "'>" & tmpCopyFrom & "</a>"
End If
End Function
---------------------
修改為:
Private Function GetAuthorInfo(tmpAuthorName, iChannelID)
Dim i, tempauthor, authorarry, temprs, temparr
If IsNull(tmpAuthorName) Or tmpAuthorName = "未知" Or tmpAuthorName = "佚名" Then
GetAuthorInfo = tmpAuthorName
Else
authorarry = Split(tmpAuthorName, "|")
For i = 0 To UBound(authorarry)
tempauthor = tempauthor & GetSubStr(authorarry(i), AuthorInfoLen, True)
If i <> UBound(authorarry) Then tempauthor = tempauthor & "|"
Next
GetAuthorInfo = tempauthor
End If
End Function
Private Function GetCopyFromInfo(tmpCopyFrom, iChannelID)
Dim temprs, temparr
If IsNull(tmpCopyFrom) Or tmpCopyFrom = "本站原創" Then
GetCopyFromInfo = "本站原創"
Else
GetCopyFromInfo = tmpCopyFrom
End If
End Function
紅色標記處,前者為作者的代碼,后者為來源的代碼。
新聞熱點
疑難解答
圖片精選