如何去掉内容页上显示“文章来源”所带的链接?_动易Cms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

问题:升级到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

红色标记处,前者为作者的代码,后者为来源的代码。

查看更多 动易Cms教程  动易Cms模板

共2页上一页12下一页
来源:模板无忧//所属分类:动易Cms教程/更新时间:2008-02-26
相关动易Cms教程