安全、高速、放心的软件下载

动易SW6.8去除文章内容页来源和作者的超链接方法

时间:2019-05-21 09:22:48来源:本站原创人气:0

这几天好不容易找到的方法,先发布到网站上,方便以后自己查找。

修改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

 

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

注意:对于修改前已经生成的部分文章,记得要重新生成一遍。

网友评论